Re: LyX efficient language/spell-check toggle

2015-08-19 Thread alex
I have managed to write a serviceable script that uses LyX server and 
LFUNs and toggles between languages only with the shortcut Alt + Shift. 
I am quite pleased with the result, but I have come up with a slight 
improvement, that can be achieved by tracking the current language used 
to spell check in LyX. However, all the LFUNs seem to be 
one-directional, that is they transfer information from the external 
application to LyX. Is there a way (for example, a get-language LFUN 
that I am missing) to echo the current LyX language in the terminal, so 
that I can use it in a script?


Cheers.


Re: LyX efficient language/spell-check toggle

2015-08-19 Thread alex
I have managed to write a serviceable script that uses LyX server and 
LFUNs and toggles between languages only with the shortcut Alt + Shift. 
I am quite pleased with the result, but I have come up with a slight 
improvement, that can be achieved by tracking the current language used 
to spell check in LyX. However, all the LFUNs seem to be 
"one-directional", that is they transfer information from the external 
application to LyX. Is there a way (for example, a get-language LFUN 
that I am missing) to echo the current LyX language in the terminal, so 
that I can use it in a script?


Cheers.


Re: LyX efficient language/spell-check toggle

2015-08-18 Thread alex



Thanks, Richard.

That seems like a step in the right direction.
In the LyX functions user guide I indeed read about command sequences.
One interesting point is that you can toggle between languages using the
language lfun,
with no arguments.
However, I still cannot find a way for a single shortcut to do exactly
what I want.
That is because LyX does not capture shortcuts used for system keyboard
layout toggle.
So, it's not possible to set a shortcut of Alt + Shift - language toggle.
I would not mind having to use another shortcut, as long as it's only 1,
to have the appropriate results.
For example, something like that would require an lfun sequence like:
layout toggle ; language toggle.
I still cannot achieve the layout toggle.
I checked out keyboard mappings a bit, but to no avail.

Another thing that caught my eye is that you can control LyX from other
programs using lfuns.
So, I though as a last resort solution to write a bash script that
senses the layout toggle and sends
the appropriate lfun to LyX. However, in the lfuns manual, I only found
a small reference to that feature
at the beginning. Is there any detailed documentation about this?

Cheers.






On 08/18/2015 11:21 PM, Richard Heck wrote:

On 08/18/2015 12:39 PM, alex wrote:

Hello everyone.

I have been using LyX as my LaTeX editor of choice for quite some
time now, and I have found it to be quite helpful. I have also
managed to set up spell checking for both the languages that I am
interested in, English and Greek. However, the way that I currently
toggle between those languages is quite inconvenient. That is, I use
Alt + Shift to toggle between languages (as I usually do), which
achieves the transition from one language to another. However, that's
not enough to get LyX to toggle to the latter language. LyX keeps
spell-checking using the former language. I have to use a second
keyboard shortcut to get LyX to switch languages, as far as
spell-checking goes. For example, I have to use 2 keyboard shortcuts
in order to go from writing English characters with English
spell-checking to writing Greek characters with Greek spell-checking,
and vice versa. Obviously, those are one too many shortcuts.

So, my question is: can LyX be configured so that toggling between
languages is made by one keyboard shortcut, or maybe so that LyX
senses the keyboard layout (GR or US) in use and spell-checks
appropriately?


A single shortcut can do more than one thing, if you use the
command-sequence LFUN. E.g., Ctrl-Alt-A is bound to:
command-sequence buffer-begin ; buffer-end-select
which has the effect of selecting the whole buffer.

See the documentation for command-sequence under Help LyX Functions.

Richard







LyX efficient language/spell-check toggle

2015-08-18 Thread alex

Hello everyone.

I have been using LyX as my LaTeX editor of choice for quite some time 
now, and I have found it to be quite helpful. I have also managed to set 
up spell checking for both the languages that I am interested in, 
English and Greek. However, the way that I currently toggle between 
those languages is quite inconvenient. That is, I use Alt + Shift to 
toggle between languages (as I usually do), which achieves the 
transition from one language to another. However, that's not enough to 
get LyX to toggle to the latter language. LyX keeps spell-checking using 
the former language. I have to use a second keyboard shortcut to get LyX 
to switch languages, as far as spell-checking goes. For example, I have 
to use 2 keyboard shortcuts in order to go from writing English 
characters with English spell-checking to writing Greek characters with 
Greek spell-checking, and vice versa. Obviously, those are one too many 
shortcuts.


