Re: In-text citation page numbers?

2013-01-22 Thread Jürgen Spitzmüller
Ray Rashif wrote:
 The text before and after only helps for single citations - they are
 totally useless for multiple citations. For e.g., p. 12 in the text after
 field meant for the author Doe would appear as Doe, 1992; Gorham, 2003,
 p. 12. The text before and after fields are only for the entire citation
 string - they do not act per citation key. There are hundreds of citations
 in this paper (already has these citations, I just need to add page numbers
 now) so I can't possibly go back and separate out each key.
 
 Now, is there any other trick to accomplish this?

Not with traditional BibTeX, AFAIK. Biblatex offers so-called Qualified 
Citation Lists which do what you want (see sec. 3.7.3 of the biblatex 
manual), but those are not yet natively supported by LyX.

So I fear your only way is to split up those complex citations to single ones.

Jürgen



Re: Conversion of pictures: which path is taken?

2013-01-22 Thread Rainer M Krug

On 21/01/13 22:50, Julien Rioux wrote:

On 21/01/2013 8:31 AM, Rainer M Krug wrote:

Hi

I am using plantuml to create uml charts in a document, defined formats
and converters and it works nicely. Plantuml has different output
formats, among others png, eps and svg.

I have converters from eps to pdf (epstopdf) and from svg to pdf
(rsvg-convert).

Both these go through to steps:

 |- .eps - .pdf(pstopdf)
..plantuml -|
 |- .svg - .pdf(pstopdf)

Now LyX chooses to go via .svg, which, based on the internals of
plantuml, does not make much sense. I can obviously delete the
conversion plantuml - svg, and LyX will go the other way, but then the
preview in LyX is of much worse quality (no idea why).

So why does LyX choose to go via svg?


Because it uses .svg in the editor view if possible, otherwise .png or 
something else.


OK - but the conversion in the editor is independent of the one for the 
compiled document, I assume?



Is there a way to trick it into going via eps?



Given two paths, LyX will choose a path that only goes through vector formats 
if possible, and the
shortest path. Given that both your paths are equivalent based on these two 
points, I am not sure
what breaks the tie in the end. You can probably trick LyX by marking .svg as a 
non-vector format.


Could work. But for me it works with removing the plantuml - svg conversion.

Thanks,

Rainer



Cheers,
Julien





Re: Word won't open simplest LyXHTML file

2013-01-22 Thread Rainer M Krug

On 22/01/13 05:03, Jerry wrote:


On Jan 18, 2013, at 1:44 AM, Rainer M Krug wrote:


On 18/01/13 09:10, Rainer M Krug wrote:

On 18/01/13 05:17, Jerry wrote:


On Jan 17, 2013, at 2:30 AM, Alex Fernandez wrote:


Hi Jerry,

I am the primary author of eLyXer.

On Thu, Jan 17, 2013 at 4:49 AM, Jerry lancebo...@qwest.net
mailto:lancebo...@qwest.net wrote:

Thanks for that tip. I checked it out. It's just a Python thing so it works 
fine on OS
X, and LyX picked it up as advertised.


Yes, I can confirm that OS X is fully supported.


The output on my simple test case does look nice in a browser, but I get the 
same error
opening with Word as I first described: The XML file bla bla bla cannot be 
opened...
etc. I thought maybe my copy of Word was broken but it reads other HTML files 
fine--I'm
guessing they don't have the XML stuff in them, however.


Word does not like XHTML very much; you need to export to HTML 4, using the 
--html
option. http://elyxer.nongnu.org/userguide.html#sub:HTML-Code If you are doing 
the
conversion inside LyX, instead of on the command line, you have to add the 
--html in the
conversion interface.


I checked the HTML file that eLyXer made with the W3C page and got: The 
uploaded
document - was successfully checked as XHTML 1.0 Transitional.


Yes, eLyXer outputs pure XHTML.


Also--eLyXer does not appear to use MathML so I don't think there is any hope 
of getting
editable math into Word using this method. (But I haven't read all of the 
eLyXer docs.)


eLyXer has several options for Math output:
http://elyxer.nongnu.org/userguide.html#sub:Math Sadly, none of them is MathML, 
since at
the time eLyXer was conceived it was not very widely supported, and I have not 
found the
time to add it.

Hope this helps,

Alex Fernández.


Hi, Alex,

Thanks for the comments and for the great tool. It does what it claims to to, 
convert LyX
to HTML, with lots of math options. The default conversion looks great in a 
browser.

I tried your --html suggestion and indeed Word opens it, and displays it much 
as a browser
does. Unfortunately, the HTML limitations are apparent; this is probably as 
good as a
HTML-only conversion can get.

