Re: Word won't open simplest LyXHTML file

2013-01-29 Thread Jerry

On Jan 25, 2013, at 10:31 PM, Pavel Sanda wrote:

> Jerry wrote:
>> It has frequently been suggested on this list that, currently, the best way 
>> to get a LyX file into Microsoft Word is to export from LyX to LyXHMTM and 
>> then to open that XHTML file with Word. I have Word 2011 for OS X and this 
>> fails because Word will not open the XHTML file, with the message 
> 
> BTW have you tried open LyXHTML in Firefox/whatever, select all, copy to 
> clipboard and then paste it to LibreOffice/Word/..? IIRC I have success with 
> some simpler documents some time ago.
> 
> Pavel

Hmm I had not thought of that, but just now tried it.

Firefox to both Word and LibreOffice: Utter failure. The text is present but 
all formatting is lost and equations are complete garbage. No figures were 
transferred.

Safari to both: Much better. Formatting is preserved. Equations are much less 
mangled but still not usable, and not recognized as equations. Figures were 
lost but captions and figure numbers were intact.

It't not a surprise that figures didn't make it since they aren't included in 
the XHTML file.

Also, it's only a little surprising that Firefox faired much worse than Safari 
because WebKit-based browsers on OS X, when cutting and pasting to any other 
program, retain font and related information perfectly, whereas Firefox passes 
only the generic text with no formatting.

Jerry

Re: Word won't open simplest LyXHTML file

2013-01-25 Thread Pavel Sanda
Jerry wrote:
> It has frequently been suggested on this list that, currently, the best way 
> to get a LyX file into Microsoft Word is to export from LyX to LyXHMTM and 
> then to open that XHTML file with Word. I have Word 2011 for OS X and this 
> fails because Word will not open the XHTML file, with the message 

BTW have you tried open LyXHTML in Firefox/whatever, select all, copy to 
clipboard and then paste it to LibreOffice/Word/..? IIRC I have success with 
some simpler documents some time ago.

Pavel


Re: Word won't open simplest LyXHTML file

2013-01-25 Thread Wilfried
Jerry wrote:

> 
> On Jan 25, 2013, at 1:27 AM, Murat Yildizoglu wrote:
> 
> > I have in the pas used Tex2word from Chikrii software with success. 
> > Equationa are correctly translated in this case, figures not, 
> > but I prefer to include them in the optimal format for Word myself. 
> > This is commercial software (a plugin for Word), but it is not expensive 
> > and has even a lower education pricing policy. 
> > It uses MathType (but the free version of it is enough). 
> > Murat
> > 
> Thanks for that information, Murat. Indeed, Tex2word was one of the 
> Windows products that I saw near the top of a Google search.
> 

> One question about Word that I have not answered for myself 
> is the relation between (on the Mac) Word 2011 and older versions of Word. 
> The 2011 version has a built-in equation-setting function 
> while older versions of Word used MathType, a separate program. 
> I think this development has paralleled Word on Windows. 
> So my question is, is the newer version just a better-integrated version 
> of MathType or did Microsoft make their own? 
> I gather that they are not compatible with one another.