So, my question is: can LyX be configured so that toggling between 
languages is made by one keyboard shortcut, or maybe so that LyX senses 
the keyboard layout (GR or US) in use and spell-checks appropriately?


This is an issue that has been bothering me for quite some time, and any 
help would be very much appreciated.


I believe it's irrelevant, but right now I am working on a Linux Mint 
system. However, I have faced the same issue in windows.


I have already posted the same question on the latex forums, on the LyX 
section, but after that realized that LyX has a mailing list, so I 
figured I would try my luck here as well.


Cheers.


LyX efficient language/spell-check toggle

2015-08-18 Thread alex

Hello everyone.

I have been using LyX as my LaTeX editor of choice for quite some time 
now, and I have found it to be quite helpful. I have also managed to set 
up spell checking for both the languages that I am interested in, 
English and Greek. However, the way that I currently toggle between 
those languages is quite inconvenient. That is, I use Alt + Shift to 
toggle between languages (as I usually do), which achieves the 
transition from one language to another. However, that's not enough to 
get LyX to toggle to the latter language. LyX keeps spell-checking using 
the former language. I have to use a second keyboard shortcut to get LyX 
to switch languages, as far as spell-checking goes. For example, I have 
to use 2 keyboard shortcuts in order to go from writing English 
characters with English spell-checking to writing Greek characters with 
Greek spell-checking, and vice versa. Obviously, those are one too many 
shortcuts.


So, my question is: can LyX be configured so that toggling between 
languages is made by one keyboard shortcut, or maybe so that LyX senses 
the keyboard layout (GR or US) in use and spell-checks appropriately?


This is an issue that has been bothering me for quite some time, and any 
help would be very much appreciated.


I believe it's irrelevant, but right now I am working on a Linux Mint 
system. However, I have faced the same issue in windows.


I have already posted the same question on the latex forums, on the LyX 
section, but after that realized that LyX has a mailing list, so I 
figured I would try my luck here as well.


Cheers.


Re: LyX efficient language/spell-check toggle

2015-08-18 Thread alex



Thanks, Richard.

That seems like a step in the right direction.
In the LyX functions user guide I indeed read about command sequences.
One interesting point is that you can toggle between languages using the
language lfun,
with no arguments.
However, I still cannot find a way for a single shortcut to do exactly
what I want.
That is because LyX does not capture shortcuts used for system keyboard
layout toggle.
So, it's not possible to set a shortcut of Alt + Shift -> language toggle.
I would not mind having to use another shortcut, as long as it's only 1,
to have the appropriate results.
For example, something like that would require an lfun sequence like:
 ; .
I still cannot achieve the layout toggle.
I checked out keyboard mappings a bit, but to no avail.

Another thing that caught my eye is that you can control LyX from other
programs using lfuns.
So, I though as a last resort solution to write a bash script that
senses the layout toggle and sends
the appropriate lfun to LyX. However, in the lfuns manual, I only found
a small reference to that feature
at the beginning. Is there any detailed documentation about this?

Cheers.






On 08/18/2015 11:21 PM, Richard Heck wrote:

On 08/18/2015 12:39 PM, alex wrote:

Hello everyone.

I have been using LyX as my LaTeX editor of choice for quite some
time now, and I have found it to be quite helpful. I have also
managed to set up spell checking for both the languages that I am
interested in, English and Greek. However, the way that I currently
toggle between those languages is quite inconvenient. That is, I use
Alt + Shift to toggle between languages (as I usually do), which
achieves the transition from one language to another. However, that's
not enough to get LyX to toggle to the latter language. LyX keeps
spell-checking using the former language. I have to use a second
keyboard shortcut to get LyX to switch languages, as far as
spell-checking goes. For example, I have to use 2 keyboard shortcuts
in order to go from writing English characters with English
spell-checking to writing Greek characters with Greek spell-checking,
and vice versa. Obviously, those are one too many shortcuts.