In my slow-witted way, I'm starting to understand why Word will not open the 
various XML
formats that I'm throwing at it. (I also played with TeXht today (and the Mac 
GUI over it,
SimpleTeXht. This method also makes XML in some variations, and .odt.) So Word 
isn't
broken—it's just not made to recognize this particular kind of XML. (I want to 
use the
word schema but don't really know what I'm talking about.) So What is 
missing, as has
been stated in previous threads, is a converter from the XML that we're seeing 
to .docx,
it seems.


check pandoc - I am using pandoc to convert xhtml to docx and odt - works 
perfect for me. I
just


Ups - should have been: ### I just added the following converter:

\converter xhtml msdocx pandoc -o $$o $$i  \converter xhtml odt lo 
pandoc -o $$o
$$i  ###


Hi Ranier,

I added these two lines to my preferences file and now I see to additional 
items in the Export
list, but I don't know how to use them. Converter implies feeding them xhtml 
files but all I
can see to do is to select them in the Export list which merely creates e.g. a 
.msdocx file,
whatever that is.


Sorry - forgotten, that I added the following format:

\format msdocx docx Microsoft docx  libreoffice libreoffice 
document,menu=export

So the .msdocx is a simple docx file, which got the extension because the format definition was not 
there.




Also, I played with pandoc a while back and its conversion of a very simple LyX 
file to Word was
not perfect. I went LyX - LaTeX - docx. I did not investigate setting options 
very much. I
recall that equations made the trip and were editable in Word 2011 (Mac) 
built-in equation
editor, but equation numbers were lost. Today's effort, also on a simple but 
different document,
LyX - LaTeX - docx, one equation was not typeset (only the markup appeared), 
a .eps file was
not found even though it was present, and section labels were translated as 
literal text.
Converting to .odt was worse, and at least once caused it to crash when it was 
attempting to
repair what it thought was a damaged converted file. (But what _doesn't_ cause 
LibreOffice to
crash?)


I also tried to go the LyX - LaTeX - docx route, but the results were not as usable as via xhtml. 
So I would suggest to try the route via xhtml. You should try both converters (the build in and 
eLyXe), as they performed differently on different objects. As my document did not contain any 
equations, I can not comment on that.


I must say, that I also used pandoc to convert to odt and then converted the odt to docx with 
OpenOffice (this was before LibreOffice...) and it also worked well.


I can only suggest to try the different paths out and see which works best, and then post your 
experiences here and add them to  http://www.lyx.org/trac/ticket/6042 so that there is 

Re: Word won't open simplest LyXHTML file

2013-01-22 Thread Richard Heck

On 01/22/2013 02:38 AM, Nico Williams wrote:


Hmm, the thought occurs that my lyx2xml script wouldn't be broken by 
any changes to.lyx, not if it was always chained with lyx2lyx so that 
it's input were always in a version supported by lyx2xml...




It wouldn't be broken, but it wouldn't support new features that way, 
since those are typically reverted to ERT. This was one of the main 
considerations around the XHTML issue.


rh



Re: Word won't open simplest LyXHTML file

2013-01-22 Thread Nico Williams
On Tue, Jan 22, 2013 at 8:52 AM, Richard Heck rgh...@lyx.org wrote:
 On 01/22/2013 02:38 AM, Nico Williams wrote:
 Hmm, the thought occurs that my lyx2xml script wouldn't be broken by any
 changes to.lyx, not if it was always chained with lyx2lyx so that it's input
 were always in a version supported by lyx2xml...

 It wouldn't be broken, but it wouldn't support new features that way, since
 those are typically reverted to ERT. This was one of the main considerations
 around the XHTML issue.

That's true.  Although lyx2xml is so generic that you'd have to do
something fairly radical to break it.  For example, merely adding a
new \begin_something wouldn't do it, but adding one that does not have
a corresponding \end_something would.  It has some things hard-coded,
line that \index is a begin-like token, or that \color, \emph, ... are
text styling tokens, and that \color appears in the header as
not-a-text-style token, which means that anything that would have to
be added to the sets of hard-coded tokens would indeed break lyx2xml,
but it's trivial to add those.  Perhaps you might like to review the
script and see for yourself?  If nothing else the script shows the few
odd things in .lyx that tripped me up.

(The script is still missing a post of the JavaScript LaTeX math -
MathML code, which I should do at some point.  And it's only really
working for the features I use or am aware of.  There's probably other
things missing besides math, though to be fair, the LaTeX math does
get preserved in the XML output, but as the original LaTeX.)

Nico
--


