about python3 and lyx
Hi lyxers! I have lyx 2.1.2 in both Windows 7 x64 and Ubuntu 14.04 x64, it runs fine when installing. Now my work depends a lot on python, specifically on python 3.4 which is the default in both of my systems. I have managed to run python scripts within lyx and then the problem arises: lyx have its own bundled python distribution in windows, so every python script runs in the bundled version which is python 2.7, so my scripts doesn´t run on windows. I tried to change the default python version in lyx so it is forced to us python3 and then it crashed because a lot of its default scripts doesn´t run anymore (ie, the reconfigure.py script). I know in linux there is both python 2.7 and 3.4 living together and you can select between them, but in windows I can´t manage to achieve this behavior. My questions are exclusive (or not) 1. Is there a plan to move everything to python3 so we can finally forget the old python2? Or 2. Is there a way to have both python3 and bundled python version in lyx living together in windows? Any hints? Best Regards Descripción: firma_Alex Alex Vergara Gil MSc Nuclear Physics Center for Radiation Protection and Hygiene Secondary Standard Dosimetry Laboratory Havana, Cuba
about python3 and lyx
Hi lyxers! I have lyx 2.1.2 in both Windows 7 x64 and Ubuntu 14.04 x64, it runs fine when installing. Now my work depends a lot on python, specifically on python 3.4 which is the default in both of my systems. I have managed to run python scripts within lyx and then the problem arises: lyx have its own bundled python distribution in windows, so every python script runs in the bundled version which is python 2.7, so my scripts doesn´t run on windows. I tried to change the default python version in lyx so it is forced to us python3 and then it crashed because a lot of its default scripts doesn´t run anymore (ie, the reconfigure.py script). I know in linux there is both python 2.7 and 3.4 living together and you can select between them, but in windows I can´t manage to achieve this behavior. My questions are exclusive (or not) 1. Is there a plan to move everything to python3 so we can finally forget the old python2? Or 2. Is there a way to have both python3 and bundled python version in lyx living together in windows? Any hints? Best Regards Descripción: firma_Alex Alex Vergara Gil MSc Nuclear Physics Center for Radiation Protection and Hygiene Secondary Standard Dosimetry Laboratory Havana, Cuba
about python3 and lyx
Hi lyxers! I have lyx 2.1.2 in both Windows 7 x64 and Ubuntu 14.04 x64, it runs fine when installing. Now my work depends a lot on python, specifically on python 3.4 which is the default in both of my systems. I have managed to run python scripts within lyx and then the problem arises: lyx have its own bundled python distribution in windows, so every python script runs in the bundled version which is python 2.7, so my scripts doesn´t run on windows. I tried to change the default python version in lyx so it is forced to us python3 and then it crashed because a lot of its default scripts doesn´t run anymore (ie, the reconfigure.py script). I know in linux there is both python 2.7 and 3.4 living together and you can select between them, but in windows I can´t manage to achieve this behavior. My questions are exclusive (or not) 1. Is there a plan to move everything to python3 so we can finally forget the old python2? Or 2. Is there a way to have both python3 and bundled python version in lyx living together in windows? Any hints? Best Regards Descripción: firma_Alex Alex Vergara Gil MSc Nuclear Physics Center for Radiation Protection and Hygiene Secondary Standard Dosimetry Laboratory Havana, Cuba
RE: figure covering two pages
-Mensaje original- De: Wolfgang Engelmann Enviado el: Lunes, 30 de Junio de 2014 05:55 p.m. How can I insert a large figure which expands over two pages? I use Debian and Koma script book style A5 format. The figure should be landscape on both pages Wolfgang Open the figure in Krita/GIMP create two new figures by cutting the original in two halves insert each half into a new graphic, using fit 100% to page and definitively here as position good luck! Alex
RE: figure covering two pages
-Mensaje original- De: Wolfgang Engelmann Enviado el: Lunes, 30 de Junio de 2014 08:19 p.m. Am 30.06.2014 19:21, schrieb Alex Vergara Gil: Open the figure in Krita/GIMP create two new figures by cutting the original in two halves insert each half into a new graphic, using fit 100% to page and definitively here as position Thanks, Alex, The upper half of the figure is rather broad, it therefore is not reaching the lower rim of the page, not to speak of the legend. This should be placed underneath the second part of the figure on the page opposing the first part. Proposals? Wolfgang Yes I forgot to mention to rotate the two halves by 90 degres so they will fit your page, sorry!
RE: figure covering two pages
-Mensaje original- De: Wolfgang Engelmann Enviado el: Lunes, 30 de Junio de 2014 05:55 p.m. How can I insert a large figure which expands over two pages? I use Debian and Koma script book style A5 format. The figure should be landscape on both pages Wolfgang Open the figure in Krita/GIMP create two new figures by cutting the original in two halves insert each half into a new graphic, using fit 100% to page and definitively here as position good luck! Alex
RE: figure covering two pages
-Mensaje original- De: Wolfgang Engelmann Enviado el: Lunes, 30 de Junio de 2014 08:19 p.m. Am 30.06.2014 19:21, schrieb Alex Vergara Gil: Open the figure in Krita/GIMP create two new figures by cutting the original in two halves insert each half into a new graphic, using fit 100% to page and definitively here as position Thanks, Alex, The upper half of the figure is rather broad, it therefore is not reaching the lower rim of the page, not to speak of the legend. This should be placed underneath the second part of the figure on the page opposing the first part. Proposals? Wolfgang Yes I forgot to mention to rotate the two halves by 90 degres so they will fit your page, sorry!
RE: figure covering two pages
> -Mensaje original- De: Wolfgang Engelmann Enviado el: Lunes, 30 de Junio de 2014 05:55 p.m. > > How can I insert a large figure which expands over two pages? > I use Debian and Koma script book style A5 format. > The figure should be landscape on both pages Wolfgang > Open the figure in Krita/GIMP create two new figures by cutting the original in two halves insert each half into a new graphic, using fit 100% to page and definitively here as position good luck! Alex
RE: figure covering two pages
> -Mensaje original- De: Wolfgang Engelmann Enviado el: Lunes, 30 de Junio de 2014 08:19 p.m. > > Am 30.06.2014 19:21, schrieb Alex Vergara Gil: > > Open the figure in Krita/GIMP > > create two new figures by cutting the original in two halves insert > > each half into a new graphic, using fit 100% to page and definitively > > here as position > Thanks, Alex, > The upper half of the figure is rather broad, it therefore is not reaching the > lower rim of the page, not to speak of the legend. This should be placed > underneath the second part of the figure on the page opposing the first part. > Proposals? > Wolfgang > Yes I forgot to mention to rotate the two halves by 90 degres so they will fit your page, sorry!
Re: Python Graphics in LyX [was: Python bindings]
- Original Message - From: Ross Reyes philip_...@yahoo.com Sent: Thursday, June 12, 2014 12:50 PM On 6/11/2014 12:41 PM, Rainer M Krug wrote: Envoyé de mon iPhone Le 11 juin 2014 à 16:07, Ross Reyes philip_...@yahoo.com a écrit : Hi Alex, I still get the error converting to loadable format message. I can run the python script from the command line and it does work. I can and have modified the .pygr script to produce other outputs in .png, .jpg, .ps, etc. without problem. If the scripts work fine outside LyX then your problem is with your LyX instalation. The only thing I can suggest is to update at least to version 2.0.3 which is the one I have tested in my debian system. But inside LyX, regardless of what I do to define the converter, I can not get the image to render nor can I produce a .pdf output from the LyX doc. Something is not right. I am using LyX 2.0.1 The converters are defined in the configuration file LyX. If you could take a loom at it and post the lines where you file formats and the converters are defined, one could see if there is something wrong. I don't have LyX at hand, so I can't give you the location of the config file. Cheers, Rainer Hi Rainer, I have this in my preferences file for pygr fomat and converter. # # FORMATS SECTION ## # \format pdf4 pdf PDF (xelatex) document,vector,menu=export \format pygr pygr Python Graphics auto auto vector \default_view_format ps # # CONVERTERS SECTION ## # \converter pdflatex pdf4 xelatex $$i latex=pdflatex \converter eps png epstopng.bat $$i \converter pygr png python $$i $$o All of this seems ok, take into account that if you are on Windows the correct converter line should be \converter pygr png python -tt $$i $$o but it would be better if you to have \converter pygr eps python $$i $$o on Linux \converter pygr eps python -tt $$i $$o on Windows
Re: Python Graphics in LyX [was: Python bindings]
- Original Message - From: Ross Reyes philip_...@yahoo.com Sent: Thursday, June 12, 2014 12:50 PM On 6/11/2014 12:41 PM, Rainer M Krug wrote: Envoyé de mon iPhone Le 11 juin 2014 à 16:07, Ross Reyes philip_...@yahoo.com a écrit : Hi Alex, I still get the error converting to loadable format message. I can run the python script from the command line and it does work. I can and have modified the .pygr script to produce other outputs in .png, .jpg, .ps, etc. without problem. If the scripts work fine outside LyX then your problem is with your LyX instalation. The only thing I can suggest is to update at least to version 2.0.3 which is the one I have tested in my debian system. But inside LyX, regardless of what I do to define the converter, I can not get the image to render nor can I produce a .pdf output from the LyX doc. Something is not right. I am using LyX 2.0.1 The converters are defined in the configuration file LyX. If you could take a loom at it and post the lines where you file formats and the converters are defined, one could see if there is something wrong. I don't have LyX at hand, so I can't give you the location of the config file. Cheers, Rainer Hi Rainer, I have this in my preferences file for pygr fomat and converter. # # FORMATS SECTION ## # \format pdf4 pdf PDF (xelatex) document,vector,menu=export \format pygr pygr Python Graphics auto auto vector \default_view_format ps # # CONVERTERS SECTION ## # \converter pdflatex pdf4 xelatex $$i latex=pdflatex \converter eps png epstopng.bat $$i \converter pygr png python $$i $$o All of this seems ok, take into account that if you are on Windows the correct converter line should be \converter pygr png python -tt $$i $$o but it would be better if you to have \converter pygr eps python $$i $$o on Linux \converter pygr eps python -tt $$i $$o on Windows
Re: Python Graphics in LyX [was: Python bindings]
- Original Message - From: "Ross Reyes"Sent: Thursday, June 12, 2014 12:50 PM On 6/11/2014 12:41 PM, Rainer M Krug wrote: Envoyé de mon iPhone Le 11 juin 2014 à 16:07, Ross Reyes a écrit : Hi Alex, I still get the "error converting to loadable format" message. I can run the python script from the command line and it does work. I can and have modified the .pygr script to produce other outputs in .png, .jpg, .ps, etc. without problem. If the scripts work fine outside LyX then your problem is with your LyX instalation. The only thing I can suggest is to update at least to version 2.0.3 which is the one I have tested in my debian system. But inside LyX, regardless of what I do to define the converter, I can not get the image to render nor can I produce a .pdf output from the LyX doc. Something is not right. I am using LyX 2.0.1 The converters are defined in the configuration file LyX. If you could take a loom at it and post the lines where you file formats and the converters are defined, one could see if there is something wrong. I don't have LyX at hand, so I can't give you the location of the config file. Cheers, Rainer Hi Rainer, I have this in my preferences file for pygr fomat and converter. # # FORMATS SECTION ## # \format "pdf4" "pdf" "PDF (xelatex)" "" "" "" "document,vector,menu=export" \format "pygr" "pygr" "Python Graphics" "" "auto" "auto" "vector" \default_view_format ps # # CONVERTERS SECTION ## # \converter "pdflatex" "pdf4" "xelatex $$i" "latex=pdflatex" \converter "eps" "png" "epstopng.bat $$i" "" \converter "pygr" "png" "python $$i $$o" "" All of this seems ok, take into account that if you are on Windows the correct converter line should be \converter "pygr" "png" "python -tt $$i $$o" "" but it would be better if you to have \converter "pygr" "eps" "python $$i $$o" "" on Linux \converter "pygr" "eps" "python -tt $$i $$o" "" on Windows
Re: Python Graphics in LyX [was: Python bindings]
Dear all I have rewritten a little the procedure using recommendations from several users that doesn´t understand the original one. I hope this time everyone can understand the procedure. Regards Alex - Original Message - From: Wolfgang Engelmann To: lyx-users@lists.lyx.org Sent: Tuesday, June 10, 2014 2:56 AM Subject: Re: Python Graphics in LyX [was: Python bindings] I retryed again and now got the PythonGraphicsLyX converter after reconfiguring, but running it gives me: LaTeX Warning: File `0_home_we_Lyx_PhytonGraphics_example.pdf' not found on inp ut line 80. shouldn't it load example.pygr, which I selected in my folder PhytonGraphics containing all the files supplied by Alex? Do I have to use instead of viewpdflatex something else for export? Wolfgang ! Package pdftex.def Error: File `0_home_we_Lyx_PhytonGraphics_example.pdf' not found. See the pdftex.def package documentation for explanation. Type H return for immediate help. ... Am 10.06.2014 09:00, schrieb Wolfgang Engelmann: Am 09.06.2014 21:42, schrieb Alex Vergara Gil: - Original Message - From: Wolfgang Engelmann To: lyx-users@lists.lyx.org Sent: Monday, June 09, 2014 12:55 PM Subject: Re: Python Graphics in LyX [was: Python bindings] where in lyx is this done?-- Define a new converter from Python graphics to EPS as python $$i $$o Wolfgang If you have followed the little manual you know in tools - preferences there is two options, one that says file types and the other says converters in the first you define the Python graphics file type in the second you define the converter regards Alex Thanks Alex, still not there. First: Could one change in the instruction of the PythonGraphics.lyx Define a new file format, name it Python graphics, extension pygr and vector image format ticked to: Define a new file format in toolspreferences, name it Python graphics, extension pygr and vector image format ticked Second: in Converters - Converter Definitions I guess I have to add python $$i $$o in the Converter: line. However, Add on the right side of the Converter Definitions is greyed out. So, how do I do that? Wolfgang __ Información de ESET NOD32 Antivirus, versión de la base de firmas de virus 9900 (20140605) __ ESET NOD32 Antivirus ha comprobado este mensaje. http://www.eset.com Python Graphics.lyx Description: Binary data
Re: Inserting text (instead of graphics) from code into LyX?
- Original Message - From: Rainer M Krug rai...@krugs.de Sent: Tuesday, June 10, 2014 3:26 AM Hi In the thread Python Graphics in LyX it was shown nicely how other programming languages can be used to include grahics generated by these into a LyX Document. That made me thinking: How can I do the same for text files generated by these external code blocks? Obviously, this depends on the format of the text (ascii, LaTeX, others?). What would be the workflow? Does the text has to be in a file (I assume) or could it be redirected directly into LyX? Somehow I have the feeling I am missing something trivial here... Cheers, Rainer Indeed! It can be produced as well, just define a python normal text file format type (as pytxt) and in the converter just add from the pytxt format to simple text format as python $$i $$o in the python script you have to output everything to a text file using the lines import sys outputfile = open(sys.argv[1]) outputfile.write('testing') outputfile.close Voilá! it works with text too Moreover in the converter you can define a csv output format and python handles well with csv, so I give you the rod, now fish something ;) Cheers, Alex
Re: Inserting text (instead of graphics) from code into LyX?
Better than ever I've found that the pandas package in python handles with excel files and produces tables in csv too, so it can be used to read excel files as input, process a little and output csv tables which can be read by LyX as external documents (child) The panorama becomes interesting! Alex
Re: Inserting text (instead of graphics) from code into LyX?
- Original Message - From: Rainer M Krug Sent: Tuesday, June 10, 2014 9:09 AM OK - spreadsheets work via the external documents. But have you found a way of including normal txt files as verbatim? One could always use good old ert (e.g. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=verbfile) But this would not provide preview. Rainer No, no preview in the case of text I fear. It should be implemented in the LyX code. Developers should handle this kind of things, if they already support image preview, why not supporting external material preview as well? They should answer this. TAIK! Cheers Alex
Re: Python Graphics in LyX [was: Python bindings]
- Original Message - From: Wolfgang Engelmann Sent: Tuesday, June 10, 2014 2:19 PM Thanks, Alex, for the new lyx file. I now realized, that I had to load the matplotlib and pandas packages, which I did. I followed your advices Define a new file format in toolspreferences, name it Python graphics, extension pygr and vector image format ticked Define a new converter from the format Python graphics to the format EPS as ... After reconfigure (necessary?) and making sure the two example graphics (in pygr format) are found in the path I get this error No, reconfigure is not necessary LaTeX Warning: File `0_home_we_Lyx_PhytonGraphics_example.eps' not found on input line 83. Why is it expecting an eps file instead of taking the pygr files? indeed a eps file is expected What am I missing? Wolfgang Did you can see the graphic within LyX? Did LyX display it correctly in your system? if not the case check that the example script is located at the same path than the lyx file, another way is to click in the inserted graphic and look for the example.pygr path Another possible explanation is that your system doesn't handle with eps, in this case you should change the definition and instead of eps, put pdf or png as final format, whichever work for you, you can check that because it will display the graphic within LyX even before you export anything! Regards Alex
Re: Python Graphics in LyX [was: Python bindings]
Dear all I have rewritten a little the procedure using recommendations from several users that doesn´t understand the original one. I hope this time everyone can understand the procedure. Regards Alex - Original Message - From: Wolfgang Engelmann To: lyx-users@lists.lyx.org Sent: Tuesday, June 10, 2014 2:56 AM Subject: Re: Python Graphics in LyX [was: Python bindings] I retryed again and now got the PythonGraphicsLyX converter after reconfiguring, but running it gives me: LaTeX Warning: File `0_home_we_Lyx_PhytonGraphics_example.pdf' not found on inp ut line 80. shouldn't it load example.pygr, which I selected in my folder PhytonGraphics containing all the files supplied by Alex? Do I have to use instead of viewpdflatex something else for export? Wolfgang ! Package pdftex.def Error: File `0_home_we_Lyx_PhytonGraphics_example.pdf' not found. See the pdftex.def package documentation for explanation. Type H return for immediate help. ... Am 10.06.2014 09:00, schrieb Wolfgang Engelmann: Am 09.06.2014 21:42, schrieb Alex Vergara Gil: - Original Message - From: Wolfgang Engelmann To: lyx-users@lists.lyx.org Sent: Monday, June 09, 2014 12:55 PM Subject: Re: Python Graphics in LyX [was: Python bindings] where in lyx is this done?-- Define a new converter from Python graphics to EPS as python $$i $$o Wolfgang If you have followed the little manual you know in tools - preferences there is two options, one that says file types and the other says converters in the first you define the Python graphics file type in the second you define the converter regards Alex Thanks Alex, still not there. First: Could one change in the instruction of the PythonGraphics.lyx Define a new file format, name it Python graphics, extension pygr and vector image format ticked to: Define a new file format in toolspreferences, name it Python graphics, extension pygr and vector image format ticked Second: in Converters - Converter Definitions I guess I have to add python $$i $$o in the Converter: line. However, Add on the right side of the Converter Definitions is greyed out. So, how do I do that? Wolfgang __ Información de ESET NOD32 Antivirus, versión de la base de firmas de virus 9900 (20140605) __ ESET NOD32 Antivirus ha comprobado este mensaje. http://www.eset.com Python Graphics.lyx Description: Binary data
Re: Inserting text (instead of graphics) from code into LyX?
- Original Message - From: Rainer M Krug rai...@krugs.de Sent: Tuesday, June 10, 2014 3:26 AM Hi In the thread Python Graphics in LyX it was shown nicely how other programming languages can be used to include grahics generated by these into a LyX Document. That made me thinking: How can I do the same for text files generated by these external code blocks? Obviously, this depends on the format of the text (ascii, LaTeX, others?). What would be the workflow? Does the text has to be in a file (I assume) or could it be redirected directly into LyX? Somehow I have the feeling I am missing something trivial here... Cheers, Rainer Indeed! It can be produced as well, just define a python normal text file format type (as pytxt) and in the converter just add from the pytxt format to simple text format as python $$i $$o in the python script you have to output everything to a text file using the lines import sys outputfile = open(sys.argv[1]) outputfile.write('testing') outputfile.close Voilá! it works with text too Moreover in the converter you can define a csv output format and python handles well with csv, so I give you the rod, now fish something ;) Cheers, Alex
Re: Inserting text (instead of graphics) from code into LyX?
Better than ever I've found that the pandas package in python handles with excel files and produces tables in csv too, so it can be used to read excel files as input, process a little and output csv tables which can be read by LyX as external documents (child) The panorama becomes interesting! Alex
Re: Inserting text (instead of graphics) from code into LyX?
- Original Message - From: Rainer M Krug Sent: Tuesday, June 10, 2014 9:09 AM OK - spreadsheets work via the external documents. But have you found a way of including normal txt files as verbatim? One could always use good old ert (e.g. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=verbfile) But this would not provide preview. Rainer No, no preview in the case of text I fear. It should be implemented in the LyX code. Developers should handle this kind of things, if they already support image preview, why not supporting external material preview as well? They should answer this. TAIK! Cheers Alex
Re: Python Graphics in LyX [was: Python bindings]
- Original Message - From: Wolfgang Engelmann Sent: Tuesday, June 10, 2014 2:19 PM Thanks, Alex, for the new lyx file. I now realized, that I had to load the matplotlib and pandas packages, which I did. I followed your advices Define a new file format in toolspreferences, name it Python graphics, extension pygr and vector image format ticked Define a new converter from the format Python graphics to the format EPS as ... After reconfigure (necessary?) and making sure the two example graphics (in pygr format) are found in the path I get this error No, reconfigure is not necessary LaTeX Warning: File `0_home_we_Lyx_PhytonGraphics_example.eps' not found on input line 83. Why is it expecting an eps file instead of taking the pygr files? indeed a eps file is expected What am I missing? Wolfgang Did you can see the graphic within LyX? Did LyX display it correctly in your system? if not the case check that the example script is located at the same path than the lyx file, another way is to click in the inserted graphic and look for the example.pygr path Another possible explanation is that your system doesn't handle with eps, in this case you should change the definition and instead of eps, put pdf or png as final format, whichever work for you, you can check that because it will display the graphic within LyX even before you export anything! Regards Alex
Re: Python Graphics in LyX [was: Python bindings]
Dear all I have rewritten a little the procedure using recommendations from several users that doesn´t understand the original one. I hope this time everyone can understand the procedure. Regards Alex - Original Message - From: Wolfgang Engelmann To: lyx-users@lists.lyx.org Sent: Tuesday, June 10, 2014 2:56 AM Subject: Re: Python Graphics in LyX [was: Python bindings] I retryed again and now got the PythonGraphics>LyX converter after reconfiguring, but running it gives me: LaTeX Warning: File `0_home_we_Lyx_PhytonGraphics_example.pdf' not found on inp ut line 80. shouldn't it load example.pygr, which I selected in my folder PhytonGraphics containing all the files supplied by Alex? Do I have to use instead of view>pdflatex something else for export? Wolfgang ! Package pdftex.def Error: File `0_home_we_Lyx_PhytonGraphics_example.pdf' not found. See the pdftex.def package documentation for explanation. Type H for immediate help. ... Am 10.06.2014 09:00, schrieb Wolfgang Engelmann: Am 09.06.2014 21:42, schrieb Alex Vergara Gil: - Original Message - From: Wolfgang Engelmann To: lyx-users@lists.lyx.org Sent: Monday, June 09, 2014 12:55 PM Subject: Re: Python Graphics in LyX [was: Python bindings] where in lyx is this done?--> Define a new converter from Python graphics to EPS as python $$i $$o Wolfgang If you have followed the little manual you know in tools - preferences there is two options, one that says file types and the other says converters in the first you define the Python graphics file type in the second you define the converter regards Alex Thanks Alex, still not there. First: Could one change in the instruction of the PythonGraphics.lyx Define a new file format, name it Python graphics, extension pygr and vector image format ticked to: Define a new file format in tools>preferences, name it Python graphics, extension pygr and vector image format ticked Second: in Converters - Converter Definitions I guess I have to add python $$i $$o in the Converter: line. However, Add on the right side of the Converter Definitions is greyed out. So, how do I do that? Wolfgang __ Información de ESET NOD32 Antivirus, versión de la base de firmas de virus 9900 (20140605) __ ESET NOD32 Antivirus ha comprobado este mensaje. http://www.eset.com Python Graphics.lyx Description: Binary data
Re: Inserting text (instead of graphics) from code into LyX?
- Original Message - From: "Rainer M Krug"Sent: Tuesday, June 10, 2014 3:26 AM Hi In the thread "Python Graphics in LyX" it was shown nicely how other programming languages can be used to include grahics generated by these into a LyX Document. That made me thinking: How can I do the same for text files generated by these external code blocks? Obviously, this depends on the format of the text (ascii, LaTeX, others?). What would be the workflow? Does the text has to be in a file (I assume) or could it be redirected directly into LyX? Somehow I have the feeling I am missing something trivial here... Cheers, Rainer Indeed! It can be produced as well, just define a python normal text file format type (as pytxt) and in the converter just add from the pytxt format to simple text format as python $$i $$o in the python script you have to output everything to a text file using the lines import sys outputfile = open(sys.argv[1]) outputfile.write('testing') outputfile.close Voilá! it works with text too Moreover in the converter you can define a csv output format and python handles well with csv, so I give you the rod, now fish something ;) Cheers, Alex
Re: Inserting text (instead of graphics) from code into LyX?
Better than ever I've found that the pandas package in python handles with excel files and produces tables in csv too, so it can be used to read excel files as input, process a little and output csv tables which can be read by LyX as external documents (child) The panorama becomes interesting! Alex
Re: Inserting text (instead of graphics) from code into LyX?
- Original Message - From: "Rainer M Krug" Sent: Tuesday, June 10, 2014 9:09 AM OK - spreadsheets work via the "external documents". But have you found a way of including "normal" txt files as verbatim? One could always use good old ert (e.g. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=verbfile) But this would not provide preview. Rainer No, no preview in the case of text I fear. It should be implemented in the LyX code. Developers should handle this kind of things, if they already support image preview, why not supporting external material preview as well? They should answer this. TAIK! Cheers Alex
Re: Python Graphics in LyX [was: Python bindings]
- Original Message - From: Wolfgang Engelmann Sent: Tuesday, June 10, 2014 2:19 PM Thanks, Alex, for the new lyx file. I now realized, that I had to load the matplotlib and pandas packages, which I did. I followed your advices Define a new file format in tools>preferences, name it Python graphics, extension pygr and vector image format ticked Define a new converter from the format Python graphics to the format EPS as ... After reconfigure (necessary?) and making sure the two example graphics (in pygr format) are found in the path I get this error No, reconfigure is not necessary LaTeX Warning: File `0_home_we_Lyx_PhytonGraphics_example.eps' not found on input line 83. Why is it expecting an eps file instead of taking the pygr files? indeed a eps file is expected What am I missing? Wolfgang Did you can see the graphic within LyX? Did LyX display it correctly in your system? if not the case check that the example script is located at the same path than the lyx file, another way is to click in the inserted graphic and look for the example.pygr path Another possible explanation is that your system doesn't handle with eps, in this case you should change the definition and instead of eps, put pdf or png as final format, whichever work for you, you can check that because it will display the graphic within LyX even before you export anything! Regards Alex
Re: Python Graphics in LyX [was: Python bindings]
- Original Message - From: Kornel Benko Sent: Monday, June 09, 2014 8:40 AM Am Montag, 9. Juni 2014 um 08:07:16, schrieb Alex Vergara Gil a...@cphr.edu.cu Dear Lyxers! Studying a little of python and LyX I have reached to this feature that makes LyX show and process python graphics. Thanks to Rainer M Krug for the hints. I share this contribution for LyX under LGPL license, so everyone benefits from it. Good luck and happy lyxing! Alex Vergara Gil MSc Nuclear Physics SSDL, CPHR, Havana Cuba PS: If Rainer agree, pass him from acknowledgements to author list, please. Trying # python example.pygr x.eps I saw, I had to install matplotlib and pandas. Thats OK, this example shows now in lyx too. Fortunately it was included in debian package manager. Indeed, to obtain python graphics matplotlib is required, pandas is a robust library to handle with complex data. Both are in any package manager. The fact that this displays in lyx too is a very nice extra. My first intention was to have a module that insert python code and executes it, but this way is far simpler and reaches the same objective. But the try # python example2.pygr x.eps leads to ImportError: No module named seaborn After installing also python-pip and using # sudo pip install seaborn I got the expected output. This should be documented somewhere I think. Nice work. Kornel In this case my intention was to show that any other python library can be used as well, and it is expected a little knowledge of python from the user, since it is the user itself who will build its own graphic script. But your hint is valid, it should be documented how to obtain extra python packages too. Regards Alex
Re: Python Graphics in LyX [was: Python bindings]
- Original Message - From: Wolfgang Engelmann To: lyx-users@lists.lyx.org Sent: Monday, June 09, 2014 12:55 PM Subject: Re: Python Graphics in LyX [was: Python bindings] where in lyx is this done?-- Define a new converter from Python graphics to EPS as python $$i $$o Wolfgang If you have followed the little manual you know in tools - preferences there is two options, one that says file types and the other says converters in the first you define the Python graphics file type in the second you define the converter regards Alex
Re: Python Graphics in LyX [was: Python bindings]
- Original Message - From: Kornel Benko Sent: Monday, June 09, 2014 8:40 AM Am Montag, 9. Juni 2014 um 08:07:16, schrieb Alex Vergara Gil a...@cphr.edu.cu Dear Lyxers! Studying a little of python and LyX I have reached to this feature that makes LyX show and process python graphics. Thanks to Rainer M Krug for the hints. I share this contribution for LyX under LGPL license, so everyone benefits from it. Good luck and happy lyxing! Alex Vergara Gil MSc Nuclear Physics SSDL, CPHR, Havana Cuba PS: If Rainer agree, pass him from acknowledgements to author list, please. Trying # python example.pygr x.eps I saw, I had to install matplotlib and pandas. Thats OK, this example shows now in lyx too. Fortunately it was included in debian package manager. Indeed, to obtain python graphics matplotlib is required, pandas is a robust library to handle with complex data. Both are in any package manager. The fact that this displays in lyx too is a very nice extra. My first intention was to have a module that insert python code and executes it, but this way is far simpler and reaches the same objective. But the try # python example2.pygr x.eps leads to ImportError: No module named seaborn After installing also python-pip and using # sudo pip install seaborn I got the expected output. This should be documented somewhere I think. Nice work. Kornel In this case my intention was to show that any other python library can be used as well, and it is expected a little knowledge of python from the user, since it is the user itself who will build its own graphic script. But your hint is valid, it should be documented how to obtain extra python packages too. Regards Alex
Re: Python Graphics in LyX [was: Python bindings]
- Original Message - From: Wolfgang Engelmann To: lyx-users@lists.lyx.org Sent: Monday, June 09, 2014 12:55 PM Subject: Re: Python Graphics in LyX [was: Python bindings] where in lyx is this done?-- Define a new converter from Python graphics to EPS as python $$i $$o Wolfgang If you have followed the little manual you know in tools - preferences there is two options, one that says file types and the other says converters in the first you define the Python graphics file type in the second you define the converter regards Alex
Re: Python Graphics in LyX [was: Python bindings]
- Original Message - From: "Kornel Benko" Sent: Monday, June 09, 2014 8:40 AM Am Montag, 9. Juni 2014 um 08:07:16, schrieb Alex Vergara Gil <a...@cphr.edu.cu> > Dear Lyxers! > > Studying a little of python and LyX I have reached to this feature that makes > LyX show and process python graphics. Thanks to Rainer M Krug for the hints. > I share this contribution for LyX under LGPL license, so everyone benefits > from it. Good luck and happy lyxing! > > Alex Vergara Gil > MSc Nuclear Physics > SSDL, CPHR, Havana Cuba > > PS: If Rainer agree, pass him from acknowledgements to author list, please. Trying # python example.pygr x.eps I saw, I had to install matplotlib and pandas. Thats OK, this example shows now in lyx too. Fortunately it was included in debian package manager. Indeed, to obtain python graphics matplotlib is required, pandas is a robust library to handle with complex data. Both are in any package manager. The fact that this displays in lyx too is a very nice extra. My first intention was to have a module that insert python code and executes it, but this way is far simpler and reaches the same objective. But the try # python example2.pygr x.eps leads to ImportError: No module named seaborn After installing also python-pip and using # sudo pip install seaborn I got the expected output. This should be documented somewhere I think. Nice work. Kornel In this case my intention was to show that any other python library can be used as well, and it is expected a little knowledge of python from the user, since it is the user itself who will build its own graphic script. But your hint is valid, it should be documented how to obtain extra python packages too. Regards Alex
Re: Python Graphics in LyX [was: Python bindings]
- Original Message - From: Wolfgang Engelmann To: lyx-users@lists.lyx.org Sent: Monday, June 09, 2014 12:55 PM Subject: Re: Python Graphics in LyX [was: Python bindings] where in lyx is this done?--> Define a new converter from Python graphics to EPS as python $$i $$o Wolfgang If you have followed the little manual you know in tools - preferences there is two options, one that says file types and the other says converters in the first you define the Python graphics file type in the second you define the converter regards Alex
Re: [Feature Request] python binding
From: Richard Heck rgh...@lyx.org Sent: Thursday, May 29, 2014 5:05 PM I might be *completely* off, but couldn't you achieve exactly this via defining converters? I have for example a converter defined, which converts plantuml source fields into uml graphs, i.e. it defines the call to compile them and return the graphs which are then inserted in the document? Yes, that's more or less what I was suggesting. rh Let's see if I understand: 1. I wrote a python script that produces the graphic I want 2. I insert it in LyX somehow I don't know, perhaps defining a converter from .py to svg, but this needs to be inside a module or every python script in LyX will try to be converted into a svg!! So a module is also needed 3. LyX is the one who knows the correct size of the graphic so in principle if I produce a svg should be enough but in this way I need to produce a new svg every time the data change Take this simple script as example import numpy as np from numpy.random import randn import matplotlib as mpl import matplotlib.pyplot as plt np.random.seed(9221999) data = randn(75) plt.hist(data) which produce a graphic like this in spyder So basically I save this graphic to a svg and then I load it into LyX, but why not letting LyX doing this automatically if it already handles with python?? This is my question. Regards Alex
Re: [Feature Request] python binding
This might work!! Thanks for the suggestions, I will try it extensively and I will comments my experiences afterwards. It seems it also renders the graphic inside LyX itself! That's what I was talking about. Regards Alex - Original Message - From: Rainer M Krug rai...@krugs.de To: Alex Vergara Gil a...@cphr.edu.cu Cc: Richard Heck rgh...@lyx.org; lyx-users Users lyx-users@lists.lyx.org; lyx-de...@lists.lyx.org Sent: Monday, June 02, 2014 8:31 AM Subject: Re: [Feature Request] python binding I just add comments inline Let's see if I understand: -1. You define a *file type* in LyX under Preferences File Handling File Formats for the file type .pygr in which Vector graphics format is ticked! 0. You define a converter under Preferences File Handling Converters which calls a script which executed files with the extension .pygr and generates, as you suggest below, an svg. 1. I wrote a python script that produces the graphic I want Exactly - and you give it a specific extension .pygr for python script which generates a graphic which you defined above. 2. I insert it in LyX somehow I don't know, perhaps defining a converter from .py to svg, but this needs to be inside a module or every python script in LyX will try to be converted into a svg!! So a module is also needed Use insert graphic and select *your .pygr* file as graphic - and Lyx will do the rest of the conversion - i.e. use your converter to convert the .pygr to an svg and other existing converters to generate the png for the preview and the pdf / eps / ... for the final copmpilation of the document. 3. LyX is the one who knows the correct size of the graphic so in principle if I produce a svg should be enough but in this way I need to produce a new svg every time the data change Correct - if the input data changes, you have to generate the graph again manually, or, if the Converter file cache is disabled, you just have to close the document and open it again. Hope this helps, Rainer
Re: [Feature Request] python binding
From: Richard Heck rgh...@lyx.org Sent: Thursday, May 29, 2014 5:05 PM I might be *completely* off, but couldn't you achieve exactly this via defining converters? I have for example a converter defined, which converts plantuml source fields into uml graphs, i.e. it defines the call to compile them and return the graphs which are then inserted in the document? Yes, that's more or less what I was suggesting. rh Let's see if I understand: 1. I wrote a python script that produces the graphic I want 2. I insert it in LyX somehow I don't know, perhaps defining a converter from .py to svg, but this needs to be inside a module or every python script in LyX will try to be converted into a svg!! So a module is also needed 3. LyX is the one who knows the correct size of the graphic so in principle if I produce a svg should be enough but in this way I need to produce a new svg every time the data change Take this simple script as example import numpy as np from numpy.random import randn import matplotlib as mpl import matplotlib.pyplot as plt np.random.seed(9221999) data = randn(75) plt.hist(data) which produce a graphic like this in spyder So basically I save this graphic to a svg and then I load it into LyX, but why not letting LyX doing this automatically if it already handles with python?? This is my question. Regards Alex
Re: [Feature Request] python binding
This might work!! Thanks for the suggestions, I will try it extensively and I will comments my experiences afterwards. It seems it also renders the graphic inside LyX itself! That's what I was talking about. Regards Alex - Original Message - From: Rainer M Krug rai...@krugs.de To: Alex Vergara Gil a...@cphr.edu.cu Cc: Richard Heck rgh...@lyx.org; lyx-users Users lyx-users@lists.lyx.org; lyx-de...@lists.lyx.org Sent: Monday, June 02, 2014 8:31 AM Subject: Re: [Feature Request] python binding I just add comments inline Let's see if I understand: -1. You define a *file type* in LyX under Preferences File Handling File Formats for the file type .pygr in which Vector graphics format is ticked! 0. You define a converter under Preferences File Handling Converters which calls a script which executed files with the extension .pygr and generates, as you suggest below, an svg. 1. I wrote a python script that produces the graphic I want Exactly - and you give it a specific extension .pygr for python script which generates a graphic which you defined above. 2. I insert it in LyX somehow I don't know, perhaps defining a converter from .py to svg, but this needs to be inside a module or every python script in LyX will try to be converted into a svg!! So a module is also needed Use insert graphic and select *your .pygr* file as graphic - and Lyx will do the rest of the conversion - i.e. use your converter to convert the .pygr to an svg and other existing converters to generate the png for the preview and the pdf / eps / ... for the final copmpilation of the document. 3. LyX is the one who knows the correct size of the graphic so in principle if I produce a svg should be enough but in this way I need to produce a new svg every time the data change Correct - if the input data changes, you have to generate the graph again manually, or, if the Converter file cache is disabled, you just have to close the document and open it again. Hope this helps, Rainer
Re: [Feature Request] python binding
From: "Richard Heck"Sent: Thursday, May 29, 2014 5:05 PM >> I might be *completely* off, but couldn't you achieve exactly this via >> defining converters? I have for example a converter defined, which >> "converts" plantuml source fields into uml graphs, i.e. it defines the >> call to compile them and return the graphs which are then inserted in >> the document? > > Yes, that's more or less what I was suggesting. > > rh > Let's see if I understand: 1. I wrote a python script that produces the graphic I want 2. I insert it in LyX somehow I don't know, perhaps defining a converter from .py to svg, but this needs to be inside a module or every python script in LyX will try to be converted into a svg!! So a module is also needed 3. LyX is the one who knows the correct size of the graphic so in principle if I produce a svg should be enough but in this way I need to produce a new svg every time the data change Take this simple script as example import numpy as np from numpy.random import randn import matplotlib as mpl import matplotlib.pyplot as plt np.random.seed(9221999) data = randn(75) plt.hist(data) which produce a graphic like this in spyder So basically I save this graphic to a svg and then I load it into LyX, but why not letting LyX doing this automatically if it already handles with python?? This is my question. Regards Alex
Re: [Feature Request] python binding
This might work!! Thanks for the suggestions, I will try it extensively and I will comments my experiences afterwards. It seems it also renders the graphic inside LyX itself! That's what I was talking about. Regards Alex - Original Message - From: "Rainer M Krug" <rai...@krugs.de> To: "Alex Vergara Gil" <a...@cphr.edu.cu> Cc: "Richard Heck" <rgh...@lyx.org>; "lyx-users Users" <lyx-users@lists.lyx.org>; <lyx-de...@lists.lyx.org> Sent: Monday, June 02, 2014 8:31 AM Subject: Re: [Feature Request] python binding I just add comments inline Let's see if I understand: -1. You define a *file type* in LyX under Preferences > File Handling > File Formats for the file type .pygr in which "Vector graphics format" is ticked! 0. You define a converter under Preferences > File Handling > Converters which calls a script which executed files with the extension .pygr and generates, as you suggest below, an svg. 1. I wrote a python script that produces the graphic I want Exactly - and you give it a specific extension .pygr for "python script which generates a graphic" which you defined above. 2. I insert it in LyX somehow I don't know, perhaps defining a converter from .py to svg, but this needs to be inside a module or every python script in LyX will try to be converted into a svg!! So a module is also needed Use insert graphic and select *your .pygr* file as graphic - and Lyx will do the rest of the conversion - i.e. use your converter to convert the .pygr to an svg and other existing converters to generate the png for the preview and the pdf / eps / ... for the final copmpilation of the document. 3. LyX is the one who knows the correct size of the graphic so in principle if I produce a svg should be enough but in this way I need to produce a new svg every time the data change Correct - if the input data changes, you have to generate the graph again manually, or, if the "Converter file cache" is disabled, you just have to close the document and open it again. Hope this helps, Rainer
[Feature Request] python binding
Hello Lyxers I wonder why LyX is not available to process little pieces of python code within its own framework, like ipython notebook for instance?? This feature allows us to have beautiful graphics such the one produced by matplotlib package. I know there already exists a similar binding for R through knitr module, so why not a binding for python too?? Is there a way, like modules or whatever, to achieve the same functionality or at least some basic functionality of ipython notebook within LyX?? Regards Alex Vergara MSc Nuclear Physics SSDL, CPHR, Havana, Cuba
[Feature Request] python binding
From: Steve Litt sl...@troubleshooters.com Sent: Thursday, May 29, 2014 2:35 PM On Thu, 29 May 2014 14:36:29 -0500 Alex Vergara Gil a...@cphr.edu.cu wrote: Hello Lyxers I wonder why LyX is not available to process little pieces of python code within its own framework, like ipython notebook for instance?? This feature allows us to have beautiful graphics such the one produced by matplotlib package. I know there already exists a similar binding for R through knitr module, so why not a binding for python too?? Is there a way, like modules or whatever, to achieve the same functionality or at least some basic functionality of ipython notebook within LyX?? Oh, if we're going consider requests for difficult additions to handle a small subset of needs like beautiful graphics, how about filling the GAPING HOLE that there's no practical way to export to ePub, without massive human intervention and end-user programming? None of LyX's HTML and xHtml exports are remotely suitable for flowing-text eBook production, especially because different people have different ideas of how eBooks should be built. I don´t think this is a dificult addition since there is already a module that does something similar for what I've asked, knitr module does this but accepting R commands instead of python ones, so maybe the knitr author can put some light to this discussion. Again there should be no need to touch the code, just build a module similar to knitr that can be named knitpy This is my original motivation (...) SteveT Regards Alex
Re: [Feature Request] python binding
From: Richard Heck Sent: Thursday, May 29, 2014 3:26 PM On 05/29/2014 03:36 PM, Alex Vergara Gil wrote: Hello Lyxers I wonder why LyX is not available to process little pieces of python code within its own framework, like ipython notebook for instance?? This feature allows us to have beautiful graphics such the one produced by matplotlib package. I know there already exists a similar binding for R through knitr module, so why not a binding for python too?? Is there a way, like modules or whatever, to achieve the same functionality or at least some basic functionality of ipython notebook within LyX?? Can you be more precise about what you want to do? I've never heard of ipython notebook. sudo aptitude install ipython-notebook ipython notebook and there you can write even thesis in a web environment with python commands being executed inlined, exporting to pdf and latex too, it is a wonder of our times, so why not letting LyX do this miracle too?? Sweave works by our having an output format (sweave) for such documents and then our declaring Rscript as a sweave -- LaTeX converter, so PDF export (say) goes via Rscript and pdflatex. There's a special script in lib/scripts/ that sets up some things for LyX first, or so it claims. It would be reasonably easy to do the same sort of thing for Python, if you wanted to do so. You'd just need to set up an appropriate format and then declare an appropriate script as a whatever - latex converter. Then LyX will run the script and do as you wish with the embedded python code. Of course, as we've discussed on the list with respect to R, there are large security issues here, too. Richard you obviously miss the point here, or I was not very clear! it is not a different format, is a facility to have python scripts running within LyX framework, you have to see ipython notebook to understand what I mean, you will be surprised!! Basically to build graphs, for instance (and only a piece of what can be done), you add the (let's call it) knitpy module and then place a knitpy insert, write some python code that produces a matplotlib graphic and then when lyx compiles the document, instead of the code it is shown the graph, it also can be done in the lyx editing window, but thats a more dificult request. Regards Alex
[Feature Request] python binding
Hello Lyxers I wonder why LyX is not available to process little pieces of python code within its own framework, like ipython notebook for instance?? This feature allows us to have beautiful graphics such the one produced by matplotlib package. I know there already exists a similar binding for R through knitr module, so why not a binding for python too?? Is there a way, like modules or whatever, to achieve the same functionality or at least some basic functionality of ipython notebook within LyX?? Regards Alex Vergara MSc Nuclear Physics SSDL, CPHR, Havana, Cuba
[Feature Request] python binding
From: Steve Litt sl...@troubleshooters.com Sent: Thursday, May 29, 2014 2:35 PM On Thu, 29 May 2014 14:36:29 -0500 Alex Vergara Gil a...@cphr.edu.cu wrote: Hello Lyxers I wonder why LyX is not available to process little pieces of python code within its own framework, like ipython notebook for instance?? This feature allows us to have beautiful graphics such the one produced by matplotlib package. I know there already exists a similar binding for R through knitr module, so why not a binding for python too?? Is there a way, like modules or whatever, to achieve the same functionality or at least some basic functionality of ipython notebook within LyX?? Oh, if we're going consider requests for difficult additions to handle a small subset of needs like beautiful graphics, how about filling the GAPING HOLE that there's no practical way to export to ePub, without massive human intervention and end-user programming? None of LyX's HTML and xHtml exports are remotely suitable for flowing-text eBook production, especially because different people have different ideas of how eBooks should be built. I don´t think this is a dificult addition since there is already a module that does something similar for what I've asked, knitr module does this but accepting R commands instead of python ones, so maybe the knitr author can put some light to this discussion. Again there should be no need to touch the code, just build a module similar to knitr that can be named knitpy This is my original motivation (...) SteveT Regards Alex
Re: [Feature Request] python binding
From: Richard Heck Sent: Thursday, May 29, 2014 3:26 PM On 05/29/2014 03:36 PM, Alex Vergara Gil wrote: Hello Lyxers I wonder why LyX is not available to process little pieces of python code within its own framework, like ipython notebook for instance?? This feature allows us to have beautiful graphics such the one produced by matplotlib package. I know there already exists a similar binding for R through knitr module, so why not a binding for python too?? Is there a way, like modules or whatever, to achieve the same functionality or at least some basic functionality of ipython notebook within LyX?? Can you be more precise about what you want to do? I've never heard of ipython notebook. sudo aptitude install ipython-notebook ipython notebook and there you can write even thesis in a web environment with python commands being executed inlined, exporting to pdf and latex too, it is a wonder of our times, so why not letting LyX do this miracle too?? Sweave works by our having an output format (sweave) for such documents and then our declaring Rscript as a sweave -- LaTeX converter, so PDF export (say) goes via Rscript and pdflatex. There's a special script in lib/scripts/ that sets up some things for LyX first, or so it claims. It would be reasonably easy to do the same sort of thing for Python, if you wanted to do so. You'd just need to set up an appropriate format and then declare an appropriate script as a whatever - latex converter. Then LyX will run the script and do as you wish with the embedded python code. Of course, as we've discussed on the list with respect to R, there are large security issues here, too. Richard you obviously miss the point here, or I was not very clear! it is not a different format, is a facility to have python scripts running within LyX framework, you have to see ipython notebook to understand what I mean, you will be surprised!! Basically to build graphs, for instance (and only a piece of what can be done), you add the (let's call it) knitpy module and then place a knitpy insert, write some python code that produces a matplotlib graphic and then when lyx compiles the document, instead of the code it is shown the graph, it also can be done in the lyx editing window, but thats a more dificult request. Regards Alex
[Feature Request] python binding
Hello Lyxers I wonder why LyX is not available to process little pieces of python code within its own framework, like ipython notebook for instance?? This feature allows us to have beautiful graphics such the one produced by matplotlib package. I know there already exists a similar binding for R through knitr module, so why not a binding for python too?? Is there a way, like modules or whatever, to achieve the same functionality or at least some basic functionality of ipython notebook within LyX?? Regards Alex Vergara MSc Nuclear Physics SSDL, CPHR, Havana, Cuba
[Feature Request] python binding
From: "Steve Litt" <sl...@troubleshooters.com> Sent: Thursday, May 29, 2014 2:35 PM On Thu, 29 May 2014 14:36:29 -0500 "Alex Vergara Gil" <a...@cphr.edu.cu> wrote: Hello Lyxers I wonder why LyX is not available to process little pieces of python code within its own framework, like ipython notebook for instance?? This feature allows us to have beautiful graphics such the one produced by matplotlib package. I know there already exists a similar binding for R through knitr module, so why not a binding for python too?? Is there a way, like modules or whatever, to achieve the same functionality or at least some basic functionality of ipython notebook within LyX?? Oh, if we're going consider requests for difficult additions to handle a small subset of needs like beautiful graphics, how about filling the GAPING HOLE that there's no practical way to export to ePub, without massive human intervention and end-user programming? None of LyX's HTML and xHtml exports are remotely suitable for flowing-text eBook production, especially because different people have different ideas of how eBooks should be built. I don´t think this is a "dificult addition" since there is already a module that does something similar for what I've asked, knitr module does this but accepting R commands instead of python ones, so maybe the knitr author can put some light to this discussion. Again there should be no need to touch the code, just build a module similar to knitr that can be named "knitpy" This is my original motivation (...) SteveT Regards Alex
Re: [Feature Request] python binding
From: Richard Heck Sent: Thursday, May 29, 2014 3:26 PM On 05/29/2014 03:36 PM, Alex Vergara Gil wrote: Hello Lyxers I wonder why LyX is not available to process little pieces of python code within its own framework, like ipython notebook for instance?? This feature allows us to have beautiful graphics such the one produced by matplotlib package. I know there already exists a similar binding for R through knitr module, so why not a binding for python too?? Is there a way, like modules or whatever, to achieve the same functionality or at least some basic functionality of ipython notebook within LyX?? Can you be more precise about what you want to do? I've never heard of ipython notebook. sudo aptitude install ipython-notebook ipython notebook and there you can write even thesis in a web environment with python commands being executed inlined, exporting to pdf and latex too, it is a wonder of our times, so why not letting LyX do this miracle too?? Sweave works by our having an output format (sweave) for such documents and then our declaring Rscript as a sweave --> LaTeX converter, so PDF export (say) goes via Rscript and pdflatex. There's a special script in lib/scripts/ that "sets up some things for LyX" first, or so it claims. It would be reasonably easy to do the same sort of thing for Python, if you wanted to do so. You'd just need to set up an appropriate format and then declare an appropriate script as a whatever -> latex converter. Then LyX will run the script and do as you wish with the embedded python code. Of course, as we've discussed on the list with respect to R, there are large security issues here, too. Richard you obviously miss the point here, or I was not very clear! it is not a different format, is a facility to have python scripts running within LyX framework, you have to see ipython notebook to understand what I mean, you will be surprised!! Basically to build graphs, for instance (and only a piece of what can be done), you add the (let's call it) "knitpy" module and then place a knitpy insert, write some python code that produces a matplotlib graphic and then when lyx compiles the document, instead of the code it is shown the graph, it also can be done in the lyx editing window, but thats a more dificult request. Regards Alex
Re: workaround enumerated lists
On Tuesday, April 08, 2014 9:32 PM, Richard Heck wrote: On 04/08/2014 05:31 PM, Alex Vergara Gil wrote: Dear lyxers! Is there a better way to switch between enumerated lists from a); b) ... to 1.; 2. ... and so on without the need of the tex hack \renewcommand{\labelenumi{alph | roman | arabic{enumi}} ) | . | .- | - } ??? Shouldn't there exists a gui to handle this??? The Customized Lists module contains some lists to do this. You can easily add more by following the same pattern. I'm attaching my hacked version. Richard I have played with your hacked module and it is better than the one installed, but it lacks some features I need which I can do with tex hacks like sublists formating, ie: \renewcommand{\labelenumi{arabic{enumi}}.-} \renewcommand{\labelenumii{alph{enumii}})} \renewcommand{\labelenumiii{roman{enumiii}}-} This provides the lists as following 1.- first item a) sublist1 i- subsublist1 ii- subsublist2 b) sublist2 2.- second item but I only see lists in your module, is there a way to add sublist formatting too? Regards Alex
Re: workaround enumerated lists
On Tuesday, April 08, 2014 9:32 PM, Richard Heck wrote: On 04/08/2014 05:31 PM, Alex Vergara Gil wrote: Dear lyxers! Is there a better way to switch between enumerated lists from a); b) ... to 1.; 2. ... and so on without the need of the tex hack \renewcommand{\labelenumi{alph | roman | arabic{enumi}} ) | . | .- | - } ??? Shouldn't there exists a gui to handle this??? The Customized Lists module contains some lists to do this. You can easily add more by following the same pattern. I'm attaching my hacked version. Richard I have played with your hacked module and it is better than the one installed, but it lacks some features I need which I can do with tex hacks like sublists formating, ie: \renewcommand{\labelenumi{arabic{enumi}}.-} \renewcommand{\labelenumii{alph{enumii}})} \renewcommand{\labelenumiii{roman{enumiii}}-} This provides the lists as following 1.- first item a) sublist1 i- subsublist1 ii- subsublist2 b) sublist2 2.- second item but I only see lists in your module, is there a way to add sublist formatting too? Regards Alex
Re: workaround enumerated lists
On Tuesday, April 08, 2014 9:32 PM, Richard Heck wrote: On 04/08/2014 05:31 PM, Alex Vergara Gil wrote: Dear lyxers! Is there a better way to switch between enumerated lists from a); b) ... to 1.; 2. ... and so on without the need of the tex hack \renewcommand{\labelenumi{alph | roman | arabic{enumi}} ) | . | .- | - } ??? Shouldn't there exists a gui to handle this??? The Customized Lists module contains some lists to do this. You can easily add more by following the same pattern. I'm attaching my hacked version. Richard I have played with your hacked module and it is better than the one installed, but it lacks some features I need which I can do with tex hacks like sublists formating, ie: \renewcommand{\labelenumi{arabic{enumi}}.-} \renewcommand{\labelenumii{alph{enumii}})} \renewcommand{\labelenumiii{roman{enumiii}}-} This provides the lists as following 1.- first item a) sublist1 i- subsublist1 ii- subsublist2 b) sublist2 2.- second item but I only see lists in your module, is there a way to add sublist formatting too? Regards Alex
workaround enumerated lists
Dear lyxers! Is there a better way to switch between enumerated lists from a); b) ... to 1.; 2. ... and so on without the need of the tex hack \renewcommand{\labelenumi{alph | roman | arabic{enumi}} ) | . | .- | - } ??? Shouldn't there exists a gui to handle this??? Regards Alex
workaround enumerated lists
Dear lyxers! Is there a better way to switch between enumerated lists from a); b) ... to 1.; 2. ... and so on without the need of the tex hack \renewcommand{\labelenumi{alph | roman | arabic{enumi}} ) | . | .- | - } ??? Shouldn't there exists a gui to handle this??? Regards Alex
workaround enumerated lists
Dear lyxers! Is there a better way to switch between enumerated lists from a); b) ... to 1.; 2. ... and so on without the need of the tex hack \renewcommand{\labelenumi{alph | roman | arabic{enumi}} ) | . | .- | - } ??? Shouldn't there exists a gui to handle this??? Regards Alex
Re: Templates from LyX-207-Bundle-3 Windows Installer
- Original Message - From: José Alejandro Lugo García jal...@uci.cu -In Ubuntu repositories there are full LaTeX engine? If so, I will think about migrate completely and use LyX on that enviroment. Actually I 'm not doing that because the problem I have with accent in LyX version 2.0.2 from my Ubuntu 12.04 already installed on my machine. But, if at Ubuntu 14.04 will be put a latest version that solve most of my current problems then yes, I would love to use LyX on Ubuntu OS. Bests, José. The accents problem is not a lyx issue, but wrong keyboard configuration, so even if you upgrade to the newest OS you will remain with that problem, so I recommend you to check your keyboard layouth been in spanish, any version (traditional sort, Latin American sort or Spain sort). That problem will vanish then. Even if you have an english keyboard you will have access to accents there. Best Alex
Re: Templates from LyX-207-Bundle-3 Windows Installer
- Original Message - From: José Alejandro Lugo García jal...@uci.cu -In Ubuntu repositories there are full LaTeX engine? If so, I will think about migrate completely and use LyX on that enviroment. Actually I 'm not doing that because the problem I have with accent in LyX version 2.0.2 from my Ubuntu 12.04 already installed on my machine. But, if at Ubuntu 14.04 will be put a latest version that solve most of my current problems then yes, I would love to use LyX on Ubuntu OS. Bests, José. The accents problem is not a lyx issue, but wrong keyboard configuration, so even if you upgrade to the newest OS you will remain with that problem, so I recommend you to check your keyboard layouth been in spanish, any version (traditional sort, Latin American sort or Spain sort). That problem will vanish then. Even if you have an english keyboard you will have access to accents there. Best Alex
Re: Templates from LyX-207-Bundle-3 Windows Installer
- Original Message - From: "José Alejandro Lugo García"-In Ubuntu repositories there are full LaTeX engine? If so, I will think about migrate completely and use LyX on that enviroment. Actually I 'm not doing that because the problem I have with accent in LyX version 2.0.2 from my Ubuntu 12.04 already installed on my machine. But, if at Ubuntu 14.04 will be put a latest version that solve most of my current problems then yes, I would love to use LyX on Ubuntu OS. Bests, José. The accents problem is not a lyx issue, but wrong keyboard configuration, so even if you upgrade to the newest OS you will remain with that problem, so I recommend you to check your keyboard layouth been in spanish, any version (traditional sort, Latin American sort or Spain sort). That problem will vanish then. Even if you have an english keyboard you will have access to accents there. Best Alex
Re: Templates from LyX-207-Bundle-3 Windows Installer
Dear José As you I don´t have full internet conection, but LyX works very well if you manage to install miktex correctly in your system, mainly miktex 2.9 which is the last version I have works as a charm. Greetings and good luck Alex - Original Message - From: José Alejandro Lugo García jal...@uci.cu To: lyx-users@lists.lyx.org Sent: Friday, March 21, 2014 8:16 PM Subject: Templates from LyX-207-Bundle-3 Windows Installer Hi: I don’t have the possibility of a full internet connection, so with some help, I reached the LyX-207-Bundle-3 installer for Windows. Install perfect. All great until I try to open some templates from File/New from Template (see “ 0 showing_templates.png”). Sadly many templates from this collection shows “errors” with missing dependencies that needs to be downloaded from internet (see “1 Show_error.png”). This problem don’t happen with Lyx on Ubuntu 12.04, where it seems that all dependencies are downloading automatically from the OS repositories during the installation process. ¿What is the possibility to fix this for people like me who has not full connection to the internet from Windows? Regards, José. I Conferencia Científica Internacional UCIENCIA 2014 en la UCI del 24 al 26 de abril de 2014, La Habana, Cuba. Ver http://uciencia.uci.cu __ Informacin de ESET NOD32 Antivirus, versin de la base de firmas de virus 9568 (20140320) __ ESET NOD32 Antivirus ha comprobado este mensaje. http://www.eset.com
Re: Templates from LyX-207-Bundle-3 Windows Installer
Dear José As you I don´t have full internet conection, but LyX works very well if you manage to install miktex correctly in your system, mainly miktex 2.9 which is the last version I have works as a charm. Greetings and good luck Alex - Original Message - From: José Alejandro Lugo García jal...@uci.cu To: lyx-users@lists.lyx.org Sent: Friday, March 21, 2014 8:16 PM Subject: Templates from LyX-207-Bundle-3 Windows Installer Hi: I don’t have the possibility of a full internet connection, so with some help, I reached the LyX-207-Bundle-3 installer for Windows. Install perfect. All great until I try to open some templates from File/New from Template (see “ 0 showing_templates.png”). Sadly many templates from this collection shows “errors” with missing dependencies that needs to be downloaded from internet (see “1 Show_error.png”). This problem don’t happen with Lyx on Ubuntu 12.04, where it seems that all dependencies are downloading automatically from the OS repositories during the installation process. ¿What is the possibility to fix this for people like me who has not full connection to the internet from Windows? Regards, José. I Conferencia Científica Internacional UCIENCIA 2014 en la UCI del 24 al 26 de abril de 2014, La Habana, Cuba. Ver http://uciencia.uci.cu __ Informacin de ESET NOD32 Antivirus, versin de la base de firmas de virus 9568 (20140320) __ ESET NOD32 Antivirus ha comprobado este mensaje. http://www.eset.com
Re: Templates from LyX-207-Bundle-3 Windows Installer
Dear José As you I don´t have full internet conection, but LyX works very well if you manage to install miktex correctly in your system, mainly miktex 2.9 which is the last version I have works as a charm. Greetings and good luck Alex - Original Message - From: "José Alejandro Lugo García"To: Sent: Friday, March 21, 2014 8:16 PM Subject: Templates from LyX-207-Bundle-3 Windows Installer Hi: I don’t have the possibility of a full internet connection, so with some help, I reached the LyX-207-Bundle-3 installer for Windows. Install perfect. All great until I try to open some templates from File/New from Template (see “ 0 showing_templates.png”). Sadly many templates from this collection shows “errors” with missing dependencies that needs to be downloaded from internet (see “1 Show_error.png”). This problem don’t happen with Lyx on Ubuntu 12.04, where it seems that all dependencies are downloading automatically from the OS repositories during the installation process. ¿What is the possibility to fix this for people like me who has not full connection to the internet from Windows? Regards, José. I Conferencia Científica Internacional UCIENCIA 2014 en la UCI del 24 al 26 de abril de 2014, La Habana, Cuba. Ver http://uciencia.uci.cu __ Informacin de ESET NOD32 Antivirus, versin de la base de firmas de virus 9568 (20140320) __ ESET NOD32 Antivirus ha comprobado este mensaje. http://www.eset.com
Re: LyX + CAS
Unfortunately the two CAS able to interact with LyX in Win7 are paid. Maybe there is also a workaround for Maxima, which would help the freeware and open source cause :) AFAIK, LyX is open source software, also Octave is open source, so why not supporting Octave as the standard CAS for LyX. The QtOctave works very good on Windows and it has a lot of compatibility with MatLab with a lot of plugins and interactions with Qt. I don´t think supporting a paid software is a good idea because we will be away of the GPL License. Just my 2c Alex
Re: LyX + CAS
Unfortunately the two CAS able to interact with LyX in Win7 are paid. Maybe there is also a workaround for Maxima, which would help the freeware and open source cause :) AFAIK, LyX is open source software, also Octave is open source, so why not supporting Octave as the standard CAS for LyX. The QtOctave works very good on Windows and it has a lot of compatibility with MatLab with a lot of plugins and interactions with Qt. I don´t think supporting a paid software is a good idea because we will be away of the GPL License. Just my 2c Alex
Re: LyX + CAS
> >> Unfortunately the two CAS able to interact with LyX in Win7 are paid. > >> Maybe there is also a workaround for Maxima, which would help the > >> freeware and open source cause :) AFAIK, LyX is open source software, also Octave is open source, so why not supporting Octave as the standard CAS for LyX. The QtOctave works very good on Windows and it has a lot of compatibility with MatLab with a lot of plugins and interactions with Qt. I don´t think supporting a paid software is a good idea because we will be away of the GPL License. Just my 2c Alex
Re: Pasting graphics in LyX 2.1 beta on Mac
- Original Message - I noticed when I had to paste some graphics with a lot of text that LyX (or rather the libraries used by LyX) seem to reduce the resolution of the pasted graphics (copied selection from Preview and pasted as a png-file in LyX). Anyone else experienced it, or could it be a setting somewhere in my environment? If so, does anyone have an idea of how to solve it (save the cropped file as a png in Preview of course works, but is several additional steps). All the best! Anders The best you can do in these cases is save the graphic in svg format whenever posible. Otherwise you must edit your graphic on inkscape to add the text manually and then export it as svg. If you doesn´t go into vectorial graphics you will definetively lose resolution and then the text will look awful. regards! Alex
Re: Pasting graphics in LyX 2.1 beta on Mac
- Original Message - I noticed when I had to paste some graphics with a lot of text that LyX (or rather the libraries used by LyX) seem to reduce the resolution of the pasted graphics (copied selection from Preview and pasted as a png-file in LyX). Anyone else experienced it, or could it be a setting somewhere in my environment? If so, does anyone have an idea of how to solve it (save the cropped file as a png in Preview of course works, but is several additional steps). All the best! Anders The best you can do in these cases is save the graphic in svg format whenever posible. Otherwise you must edit your graphic on inkscape to add the text manually and then export it as svg. If you doesn´t go into vectorial graphics you will definetively lose resolution and then the text will look awful. regards! Alex
Re: Pasting graphics in LyX 2.1 beta on Mac
- Original Message - I noticed when I had to paste some graphics with a lot of text that LyX (or rather the libraries used by LyX) seem to reduce the resolution of the pasted graphics (copied selection from Preview and pasted as a png-file in LyX). Anyone else experienced it, or could it be a setting somewhere in my environment? If so, does anyone have an idea of how to solve it (save the cropped file as a png in Preview of course works, but is several additional steps). All the best! Anders The best you can do in these cases is save the graphic in svg format whenever posible. Otherwise you must edit your graphic on inkscape to add the text manually and then export it as svg. If you doesn´t go into vectorial graphics you will definetively lose resolution and then the text will look awful. regards! Alex
Re: formula numbering
El Jueves, 08 de Agosto de 2013 12:24 p.m., Richard Heck escribió: On 08/08/2013 01:19 PM, curtis osterhoudt wrote: I *like* the way LyX handles it. I give my equations labels which _make_sense_ to me as a physicist---like Poisson-Eqn---not having to coddle to the structure of the paper. If I want to refer to the equation 20 pages later, I don't have to go back and find the number and adapt the label or the references, nor do I have to worry about renumbering if anything changes. The cross-reference system built into Lyx/LaTeX takes care of that. My only objection is the (perhaps apocryphal, but lodged in my brain since I've used LyX for about a decade now) requirement/suggestion to put dashes in place of spaces in one's labels. Yes, LaTeX regards the space as separating tokens, and as things now are labels get entered as raw LaTeX, not as something that gets processed by LyX. So no spaces. That, however, would be easy to fix. Richard I have written my MSc thesis in LyX and the way references are handled helps me a lot, but I got only one suggestion: when I set my own labels LyX also asigns a number to the equation which is automatically changed but doesn´t correspond to the real equation number that appears in the final text, so when I finally got about 120 pages written I detect one wrong equation and I have to spend a few time to detect which equation is in the LyX document because I didn´t find the equation 2.4 instead it was equation 17. So I think this behaviour is wrong and must be fixed. Best Regards Alex
Re: formula numbering
El Viernes, 09 de Agosto de 2013 08:59 a.m., Richard Heck escribió: On 08/09/2013 09:42 AM, Alex Vergara Gil wrote: I have written my MSc thesis in LyX and the way references are handled helps me a lot, but I got only one suggestion: when I set my own labels LyX also asigns a number to the equation which is automatically changed but doesn´t correspond to the real equation number that appears in the final text, so when I finally got about 120 pages written I detect one wrong equation and I have to spend a few time to detect which equation is in the LyX document because I didn´t find the equation 2.4 instead it was equation 17. So I think this behaviour is wrong and must be fixed. Do you remember what document class, etc, you were using? It sounds like it set number equations by section, and the layout file did not know about that. Richard The class I used was book (KOMA-Script) with the following preamble % increase link area for cross-references and autoname them \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1 \newlength{\abc} \settowidth{\abc}{\space} \AtBeginDocument{% \addto\shorthandsspanish{ \renewcommand{\equationautorefname}{\hspace{-\abc}} \renewcommand{\sectionautorefname}{sec.\negthinspace} \renewcommand{\subsectionautorefname}{sec.\negthinspace} \renewcommand{\subsubsectionautorefname}{sec.\negthinspace} \renewcommand{\figureautorefname}{Fig.\negthinspace} \renewcommand{\tableautorefname}{Tab.\negthinspace} } } % in case somebody want to have the label equation %\renewcommand{\eqref}[1]{equation~(\negthinspace\autoref{#1})} \def\es@tablename{Ttabla} \def\es@appendixname{Aanexo} % that links to image floats jumps to the beginning % of the float and not to its caption \usepackage[figure]{hypcap} % the pages of the TOC is numbered roman % and a pdf-bookmark for the TOC is added \let\myTOC\tableofcontents \renewcommand\tableofcontents{% \frontmatter \pdfbookmark[1]{\contentsname}{} \myTOC \mainmatter } % make caption labels bold \setkomafont{captionlabel}{\bfseries} \setcapindent{1em} % enable calculations \usepackage{calc} % fancy page header/footer settings \renewcommand{\chaptermark}[1]{\markboth{#1}{#1}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} % increase the bottom float placement fraction \renewcommand{\bottomfraction}{0.5} % avoid that floats are placed above its sections \let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}
Re: formula numbering
El Jueves, 08 de Agosto de 2013 12:24 p.m., Richard Heck escribió: On 08/08/2013 01:19 PM, curtis osterhoudt wrote: I *like* the way LyX handles it. I give my equations labels which _make_sense_ to me as a physicist---like Poisson-Eqn---not having to coddle to the structure of the paper. If I want to refer to the equation 20 pages later, I don't have to go back and find the number and adapt the label or the references, nor do I have to worry about renumbering if anything changes. The cross-reference system built into Lyx/LaTeX takes care of that. My only objection is the (perhaps apocryphal, but lodged in my brain since I've used LyX for about a decade now) requirement/suggestion to put dashes in place of spaces in one's labels. Yes, LaTeX regards the space as separating tokens, and as things now are labels get entered as raw LaTeX, not as something that gets processed by LyX. So no spaces. That, however, would be easy to fix. Richard I have written my MSc thesis in LyX and the way references are handled helps me a lot, but I got only one suggestion: when I set my own labels LyX also asigns a number to the equation which is automatically changed but doesn´t correspond to the real equation number that appears in the final text, so when I finally got about 120 pages written I detect one wrong equation and I have to spend a few time to detect which equation is in the LyX document because I didn´t find the equation 2.4 instead it was equation 17. So I think this behaviour is wrong and must be fixed. Best Regards Alex
Re: formula numbering
El Viernes, 09 de Agosto de 2013 08:59 a.m., Richard Heck escribió: On 08/09/2013 09:42 AM, Alex Vergara Gil wrote: I have written my MSc thesis in LyX and the way references are handled helps me a lot, but I got only one suggestion: when I set my own labels LyX also asigns a number to the equation which is automatically changed but doesn´t correspond to the real equation number that appears in the final text, so when I finally got about 120 pages written I detect one wrong equation and I have to spend a few time to detect which equation is in the LyX document because I didn´t find the equation 2.4 instead it was equation 17. So I think this behaviour is wrong and must be fixed. Do you remember what document class, etc, you were using? It sounds like it set number equations by section, and the layout file did not know about that. Richard The class I used was book (KOMA-Script) with the following preamble % increase link area for cross-references and autoname them \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1 \newlength{\abc} \settowidth{\abc}{\space} \AtBeginDocument{% \addto\shorthandsspanish{ \renewcommand{\equationautorefname}{\hspace{-\abc}} \renewcommand{\sectionautorefname}{sec.\negthinspace} \renewcommand{\subsectionautorefname}{sec.\negthinspace} \renewcommand{\subsubsectionautorefname}{sec.\negthinspace} \renewcommand{\figureautorefname}{Fig.\negthinspace} \renewcommand{\tableautorefname}{Tab.\negthinspace} } } % in case somebody want to have the label equation %\renewcommand{\eqref}[1]{equation~(\negthinspace\autoref{#1})} \def\es@tablename{Ttabla} \def\es@appendixname{Aanexo} % that links to image floats jumps to the beginning % of the float and not to its caption \usepackage[figure]{hypcap} % the pages of the TOC is numbered roman % and a pdf-bookmark for the TOC is added \let\myTOC\tableofcontents \renewcommand\tableofcontents{% \frontmatter \pdfbookmark[1]{\contentsname}{} \myTOC \mainmatter } % make caption labels bold \setkomafont{captionlabel}{\bfseries} \setcapindent{1em} % enable calculations \usepackage{calc} % fancy page header/footer settings \renewcommand{\chaptermark}[1]{\markboth{#1}{#1}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} % increase the bottom float placement fraction \renewcommand{\bottomfraction}{0.5} % avoid that floats are placed above its sections \let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}
Re: formula numbering
El Jueves, 08 de Agosto de 2013 12:24 p.m., Richard Heck escribió: On 08/08/2013 01:19 PM, curtis osterhoudt wrote: I *like* the way LyX handles it. I give my equations labels which _make_sense_ to me as a physicist---like "Poisson-Eqn"---not having to coddle to the structure of the paper. If I want to refer to the equation 20 pages later, I don't have to go back and find the number and adapt the label or the references, nor do I have to worry about renumbering if anything changes. The cross-reference system built into Lyx/LaTeX takes care of that. My only objection is the (perhaps apocryphal, but lodged in my brain since I've used LyX for about a decade now) requirement/suggestion to put dashes in place of spaces in one's labels. Yes, LaTeX regards the space as separating tokens, and as things now are labels get entered as raw LaTeX, not as something that gets processed by LyX. So no spaces. That, however, would be easy to fix. Richard I have written my MSc thesis in LyX and the way references are handled helps me a lot, but I got only one suggestion: when I set my own labels LyX also asigns a number to the equation which is automatically changed but doesn´t correspond to the "real" equation number that appears in the final text, so when I finally got about 120 pages written I detect one wrong equation and I have to spend a few time to detect which equation is in the LyX document because I didn´t find the equation 2.4 instead it was equation 17. So I think this behaviour is wrong and must be fixed. Best Regards Alex
Re: formula numbering
El Viernes, 09 de Agosto de 2013 08:59 a.m., Richard Heck escribió: On 08/09/2013 09:42 AM, Alex Vergara Gil wrote: I have written my MSc thesis in LyX and the way references are handled helps me a lot, but I got only one suggestion: when I set my own labels LyX also asigns a number to the equation which is automatically changed but doesn´t correspond to the "real" equation number that appears in the final text, so when I finally got about 120 pages written I detect one wrong equation and I have to spend a few time to detect which equation is in the LyX document because I didn´t find the equation 2.4 instead it was equation 17. So I think this behaviour is wrong and must be fixed. Do you remember what document class, etc, you were using? It sounds like it set "number equations by section", and the layout file did not know about that. Richard The class I used was book (KOMA-Script) with the following preamble % increase link area for cross-references and autoname them \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1 \newlength{\abc} \settowidth{\abc}{\space} \AtBeginDocument{% \addto\shorthandsspanish{ \renewcommand{\equationautorefname}{\hspace{-\abc}} \renewcommand{\sectionautorefname}{sec.\negthinspace} \renewcommand{\subsectionautorefname}{sec.\negthinspace} \renewcommand{\subsubsectionautorefname}{sec.\negthinspace} \renewcommand{\figureautorefname}{Fig.\negthinspace} \renewcommand{\tableautorefname}{Tab.\negthinspace} } } % in case somebody want to have the label "equation" %\renewcommand{\eqref}[1]{equation~(\negthinspace\autoref{#1})} \def\es@tablename{Ttabla} \def\es@appendixname{Aanexo} % that links to image floats jumps to the beginning % of the float and not to its caption \usepackage[figure]{hypcap} % the pages of the TOC is numbered roman % and a pdf-bookmark for the TOC is added \let\myTOC\tableofcontents \renewcommand\tableofcontents{% \frontmatter \pdfbookmark[1]{\contentsname}{} \myTOC \mainmatter } % make caption labels bold \setkomafont{captionlabel}{\bfseries} \setcapindent{1em} % enable calculations \usepackage{calc} % fancy page header/footer settings \renewcommand{\chaptermark}[1]{\markboth{#1}{#1}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} % increase the bottom float placement fraction \renewcommand{\bottomfraction}{0.5} % avoid that floats are placed above its sections \let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}
Re: latex to lyx
I'm new using lyx to write articles and I found a perfect template for my paper in this web for latex templates: http://www.latextemplates.com/ My question is if anyone knows how to use them in lyx? Thanks in advance Miquel You should name the template itself since there should be an equivalence already in lyx, or perhaps not, but somebody may already made the required module
Re: latex to lyx
I'm new using lyx to write articles and I found a perfect template for my paper in this web for latex templates: http://www.latextemplates.com/ My question is if anyone knows how to use them in lyx? Thanks in advance Miquel You should name the template itself since there should be an equivalence already in lyx, or perhaps not, but somebody may already made the required module
Re: latex to lyx
I'm new using lyx to write articles and I found a perfect template for my paper in this web for latex templates: http://www.latextemplates.com/ My question is if anyone knows how to use them in lyx? Thanks in advance Miquel You should name the template itself since there should be an equivalence already in lyx, or perhaps not, but somebody may already made the required module
Re: document statistics
Hello: Occasionally it is necessary to count the total word or character number in a document. Lyx has Tools-Statistics option for the document, but how can I make statistics that includes the text in the Bibliography which is not edited in lyx? Thanks, bcsikos If is not edited in LyX there is no way LyX can count the words, so I use Okular to do this kind of things once the document is ready. Alex
Re: document statistics
Hello: Occasionally it is necessary to count the total word or character number in a document. Lyx has Tools-Statistics option for the document, but how can I make statistics that includes the text in the Bibliography which is not edited in lyx? Thanks, bcsikos If is not edited in LyX there is no way LyX can count the words, so I use Okular to do this kind of things once the document is ready. Alex
Re: document statistics
Hello: Occasionally it is necessary to count the total word or character number in a document. Lyx has Tools->Statistics option for the document, but how can I make statistics that includes the text in the Bibliography which is not edited in lyx? Thanks, bcsikos If is not edited in LyX there is no way LyX can count the words, so I use Okular to do this kind of things once the document is ready. Alex
Re: conflict between LyX and Gimp for the use of python
On 11/05/2012 10:50 AM, Alex Vergara Gil wrote: I have a system with windows 7 which have previously installed python 2.6 for the use of GIMP, this sofware do use python for a lot of things so I cannot remove it from the system. I want to install LyX in this system but when I do that all goes wrong because all the python scripts refers to the python 2.6 already installed instead of the correct python inside LyX This should be fixed since a while. Please test it out by reinstalling LyX using the latest version. Reopen bug http://www.lyx.org/trac/ticket/8691 if you still have problems. regards Uwe Dear Uwe This is an old message, nevertheless I have solved it by updating both GIMP and LyX to the newest versions so both now use the same python sources. Anyway if LyX still refer statically to python under it directory I see no reason for the conflict. I think this is an already solved bug. Alex
Re: conflict between LyX and Gimp for the use of python
On 11/05/2012 10:50 AM, Alex Vergara Gil wrote: I have a system with windows 7 which have previously installed python 2.6 for the use of GIMP, this sofware do use python for a lot of things so I cannot remove it from the system. I want to install LyX in this system but when I do that all goes wrong because all the python scripts refers to the python 2.6 already installed instead of the correct python inside LyX This should be fixed since a while. Please test it out by reinstalling LyX using the latest version. Reopen bug http://www.lyx.org/trac/ticket/8691 if you still have problems. regards Uwe Dear Uwe This is an old message, nevertheless I have solved it by updating both GIMP and LyX to the newest versions so both now use the same python sources. Anyway if LyX still refer statically to python under it directory I see no reason for the conflict. I think this is an already solved bug. Alex
Re: conflict between LyX and Gimp for the use of python
On 11/05/2012 10:50 AM, Alex Vergara Gil wrote: I have a system with windows 7 which have previously installed python 2.6 for the use of GIMP, this sofware do use python for a lot of things so I cannot remove it from the system. I want to install LyX in this system but when I do that all goes wrong because all the python scripts refers to the python 2.6 already installed instead of the correct python inside LyX This should be fixed since a while. Please test it out by reinstalling LyX using the latest version. Reopen bug http://www.lyx.org/trac/ticket/8691 if you still have problems. regards Uwe Dear Uwe This is an old message, nevertheless I have solved it by updating both GIMP and LyX to the newest versions so both now use the same python sources. Anyway if LyX still refer statically to python under it directory I see no reason for the conflict. I think this is an already solved bug. Alex
Re: feature request: ribbon menus
- Original Message - From: Steve Litt sl...@troubleshooters.com To: lyx-users@lists.lyx.org Sent: Thursday, April 04, 2013 7:38 PM Subject: Re: feature request: ribbon menus On Thu, 4 Apr 2013 14:31:07 +0200 (CEST) Csikos Bela bcsikos...@freemail.hu wrote: Alex Vergara Gil a...@cphr.edu.cu írta: Hello developers! I have a feature request if this is not already requested to you: Ribbon Menus. I don't know what ribbon menus is, and I may not be the only one. You should have explained it, attached an image, or given a link where it is explained. The way I see it, if LyX developers were to have enough time to put in this UI eye candy, that time would be much better spent, for instance, finishing the job of making LyX a full outliner that can add, delete, change and move nodes. Or something else necessary or highly desirable for someone who actually uses it to create large volumes of content. Next thing you know, somebody will ask for an io/s looking interface to match his iPhone. SteveT Changes in UI like this one takes to anyone just 1 day, it is just a matter of decide to make it or not, however the changes you mentioned take a lot of coding and a lot of man-hour work, so the time scale is not comparable. On the other hand ribbon menus once you get use to them you find your productivity increasing, actually LyX has something that is like this: The math toolbar, which groups several common operators in just one menu and have several menus grouped by functionality. If the ribbon appearance is problematic then you can create something like the math toolbar for every toolbar and put them in just one toolbar. I see people here who argue with this because they would not have everything in front of their eyes, really!! then why don´t you complain of not having every single option visible in toolbars? What I beg is an UI organization grouping icons by functionality, so the resulting toolbar (or ribbon menu) should be smaller and highly configurable. Come on people, not only M$ do this, even Apple and there are some linux programs that are using a similar approach right now. Static toolbars are obsolete in terms of modern GUIs. This request is not for beautyness but for increasing productivity. As I said this is my personal opinion so I migth be wrong, but I haven´t received any useful opinion (besides M$ patent) of why not doing such a thing just a few user complaining they will affect some how what they feel is comfortable. Regarding the patent believe me that if they patent 0s and 1s then we are definitively lost.:) Alex
Re: feature request: ribbon menus
- Original Message - From: Jürgen Spitzmüller sp...@lyx.org To: lyx-de...@lists.lyx.org Sent: Friday, April 05, 2013 11:16 AM Subject: Re: feature request: ribbon menus Well, this is an open source project. So if there are no license issues, everybody who is motivated enough to implement and maintain such an UI is of course allowed to go ahead and propose a patch. This was my initial intention, but I was exploring in this list to see if there are some users who actually want this. Not the case, so the intention seems to have wrong fundations. My bad :( At the moment, nobody seems to be really enthusiastic, so one consequence could be that you do it yourself (this is actually exactly how I came into LyX development). Jürgen I am learning Qt right now but I have some experience developing, especially with UI. My concept of a text editor software always include ribbon menus and thats why I shout this proposition, but without community acceptance any purpose is a nonsense! So next time will be. Alex
Re: feature request: ribbon menus
- Original Message - From: Steve Litt sl...@troubleshooters.com To: lyx-users@lists.lyx.org Sent: Thursday, April 04, 2013 7:38 PM Subject: Re: feature request: ribbon menus On Thu, 4 Apr 2013 14:31:07 +0200 (CEST) Csikos Bela bcsikos...@freemail.hu wrote: Alex Vergara Gil a...@cphr.edu.cu írta: Hello developers! I have a feature request if this is not already requested to you: Ribbon Menus. I don't know what ribbon menus is, and I may not be the only one. You should have explained it, attached an image, or given a link where it is explained. The way I see it, if LyX developers were to have enough time to put in this UI eye candy, that time would be much better spent, for instance, finishing the job of making LyX a full outliner that can add, delete, change and move nodes. Or something else necessary or highly desirable for someone who actually uses it to create large volumes of content. Next thing you know, somebody will ask for an io/s looking interface to match his iPhone. SteveT Changes in UI like this one takes to anyone just 1 day, it is just a matter of decide to make it or not, however the changes you mentioned take a lot of coding and a lot of man-hour work, so the time scale is not comparable. On the other hand ribbon menus once you get use to them you find your productivity increasing, actually LyX has something that is like this: The math toolbar, which groups several common operators in just one menu and have several menus grouped by functionality. If the ribbon appearance is problematic then you can create something like the math toolbar for every toolbar and put them in just one toolbar. I see people here who argue with this because they would not have everything in front of their eyes, really!! then why don´t you complain of not having every single option visible in toolbars? What I beg is an UI organization grouping icons by functionality, so the resulting toolbar (or ribbon menu) should be smaller and highly configurable. Come on people, not only M$ do this, even Apple and there are some linux programs that are using a similar approach right now. Static toolbars are obsolete in terms of modern GUIs. This request is not for beautyness but for increasing productivity. As I said this is my personal opinion so I migth be wrong, but I haven´t received any useful opinion (besides M$ patent) of why not doing such a thing just a few user complaining they will affect some how what they feel is comfortable. Regarding the patent believe me that if they patent 0s and 1s then we are definitively lost.:) Alex
Re: feature request: ribbon menus
- Original Message - From: Jürgen Spitzmüller sp...@lyx.org To: lyx-de...@lists.lyx.org Sent: Friday, April 05, 2013 11:16 AM Subject: Re: feature request: ribbon menus Well, this is an open source project. So if there are no license issues, everybody who is motivated enough to implement and maintain such an UI is of course allowed to go ahead and propose a patch. This was my initial intention, but I was exploring in this list to see if there are some users who actually want this. Not the case, so the intention seems to have wrong fundations. My bad :( At the moment, nobody seems to be really enthusiastic, so one consequence could be that you do it yourself (this is actually exactly how I came into LyX development). Jürgen I am learning Qt right now but I have some experience developing, especially with UI. My concept of a text editor software always include ribbon menus and thats why I shout this proposition, but without community acceptance any purpose is a nonsense! So next time will be. Alex
Re: feature request: ribbon menus
- Original Message - From: "Steve Litt" <sl...@troubleshooters.com> To: <lyx-users@lists.lyx.org> Sent: Thursday, April 04, 2013 7:38 PM Subject: Re: feature request: ribbon menus On Thu, 4 Apr 2013 14:31:07 +0200 (CEST) Csikos Bela <bcsikos...@freemail.hu> wrote: Alex Vergara Gil <a...@cphr.edu.cu> írta: >Hello developers! > >I have a feature request if this is not already > >requested to you: Ribbon Menus.> I don't know what ribbon menus is, and I may not be the only one. You should have explained it, attached an image, or given a link where it is explained. The way I see it, if LyX developers were to have enough time to put in this UI eye candy, that time would be much better spent, for instance, finishing the job of making LyX a full outliner that can add, delete, change and move nodes. Or something else necessary or highly desirable for someone who actually uses it to create large volumes of content. Next thing you know, somebody will ask for an io/s looking interface to match his iPhone. SteveT Changes in UI like this one takes to anyone just 1 day, it is just a matter of decide to make it or not, however the changes you mentioned take a lot of coding and a lot of man-hour work, so the time scale is not comparable. On the other hand ribbon menus once you get use to them you find your productivity increasing, actually LyX has something that is like this: "The math toolbar", which groups several common operators in just one menu and have several menus grouped by functionality. If the ribbon appearance is problematic then you can create something like the math toolbar for every toolbar and put them in just one toolbar. I see people here who argue with this because they would not have everything in front of their eyes, really!! then why don´t you complain of not having every single option visible in toolbars? What I beg is an UI organization grouping icons by functionality, so the resulting toolbar (or ribbon menu) should be smaller and highly configurable. Come on people, not only M$ do this, even Apple and there are some linux programs that are using a similar approach right now. Static toolbars are obsolete in terms of modern GUIs. This request is not for beautyness but for increasing productivity. As I said this is my personal opinion so I migth be wrong, but I haven´t received any useful opinion (besides M$ patent) of why not doing such a thing just a few user complaining they will affect some how what they feel is comfortable. Regarding the patent believe me that if they patent 0s and 1s then we are definitively lost.:) Alex
Re: feature request: ribbon menus
- Original Message - From: "Jürgen Spitzmüller"To: Sent: Friday, April 05, 2013 11:16 AM Subject: Re: feature request: ribbon menus Well, this is an open source project. So if there are no license issues, everybody who is motivated enough to implement and maintain such an UI is of course allowed to go ahead and propose a patch. This was my initial intention, but I was exploring in this list to see if there are some users who actually want this. Not the case, so the intention seems to have wrong fundations. My bad :( At the moment, nobody seems to be really enthusiastic, so one consequence could be that you do it yourself (this is actually exactly how I came into LyX development). Jürgen I am learning Qt right now but I have some experience developing, especially with UI. My concept of a text editor software always include ribbon menus and thats why I shout this proposition, but without community acceptance any purpose is a nonsense! So next time will be. Alex
feature request: ribbon menus
Hello developers! I have a feature request if this is not already requested to you: Ribbon Menus. The actual look of lyx makes duplicate functions in text menus and icon menus, besides there is a lot of space wasted by allocating the icon menus. This has nothing to do with intrinsic code but to UI graphic design. This modern approach is the best to maximize functionality and avoid duplicating functionality. I don´t know if thi request can be made inside Qt (I think there should be some package for this in the nokia library!). What are your opinions about this? Is this approach correct to you? Best Regards Alex
Re: feature request: ribbon menus
Alex Vergara Gil wrote: I don´t know if thi request can be made inside Qt (I think there should be some package for this in the nokia library!). Pavel Sanda wrote: No it isn't. Mr Google suggest that Qt team at one point stopped developing the control due to Microsoft licensing. This sounds funny given the fact that tabbed toolbar was already around in 90s and I remember it from Borland's Delphi UI. Pavel Yes indeed, this sounds like we should not be able to build frames at all because they look like Microsoft´s Windows and these are licensed by Microsoft ;) so what kind of things are legal or not? This point puts even more fuzzy to my logic! I thougth graphic design as long as it is not equal are not the same and we can make the ribbon as different as we want, just keeping the idea and even better, instead of putting it in the top we can put then at the left so we can avoid the vertical space eating that Jacob mentioned. So I don´t understand that logic. Just my POW Alex
feature request: ribbon menus
Hello developers! I have a feature request if this is not already requested to you: Ribbon Menus. The actual look of lyx makes duplicate functions in text menus and icon menus, besides there is a lot of space wasted by allocating the icon menus. This has nothing to do with intrinsic code but to UI graphic design. This modern approach is the best to maximize functionality and avoid duplicating functionality. I don´t know if thi request can be made inside Qt (I think there should be some package for this in the nokia library!). What are your opinions about this? Is this approach correct to you? Best Regards Alex
Re: feature request: ribbon menus
Alex Vergara Gil wrote: I don´t know if thi request can be made inside Qt (I think there should be some package for this in the nokia library!). Pavel Sanda wrote: No it isn't. Mr Google suggest that Qt team at one point stopped developing the control due to Microsoft licensing. This sounds funny given the fact that tabbed toolbar was already around in 90s and I remember it from Borland's Delphi UI. Pavel Yes indeed, this sounds like we should not be able to build frames at all because they look like Microsoft´s Windows and these are licensed by Microsoft ;) so what kind of things are legal or not? This point puts even more fuzzy to my logic! I thougth graphic design as long as it is not equal are not the same and we can make the ribbon as different as we want, just keeping the idea and even better, instead of putting it in the top we can put then at the left so we can avoid the vertical space eating that Jacob mentioned. So I don´t understand that logic. Just my POW Alex
feature request: ribbon menus
Hello developers! I have a feature request if this is not already requested to you: Ribbon Menus. The actual look of lyx makes duplicate functions in text menus and icon menus, besides there is a lot of space wasted by allocating the icon menus. This has nothing to do with intrinsic code but to UI graphic design. This modern approach is the best to maximize functionality and avoid duplicating functionality. I don´t know if thi request can be made inside Qt (I think there should be some package for this in the nokia library!). What are your opinions about this? Is this approach correct to you? Best Regards Alex
Re: feature request: ribbon menus
Alex Vergara Gil wrote: I don´t know if thi request can be made inside Qt (I think there should be some package for this in the nokia library!). Pavel Sanda wrote: No it isn't. Mr Google suggest that "Qt team at one point stopped developing the control due to Microsoft licensing." This sounds funny given the fact that tabbed toolbar was already around in 90s and I remember it from Borland's Delphi UI. Pavel Yes indeed, this sounds like we should not be able to build frames at all because they look like Microsoft´s Windows and these are licensed by Microsoft ;) so what kind of things are legal or not? This point puts even more fuzzy to my logic! I thougth graphic design as long as it is not equal are not the same and we can make the ribbon as different as we want, just keeping the idea and even better, instead of putting it in the top we can put then at the left so we can avoid the vertical space eating that Jacob mentioned. So I don´t understand that logic. Just my POW Alex
Re: Creating pdf forms template
- Original Message - From: Rainer M Krug r.m.k...@gmail.com -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am really looking forward to a working example - but could we please keep this discussion on lyx-users, as it has nothing to do with devel? Thanks, Rainer Dear Rainer This discussion was made in both user and developers lists because my questions has two purposes: 1. to have a working example of forms in lyx and 2. To make developers realize that a toolbox for form design should be made for native support for this inside lyx (as you can see my example is full of ERT code) Regards Alex
Re: Creating pdf forms template
- Original Message - From: Rainer M Krug r.m.k...@gmail.com -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am really looking forward to a working example - but could we please keep this discussion on lyx-users, as it has nothing to do with devel? Thanks, Rainer Dear Rainer This discussion was made in both user and developers lists because my questions has two purposes: 1. to have a working example of forms in lyx and 2. To make developers realize that a toolbox for form design should be made for native support for this inside lyx (as you can see my example is full of ERT code) Regards Alex
Re: Creating pdf forms template
- Original Message - From: "Rainer M Krug"-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am really looking forward to a working example - but could we please keep this discussion on lyx-users, as it has nothing to do with devel? Thanks, Rainer Dear Rainer This discussion was made in both user and developers lists because my questions has two purposes: 1. to have a working example of forms in lyx and 2. To make developers realize that a toolbox for form design should be made for native support for this inside lyx (as you can see my example is full of ERT code) Regards Alex
Creating pdf forms template
Hello Lyxers! In the lasts days I was learning how to create PDF forms using LyX. But this process require a few javascript knowledge. I´ve tried my best to translate to english the attached template (an improvement of previous in spanish) in which you will see that objects are actually created but the scripts doesn´t behave as I expect. Someone please help me to set this to work. I think this is a first step to make a good template and if we manage to obtain an impresive one and people starts using it then it should be a feature request to support form creation natively in LyX, hopely as a new toolbox. What do you think about this? Please don´t feel offended by my (bad) english, I really make my best effort to translate it. Regards Alex pdf-forms-en.lyx Description: application/lyx
Re: Creating pdf forms template
- Original Message - From: John Kane To: Alex Vergara Gil ; lyx-users Users ; lyx-de...@lists.lyx.org Sent: Thursday, March 21, 2013 12:32 PM Subject: Re: Creating pdf forms template It works or at least I managed to type some text into the text box. I made a couple of changes to the text which I think makes it a bit more idiomatic in English (see attached. I hope you don't mind. I spent what seemed like forever installing the blasted insdljs.sty and it worked. For those having the same problem in Ubuntu I 1) created a texmf folder at root level following these directions http://nmv.stat.cmu.edu/2012/06/14/managing-latex-packages-manually-in-ubuntu-12-04/ and then following instructions from http://www.latex-community.org/forum/viewtopic.php?f=5t=8886 2. cd'd to the texmf/tex/latex/acrotex directory 3. ran sudo texhash 4 ran latex acrotex.ins Reconfigured LyX and everything ran nicely. Dear John Thanks for your reply and your idiomatic suggestions. Now I notice that it must be told in the document that for make it to work the AcroTeX package must be instaled also (it contains the insdljs.sty file), this specific package allows javascript code inside a pdf, so you can manage actions like (onselect, onkeypress, etc). It is also part of MikTeX if you run this on Windows so this should works on every platform. The problem is that if you just put {this.getField(Escuelat).readonly=false;} it works in one way, but when you uncheck the box the linked text field should become uneditable and empty. For this I expect that the code {this.getField(Escuelat).readonly=!this.getField(Escuelac).checked; this.getField(Escuelat).value=;} shall do the job, but it isn´t. I even made this as a function, but nothing happened. The rest of the objects work very nice but this kind of behaviour is critical for the next step of creating action buttons. Regards Alex
Creating pdf forms template
Hello Lyxers! In the lasts days I was learning how to create PDF forms using LyX. But this process require a few javascript knowledge. I´ve tried my best to translate to english the attached template (an improvement of previous in spanish) in which you will see that objects are actually created but the scripts doesn´t behave as I expect. Someone please help me to set this to work. I think this is a first step to make a good template and if we manage to obtain an impresive one and people starts using it then it should be a feature request to support form creation natively in LyX, hopely as a new toolbox. What do you think about this? Please don´t feel offended by my (bad) english, I really make my best effort to translate it. Regards Alex pdf-forms-en.lyx Description: application/lyx
Re: Creating pdf forms template
- Original Message - From: John Kane To: Alex Vergara Gil ; lyx-users Users ; lyx-de...@lists.lyx.org Sent: Thursday, March 21, 2013 12:32 PM Subject: Re: Creating pdf forms template It works or at least I managed to type some text into the text box. I made a couple of changes to the text which I think makes it a bit more idiomatic in English (see attached. I hope you don't mind. I spent what seemed like forever installing the blasted insdljs.sty and it worked. For those having the same problem in Ubuntu I 1) created a texmf folder at root level following these directions http://nmv.stat.cmu.edu/2012/06/14/managing-latex-packages-manually-in-ubuntu-12-04/ and then following instructions from http://www.latex-community.org/forum/viewtopic.php?f=5t=8886 2. cd'd to the texmf/tex/latex/acrotex directory 3. ran sudo texhash 4 ran latex acrotex.ins Reconfigured LyX and everything ran nicely. Dear John Thanks for your reply and your idiomatic suggestions. Now I notice that it must be told in the document that for make it to work the AcroTeX package must be instaled also (it contains the insdljs.sty file), this specific package allows javascript code inside a pdf, so you can manage actions like (onselect, onkeypress, etc). It is also part of MikTeX if you run this on Windows so this should works on every platform. The problem is that if you just put {this.getField(Escuelat).readonly=false;} it works in one way, but when you uncheck the box the linked text field should become uneditable and empty. For this I expect that the code {this.getField(Escuelat).readonly=!this.getField(Escuelac).checked; this.getField(Escuelat).value=;} shall do the job, but it isn´t. I even made this as a function, but nothing happened. The rest of the objects work very nice but this kind of behaviour is critical for the next step of creating action buttons. Regards Alex