So, my question is: can LyX be configured so that toggling between
languages is made by one keyboard shortcut, or maybe so that LyX
senses the keyboard layout (GR or US) in use and spell-checks
appropriately?


A single shortcut can do more than one thing, if you use the
command-sequence LFUN. E.g., Ctrl-Alt-A is bound to:
command-sequence buffer-begin ; buffer-end-select
which has the effect of selecting the whole buffer.

See the documentation for command-sequence under Help> LyX Functions.

Richard







about python3 and lyx

2014-10-08 Thread Alex Vergara Gil
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

2014-10-08 Thread Alex Vergara Gil
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

2014-10-08 Thread Alex Vergara Gil
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

2014-06-30 Thread Alex Vergara Gil
 -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

2014-06-30 Thread Alex Vergara Gil
 -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

2014-06-30 Thread Alex Vergara Gil
 -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

2014-06-30 Thread Alex Vergara Gil
 -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

2014-06-30 Thread Alex Vergara Gil
> -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

2014-06-30 Thread Alex Vergara Gil
> -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]

2014-06-12 Thread Alex Vergara Gil
- 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]

2014-06-12 Thread Alex Vergara Gil
- 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]

2014-06-12 Thread Alex Vergara Gil
- 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]

2014-06-10 Thread Alex Vergara Gil
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?

2014-06-10 Thread Alex Vergara Gil
  - 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?

2014-06-10 Thread Alex Vergara Gil

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?

2014-06-10 Thread Alex Vergara Gil
  - 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]

2014-06-10 Thread Alex Vergara Gil
  - 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]

2014-06-10 Thread Alex Vergara Gil
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?

2014-06-10 Thread Alex Vergara Gil
  - 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?

2014-06-10 Thread Alex Vergara Gil

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?

2014-06-10 Thread Alex Vergara Gil
  - 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]

2014-06-10 Thread Alex Vergara Gil
  - 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]

2014-06-10 Thread Alex Vergara Gil
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?

2014-06-10 Thread Alex Vergara Gil
  - 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?

2014-06-10 Thread Alex Vergara Gil

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?

2014-06-10 Thread Alex Vergara Gil
  - 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]

2014-06-10 Thread Alex Vergara Gil
  - 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]

2014-06-09 Thread Alex Vergara Gil
- 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]

2014-06-09 Thread 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

Re: Python Graphics in LyX [was: Python bindings]

2014-06-09 Thread Alex Vergara Gil
- 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]

2014-06-09 Thread 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

Re: Python Graphics in LyX [was: Python bindings]

2014-06-09 Thread Alex Vergara Gil
- 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]

2014-06-09 Thread 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

Re: [Feature Request] python binding

2014-06-02 Thread Alex Vergara Gil
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

2014-06-02 Thread Alex Vergara Gil
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

2014-06-02 Thread Alex Vergara Gil
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

2014-06-02 Thread Alex Vergara Gil
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

2014-06-02 Thread Alex Vergara Gil
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

2014-06-02 Thread Alex Vergara Gil
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

2014-05-29 Thread Alex Vergara Gil
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

2014-05-29 Thread Alex Vergara Gil

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

2014-05-29 Thread Alex Vergara Gil

  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

2014-05-29 Thread Alex Vergara Gil
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

2014-05-29 Thread Alex Vergara Gil

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

2014-05-29 Thread Alex Vergara Gil

  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

2014-05-29 Thread Alex Vergara Gil
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

2014-05-29 Thread Alex Vergara Gil

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

2014-05-29 Thread Alex Vergara Gil

  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

2014-04-11 Thread Alex Vergara Gil

  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

2014-04-11 Thread Alex Vergara Gil

  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

2014-04-11 Thread Alex Vergara Gil

  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

2014-04-08 Thread Alex Vergara Gil
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

2014-04-08 Thread Alex Vergara Gil
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

2014-04-08 Thread Alex Vergara Gil
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

2014-03-27 Thread Alex Vergara Gil


- 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