Misunderstood comment on LyX Site.

2013-01-22 Thread Andrea Landella
Dear Misters,

I wold begin my request with a special thanks to all of you for the 
continuing efforts in order to 

make LyX even more user friendly, as my favourite LaTeX front-end.

Recently, I came up with a problem with the new release of the stabilized 
version 2.0.5, I installed
LyX 2.0.4 and MikTeX on 9-10-12, since the version 2.0.5 has some useful 
improvements, I thought
that it could be easy to update using a simple installer as the comment on 
the site states: 


Installer: LyX-2.0.5.-Installer-2.exe (~35 MB)
Download
 this one if you already have an older version of LyX installed and you 
want to update it. 

This installer requires that LaTeX (MikTeX or TeXLive) already be installed. 

With Windows 7 I wonder if the direct installation of the *.exe file implies 
the formation of two distinct 

versions of LyX at the same time or, as the comment says, the update of my 
current version. I hope
you will be able to give me the detailed explanation on how the version update 
should be done properly.


Best Regards
Andrea Landella


P.S.:I truly apologize for any possible grammatical mistakes, because English 
is not my first language.

Re: Saving a document as a new default template?

2013-01-22 Thread Paul A . Rubin
Document  Settings...  Save as Document Defaults button?

Paul



Re: Word won't open simplest LyXHTML file

2013-01-22 Thread Jerry

On Jan 22, 2013, at 1:38 AM, Rainer M Krug wrote:

 
 
 Also, I played with pandoc a while back and its conversion of a very simple 
 LyX file to Word was
 not perfect. I went LyX - LaTeX - docx. I did not investigate setting 
 options very much. I
 recall that equations made the trip and were editable in Word 2011 (Mac) 
 built-in equation
 editor, but equation numbers were lost. Today's effort, also on a simple but 
 different document,
 LyX - LaTeX - docx, one equation was not typeset (only the markup 
 appeared), a .eps file was
 not found even though it was present, and section labels were translated as 
 literal text.
 Converting to .odt was worse, and at least once caused it to crash when it 
 was attempting to
 repair what it thought was a damaged converted file. (But what _doesn't_ 
 cause LibreOffice to
 crash?)
 
 I also tried to go the LyX - LaTeX - docx route, but the results were not 
 as usable as via xhtml. So I would suggest to try the route via xhtml.