No, they aren't (same in the Word-for-Windows since version 2007). They
are completely different and it is not possible (afaik) to convert one
into the other, and I also don't know any converter which is able to
convert the new format into anything else - although the notation for
inputting equations in the new editor is much like LaTeX. 
The old one is still delivered with Word 2007 and 2010 for Windows (I
don't know about the Mac) but only available on the ribbon if the file
format is set to "Word 97-2003-document".
Some publishers ask not to use the new equation editor but the old
(MathType compatible) one when submitting an article as Word file.

-- 
Wilfried Hennings



Re: Re : Word won't open simplest LyXHTML file

2013-01-25 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 25/01/13 11:03, Murat Yildizoglu wrote:
> But the installation of Tex2Word could require Windows m: it comes with a 
> setup exe if I
> remember well, and probably needs to run some code to activate through 
> Internet, I have not
> tested this under Wine. I have been able to install it under Parallel's VM.

I just installed it under Wine (30 day test) and it worked - I am using "Play 
On Linux" and Office
2010.

Can not comment onthe activation though, but I do not expect ay problems there.

Cheers,

Rainer


> 
> -- Murat Yildizoglu http://yildizoglu.info
> 
> Le vendredi 25 janvier 2013 à 09:55, Rainer M Krug a écrit :
> 
> On 25/01/13 09:27, Murat Yildizoglu wrote:
 I have in the pas used Tex2word from Chikrii software with success. 
 Equationa are
 correctly translated in this case, figures not, but I prefer to include 
 them in the
 optimal format for Word myself. This is commercial software (a plugin for 
 Word), but it
 is not expensive and has even a lower education pricing policy. It uses 
 MathType (but the
 free version of it is enough).
> Thanks - I'll keep it in mind when I have convert again. And the academic 
> pricing is acceptable
> if it keeps co-authors happy
> 
> And as I get MSOffice via the University for free and it runs nicely under 
> wine, it might be
> an option.
> 
> Cheers,
> 
> Rainer
> 
 Murat
 
 Le vendredi 25 janvier 2013, Rainer M Krug a ←crit :
 
 On 25/01/13 05:20, Jerry wrote:
 
> On Jan 24, 2013, at 1:42 AM, Rainer M Krug wrote:
 
> On 24/01/13 01:02, Jerry wrote:
 
 On Jan 23, 2013, at 1:02 AM, Rainer M Krug wrote:
 
 On 22/01/13 23:37, Jerry wrote:
>>> 
>>> 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
 
 Well - using
 
 pandoc -o newfile.docx newfile1.xhtml
 
 works as expected and produces a docx file.
 
 So I can only say it works. I only used the converters and format 
 definitions as 
 mentioned earlier.
 
 
 Truy it:
 
 simple lyx file, export to LyXhtml and use above command to convert to 
 docx.
 
 Cheers,
 
 Rainer
 
> Thanks, Ranier. I have just now tried this on a simple document (two 
> equations,
> two sections, a footnote, a figure with caption, a greyed comment, 
> and two
> cross references (to an equation and to a section).
 
> As usual, the LyXHTML looks very good. But in the docx, the equations 
> are not 
> rendered and contain spurious text, the figure caption and figure 
> name are
> separated from the figure and are shown as normal text, spurious text 
> is
> inserted relating to the image, and all of the cross-references move 
> the cursor
> to the title rather than to where it should move. The footnote is 
> printed as
> ordinary text as is the greyed text also.
 
> Without doubt this is not perfect. As I said, I can't comment on 
> equations and I did
> not worry about the captions. Have you tried LyX -> eLyXer -> pandoc as 
> well?
 
 
> pandoc -o newfile.odt newfile1.xhtml
 
> results in a similar result, but with completely nonfunctional cross 
> refer

Re : Word won't open simplest LyXHTML file

2013-01-25 Thread Murat Yildizoglu
But the installation of Tex2Word could require Windows m: it comes with a setup 
exe if I remember well, and probably needs to run some code to activate through 
Internet, I have not tested this under Wine. I have been able to install it 
under Parallel's VM.   

--  
Murat Yildizoglu
http://yildizoglu.info


Le vendredi 25 janvier 2013 à 09:55, Rainer M Krug a écrit :

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>  
> On 25/01/13 09:27, Murat Yildizoglu wrote:
> > I have in the pas used Tex2word from Chikrii software with success. 
> > Equationa are correctly  
> > translated in this case, figures not, but I prefer to include them in the 
> > optimal format for
> > Word myself. This is commercial software (a plugin for Word), but it is not 
> > expensive and has
> > even a lower education pricing policy. It uses MathType (but the free 
> > version of it is enough).
> >  
>  
> Thanks - I'll keep it in mind when I have convert again. And the academic 
> pricing is acceptable if
> it keeps co-authors happy
>  
> And as I get MSOffice via the University for free and it runs nicely under 
> wine, it might be an
> option.
>  
> Cheers,
>  
> Rainer
>  
> > Murat
> >  
> > Le vendredi 25 janvier 2013, Rainer M Krug a ←crit :
> >  
> > On 25/01/13 05:20, Jerry wrote:
> >  
> > > On Jan 24, 2013, at 1:42 AM, Rainer M Krug wrote:
> >  
> > > On 24/01/13 01:02, Jerry wrote:
> > > > > >  
> > > > > > On Jan 23, 2013, at 1:02 AM, Rainer M Krug wrote:
> > > > > >  
> > > > > > On 22/01/13 23:37, Jerry wrote:
> > > > > > > > >  
> > > > > > > > > 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
> > > > > > > > >  
> > > > > > > >  
> > > > > > >  
> > > > > >  
> > > > > >  
> > > > > > Well - using
> > > > > >  
> > > > > > pandoc -o newfile.docx newfile1.xhtml
> > > > > >  
> > > > > > works as expected and produces a docx file.
> > > > > >  
> > > > > > So I can only say it works. I only used the converters and format 
> > > > > > definitions as  
> > > > > > mentioned earlier.
> > > > > >  
> > > > > >  
> > > > > > Truy it:
> > > > > >  
> > > > > > simple lyx file, export to LyXhtml and use above command to convert 
> > > > > > to docx.
> > > > > >  
> > > > > > Cheers,
> > > > > >  
> > > > > > Rainer
> > > > > >  
> > > > > > > Thanks, Ranier. I have just now tried this on a simple document 
> > > > > > > (two equations, two  
> > > > > > > sections, a footnote, a figure with caption, a greyed comment, 
> > > > > > > and two cross
> > > > > > > references (to an equation and to a section).
> > > > > > >  
> > > > > >  
> > > > > >  
> > > > > > > As usual, the LyXHTML looks very good. But in the docx, the 
> > > > > > > equations are not
> > > > > > > rendered and contain spurious text, the figure caption and figure 
> > > > > > > name are separated
> > > > > > > from the figure and are shown as normal text, spurious text is 
> > > > > > > inserted relating to
> > > > > > > the image, and all of the cross-references move the cursor to the 
> > > > > > > title rather than
> > > > > > > to where it should move. The footnote is printed as ordinary text 
> > > > > > > as is th

Re: Word won't open simplest LyXHTML file

2013-01-25 Thread Jerry

On Jan 25, 2013, at 1:27 AM, Murat Yildizoglu wrote:

> I have in the pas used Tex2word from Chikrii software with success. Equationa 
> are correctly translated in this case, figures not, but I prefer to include 
> them in the optimal format for Word myself. This is commercial software (a 
> plugin for Word), but it is not expensive and has even a lower education 
> pricing policy. It uses MathType (but the free version of it is enough). 
> Murat
> 
Thanks for that information, Murat. Indeed, Tex2word was one of the Windows 
products that I saw near the top of a Google search.

One question about Word that I have not answered for myself is the relation 
between (on the Mac) Word 2011 and older versions of Word. The 2011 version has 
a built-in equation-setting function while older versions of Word used 
MathType, a separate program. I think this development has paralleled Word on 
Windows. So my question is, is the newer version just a better-integrated 
version of MathType or did Microsoft make their own? I gather that they are not 
compatible with one another.

Jerry



Re: Word won't open simplest LyXHTML file

2013-01-25 Thread Jerry

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

>>> Unless there is progress from other quarters in the meantime, I suppose 
>>> when the occasion 
>>> arises to make a conversion, I'll look into commercial options on Windows.
> 
> Do they work as expected and reliably?

I have no idea. At least one company is charging $99 (USD) for their product. 

> 
>>> As a Mac user, I can of course run Windows, but I don't relish the idea of 
>>> buying another 
>>> copy of Office, plus converter software for Windows. I don't mind paying 
>>> for commercial 
>>> software except Microsoft stuff which I find is generally of poor quality 
>>> (in fact, I often 
>>> prefer it)

Sorry for that confusing sentence. What I meant to say was that I frequently 
find that someone who charges money for their product is committed to keeping 
it up to date and improving it rather than letting it languish. Of course I say 
that with due deference to the amazing LyX team (and many other open source 
volunteer efforts) but not to a lot of one-person freeware projects who leave a 
sometimes large user base hanging, such as the case of the recent abandonment 
of the great word processor called Bean, on the Mac.

>>> but the extra hassle of going this route, with still unknown results, is 
>>> not 
>>> appealing. I think I recall a Windows converter from LaTeX to Word where 
>>> there was also 
>>> offered a manual conversion of anything that their software did not 
>>> convert, for an 
>>> additional fee per megabyte over a certain level of file size. What a mess.
> 
> True - even though commercial, could you please report back if you find a 
> usable solution, as hee
> are quite a few users fighting regul;arly with conversion issues.

Of course.

Jerry



Re: Word won't open simplest LyXHTML file

2013-01-25 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 25/01/13 09:27, Murat Yildizoglu wrote:
> I have in the pas used Tex2word from Chikrii software with success. Equationa 
> are correctly 
> translated in this case, figures not, but I prefer to include them in the 
> optimal format for
> Word myself. This is commercial software (a plugin for Word), but it is not 
> expensive and has
> even a lower education pricing policy. It uses MathType (but the free version 
> of it is enough).
> 
Thanks - I'll keep it in mind when I have convert again. And the academic 
pricing is acceptable if
it keeps co-authors happy

And as I get MSOffice via the University for free and it runs nicely under 
wine, it might be an
option.

Cheers,

Rainer

> Murat
> 
> Le vendredi 25 janvier 2013, Rainer M Krug a ←crit :
> 
> On 25/01/13 05:20, Jerry wrote:
> 
>> On Jan 24, 2013, at 1:42 AM, Rainer M Krug wrote:
> 
>> On 24/01/13 01:02, Jerry wrote:
> 
> On Jan 23, 2013, at 1:02 AM, Rainer M Krug wrote:
> 
> On 22/01/13 23:37, Jerry wrote:
 
 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
> 
> Well - using
> 
> pandoc -o newfile.docx newfile1.xhtml
> 
> works as expected and produces a docx file.
> 
> So I can only say it works. I only used the converters and format 
> definitions as 
> mentioned earlier.
> 
> 
> Truy it:
> 
> simple lyx file, export to LyXhtml and use above command to convert to 
> docx.
> 
> Cheers,
> 
> Rainer
> 
>> Thanks, Ranier. I have just now tried this on a simple document (two 
>> equations, two 
>> sections, a footnote, a figure with caption, a greyed comment, and two 
>> cross
>> references (to an equation and to a section).
> 
>> As usual, the LyXHTML looks very good. But in the docx, the equations 
>> are not
>> rendered and contain spurious text, the figure caption and figure name 
>> are separated
>> from the figure and are shown as normal text, spurious text is inserted 
>> relating to
>> the image, and all of the cross-references move the cursor to the title 
>> rather than
>> to where it should move. The footnote is printed as ordinary text as is 
>> the greyed
>> text also.
> 
>> Without doubt this is not perfect. As I said, I can't comment on equations 
>> and I did not
>> worry about the captions. Have you tried LyX -> eLyXer -> pandoc as well?
> 
> 
>> pandoc -o newfile.odt newfile1.xhtml
> 
>> results in a similar result, but with completely nonfunctional cross 
>> references and
>> no spurious text relating to the figure image.
> 
>> I'm using OS X, LyX 2.0.5, Word 2011, LibreOffice 4.0.0.1, and pandoc 
>> 1.9.4.2.
> 
>> For my case (no crossreferences, no inseted references, but formating in the 
>> text (italic
>> for species names) and only some pictures which I deleted anyway to reduce 
>> the size of the
>> docx as I had to email it for further revisions it worked better and faster 
>> then any other
>> solution.
> 
>> Have you tried to go ia LaTeX and pandoc?
> 
>>> Yes. I have commented on this recently.
> 
> Sorry - must have overlooked it.
> 
>>> LyX -> LaTeX (plain) -> docx using pandoc:
> 
>>> Word (Mac 2011) complains "This file is corrupt and cannot be opened." It 
>>> then offers to 
>>> repair the file. Results are: inline equation translated and editable but 
>>> with two minor 
>>> errors (it did not recognize lim as a function and set it in italics)--this 
>>> shows that 
>>> equation 

Re: Word won't open simplest LyXHTML file

2013-01-25 Thread Murat Yildizoglu
I have in the pas used Tex2word from Chikrii software with success.
Equationa are correctly translated in this case, figures not, but I prefer
to include them in the optimal format for Word myself. This is commercial
software (a plugin for Word), but it is not expensive and has even a lower
education pricing policy. It uses MathType (but the free version of it is
enough).
Murat

Le vendredi 25 janvier 2013, Rainer M Krug a écrit :

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 25/01/13 05:20, Jerry wrote:
> >
> > On Jan 24, 2013, at 1:42 AM, Rainer M Krug wrote:
> >
> > On 24/01/13 01:02, Jerry wrote:
> 
>  On Jan 23, 2013, at 1:02 AM, Rainer M Krug wrote:
> 
>  On 22/01/13 23:37, Jerry wrote:
> >>>
> >>> 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
> 
>  Well - using
> 
>  pandoc -o newfile.docx newfile1.xhtml
> 
>  works as expected and produces a docx file.
> 
>  So I can only say it works. I only used the converters and format
> definitions as
>  mentioned earlier.
> 
> 
>  Truy it:
> 
>  simple lyx file, export to LyXhtml and use above command to convert
> to docx.
> 
>  Cheers,
> 
>  Rainer
> 
> > Thanks, Ranier. I have just now tried this on a simple document (two
> equations, two
> > sections, a footnote, a figure with caption, a greyed comment, and
> two cross references
> > (to an equation and to a section).
> 
> > As usual, the LyXHTML looks very good. But in the docx, the
> equations are not rendered
> >  and contain spurious text, the figure caption and figure name are
> separated from the
> > figure and are shown as normal text, spurious text is inserted
> relating to the image,
> > and all of the cross-references move the cursor to the title rather
> than to where it
> > should move. The footnote is printed as ordinary text as is the
> greyed text also.
> >
> > Without doubt this is not perfect. As I said, I can't comment on
> equations and I did not worry
> > about the captions. Have you tried LyX -> eLyXer -> pandoc as well?
> >
> 
> > pandoc -o newfile.odt newfile1.xhtml
> 
> > results in a similar result, but with completely nonfunctional cross
> references and no
> > spurious text relating to the figure image.
> 
> > I'm using OS X, LyX 2.0.5, Word 2011, LibreOffice 4.0.0.1, and
> pandoc 1.9.4.2.
> >
> > For my case (no crossreferences, no inseted references, but formating in
> the text (italic for
> > species names) and only some pictures which I deleted anyway to reduce
> the size of the docx as
> > I had to email it for further revisions it worked better and faster then
> any other solution.
> >
> > Have you tried to go ia LaTeX and pandoc?
> >
> >> Yes. I have commented on this recently.
>
> Sorry - must have overlooked it.
> >
> >> LyX -> LaTeX (plain) -> docx using pandoc:
> >
> >> Word (Mac 2011) complains "This file is corrupt and cannot be opened."
> It then offers to
> >> repair the file. Results are: inline equation translated and editable
> but with two minor
> >> errors (it did not recognize lim as a function and set it in
> italics)--this shows that
> >> equation translation _can_ work; standalone equation not translated,
> TeX code is displayed
> >> between two $ signs, and equation number is lost; image caption is
> lost, but the spurious
> >> word "image" is displayed nearby; labels (section, equation) are set as
> ordinary text within
> >> their respective domains; cross-references are displayed as ordinary
> text but with
> >> nonexistent links; comments are displayed as normal text but in a
> separate paragraph, thus
> >> split

Re: Word won't open simplest LyXHTML file

2013-01-25 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 25/01/13 05:20, Jerry wrote:
> 
> On Jan 24, 2013, at 1:42 AM, Rainer M Krug wrote:
> 
> On 24/01/13 01:02, Jerry wrote:
 
 On Jan 23, 2013, at 1:02 AM, Rainer M Krug wrote:
 
 On 22/01/13 23:37, Jerry wrote:
>>> 
>>> 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
 
 Well - using
 
 pandoc -o newfile.docx newfile1.xhtml
 
 works as expected and produces a docx file.
 
 So I can only say it works. I only used the converters and format 
 definitions as 
 mentioned earlier.
 
 
 Truy it:
 
 simple lyx file, export to LyXhtml and use above command to convert to 
 docx.
 
 Cheers,
 
 Rainer
 
> Thanks, Ranier. I have just now tried this on a simple document (two 
> equations, two 
> sections, a footnote, a figure with caption, a greyed comment, and two 
> cross references
> (to an equation and to a section).
 
> As usual, the LyXHTML looks very good. But in the docx, the equations are 
> not rendered
>  and contain spurious text, the figure caption and figure name are 
> separated from the 
> figure and are shown as normal text, spurious text is inserted relating 
> to the image, 
> and all of the cross-references move the cursor to the title rather than 
> to where it 
> should move. The footnote is printed as ordinary text as is the greyed 
> text also.
> 
> Without doubt this is not perfect. As I said, I can't comment on equations 
> and I did not worry 
> about the captions. Have you tried LyX -> eLyXer -> pandoc as well?
> 
 
> pandoc -o newfile.odt newfile1.xhtml
 
> results in a similar result, but with completely nonfunctional cross 
> references and no 
> spurious text relating to the figure image.
 
> I'm using OS X, LyX 2.0.5, Word 2011, LibreOffice 4.0.0.1, and pandoc 
> 1.9.4.2.
> 
> For my case (no crossreferences, no inseted references, but formating in the 
> text (italic for 
> species names) and only some pictures which I deleted anyway to reduce the 
> size of the docx as 
> I had to email it for further revisions it worked better and faster then any 
> other solution.
> 
> Have you tried to go ia LaTeX and pandoc?
> 
>> Yes. I have commented on this recently.

Sorry - must have overlooked it.
> 
>> LyX -> LaTeX (plain) -> docx using pandoc:
> 
>> Word (Mac 2011) complains "This file is corrupt and cannot be opened." It 
>> then offers to 
>> repair the file. Results are: inline equation translated and editable but 
>> with two minor 
>> errors (it did not recognize lim as a function and set it in italics)--this 
>> shows that 
>> equation translation _can_ work; standalone equation not translated, TeX 
>> code is displayed 
>> between two $ signs, and equation number is lost; image caption is lost, but 
>> the spurious 
>> word "image" is displayed nearby; labels (section, equation) are set as 
>> ordinary text within 
>> their respective domains; cross-references are displayed as ordinary text 
>> but with 
>> nonexistent links; comments are displayed as normal text but in a separate 
>> paragraph, thus 
>> splitting the paragraph in which it is contained into two paragraphs; and 
>> indexed terms are 
>> lost.
> 
> 
>> LyX -> LaTeX (plain) -> odt using pandoc: Opened with LibreOffice. The file 
>> is reported as 
>> corrupt and the program offers to repair it. Results--similar to above for 
>> Word except: 
>> inline equation is very poorly typeset and is not editable using the 
>> built-in equation 
>> ed

Re: Word won't open simplest LyXHTML file

2013-01-24 Thread Jerry

On Jan 24, 2013, at 1:42 AM, Rainer M Krug wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 24/01/13 01:02, Jerry wrote:
>> 
>> On Jan 23, 2013, at 1:02 AM, Rainer M Krug wrote:
>> 
>> On 22/01/13 23:37, Jerry wrote:
> 
> 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
>> 
>> Well - using
>> 
>> pandoc -o newfile.docx newfile1.xhtml
>> 
>> works as expected and produces a docx file.
>> 
>> So I can only say it works. I only used the converters and format 
>> definitions as mentioned 
>> earlier.
>> 
>> 
>> Truy it:
>> 
>> simple lyx file, export to LyXhtml and use above command to convert to docx.
>> 
>> Cheers,
>> 
>> Rainer
>> 
>>> Thanks, Ranier. I have just now tried this on a simple document (two 
>>> equations, two sections,
>>> a footnote, a figure with caption, a greyed comment, and two cross 
>>> references (to an equation
>>> and to a section).
>> 
>>> As usual, the LyXHTML looks very good. But in the docx, the equations are 
>>> not rendered and 
>>> contain spurious text, the figure caption and figure name are separated 
>>> from the figure and
>>> are shown as normal text, spurious text is inserted relating to the image, 
>>> and all of the 
>>> cross-references move the cursor to the title rather than to where it 
>>> should move. The
>>> footnote is printed as ordinary text as is the greyed text also.
> 
> Without doubt this is not perfect. As I said, I can't comment on equations 
> and I did not worry
> about the captions. Have you tried LyX -> eLyXer -> pandoc as well?
> 
>> 
>>> pandoc -o newfile.odt newfile1.xhtml
>> 
>>> results in a similar result, but with completely nonfunctional cross 
>>> references and no
>>> spurious text relating to the figure image.
>> 
>>> I'm using OS X, LyX 2.0.5, Word 2011, LibreOffice 4.0.0.1, and pandoc 
>>> 1.9.4.2.
> 
> For my case (no crossreferences, no inseted references, but formating in the 
> text (italic for
> species names) and only some pictures which I deleted anyway to reduce the 
> size of the docx as I
> had to email it for further revisions it worked better and faster then any 
> other solution.
> 
> Have you tried to go ia LaTeX and pandoc?

Yes. I have commented on this recently.

LyX -> LaTeX (plain) -> docx using pandoc:

Word (Mac 2011) complains "This file is corrupt and cannot be opened." It then 
offers to repair the file. Results are: inline equation translated and editable 
but with two minor errors (it did not recognize lim as a function and set it in 
italics)--this shows that equation translation _can_ work; standalone equation 
not translated, TeX code is displayed between two $ signs, and equation number 
is lost; image caption is lost, but the spurious word "image" is displayed 
nearby; labels (section, equation) are set as ordinary text within their 
respective domains; cross-references are displayed as ordinary text but with 
nonexistent links; comments are displayed as normal text but in a separate 
paragraph, thus splitting the paragraph in which it is contained into two 
paragraphs; and indexed terms are lost.


LyX -> LaTeX (plain) -> odt using pandoc:
Opened with LibreOffice. The file is reported as corrupt and the program offers 
to repair it. Results--similar to above for Word except: inline equation is 
very poorly typeset and is not editable using the built-in equation editor; 
instead of the picture that was supposed to be a figure, a box is displayed 
which reads "Read error"; the word "image" is not displayed; clicking on the 
footnote cross reference moves the cursor to the crossreference;


> I guess some manual fidelling will always be necessary, and for my document 
> the fidelling required
> after pandoc was consi

Re: Word won't open simplest LyXHTML file

2013-01-24 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 24/01/13 01:02, Jerry wrote:
> 
> On Jan 23, 2013, at 1:02 AM, Rainer M Krug wrote:
> 
> On 22/01/13 23:37, Jerry wrote:
 
 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
> 
> Well - using
> 
> pandoc -o newfile.docx newfile1.xhtml
> 
> works as expected and produces a docx file.
> 
> So I can only say it works. I only used the converters and format definitions 
> as mentioned 
> earlier.
> 
> 
> Truy it:
> 
> simple lyx file, export to LyXhtml and use above command to convert to docx.
> 
> Cheers,
> 
> Rainer
> 
>> Thanks, Ranier. I have just now tried this on a simple document (two 
>> equations, two sections,
>> a footnote, a figure with caption, a greyed comment, and two cross 
>> references (to an equation
>> and to a section).
> 
>> As usual, the LyXHTML looks very good. But in the docx, the equations are 
>> not rendered and 
>> contain spurious text, the figure caption and figure name are separated from 
>> the figure and
>> are shown as normal text, spurious text is inserted relating to the image, 
>> and all of the 
>> cross-references move the cursor to the title rather than to where it should 
>> move. The
>> footnote is printed as ordinary text as is the greyed text also.

Without doubt this is not perfect. As I said, I can't comment on equations and 
I did not worry
about the captions. Have you tried LyX -> eLyXer -> pandoc as well?

> 
>> pandoc -o newfile.odt newfile1.xhtml
> 
>> results in a similar result, but with completely nonfunctional cross 
>> references and no
>> spurious text relating to the figure image.
> 
>> I'm using OS X, LyX 2.0.5, Word 2011, LibreOffice 4.0.0.1, and pandoc 
>> 1.9.4.2.

For my case (no crossreferences, no inseted references, but formating in the 
text (italic for
species names) and only some pictures which I deleted anyway to reduce the size 
of the docx as I
had to email it for further revisions it worked better and faster then any 
other solution.

Have you tried to go ia LaTeX and pandoc?

I guess some manual fidelling will always be necessary, and for my document the 
fidelling required
after pandoc was considerably less as after any other approach.

Please keep us posted about any progress.

Cheers,

Rainer

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

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRAPP9AAoJENvXNx4PUvmCzd0H/3lUcAfEgVhF2guIOI9DsDEa
p5HaBDZEpcpPexLrUgwHCrWVp7jPHGGt9qP+InnyU5PTizsPwXCoh8l0HkDYWQ+n
Kz2FhV+hUuWtlwR5gdV59nEPDnWy7auQUgFnZqy6JQ/rSdrBnfZ8EXi0yD250YtN
xWaTnjSGn3Pa+dlL/crAGM+hm+bEqs23wzssQvZvunF9lx5LnnoitIwuggcdVyxo
YNyN4VWj7vPUmRle7Qt1zhyZSn8Wb2TV4ZziKvtGa9couzXoq2tqUeIDpoCIDASR
lXwEWY9sKb7uPybnnqUckAEE8TgQIFkNfpsWPnJRgiiS0fp5zd3FCUNsWCn2LHQ=
=xga4
-END PGP SIGNATURE-


Re: Word won't open simplest LyXHTML file

2013-01-23 Thread Jerry

On Jan 23, 2013, at 1:02 AM, Rainer M Krug wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 22/01/13 23:37, Jerry wrote:
>> 
>> 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
> 
> Well - using
> 
> pandoc -o newfile.docx newfile1.xhtml
> 
> works as expected and produces a docx file.
> 
> So I can only say it works. I only used the converters and format definitions 
> as mentioned earlier.
> 
> 
> Truy it:
> 
> simple lyx file, export to LyXhtml and use above command to convert to docx.
> 
> Cheers,
> 
> Rainer

Thanks, Ranier. I have just now tried this on a simple document (two equations, 
two sections, a footnote, a figure with caption, a greyed comment, and two 
cross references (to an equation and to a section).

As usual, the LyXHTML looks very good. But in the docx, the equations are not 
rendered and contain spurious text, the figure caption and figure name are 
separated from the figure and are shown as normal text, spurious text is 
inserted relating to the image, and all of the cross-references move the cursor 
to the title rather than to where it should move. The footnote is printed as 
ordinary text as is the greyed text also.

pandoc -o newfile.odt newfile1.xhtml

results in a similar result, but with completely nonfunctional cross references 
and no spurious text relating to the figure image.

I'm using OS X, LyX 2.0.5, Word 2011, LibreOffice 4.0.0.1, and pandoc 1.9.4.2.

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
>> 
>> 
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> 
> iQEcBAEBAgAGBQJQ/5kMAAoJENvXNx4PUvmCrMcIAKPlUM39ihrVVGfAWgbyyv9B
> eqNmrpj4VvAgkUppfDmjwD2kK1TMjuvJA7ImQ+zx5/M3mz8otXgQOZIbJzzzYq0u
> NRjsBvIGmrYAPToC8gjcaTkn0S+qoWVO80gmrDVorSutIkZDAzpefgdLIeNQecz7
> 927loMioyZtLhikxtI6WeZfpI423zY7RT0tdQZW1MpNVOXxqP1XU5Dob3ljJe5ZW
> wHDTovgg85r1BEaJX+SfkIkhJOiKu/uPfLbKw3+APlrSKIlZpWGUrvfnKYweCbtr
> dnbFg21rJPlG2gwK+uoatxOAsCLIA+Ybd5eS9l19SxCx5nSNrSk2gWEFgwa9sBU=
> =Lwnd
> -END PGP SIGNATURE-
> 



Re: LyX2YAML: was Re: Word won't open simplest LyXHTML file

2013-01-23 Thread Nico Williams
On Wed, Jan 23, 2013 at 5:01 PM, Steve Litt  wrote:
> On Wed, 23 Jan 2013 14:20:57 -0600, Nico Williams said:
>
>> Well, there's http://yaxml.rubyforge.org/ , which is a tool that
>> converts between (in both directions) YAXML and YAML.  Pair this with
>> my lyx2xml script and you have a way to convert to YAML.
>
> Well cool, I guess that's one less program I have to write. How close
> to finished is your converter?

It... works.  For that subset of LyX that I use.  This includes
tables, but not math (someone needs to port to Python the
LaTeX->MathML code that can be found all over), and who knows what
else.

You can find it at
https://github.com/nicowilliams/lyx/tree/lyxml/lib/lyx2lyx  -- look
for lyx2xml*.  Forgive the sloppy code.

If this is of use to you and you need more features and want to
contribute them, or maybe tell me what they'd be...  we can make this
better.

Nico
--


Re: LyX2YAML: was Re: Word won't open simplest LyXHTML file

2013-01-23 Thread Steve Litt
On Wed, 23 Jan 2013 14:20:57 -0600, Nico Williams said:

> Well, there's http://yaxml.rubyforge.org/ , which is a tool that
> converts between (in both directions) YAXML and YAML.  Pair this with
> my lyx2xml script and you have a way to convert to YAML.

Well cool, I guess that's one less program I have to write. How close
to finished is your converter?

Thanks

SteveT

Steve Litt*  http://www.troubleshooters.com/
  *  http://twitter.com/stevelitt
Troubleshooting Training  *  Human Performance



Re: LyX2YAML: was Re: Word won't open simplest LyXHTML file

2013-01-23 Thread Nico Williams
On Wed, Jan 23, 2013 at 1:57 PM, Steve Litt  wrote:
> On Wed, 23 Jan 2013 15:15:15 + (UTC), Guenter Milde said:
>> Please don't be discouraged to continue the work on and publication of
>> the lyx2xml script. I think it is a useful addition to LyX.
>
> I have a question for you...
>
> When is somebody going to write a lyx2yaml script?
>
> Another question: Instead of having LyX's native format being
> human-opaque XML, why not make it YAML, the ultimate in human
> readability and writeability?

I want XML because of XSLT (and XPath, and XQuery): I can write XSLs
to convert from one schema to another, and this then gets to be
completely external to LyX.  If the LyX XML schema changes, of course,
the XSLs need updating, but it's XSLT code, not C++ or what have you
-- it's a simpler update.  It's more than that.  You can serve XML and
XSLs from some web server and let the browser apply the XSLs to create
XHTML.  And more.  There's lots of databases that specialize in XML
documents and make it easy to search them in regular ways (i.e., with
XPath or XQuery).  I'm probably only scratching the surface here.

Also, properly formatted XML is not human-opaque, but merely annoying.

Don't get me wrong: I'm *not* a fan of XML.  I'm a fan of the DSLs and
tooling that has been built around XML, which -for me- overcome the
downsides to XML itself.

Of course, if our world had been built on programming languages with
hygienic macro facilities with all the power expect of a Scheme, then
we could write these DSLs as needed.  XML is so much wheel
re-invention, but there's a ton of value in standardizing these DSLs:
you can write portable code in them, and you need only know those
standard DSLs instead of having to learn and hack on ad-hoc DSLs.

In a sense YAML saddens me: it's even more wheel re-invention, but
without the DSLs to go with it that XML has.  Why would I want this
for any purpose other than UI?  And why would I want it even for that
purpose when LyX *is* the UI?

> http://en.wikipedia.org/wiki/Yaml

I don't really care what it is as long as there's a trivial,
*lossless* mapping onto XML.  (My script's translation of .lyx to XML
is lossless, though the return trip will not obtain the same original
.lyx because some things in .lyx content need to get normalized in the
conversion to XML.  But no data and metadata get lost in the
conversion.)

> As I understand, the LyX project's preferred scripting language is
> Python, and PyYaml is an excellent YAML parser and emitter.
>
> I don't have time or knowledge to write a lyx2yaml script, but if
> somebody else takes the captain's chair, I'll for sure help.

Well, there's http://yaxml.rubyforge.org/ , which is a tool that
converts between (in both directions) YAXML and YAML.  Pair this with
my lyx2xml script and you have a way to convert to YAML.

I don't think converting directly from .lyx to YAML is going to be any
easier than converting directly to XML is, but if it's *as* easy then
FYI you'll still run into pretty much the same issues I did in
lyx2xml.

Nico
--


LyX2YAML: was Re: Word won't open simplest LyXHTML file

2013-01-23 Thread Steve Litt
On Wed, 23 Jan 2013 15:15:15 + (UTC), Guenter Milde said:

> Please don't be discouraged to continue the work on and publication of
> the lyx2xml script. I think it is a useful addition to LyX. 

I have a question for you...

When is somebody going to write a lyx2yaml script?

Another question: Instead of having LyX's native format being
human-opaque XML, why not make it YAML, the ultimate in human
readability and writeability?

http://en.wikipedia.org/wiki/Yaml

As I understand, the LyX project's preferred scripting language is
Python, and PyYaml is an excellent YAML parser and emitter.

I don't have time or knowledge to write a lyx2yaml script, but if
somebody else takes the captain's chair, I'll for sure help.

Thanks

SteveT


Steve Litt*  http://www.troubleshooters.com/
  *  http://twitter.com/stevelitt
Troubleshooting Training  *  Human Performance



Re: Word won't open simplest LyXHTML file

2013-01-23 Thread Nico Williams
On Wed, Jan 23, 2013 at 9:15 AM, Guenter Milde  wrote:
> On 2013-01-22, Nico Williams wrote:
>> There was a thread about this a while back and the conclusion was that
>> I'm on my own with this, that for now my lyx2xml is not to be part of
>> LyX.  Partly there's a desire to consider making XML a native thing in
>> LyX, and partly there's a desire to not add more things into the LyX
>> source tree that might break when new features are added elsewhere in
>> the tree.
>
> Please don't be discouraged to continue the work on and publication of
> the lyx2xml script. I think it is a useful addition to LyX.

I'm not.  I soldier one because I want to use LyX and I need XML.  In
fact, for *my* use cases the script is done.  It's not complete
however, and I was hoping others would be interested in contributing.
Instead it seems I will have to finish my XSLs (I'm doing this in my
spare time) and write a nice blog post about all this (with some
exposition of XSL code and explanations) to get people interested.

I've been surprised at how close .lyx is to being a form of XML, and
how irritating some of the ways in which it's not are.  (For example,
when mixing text styles there's no well-formed-XML-like closing of
"tags".  The most irritating thing by far is the fact that description
lists items' title/description are separated by the first breaking
space.)

> I don't know whether it will become possible to have "painless" LyX<->Word
> conversions at all, because the document models differ widely, but XSL may
> still be the best route for this conversion.

Right, there may be loss of metadata, and it may be that multiple
XSLs, or one with many options, will be needed to provide a useful
experience.  That's to be expected in schema transformations.

Nico
--


Re: Word won't open simplest LyXHTML file

2013-01-23 Thread Guenter Milde
Dear Nico,

On 2013-01-22, Nico Williams wrote:

> I think the right approach is to have a LyX XML schema, export to
> that, then apply an XSL to convert to whatever format you want.  I've
> written a script to convert .lyx to XML using a very simple-minded
> approach; I don't have a schema defined for this, just well-formed XML
> output.
...

> There was a thread about this a while back and the conclusion was that
> I'm on my own with this, that for now my lyx2xml is not to be part of
> LyX.  Partly there's a desire to consider making XML a native thing in
> LyX, and partly there's a desire to not add more things into the LyX
> source tree that might break when new features are added elsewhere in
> the tree.

Please don't be discouraged to continue the work on and publication of
the lyx2xml script. I think it is a useful addition to LyX. 

If you search the archives, you will find that the idea to move the
native LyX format to XML is discussed since several years without a
consensus between the developers. Therefore I understand the hesitation of
the developers to re-open this can of worms and rather concentrate on
issues that are agreed on.

But this is exactly why I really like your idea of a LyX-XML *in addition*
to the current native format. This will give new insight in the advantages
as well as problems of such a transition and will be of great value to the
"XSL freaks" independent of the decision whether it should become LyX's
default format. 

I don't know whether it will become possible to have "painless" LyX<->Word
conversions at all, because the document models differ widely, but XSL may
still be the best route for this conversion.

Thanks for your work,

Günter






Re: Word won't open simplest LyXHTML file

2013-01-23 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 22/01/13 23:37, Jerry wrote:
> 
> 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

Well - using

pandoc -o newfile.docx newfile1.xhtml

works as expected and produces a docx file.

So I can only say it works. I only used the converters and format definitions 
as mentioned earlier.


Truy it:

simple lyx file, export to LyXhtml and use above command to convert to docx.

Cheers,

Rainer

Cheers,

Rainer

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

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJQ/5kMAAoJENvXNx4PUvmCrMcIAKPlUM39ihrVVGfAWgbyyv9B
eqNmrpj4VvAgkUppfDmjwD2kK1TMjuvJA7ImQ+zx5/M3mz8otXgQOZIbJzzzYq0u
NRjsBvIGmrYAPToC8gjcaTkn0S+qoWVO80gmrDVorSutIkZDAzpefgdLIeNQecz7
927loMioyZtLhikxtI6WeZfpI423zY7RT0tdQZW1MpNVOXxqP1XU5Dob3ljJe5ZW
wHDTovgg85r1BEaJX+SfkIkhJOiKu/uPfLbKw3+APlrSKIlZpWGUrvfnKYweCbtr
dnbFg21rJPlG2gwK+uoatxOAsCLIA+Ybd5eS9l19SxCx5nSNrSk2gWEFgwa9sBU=
=Lwnd
-END PGP SIGNATURE-


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


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

Re: Word won't open simplest LyXHTML file

2013-01-21 Thread Nico Williams
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...


Re: Word won't open simplest LyXHTML file

2013-01-21 Thread Jerry

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.

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

Jerry
> 
>> 
>> \converter "xhtml" "msdocx" "pandoc -o $$o $$i" "" \converter "xhtml" "odt 
>> lo" "pandoc -o $$o
>> $$i" ""added the following converter:
>> 
>> You have to play with the LyX xhtml or the eLyXer xhtml - I used LyXHTRML 
>> because it workded 
>> better in my case.
>> 
>> I really think that pandoc should be detected automatically by LyX (when 
>> doing reconfigure)
>> and added as it provides very usable conversions.
>> 
>> 
>> Cheers,
>> 
>> Rainer
>> 
>>> 
>>> Jerry
>> 
>> 
> 
> 



Re: Word won't open simplest LyXHTML file

2013-01-21 Thread Nico Williams
I've been using LyXHTML and writing an XSL to convert from that.
That's left me unsatisfied.

I think the right approach is to have a LyX XML schema, export to
that, then apply an XSL to convert to whatever format you want.  I've
written a script to convert .lyx to XML using a very simple-minded
approach; I don't have a schema defined for this, just well-formed XML
output.  I'm still writing an XSL to replace the one I have that uses
LyXHTML input.

There was a thread about this a while back and the conclusion was that
I'm on my own with this, that for now my lyx2xml is not to be part of
LyX.  Partly there's a desire to consider making XML a native thing in
LyX, and partly there's a desire to not add more things into the LyX
source tree that might break when new features are added elsewhere in
the tree.

Dear LyX dev team: eventually you *really* do need to go the XML
route.  It's getting painful to not have a LyX XML format.  I know
this is a volunteer organization, so it's not like this can be made a
priority, but if you want LyX to be more relevant, then you need to do
this.

Nico
--


Re: Word won't open simplest LyXHTML file

2013-01-21 Thread Jerry

On Jan 18, 2013, at 6:15 AM, Steve Litt wrote:

> On Thu, 17 Jan 2013 21:17:28 -0700, Jerry said:
>> 
>> 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.
>> 
>> Jerry
> 
> Hi Jerry,
> 
> Did you ever consider trying to open the LyXML or whatever it's called
> in LibreOffice, and then from LibreOffice exporting it to MSWord
> format? That just might work.
> 
> Thanks
> 
> SteveT

I also found xhtml2odt at http://xhtml2odt.org/ but I can't get it to work for 
some reason. Also, the docs say that it will not convert graphics--these must 
be imported and linked in LibreOffice manually.

In any case, it looks like any path through (X)HTML is going to convert any 
vector graphics to something else, probably png, which is not a good service to 
e.g. PDFs.

Jerry

Re: Word won't open simplest LyXHTML file

2013-01-18 Thread Steve Litt
On Thu, 17 Jan 2013 21:17:28 -0700, Jerry said:
> 
> 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.
> 
> Jerry

Hi Jerry,

Did you ever consider trying to open the LyXML or whatever it's called
in LibreOffice, and then from LibreOffice exporting it to MSWord
format? That just might work.

Thanks

SteveT

Steve Litt*  http://www.troubleshooters.com/
  *  http://twitter.com/stevelitt
Troubleshooting Training  *  Human Performance



Re: Word won't open simplest LyXHTML file

2013-01-18 Thread Rainer M Krug
On 18/01/13 10:58, Liviu Andronic wrote:
> Rainer,
> 
> 
> On Fri, Jan 18, 2013 at 9:44 AM, Rainer M Krug  wrote:
>> \converter "xhtml" "msdocx" "pandoc -o $$o $$i" "" \converter "xhtml" "odt 
>> lo" "pandoc -o $$o
>> $$i" "" ###
>> 
> Would you mind pasting all the pandoc-related converter and format 
> definitions that work for
> you to http://www.lyx.org/trac/ticket/6042 ? If you include working configs 
> there and others
> can test them and confirm they indeed work, then chances are that they would 
> get included in
> base LyX.

Done - thanks for reminding me.

Rainer

> 
> Liviu
> 


-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug


Re: Word won't open simplest LyXHTML file

2013-01-18 Thread Liviu Andronic
Rainer,


On Fri, Jan 18, 2013 at 9:44 AM, Rainer M Krug  wrote:
> \converter "xhtml" "msdocx" "pandoc -o $$o $$i" ""
> \converter "xhtml" "odt lo" "pandoc -o $$o $$i" ""
> ###
>
Would you mind pasting all the pandoc-related converter and format
definitions that work for you to http://www.lyx.org/trac/ticket/6042 ?
If you include working configs there and others can test them and
confirm they indeed work, then chances are that they would get
included in base LyX.

Liviu


Re: Word won't open simplest LyXHTML file

2013-01-18 Thread Rainer M Krug
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" ""
###

> 
> \converter "xhtml" "msdocx" "pandoc -o $$o $$i" "" \converter "xhtml" "odt 
> lo" "pandoc -o $$o
> $$i" ""added the following converter:
> 
> You have to play with the LyX xhtml or the eLyXer xhtml - I used LyXHTRML 
> because it workded 
> better in my case.
> 
> I really think that pandoc should be detected automatically by LyX (when 
> doing reconfigure)
> and added as it provides very usable conversions.
> 
> 
> Cheers,
> 
> Rainer
> 
>> 
>> Jerry
> 
> 



Re: Word won't open simplest LyXHTML file

2013-01-18 Thread Rainer M Krug
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

\converter "xhtml" "msdocx" "pandoc -o $$o $$i" ""
\converter "xhtml" "odt lo" "pandoc -o $$o $$i" ""added the following converter:

You have to play with the LyX xhtml or the eLyXer xhtml - I used LyXHTRML 
because it workded
better in my case.

I really think that pandoc should be detected automatically by LyX (when doing 
reconfigure) and
added as it provides very usable conversions.


Cheers,

Rainer

> 
> Jerry



Re: Word won't open simplest LyXHTML file

2013-01-17 Thread Liviu Andronic
Hello,
Rob has some work on word2lyx conversion (using .docx). [1] I remember
he was mulling a round-trip conversion, but I guess he never got to
implementing it.
[1] http://www.oak-tree.us/2012/03/07/word2lyx01-2/


Regards,
 Liviu


On Fri, Jan 18, 2013 at 5:17 AM, 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.
>
> Jerry



-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail


Re: Word won't open simplest LyXHTML file

2013-01-17 Thread Jerry

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.

Jerry

Re: Word won't open simplest LyXHTML file

2013-01-17 Thread Alex Fernandez
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.


Re: Word won't open simplest LyXHTML file

2013-01-16 Thread Steve Litt
On Wed, 16 Jan 2013 14:13:42 -0700, Jerry said:
> It has frequently been suggested on this list that, currently, the
> best way to get a LyX file into Microsoft Word is to export from LyX
> to LyXHMTM and then to open that XHTML file with Word. I have Word
> 2011 for OS X and this fails because Word will not open the XHTML
> file, with the message 
> 
> 
> The XML file bla bla bla cannot be opened because there are problems
> with the contents. Details
> No error detail available
> Location: 2
> 
> 
> This happens even for the simplest LyX file with only one sentence
> and no fancy stuff--the entire contents of one test file is simply
> "Test sentence". However, the exported XHTML files doe open OK in
> Firefox and displays math in acceptable, if not perfect, form.
> (Firefox renders MathML out of the box--why can't other browsers join
> the 20th century.)
> 
> On the same "Test sentence" file exported via LyXHTML, I opened it in
> TextMate, a very popular and extensible text editor on OS X, and
> applied the "Validate syntax" command that is available therein,
> resulting in this output:
> 
> 
> xmllint output
> error: colon are forbidden from PI names 'IS10744:arch'
>^
> Test sentence.
> 
> 
> I am using LyX 2.0.5 for OS X. I _think_ I have been able to do this
> in the past so I don't know why I can't do it now.
> 
> I am preparing to start a major writing project and I want to
> understand as much as I can about this--I'm pretty sure that there
> will be a huge incentive later to have a usable if not perfect
> version of my LyX work available in Word; this will include math.
> 
> I know that LyX -> Word is a frequent topic on this list so I'm not
> necessarily looking for a complete rehashing of the topic--only why
> LyXHTML -> Word fails.
> 
> Jerry

Hi Jerry,

Your creating a tiny case of the problem is productive and rare. I
looked up your error message and got several promising prospects:

http://lists.w3.org/Archives/Public/www-html-editor/2009JulSep/0011.html

I also saw some sources saying that namespaces could not be on if the
name contained a colon. I don't know what that means because I'm not an
XML hound.

SteveT

Steve Litt*  http://www.troubleshooters.com/
  *  http://twitter.com/stevelitt
Troubleshooting Training  *  Human Performance



Re: Word won't open simplest LyXHTML file

2013-01-16 Thread Jerry

On Jan 16, 2013, at 5:28 PM, Doug Laidlaw wrote:

> Jerry wrote:
> 
>> It has frequently been suggested on this list that, currently, the best
>> way to get a LyX file into Microsoft Word is to export from LyX to LyXHMTM
>> and then to open that XHTML file with Word. I have Word 2011 for OS X and
>> this fails because Word will not open the XHTML file, with the message
>> 
>> 
>> The XML file bla bla bla cannot be opened because there are problems with
>> the contents. Details
>> No error detail available
>> Location: 2
>> 
>> 
>> This happens even for the simplest LyX file with only one sentence and no
>> fancy stuff--the entire contents of one test file is simply "Test
>> sentence". However, the exported XHTML files doe open OK in Firefox and
>> displays math in acceptable, if not perfect, form. (Firefox renders MathML
>> out of the box--why can't other browsers join the 20th century.)
>> 
>> On the same "Test sentence" file exported via LyXHTML, I opened it in
>> TextMate, a very popular and extensible text editor on OS X, and applied
>> the "Validate syntax" command that is available therein, resulting in this
>> output:
>> 
>> 
>> xmllint output
>> error: colon are forbidden from PI names 'IS10744:arch'
>> >  ^
>> Test sentence.
>> 
>> 
>> I am using LyX 2.0.5 for OS X. I _think_ I have been able to do this in
>> the past so I don't know why I can't do it now.
>> 
>> I am preparing to start a major writing project and I want to understand
>> as much as I can about this--I'm pretty sure that there will be a huge
>> incentive later to have a usable if not perfect version of my LyX work
>> available in Word; this will include math.
>> 
>> I know that LyX -> Word is a frequent topic on this list so I'm not
>> necessarily looking for a complete rehashing of the topic--only why
>> LyXHTML -> Word fails.
>> 
>> Jerry
> 
> I used eLyxer (http://elyxer.nongnu.org/) to export from Linux to HTML then 
> to epub, but it may not support the Mac.
> 
> HTH
> 
> Doug.
> 
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.

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.

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

How does your method, LyX -> HTML -> epub, get me into Word? I don't think Word 
reads epub, does it?

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

Jerry

Re: Word won't open simplest LyXHTML file

2013-01-16 Thread Doug Laidlaw
Jerry wrote:

> It has frequently been suggested on this list that, currently, the best
> way to get a LyX file into Microsoft Word is to export from LyX to LyXHMTM
> and then to open that XHTML file with Word. I have Word 2011 for OS X and
> this fails because Word will not open the XHTML file, with the message
> 
> 
> The XML file bla bla bla cannot be opened because there are problems with
> the contents. Details
> No error detail available
> Location: 2
> 
> 
> This happens even for the simplest LyX file with only one sentence and no
> fancy stuff--the entire contents of one test file is simply "Test
> sentence". However, the exported XHTML files doe open OK in Firefox and
> displays math in acceptable, if not perfect, form. (Firefox renders MathML
> out of the box--why can't other browsers join the 20th century.)
> 
> On the same "Test sentence" file exported via LyXHTML, I opened it in
> TextMate, a very popular and extensible text editor on OS X, and applied
> the "Validate syntax" command that is available therein, resulting in this
> output:
> 
> 
> xmllint output
> error: colon are forbidden from PI names 'IS10744:arch'
>^
> Test sentence.
> 
> 
> I am using LyX 2.0.5 for OS X. I _think_ I have been able to do this in
> the past so I don't know why I can't do it now.
> 
> I am preparing to start a major writing project and I want to understand
> as much as I can about this--I'm pretty sure that there will be a huge
> incentive later to have a usable if not perfect version of my LyX work
> available in Word; this will include math.
> 
> I know that LyX -> Word is a frequent topic on this list so I'm not
> necessarily looking for a complete rehashing of the topic--only why
> LyXHTML -> Word fails.
> 
> Jerry

I used eLyxer (http://elyxer.nongnu.org/) to export from Linux to HTML then 
to epub, but it may not support the Mac.

HTH

Doug.