2014-03-27 Thread Alex Vergara Gil


- 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

2014-03-27 Thread Alex Vergara Gil


- 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

2014-03-24 Thread Alex Vergara Gil

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

2014-03-24 Thread Alex Vergara Gil

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

2014-03-24 Thread Alex Vergara Gil

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: We need ePub/Mobi conversion: was: Book Frontmatter

2014-01-31 Thread Alex Fernandez
 myself
to devote any efforts to support eLyXer, not even a few hours to solve
reported issues with the latest formats. I am just not interested. My lack
of long-term support for eLyXer has thus become a self-fulfilling prophecy.

Anyway, I would suggest anyone who is working on any portion of a LyX
 to ePub conversion talk with me. I'm pretty knowledgeable about ePub,
 and I've already identified a lot of the dead ends and blind alleys in
 ePub creation, and I know what parts of the LyX document should go into
 the ePub, and which parts would be better re-done as either config or
 CSS.


If you are already conversant in Python, know ePub and are willing to do
the pretty boring task of translating between LyX and ePub, then you can
take eLyXer as the starting point to do the job. It can probably be done in
a few days:
- one to understand eLyXer internals,
- one to solve any stupid design errors that I may have made that make ePub
support hard, such as configure it to use a different base.cfg file,
- and one or two to recode all commands to output ePub.

I would encourage you to take eLyXer and run from there, but the high
probability that you will find strong opposition to integrate the resulting
converter into eLyXer will probably mean that your effort will mostly be
useful for you. So, my advice would be to keep away from it. If you are
still interested I can of course give you any support you need with the
source code.

My switch to Bluefish isn't cast in concrete: Once LyX contains a
 good, generic, reliable LyX to ePub or even LyX to ePub friendly Xhtml
 conversion, I can switch back. If you do it soon enough, I won't even
 have to write an Xhtml to LaTeX converter :-)


Again, good luck, whatever course you choose.

Alex.


Re: We need ePub/Mobi conversion: was: Book Frontmatter

2014-01-31 Thread Alex Fernandez
 myself
to devote any efforts to support eLyXer, not even a few hours to solve
reported issues with the latest formats. I am just not interested. My lack
of long-term support for eLyXer has thus become a self-fulfilling prophecy.

Anyway, I would suggest anyone who is working on any portion of a LyX
 to ePub conversion talk with me. I'm pretty knowledgeable about ePub,
 and I've already identified a lot of the dead ends and blind alleys in
 ePub creation, and I know what parts of the LyX document should go into
 the ePub, and which parts would be better re-done as either config or
 CSS.


If you are already conversant in Python, know ePub and are willing to do
the pretty boring task of translating between LyX and ePub, then you can
take eLyXer as the starting point to do the job. It can probably be done in
a few days:
- one to understand eLyXer internals,
- one to solve any stupid design errors that I may have made that make ePub
support hard, such as configure it to use a different base.cfg file,
- and one or two to recode all commands to output ePub.

I would encourage you to take eLyXer and run from there, but the high
probability that you will find strong opposition to integrate the resulting
converter into eLyXer will probably mean that your effort will mostly be
useful for you. So, my advice would be to keep away from it. If you are
still interested I can of course give you any support you need with the
source code.

My switch to Bluefish isn't cast in concrete: Once LyX contains a
 good, generic, reliable LyX to ePub or even LyX to ePub friendly Xhtml
 conversion, I can switch back. If you do it soon enough, I won't even
 have to write an Xhtml to LaTeX converter :-)


Again, good luck, whatever course you choose.

Alex.


Re: We need ePub/Mobi conversion: was: Book Frontmatter

2014-01-31 Thread Alex Fernandez
dly, after 7 years, not using LyX anymore and with little help from LyX
developers (with some *laudable exceptions*) I can no longer justify myself
to devote any efforts to support eLyXer, not even a few hours to solve
reported issues with the latest formats. I am just not interested. My lack
of long-term support for eLyXer has thus become a self-fulfilling prophecy.