How did you get from XHTML - docx? Pandoc (according to the first paragraph of 
the user's manual) does not accept XHTML input files.
Jerry

 You should try both converters (the build in and eLyXe), as they performed 
 differently on different objects. As my document did not contain any 
 equations, I can not comment on that.
 
 I must say, that I also used pandoc to convert to odt and then converted the 
 odt to docx with OpenOffice (this was before LibreOffice...) and it also 
 worked well.
 
 I can only suggest to try the different paths out and see which works best, 
 and then post your experiences here and add them to  
 http://www.lyx.org/trac/ticket/6042 so that there is some progress with 
 pandoc support in LyX.
 
 Cheers,
 
 Rainer
 
 
 
 Jerry



Re: In-text citation page numbers?

2013-01-22 Thread Jürgen Spitzmüller
Ray Rashif wrote:
 The text before and after only helps for single citations - they are
 totally useless for multiple citations. For e.g., p. 12 in the text after
 field meant for the author Doe would appear as Doe, 1992; Gorham, 2003,
 p. 12. The text before and after fields are only for the entire citation
 string - they do not act per citation key. There are hundreds of citations
 in this paper (already has these citations, I just need to add page numbers
 now) so I can't possibly go back and separate out each key.
 
 Now, is there any other trick to accomplish this?

Not with traditional BibTeX, AFAIK. Biblatex offers so-called Qualified 
Citation Lists which do what you want (see sec. 3.7.3 of the biblatex 
manual), but those are not yet natively supported by LyX.

So I fear your only way is to split up those complex citations to single ones.

Jürgen



Re: Conversion of pictures: which path is taken?

2013-01-22 Thread Rainer M Krug

On 21/01/13 22:50, Julien Rioux wrote:

On 21/01/2013 8:31 AM, Rainer M Krug wrote:

Hi

I am using plantuml to create uml charts in a document, defined formats
and converters and it works nicely. Plantuml has different output
formats, among others png, eps and svg.

I have converters from eps to pdf (epstopdf) and from svg to pdf
(rsvg-convert).

Both these go through to steps:

 |- .eps - .pdf(pstopdf)
..plantuml -|
 |- .svg - .pdf(pstopdf)

Now LyX chooses to go via .svg, which, based on the internals of
plantuml, does not make much sense. I can obviously delete the
conversion plantuml - svg, and LyX will go the other way, but then the
preview in LyX is of much worse quality (no idea why).

So why does LyX choose to go via svg?


Because it uses .svg in the editor view if possible, otherwise .png or 
something else.


OK - but the conversion in the editor is independent of the one for the 
compiled document, I assume?



Is there a way to trick it into going via eps?



Given two paths, LyX will choose a path that only goes through vector formats 
if possible, and the
shortest path. Given that both your paths are equivalent based on these two 
points, I am not sure
what breaks the tie in the end. You can probably trick LyX by marking .svg as a 
non-vector format.


Could work. But for me it works with removing the plantuml - svg conversion.

Thanks,

Rainer



Cheers,
Julien





Re: Word won't open simplest LyXHTML file

2013-01-22 Thread Rainer M Krug

On 22/01/13 05:03, Jerry wrote:


On Jan 18, 2013, at 1:44 AM, Rainer M Krug wrote:


On 18/01/13 09:10, Rainer M Krug wrote:

On 18/01/13 05:17, Jerry wrote:


On Jan 17, 2013, at 2:30 AM, Alex Fernandez wrote:


Hi Jerry,

I am the primary author of eLyXer.

On Thu, Jan 17, 2013 at 4:49 AM, Jerry lancebo...@qwest.net
mailto:lancebo...@qwest.net wrote:

Thanks for that tip. I checked it out. It's just a Python thing so it works 
fine on OS
X, and LyX picked it up as advertised.


Yes, I can confirm that OS X is fully supported.


The output on my simple test case does look nice in a browser, but I get the 
same error
opening with Word as I first described: The XML file bla bla bla cannot be 
opened...
etc. I thought maybe my copy of Word was broken but it reads other HTML files 
fine--I'm
guessing they don't have the XML stuff in them, however.


Word does not like XHTML very much; you need to export to HTML 4, using the 
--html
option. http://elyxer.nongnu.org/userguide.html#sub:HTML-Code If you are doing 
the
conversion inside LyX, instead of on the command line, you have to add the 
--html in the
conversion interface.


I checked the HTML file that eLyXer made with the W3C page and got: The 
uploaded
document - was successfully checked as XHTML 1.0 Transitional.


Yes, eLyXer outputs pure XHTML.


Also--eLyXer does not appear to use MathML so I don't think there is any hope 
of getting
editable math into Word using this method. (But I haven't read all of the 
eLyXer docs.)


eLyXer has several options for Math output:
http://elyxer.nongnu.org/userguide.html#sub:Math Sadly, none of them is MathML, 
since at
the time eLyXer was conceived it was not very widely supported, and I have not 
found the
time to add it.

Hope this helps,

Alex Fernández.


Hi, Alex,

Thanks for the comments and for the great tool. It does what it claims to to, 
convert LyX
to HTML, with lots of math options. The default conversion looks great in a 
browser.

I tried your --html suggestion and indeed Word opens it, and displays it much 
as a browser
does. Unfortunately, the HTML limitations are apparent; this is probably as 
good as a
HTML-only conversion can get.

In my slow-witted way, I'm starting to understand why Word will not open the 
various XML
formats that I'm throwing at it. (I also played with TeXht today (and the Mac 
GUI over it,
SimpleTeXht. This method also makes XML in some variations, and .odt.) So Word 
isn't
broken—it's just not made to recognize this particular kind of XML. (I want to 
use the
word schema but don't really know what I'm talking about.) So What is 
missing, as has
been stated in previous threads, is a converter from the XML that we're seeing 
to .docx,
it seems.


check pandoc - I am using pandoc to convert xhtml to docx and odt - works 
perfect for me. I
just


Ups - should have been: ### I just added the following converter:

\converter xhtml msdocx pandoc -o $$o $$i  \converter xhtml odt lo 
pandoc -o $$o
$$i  ###


Hi Ranier,

I added these two lines to my preferences file and now I see to additional 
items in the Export
list, but I don't know how to use them. Converter implies feeding them xhtml 
files but all I
can see to do is to select them in the Export list which merely creates e.g. a 
.msdocx file,
whatever that is.


Sorry - forgotten, that I added the following format:

\format msdocx docx Microsoft docx  libreoffice libreoffice 
document,menu=export

So the .msdocx is a simple docx file, which got the extension because the format definition was not 
there.




Also, I played with pandoc a while back and its conversion of a very simple LyX 
file to Word was
not perfect. I went LyX - LaTeX - docx. I did not investigate setting options 
very much. I
recall that equations made the trip and were editable in Word 2011 (Mac) 
built-in equation
editor, but equation numbers were lost. Today's effort, also on a simple but 
different document,
LyX - LaTeX - docx, one equation was not typeset (only the markup appeared), 
a .eps file was
not found even though it was present, and section labels were translated as 
literal text.
Converting to .odt was worse, and at least once caused it to crash when it was 
attempting to
repair what it thought was a damaged converted file. (But what _doesn't_ cause 
LibreOffice to
crash?)


I also tried to go the LyX - LaTeX - docx route, but the results were not as usable as via xhtml. 
So I would suggest to try the route via xhtml. You should try both converters (the build in and 
eLyXe), as they performed differently on different objects. As my document did not contain any 
equations, I can not comment on that.


I must say, that I also used pandoc to convert to odt and then converted the odt to docx with 
OpenOffice (this was before LibreOffice...) and it also worked well.


I can only suggest to try the different paths out and see which works best, and then post your 
experiences here and add them to  http://www.lyx.org/trac/ticket/6042 so that there is 

Re: Word won't open simplest LyXHTML file

2013-01-22 Thread Richard Heck

On 01/22/2013 02:38 AM, Nico Williams wrote:


Hmm, the thought occurs that my lyx2xml script wouldn't be broken by 
any changes to.lyx, not if it was always chained with lyx2lyx so that 
it's input were always in a version supported by lyx2xml...




It wouldn't be broken, but it wouldn't support new features that way, 
since those are typically reverted to ERT. This was one of the main 
considerations around the XHTML issue.


rh



Re: Word won't open simplest LyXHTML file

2013-01-22 Thread Nico Williams
On Tue, Jan 22, 2013 at 8:52 AM, Richard Heck rgh...@lyx.org wrote:
 On 01/22/2013 02:38 AM, Nico Williams wrote:
 Hmm, the thought occurs that my lyx2xml script wouldn't be broken by any
 changes to.lyx, not if it was always chained with lyx2lyx so that it's input
 were always in a version supported by lyx2xml...

 It wouldn't be broken, but it wouldn't support new features that way, since
 those are typically reverted to ERT. This was one of the main considerations
 around the XHTML issue.

That's true.  Although lyx2xml is so generic that you'd have to do
something fairly radical to break it.  For example, merely adding a
new \begin_something wouldn't do it, but adding one that does not have
a corresponding \end_something would.  It has some things hard-coded,
line that \index is a begin-like token, or that \color, \emph, ... are
text styling tokens, and that \color appears in the header as
not-a-text-style token, which means that anything that would have to
be added to the sets of hard-coded tokens would indeed break lyx2xml,
but it's trivial to add those.  Perhaps you might like to review the
script and see for yourself?  If nothing else the script shows the few
odd things in .lyx that tripped me up.

(The script is still missing a post of the JavaScript LaTeX math -
MathML code, which I should do at some point.  And it's only really
working for the features I use or am aware of.  There's probably other
things missing besides math, though to be fair, the LaTeX math does
get preserved in the XML output, but as the original LaTeX.)

Nico
--


Misunderstood comment on LyX Site.

2013-01-22 Thread Andrea Landella
Dear Misters,

I wold begin my request with a special thanks to all of you for the 
continuing efforts in order to 

make LyX even more user friendly, as my favourite LaTeX front-end.

Recently, I came up with a problem with the new release of the stabilized 
version 2.0.5, I installed
LyX 2.0.4 and MikTeX on 9-10-12, since the version 2.0.5 has some useful 
improvements, I thought
that it could be easy to update using a simple installer as the comment on 
the site states: 


Installer: LyX-2.0.5.-Installer-2.exe (~35 MB)
Download
 this one if you already have an older version of LyX installed and you 
want to update it. 

This installer requires that LaTeX (MikTeX or TeXLive) already be installed. 

With Windows 7 I wonder if the direct installation of the *.exe file implies 
the formation of two distinct 

versions of LyX at the same time or, as the comment says, the update of my 
current version. I hope
you will be able to give me the detailed explanation on how the version update 
should be done properly.


Best Regards
Andrea Landella


P.S.:I truly apologize for any possible grammatical mistakes, because English 
is not my first language.

Re: Saving a document as a new default template?

2013-01-22 Thread Paul A . Rubin
Document  Settings...  Save as Document Defaults button?

Paul



Re: Word won't open simplest LyXHTML file

2013-01-22 Thread Jerry