Anyway, I would suggest anyone who is working on any portion of a LyX
> to ePub conversion talk with me. I'm pretty knowledgeable about ePub,
> and I've already identified a lot of the dead ends and blind alleys in
> ePub creation, and I know what parts of the LyX document should go into
> the ePub, and which parts would be better re-done as either config or
> CSS.
>

If you are already conversant in Python, know ePub and are willing to do
the pretty boring task of translating between LyX and ePub, then you can
take eLyXer as the starting point to do the job. It can probably be done in
a few days:
- one to understand eLyXer internals,
- one to solve any stupid design errors that I may have made that make ePub
support hard, such as configure it to use a different base.cfg file,
- and one or two to recode all commands to output ePub.

I would encourage you to take eLyXer and run from there, but the high
probability that you will find strong opposition to integrate the resulting
converter into eLyXer will probably mean that your effort will mostly be
useful for you. So, my advice would be to keep away from it. If you are
still interested I can of course give you any support you need with the
source code.

My switch to Bluefish isn't cast in concrete: Once LyX contains a
> good, generic, reliable LyX to ePub or even LyX to "ePub friendly" Xhtml
> conversion, I can switch back. If you do it soon enough, I won't even
> have to write an Xhtml to LaTeX converter :-)
>

Again, good luck, whatever course you choose.

Alex.


Re: RCS on Mac OS X 10.9 Mavericks with Xcode 5.1 doesn't work

2013-11-11 Thread Alex Liberzon
Thanks, 

So the solution for Mac OS X Mavericks with Xcode 5 that doesn’t include RCS 
anymore is to download the GNU-RCS from this site: 

https://code.google.com/p/rudix-mountainlion/downloads/detail?name=rcs-5.9.0-0.pkg


and using Control-Click option, open and install the RCS.  Lyx version control 
works back for me. 

Best regards,
Alex


On Nov 11, 2013, at 9:32, Stephan Witt st.w...@gmx.net wrote:

 Am 10.11.2013 um 20:54 schrieb Alex Liberzon alex.liber...@gmail.com:
 
 Hi, 
 
 After few failures to use RCS on Mac OS X 10.9 Mavericks, 
 I found on the Xcode release notes 
 https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-
 Xcode/#//apple_ref/doc/uid/TP40001051-SW241
 
 this statement: 
 The CVS and RCS source control tools have been removed from Xcode 5. 11968433
 
 Removing CVS and RCS control from Xcode doesn't imply it's removed from LyX.
 
 Does anybody know how to get those working back? 
 
 You have to provide the cvs and rcs executables to get it working.
 Perhaps you miss these command line tools now after going to 10.9 + Xcode 5.
 
 Isn't it about time to use Git for Lyx? 
 Does anyone know how to use Git from Lyx 
 ( I know how to use it in the command line)
 
 
 It's supported with the upcoming LyX-2.1 release.
 
 Regards,
 Stephan



Re: RCS on Mac OS X 10.9 Mavericks with Xcode 5.1 doesn't work

2013-11-11 Thread Alex Liberzon
Thanks, 

So the solution for Mac OS X Mavericks with Xcode 5 that doesn’t include RCS 
anymore is to download the GNU-RCS from this site: 

https://code.google.com/p/rudix-mountainlion/downloads/detail?name=rcs-5.9.0-0.pkg


and using Control-Click option, open and install the RCS.  Lyx version control 
works back for me. 

Best regards,
Alex


On Nov 11, 2013, at 9:32, Stephan Witt st.w...@gmx.net wrote:

 Am 10.11.2013 um 20:54 schrieb Alex Liberzon alex.liber...@gmail.com:
 
 Hi, 
 
 After few failures to use RCS on Mac OS X 10.9 Mavericks, 
 I found on the Xcode release notes 
 https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-
 Xcode/#//apple_ref/doc/uid/TP40001051-SW241
 
 this statement: 
 The CVS and RCS source control tools have been removed from Xcode 5. 11968433
 
 Removing CVS and RCS control from Xcode doesn't imply it's removed from LyX.
 
 Does anybody know how to get those working back? 
 
 You have to provide the cvs and rcs executables to get it working.
 Perhaps you miss these command line tools now after going to 10.9 + Xcode 5.
 
 Isn't it about time to use Git for Lyx? 
 Does anyone know how to use Git from Lyx 
 ( I know how to use it in the command line)
 
 
 It's supported with the upcoming LyX-2.1 release.
 
 Regards,
 Stephan