On Jan 22, 2013, at 1:38 AM, Rainer M Krug wrote:

 
 
 Also, I played with pandoc a while back and its conversion of a very simple 
 LyX file to Word was
 not perfect. I went LyX - LaTeX - docx. I did not investigate setting 
 options very much. I
 recall that equations made the trip and were editable in Word 2011 (Mac) 
 built-in equation
 editor, but equation numbers were lost. Today's effort, also on a simple but 
 different document,
 LyX - LaTeX - docx, one equation was not typeset (only the markup 
 appeared), a .eps file was
 not found even though it was present, and section labels were translated as 
 literal text.
 Converting to .odt was worse, and at least once caused it to crash when it 
 was attempting to
 repair what it thought was a damaged converted file. (But what _doesn't_ 
 cause LibreOffice to
 crash?)
 
 I also tried to go the LyX - LaTeX - docx route, but the results were not 
 as usable as via xhtml. So I would suggest to try the route via xhtml.

How did you get from XHTML - docx? Pandoc (according to the first paragraph of 
the user's manual) does not accept XHTML input files.
Jerry

 You should try both converters (the build in and eLyXe), as they performed 
 differently on different objects. As my document did not contain any 
 equations, I can not comment on that.
 
 I must say, that I also used pandoc to convert to odt and then converted the 
 odt to docx with OpenOffice (this was before LibreOffice...) and it also 
 worked well.
 
 I can only suggest to try the different paths out and see which works best, 
 and then post your experiences here and add them to  
 http://www.lyx.org/trac/ticket/6042 so that there is some progress with 
 pandoc support in LyX.
 
 Cheers,
 
 Rainer
 
 
 
 Jerry



Re: In-text citation page numbers?

2013-01-22 Thread Jürgen Spitzmüller
Ray Rashif wrote:
> The text before and after only helps for single citations - they are
> totally useless for multiple citations. For e.g., "p. 12" in the text after
> field meant for the author "Doe" would appear as "Doe, 1992; Gorham, 2003,
> p. 12". The text before and after fields are only for the entire citation
> string - they do not act per citation key. There are hundreds of citations
> in this paper (already has these citations, I just need to add page numbers
> now) so I can't possibly go back and separate out each key.
> 
> Now, is there any other trick to accomplish this?

Not with traditional BibTeX, AFAIK. Biblatex offers so-called "Qualified 
Citation Lists" which do what you want (see sec. 3.7.3 of the biblatex 
manual), but those are not yet natively supported by LyX.

So I fear your only way is to split up those complex citations to single ones.

Jürgen



Re: Conversion of pictures: which path is taken?

2013-01-22 Thread Rainer M Krug

On 21/01/13 22:50, Julien Rioux wrote:

On 21/01/2013 8:31 AM, Rainer M Krug wrote:

Hi

I am using plantuml to create uml charts in a document, defined formats
and converters and it works nicely. Plantuml has different output
formats, among others png, eps and svg.

I have converters from eps to pdf (epstopdf) and from svg to pdf
(rsvg-convert).

Both these go through to steps:

 |-> .eps -> .pdf(pstopdf)
..plantuml ->|
 |-> .svg -> .pdf(pstopdf)

Now LyX chooses to go via .svg, which, based on the internals of
plantuml, does not make much sense. I can obviously delete the
conversion plantuml -> svg, and LyX will go the other way, but then the
preview in LyX is of much worse quality (no idea why).

So why does LyX choose to go via svg?


Because it uses .svg in the editor view if possible, otherwise .png or 
something else.


OK - but the conversion in the editor is independent of the one for the 
compiled document, I assume?



Is there a way to trick it into going via eps?



Given two paths, LyX will choose a path that only goes through vector formats 
if possible, and the
shortest path. Given that both your paths are equivalent based on these two 
points, I am not sure
what breaks the tie in the end. You can probably trick LyX by marking .svg as a 
non-vector format.


Could work. But for me it works with removing the plantuml -> svg conversion.

Thanks,

Rainer



Cheers,
Julien





Re: Word won't open simplest LyXHTML file

2013-01-22 Thread Rainer M Krug

On 22/01/13 05:03, Jerry wrote:


On Jan 18, 2013, at 1:44 AM, Rainer M Krug wrote:


On 18/01/13 09:10, Rainer M Krug wrote:

On 18/01/13 05:17, Jerry wrote:


On Jan 17, 2013, at 2:30 AM, Alex Fernandez wrote:


Hi Jerry,

I am the primary author of eLyXer.

On Thu, Jan 17, 2013 at 4:49 AM, Jerry > wrote:

Thanks for that tip. I checked it out. It's just a Python thing so it works 
fine on OS
X, and LyX picked it up as advertised.


Yes, I can confirm that OS X is fully supported.


The output on my simple test case does look nice in a browser, but I get the 
same error
opening with Word as I first described: "The XML file bla bla bla cannot be 
opened..."
etc. I thought maybe my copy of Word was broken but it reads other HTML files 
fine--I'm
guessing they don't have the XML stuff in them, however.


Word does not like XHTML very much; you need to export to HTML 4, using the 
--html
option. http://elyxer.nongnu.org/userguide.html#sub:HTML-Code If you are doing 
the
conversion inside LyX, instead of on the command line, you have to add the 
--html in the
conversion interface.


I checked the HTML file that eLyXer made with the W3C page and got: "The 
uploaded
document "-" was successfully checked as XHTML 1.0 Transitional."


Yes, eLyXer outputs pure XHTML.


Also--eLyXer does not appear to use MathML so I don't think there is any hope 
of getting
editable math into Word using this method. (But I haven't read all of the 
eLyXer docs.)


eLyXer has several options for Math output:
http://elyxer.nongnu.org/userguide.html#sub:Math Sadly, none of them is MathML, 
since at
the time eLyXer was conceived it was not very widely supported, and I have not 
found the
time to add it.

Hope this helps,

Alex Fernández.


Hi, Alex,

Thanks for the comments and for the great tool. It does what it claims to to, 
convert LyX
to HTML, with lots of math options. The default conversion looks great in a 
browser.

I tried your --html suggestion and indeed Word opens it, and displays it much 
as a browser
does. Unfortunately, the HTML limitations are apparent; this is probably as 
good as a
HTML-only conversion can get.

In my slow-witted way, I'm starting to understand why Word will not open the 
various XML
formats that I'm throwing at it. (I also played with TeXht today (and the Mac 
GUI over it,
SimpleTeXht. This method also makes XML in some variations, and .odt.) So Word 
isn't
broken—it's just not made to recognize this particular kind of XML. (I want to 
use the
word "schema" but don't really know what I'm talking about.) So What is 
missing, as has
been stated in previous threads, is a converter from the XML that we're seeing 
to .docx,
it seems.


check pandoc - I am using pandoc to convert xhtml to docx and odt - works 
perfect for me. I
just


Ups - should have been: ### I just added the following converter:

\converter "xhtml" "msdocx" "pandoc -o $$o $$i" "" \converter "xhtml" "odt lo" 
"pandoc -o $$o
$$i" "" ###


Hi Ranier,

I added these two lines to my preferences file and now I see to additional 
items in the Export
list, but I don't know how to use them. "Converter" implies feeding them xhtml 
files but all I
can see to do is to select them in the Export list which merely creates e.g. a 
.msdocx file,
whatever that is.


Sorry - forgotten, that I added the following format:

\format "msdocx" "docx" "Microsoft docx" "" "libreoffice" "libreoffice" 
"document,menu=export"

So the .msdocx is a simple docx file, which got the extension because the format definition was not 
there.




Also, I played with pandoc a while back and its conversion of a very simple LyX 
file to Word was
not perfect. I went LyX -> LaTeX -> docx. I did not investigate setting options 
very much. I
recall that equations made the trip and were editable in Word 2011 (Mac) 
built-in equation
editor, but equation numbers were lost. Today's effort, also on a simple but 
different document,
LyX -> LaTeX -> docx, one equation was not typeset (only the markup appeared), 
a .eps file was
not found even though it was present, and section labels were translated as 
literal text.
Converting to .odt was worse, and at least once caused it to crash when it was 
attempting to
repair what it thought was a damaged converted file. (But what _doesn't_ cause 
LibreOffice to
crash?)


I also tried to go the LyX -> LaTeX -> docx route, but the results were not as usable as via xhtml. 
So I would suggest to try the route via xhtml. You should try both converters (the build in and 
eLyXe), as they performed differently on different objects. As my document did not contain any 
equations, I can not comment on that.


I must say, that I also used pandoc to convert to odt and then converted the odt to docx with 
OpenOffice (this was before LibreOffice...) and it also worked well.


I can only suggest to try the different paths out and see which works best, and then post your 
experiences here and add them to  

Re: Word won't open simplest LyXHTML file

2013-01-22 Thread Richard Heck

On 01/22/2013 02:38 AM, Nico Williams wrote:


Hmm, the thought occurs that my lyx2xml script wouldn't be broken by 
any changes to.lyx, not if it was always chained with lyx2lyx so that 
it's input were always in a version supported by lyx2xml...




It wouldn't be broken, but it wouldn't support new features that way, 
since those are typically reverted to ERT. This was one of the main 
considerations around the XHTML issue.


rh



Re: Word won't open simplest LyXHTML file