Re: RCS on Mac OS X 10.9 Mavericks with Xcode 5.1 doesn't work

2013-11-11 Thread Alex Liberzon
Thanks, 

So the solution for Mac OS X Mavericks with Xcode 5 that doesn’t include RCS 
anymore is to download the GNU-RCS from this site: 

https://code.google.com/p/rudix-mountainlion/downloads/detail?name=rcs-5.9.0-0.pkg


and using Control-Click option, open and install the RCS.  Lyx version control 
works back for me. 

Best regards,
Alex


On Nov 11, 2013, at 9:32, Stephan Witt <st.w...@gmx.net> wrote:

> Am 10.11.2013 um 20:54 schrieb Alex Liberzon <alex.liber...@gmail.com>:
> 
>> Hi, 
>> 
>> After few failures to use RCS on Mac OS X 10.9 Mavericks, 
>> I found on the Xcode release notes 
>> https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-
>> Xcode/#//apple_ref/doc/uid/TP40001051-SW241
>> 
>> this statement: 
>> The CVS and RCS source control tools have been removed from Xcode 5. 11968433
> 
> Removing CVS and RCS control from Xcode doesn't imply it's removed from LyX.
> 
>> Does anybody know how to get those working back? 
> 
> You have to provide the cvs and rcs executables to get it working.
> Perhaps you miss these command line tools now after going to 10.9 + Xcode 5.
> 
>> Isn't it about time to use Git for Lyx? 
>> Does anyone know how to use Git from Lyx 
>> ( I know how to use it in the command line)
> 
> 
> It's supported with the upcoming LyX-2.1 release.
> 
> Regards,
> Stephan



RCS on Mac OS X 10.9 Mavericks with Xcode 5.1 doesn't work

2013-11-10 Thread Alex Liberzon
Hi, 

After few failures to use RCS on Mac OS X 10.9 Mavericks, 
I found on the Xcode release notes 
https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-
Xcode/#//apple_ref/doc/uid/TP40001051-SW241

this statement: 
The CVS and RCS source control tools have been removed from Xcode 5. 11968433

Does anybody know how to get those working back? 
Isn't it about time to use Git for Lyx? 
Does anyone know how to use Git from Lyx 
( I know how to use it in the command line)

Thanks
Alex



RCS on Mac OS X 10.9 Mavericks with Xcode 5.1 doesn't work

2013-11-10 Thread Alex Liberzon
Hi, 

After few failures to use RCS on Mac OS X 10.9 Mavericks, 
I found on the Xcode release notes 
https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-
Xcode/#//apple_ref/doc/uid/TP40001051-SW241

this statement: 
The CVS and RCS source control tools have been removed from Xcode 5. 11968433

Does anybody know how to get those working back? 
Isn't it about time to use Git for Lyx? 
Does anyone know how to use Git from Lyx 
( I know how to use it in the command line)

Thanks
Alex



RCS on Mac OS X 10.9 Mavericks with Xcode 5.1 doesn't work

2013-11-10 Thread Alex Liberzon
Hi, 

After few failures to use RCS on Mac OS X 10.9 Mavericks, 
I found on the Xcode release notes 
https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-
Xcode/#//apple_ref/doc/uid/TP40001051-SW241

this statement: 
The CVS and RCS source control tools have been removed from Xcode 5. 11968433

Does anybody know how to get those working back? 
Isn't it about time to use Git for Lyx? 
Does anyone know how to use Git from Lyx 
( I know how to use it in the command line)

Thanks
Alex



Re: LyX + CAS

2013-09-05 Thread Alex Vergara Gil


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

2013-09-05 Thread Alex Vergara Gil


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

2013-09-05 Thread Alex Vergara Gil


  > >> 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

2013-09-02 Thread Alex Vergara Gil

  - 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

2013-09-02 Thread Alex Vergara Gil

  - 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

2013-09-02 Thread Alex Vergara Gil

  - 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