2013-01-22 Thread Nico Williams
On Tue, Jan 22, 2013 at 8:52 AM, Richard Heck  wrote:
> On 01/22/2013 02:38 AM, Nico Williams wrote:
>> Hmm, the thought occurs that my lyx2xml script wouldn't be broken by any
>> changes to.lyx, not if it was always chained with lyx2lyx so that it's input
>> were always in a version supported by lyx2xml...
>
> It wouldn't be broken, but it wouldn't support new features that way, since
> those are typically reverted to ERT. This was one of the main considerations
> around the XHTML issue.

That's true.  Although lyx2xml is so generic that you'd have to do
something fairly radical to break it.  For example, merely adding a
new \begin_something wouldn't do it, but adding one that does not have
a corresponding \end_something would.  It has some things hard-coded,
line that \index is a begin-like token, or that \color, \emph, ... are
text styling tokens, and that \color appears in the header as
not-a-text-style token, which means that anything that would have to
be added to the sets of hard-coded tokens would indeed break lyx2xml,
but it's trivial to add those.  Perhaps you might like to review the
script and see for yourself?  If nothing else the script shows the few
odd things in .lyx that tripped me up.

(The script is still missing a post of the JavaScript LaTeX math ->
MathML code, which I should do at some point.  And it's only really
working for the features I use or am aware of.  There's probably other
things missing besides math, though to be fair, the LaTeX math does
get preserved in the XML output, but as the original LaTeX.)

Nico
--


Misunderstood comment on LyX Site.

2013-01-22 Thread Andrea Landella
Dear Misters,

I wold begin my request with a special "thanks" to all of you for the 
continuing efforts in order to 

make LyX even more user friendly, as my favourite LaTeX front-end.

Recently, I came up with a problem with the new release of the stabilized 
version 2.0.5, I installed
LyX 2.0.4 and MikTeX on 9-10-12, since the version 2.0.5 has some useful 
improvements, I thought
that it could be easy to update using a simple "installer" as the comment on 
the site states: 


Installer: LyX-2.0.5.-Installer-2.exe (~35 MB)
Download
 this one if you already have an older version of LyX installed and you 
want to update it. 

This installer requires that LaTeX (MikTeX or TeXLive) already be installed. 

With Windows 7 I wonder if the direct installation of the *.exe file implies 
the formation of two distinct 

versions of LyX at the same time or, as the comment says, the update of my 
current version. I hope
you will be able to give me the detailed explanation on how the version update 
should be done properly.


Best Regards
Andrea Landella


P.S.:I truly apologize for any possible grammatical mistakes, because English 
is not my first language.

Re: Saving a document as a new default template?

2013-01-22 Thread Paul A . Rubin
Document > Settings... > Save as Document Defaults button?

Paul



Re: Word won't open simplest LyXHTML file

2013-01-22 Thread Jerry

On Jan 22, 2013, at 1:38 AM, Rainer M Krug wrote:

>> 
>> 
>> Also, I played with pandoc a while back and its conversion of a very simple 
>> LyX file to Word was
>> not perfect. I went LyX -> LaTeX -> docx. I did not investigate setting 
>> options very much. I
>> recall that equations made the trip and were editable in Word 2011 (Mac) 
>> built-in equation
>> editor, but equation numbers were lost. Today's effort, also on a simple but 
>> different document,
>> LyX -> LaTeX -> docx, one equation was not typeset (only the markup 
>> appeared), a .eps file was
>> not found even though it was present, and section labels were translated as 
>> literal text.
>> Converting to .odt was worse, and at least once caused it to crash when it 
>> was attempting to
>> repair what it thought was a damaged converted file. (But what _doesn't_ 
>> cause LibreOffice to
>> crash?)
> 
> I also tried to go the LyX -> LaTeX -> docx route, but the results were not 
> as usable as via xhtml. So I would suggest to try the route via xhtml.

How did you get from XHTML -> docx? Pandoc (according to the first paragraph of 
the user's manual) does not accept XHTML input files.
Jerry

> You should try both converters (the build in and eLyXe), as they performed 
> differently on different objects. As my document did not contain any 
> equations, I can not comment on that.
> 
> I must say, that I also used pandoc to convert to odt and then converted the 
> odt to docx with OpenOffice (this was before LibreOffice...) and it also 
> worked well.
> 
> I can only suggest to try the different paths out and see which works best, 
> and then post your experiences here and add them to  
> http://www.lyx.org/trac/ticket/6042 so that there is some progress with 
> pandoc support in LyX.
> 
> Cheers,
> 
> Rainer
> 
> 
>> 
>> Jerry