2013-08-09 Thread Alex Vergara Gil
  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

2013-08-09 Thread Alex Vergara Gil

  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

2013-08-09 Thread Alex Vergara Gil
  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

2013-08-09 Thread Alex Vergara Gil

  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

2013-08-09 Thread Alex Vergara Gil
  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

2013-08-09 Thread Alex Vergara Gil

  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

2013-07-15 Thread Alex Vergara Gil

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

2013-07-15 Thread Alex Vergara Gil

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

2013-07-15 Thread Alex Vergara Gil

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: Project's favorite license????

2013-07-05 Thread Alex Fernandez
Hi,

On Fri, Jul 5, 2013 at 9:58 PM, Liviu Andronic landronim...@gmail.comwrote:

 On Fri, Jul 5, 2013 at 6:50 PM, Steve Litt sl...@troubleshooters.com
 wrote:
  tex4ht and eLyXer, or the project's need to incorporate it. If my code
  is good, and my code is licensed right, it very well could be that I or
  someone else can tear chunks out of my code and put them in LyX or
  eLyXer or make a shellscript or whatever.
 
 I can easily imagine Alex, the author of eLyXer, accepting an ePub
 export switch in his converter.


I would be happy to. Just fork and send a pull request when you are ready
to:
  https://github.com/alexfernandez/elyxer/
That is how things work these days, and I cannot complain. Sadly I don't
have the time to do most things myself, but I have already received some
juicy pull requests and have integrated them happily.

As for the license, we can work things out to our mutual benefit. Open
source licenses are a means to an end.

Alex.


Re: Project's favorite license????

2013-07-05 Thread Alex Fernandez
Hi,

On Fri, Jul 5, 2013 at 9:58 PM, Liviu Andronic landronim...@gmail.comwrote:

 On Fri, Jul 5, 2013 at 6:50 PM, Steve Litt sl...@troubleshooters.com
 wrote:
  tex4ht and eLyXer, or the project's need to incorporate it. If my code
  is good, and my code is licensed right, it very well could be that I or
  someone else can tear chunks out of my code and put them in LyX or
  eLyXer or make a shellscript or whatever.
 
 I can easily imagine Alex, the author of eLyXer, accepting an ePub
 export switch in his converter.


I would be happy to. Just fork and send a pull request when you are ready
to:
  https://github.com/alexfernandez/elyxer/
That is how things work these days, and I cannot complain. Sadly I don't
have the time to do most things myself, but I have already received some
juicy pull requests and have integrated them happily.

As for the license, we can work things out to our mutual benefit. Open
source licenses are a means to an end.

Alex.


Re: Project's favorite license????

2013-07-05 Thread Alex Fernandez
Hi,

On Fri, Jul 5, 2013 at 9:58 PM, Liviu Andronic <landronim...@gmail.com>wrote:

> On Fri, Jul 5, 2013 at 6:50 PM, Steve Litt <sl...@troubleshooters.com>
> wrote:
> > tex4ht and eLyXer, or the project's need to incorporate it. If my code
> > is good, and my code is licensed right, it very well could be that I or
> > someone else can tear chunks out of my code and put them in LyX or
> > eLyXer or make a shellscript or whatever.
> >
> I can easily imagine Alex, the author of eLyXer, accepting an ePub
> export switch in his converter.
>

I would be happy to. Just fork and send a pull request when you are ready
to:
  https://github.com/alexfernandez/elyxer/
That is how things work these days, and I cannot complain. Sadly I don't
have the time to do most things myself, but I have already received some
juicy pull requests and have integrated them happily.

As for the license, we can work things out to our mutual benefit. Open
source licenses are a means to an end.

Alex.


Re: document statistics

2013-06-14 Thread Alex Vergara Gil

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

2013-06-14 Thread Alex Vergara Gil

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

2013-06-14 Thread Alex Vergara Gil

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

2013-05-22 Thread Alex Vergara Gil

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

2013-05-22 Thread Alex Vergara Gil

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

2013-05-22 Thread Alex Vergara Gil

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

2013-04-05 Thread Alex Vergara Gil


- 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






  1   2   3   4   5   6   7   8   9   10   >