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

2014-01-31 Thread Alex Fernandez
Hi Steve,

On Fri, Jan 31, 2014 at 5:47 PM, Steve Litt sl...@troubleshooters.comwrote:

 Ladies and gentlemen, if the preceding paragraph doesn't convince us we
 need a good, solid, LyX to ePub and LyX to Mobi conversion (do ePub
 first, you can convert ePub into Mobi), then nothing will. Instead of
 slamming out his book in LyX, Anthony must use an outside service
 (smashwords), meaning a two word modification is, as Joe Biden would
 say, a Big Friggin Deal. Further, to satisfy Smashwords he must write it
 in LibreOffice to simulate MS Word. Or, if he's just doing Kindle, he
 can submit rtf (what could *possibly* go wrong).


Good luck with the convincing part.


 You can't base a LyX to ePub converter off either LyX2Xhtml or Alex's
 eLyXer: Those produce great (X)html for stuff like footnotes and
 bibliographies, but they discard semantic tags (h1-h6) for variously
 named divs (yeah, div, not even p), as I remember they still use
 outdated a name=whatever/ instead of giving an ID to a tag. One or
 both of them does you the favor of renaming all graphic files to a
 numerical sequence: I guess this is to prevent identically named
 graphics in different directories from clobbering each other, but there
 are better ways of doing this that don't have the anti-debugging
 baggage of removing all meaning from graphic names.  Current
 LyX exported (X)html files just generally require *huge*
 postprocessing, with zillions of special cases, to get them in
 reasonable shape to make an ePub. If that were not the case, somebody
 would have made a LyX2ePub a long, long time ago, because the demand is
 there, and a lot of people have that itch, and I'm not the only one
 who has tried to do it.


eLyXer does not rename any graphic files AFAICR. Also, eLyXer should
provide semantic tags like h1-h6, as you can see here:
  http://elyxer.nongnu.org/math-unicode.html

Shamefully, because I need to be able to have my books available as
 ePubs, after 13 years using LyX to write my books, I'm now using the
 Bluefish editor to write my future books. I've written an Xhtml to ePub
 converter in Python, and I can write an Xhtml to LaTeX converter just
 as easily. But let me ask you something: Have you ever tried to slam
 out 2500 words a day in Bluefish? Bluefish will never have the
 authoring speed of LyX. But then again, as things stand now, a LyX
 authored document will never be convertible to ePub.


I feel your pain. Not with Bluefish but with other, also less powerful
editors. For good or for bad I have not needed translation to ePub yet.

The shame is, in theory, LyX to ePub is simple. Every environment
 becomes p class=environmentname, every character style becomes
 span class=charstylename. Leave div out of it except for every
 special cases. Even lyx-code should become pre class=lyxcode, not
 div class=lyxcode.


It should not be difficult to change eLyXer output to be as you desire;
just take a look at base.cfg
  https://github.com/alexfernandez/elyxer/blob/master/src/conf/base.cfg
where most elements of the output can be configured. There are many special
cases and a few ugly-ish tricks (such as h? to denote h1-h6), but it is
mostly there. Or should be.


 A special one-per-book configuration file (I did mine in YAML) defines
 the assignment of Part, Chapter, Section, Subsection etc to h1, h2,
 h3, h4 etc, and defines which go in the table of contents, and
 which get numbers and what prefix the number gets (Part, Chapter, etc).
 I've already done this: It works. Don't worry about converting LyX
 environment and char style defs to CSS, just list all paragraph and
 char styles, so that the author can make the necessary CSS. CSS is
 *much* easier to define than LaTeX environments and commands. And yes,
 let the author know that this export requires the author use only a
 subset of LyX's capabilities.


With luck, LyX devs will propose a native export which is neither here nor
there. Uphill battle in any case.

I briefly considered writing Yet Another LyX to HTML Exporter, but
 found out that in spite of LyX's native format being Non Human Friendly
 XML, it's not *well formed* XML, so I can't use Python's lxml.etree,
 let alone Python's xml.etree.ElementTree, to parse it. Perhaps if LyX
 offered an export to well-formed XML, hopefully with a DTD, I could
 parse that to produce ePub-friendly Xhtml, but as far as I know that
 doesn't exist either.


With eLyXer I have already done all the heavy work myself of converting LyX
documents to an in-memory structure of containers and insets. In theory you
might just tweak the configuration file base.cfg and generate a completely
different document structure such as ePub. In practice, and as far as I
know, it works: I was able to make the transition from LyX 1.x to 2.0 just
by adding a few insets and containers to the configuration file.

Sadly, after 7 years, not using LyX anymore and with little help from LyX
developers (with some *laudable exceptions*) I can no longer justify 

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

2014-01-31 Thread Alex Fernandez
Hi Steve,

On Fri, Jan 31, 2014 at 5:47 PM, Steve Litt sl...@troubleshooters.comwrote:

 Ladies and gentlemen, if the preceding paragraph doesn't convince us we
 need a good, solid, LyX to ePub and LyX to Mobi conversion (do ePub
 first, you can convert ePub into Mobi), then nothing will. Instead of
 slamming out his book in LyX, Anthony must use an outside service
 (smashwords), meaning a two word modification is, as Joe Biden would
 say, a Big Friggin Deal. Further, to satisfy Smashwords he must write it
 in LibreOffice to simulate MS Word. Or, if he's just doing Kindle, he
 can submit rtf (what could *possibly* go wrong).


Good luck with the convincing part.


 You can't base a LyX to ePub converter off either LyX2Xhtml or Alex's
 eLyXer: Those produce great (X)html for stuff like footnotes and
 bibliographies, but they discard semantic tags (h1-h6) for variously
 named divs (yeah, div, not even p), as I remember they still use
 outdated a name=whatever/ instead of giving an ID to a tag. One or
 both of them does you the favor of renaming all graphic files to a
 numerical sequence: I guess this is to prevent identically named
 graphics in different directories from clobbering each other, but there
 are better ways of doing this that don't have the anti-debugging
 baggage of removing all meaning from graphic names.  Current
 LyX exported (X)html files just generally require *huge*
 postprocessing, with zillions of special cases, to get them in
 reasonable shape to make an ePub. If that were not the case, somebody
 would have made a LyX2ePub a long, long time ago, because the demand is
 there, and a lot of people have that itch, and I'm not the only one
 who has tried to do it.


eLyXer does not rename any graphic files AFAICR. Also, eLyXer should
provide semantic tags like h1-h6, as you can see here:
  http://elyxer.nongnu.org/math-unicode.html

Shamefully, because I need to be able to have my books available as
 ePubs, after 13 years using LyX to write my books, I'm now using the
 Bluefish editor to write my future books. I've written an Xhtml to ePub
 converter in Python, and I can write an Xhtml to LaTeX converter just
 as easily. But let me ask you something: Have you ever tried to slam
 out 2500 words a day in Bluefish? Bluefish will never have the
 authoring speed of LyX. But then again, as things stand now, a LyX
 authored document will never be convertible to ePub.


I feel your pain. Not with Bluefish but with other, also less powerful
editors. For good or for bad I have not needed translation to ePub yet.

The shame is, in theory, LyX to ePub is simple. Every environment
 becomes p class=environmentname, every character style becomes
 span class=charstylename. Leave div out of it except for every
 special cases. Even lyx-code should become pre class=lyxcode, not
 div class=lyxcode.


It should not be difficult to change eLyXer output to be as you desire;
just take a look at base.cfg
  https://github.com/alexfernandez/elyxer/blob/master/src/conf/base.cfg
where most elements of the output can be configured. There are many special
cases and a few ugly-ish tricks (such as h? to denote h1-h6), but it is
mostly there. Or should be.


 A special one-per-book configuration file (I did mine in YAML) defines
 the assignment of Part, Chapter, Section, Subsection etc to h1, h2,
 h3, h4 etc, and defines which go in the table of contents, and
 which get numbers and what prefix the number gets (Part, Chapter, etc).
 I've already done this: It works. Don't worry about converting LyX
 environment and char style defs to CSS, just list all paragraph and
 char styles, so that the author can make the necessary CSS. CSS is
 *much* easier to define than LaTeX environments and commands. And yes,
 let the author know that this export requires the author use only a
 subset of LyX's capabilities.


With luck, LyX devs will propose a native export which is neither here nor
there. Uphill battle in any case.

I briefly considered writing Yet Another LyX to HTML Exporter, but
 found out that in spite of LyX's native format being Non Human Friendly
 XML, it's not *well formed* XML, so I can't use Python's lxml.etree,
 let alone Python's xml.etree.ElementTree, to parse it. Perhaps if LyX
 offered an export to well-formed XML, hopefully with a DTD, I could
 parse that to produce ePub-friendly Xhtml, but as far as I know that
 doesn't exist either.


With eLyXer I have already done all the heavy work myself of converting LyX
documents to an in-memory structure of containers and insets. In theory you
might just tweak the configuration file base.cfg and generate a completely
different document structure such as ePub. In practice, and as far as I
know, it works: I was able to make the transition from LyX 1.x to 2.0 just
by adding a few insets and containers to the configuration file.

Sadly, after 7 years, not using LyX anymore and with little help from LyX
developers (with some *laudable exceptions*) I can no longer justify 

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

2014-01-31 Thread Alex Fernandez
Hi Steve,

On Fri, Jan 31, 2014 at 5:47 PM, Steve Litt wrote:

> Ladies and gentlemen, if the preceding paragraph doesn't convince us we
> need a good, solid, LyX to ePub and LyX to Mobi conversion (do ePub
> first, you can convert ePub into Mobi), then nothing will. Instead of
> slamming out his book in LyX, Anthony must use an outside service
> (smashwords), meaning a two word modification is, as Joe Biden would
> say, a Big Friggin Deal. Further, to satisfy Smashwords he must write it
> in LibreOffice to simulate MS Word. Or, if he's just doing Kindle, he
> can submit rtf (what could *possibly* go wrong).
>

Good luck with the convincing part.


> You can't base a LyX to ePub converter off either LyX2Xhtml or Alex's
> eLyXer: Those produce great (X)html for stuff like footnotes and
> bibliographies, but they discard semantic tags (h1-h6) for variously
> named divs (yeah, , not even ), as I remember they still use
> outdated  instead of giving an ID to a tag. One or
> both of them does you the "favor" of renaming all graphic files to a
> numerical sequence: I guess this is to prevent identically named
> graphics in different directories from clobbering each other, but there
> are better ways of doing this that don't have the anti-debugging
> baggage of removing all meaning from graphic names.  Current
> LyX exported (X)html files just generally require *huge*
> postprocessing, with zillions of special cases, to get them in
> reasonable shape to make an ePub. If that were not the case, somebody
> would have made a LyX2ePub a long, long time ago, because the demand is
> there, and a lot of people have that itch, and I'm not the only one
> who has tried to do it.
>

eLyXer does not rename any graphic files AFAICR. Also, eLyXer should
provide semantic tags like h1-h6, as you can see here:
  http://elyxer.nongnu.org/math-unicode.html

Shamefully, because I need to be able to have my books available as
> ePubs, after 13 years using LyX to write my books, I'm now using the
> Bluefish editor to write my future books. I've written an Xhtml to ePub
> converter in Python, and I can write an Xhtml to LaTeX converter just
> as easily. But let me ask you something: Have you ever tried to slam
> out 2500 words a day in Bluefish? Bluefish will never have the
> authoring speed of LyX. But then again, as things stand now, a LyX
> authored document will never be convertible to ePub.
>

I feel your pain. Not with Bluefish but with other, also less powerful
editors. For good or for bad I have not needed translation to ePub yet.

The shame is, in theory, LyX to ePub is simple. Every environment
> becomes , every character style becomes
> . Leave  out of it except for every
> special cases. Even lyx-code should become , not
> .
>

It should not be difficult to change eLyXer output to be as you desire;
just take a look at base.cfg
  https://github.com/alexfernandez/elyxer/blob/master/src/conf/base.cfg
where most elements of the output can be configured. There are many special
cases and a few ugly-ish tricks (such as h? to denote h1-h6), but it is
mostly there. Or should be.


> A special one-per-book configuration file (I did mine in YAML) defines
> the assignment of Part, Chapter, Section, Subsection etc to , ,
> ,  etc, and defines which go in the table of contents, and
> which get numbers and what prefix the number gets (Part, Chapter, etc).
> I've already done this: It works. Don't worry about converting LyX
> environment and char style defs to CSS, just list all paragraph and
> char styles, so that the author can make the necessary CSS. CSS is
> *much* easier to define than LaTeX environments and commands. And yes,
> let the author know that this export requires the author use only a
> subset of LyX's capabilities.
>

With luck, LyX devs will propose a native export which is neither here nor
there. Uphill battle in any case.

I briefly considered writing Yet Another LyX to HTML Exporter, but
> found out that in spite of LyX's native format being Non Human Friendly
> XML, it's not *well formed* XML, so I can't use Python's lxml.etree,
> let alone Python's xml.etree.ElementTree, to parse it. Perhaps if LyX
> offered an export to well-formed XML, hopefully with a DTD, I could
> parse that to produce ePub-friendly Xhtml, but as far as I know that
> doesn't exist either.
>

With eLyXer I have already done all the heavy work myself of converting LyX
documents to an in-memory structure of containers and insets. In theory you
might just tweak the configuration file base.cfg and generate a completely
different document structure such as ePub. In practice, and as far as I
know, it works: I was able to make the transition from LyX 1.x to 2.0 just
by adding a few insets and containers to the configuration file.

Sadly, after 7 years, not using LyX anymore and with little help from LyX
developers (with some *laudable exceptions*) I can no longer justify myself
to devote any efforts to support eLyXer, not 

Re: Project's favorite license????

2013-07-05 Thread Alex Fernandez
Hi,

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

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


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

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

Alex.


Re: Project's favorite license????

2013-07-05 Thread Alex Fernandez
Hi,

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

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


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

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

Alex.


Re: Project's favorite license????

2013-07-05 Thread Alex Fernandez
Hi,

On Fri, Jul 5, 2013 at 9:58 PM, Liviu Andronic wrote:

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

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

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

Alex.


Re: eLyXer 1.2.4 released

2013-03-17 Thread Alex Fernandez
Hi Ray,

On Sun, Mar 17, 2013 at 1:35 AM, Ray Rashif schivmeis...@gmail.com wrote:

 On 17 March 2013 07:12, Alex Fernandez ely...@gmail.com wrote:
  As Liviu discovered, just to let you all know that I had to release 1.2.5
  because of problems with the 1.2.4 release (the binary lacked a couple of
  patches; otherwise the source code was fine).

 Alex, when I first heard of eLyXer -- amidst mounting frustrations
 resulting from several failed attempts at converting a 350-page
 document to any other usable format -- I thought it was just another
 deceptive solution and gave it a miss entirely.

 How wrong I was, how deceptively brilliant this is! I was expecting I
 would have to at least input child documents, but it worked its magic
 on the master document itself. Believe me, nothing else ever worked,
 and this is a complex document with LaTeX hacks here and there.

 Sure, there were some issues, like not recognising some (or all) LaTeX
 commands, external inset, and ignoring some BibTeX entries, but I now
 have a usable single-file HTML verbatim copy of the main contents,
 complete with (cross-)references and images.

 The software had been lying dormant as a package in my (GNU/Linux)
 distribution's unofficial buildscripts repository [1] with no love at
 all, but I'll be promoting it directly to a supported binary
 repository as soon as I get some time -- no-one should miss this.



 [1] https://aur.archlinux.org/packages/elyxer/


Glad you are doing this. I will add you to the list of maintainers if you
want, and send you any announcements directly.

Thanks,

Alex.


Re: eLyXer 1.2.4 released

2013-03-17 Thread Alex Fernandez
Hi Ray,

On Sun, Mar 17, 2013 at 1:35 AM, Ray Rashif schivmeis...@gmail.com wrote:

 On 17 March 2013 07:12, Alex Fernandez ely...@gmail.com wrote:
  As Liviu discovered, just to let you all know that I had to release 1.2.5
  because of problems with the 1.2.4 release (the binary lacked a couple of
  patches; otherwise the source code was fine).

 Alex, when I first heard of eLyXer -- amidst mounting frustrations
 resulting from several failed attempts at converting a 350-page
 document to any other usable format -- I thought it was just another
 deceptive solution and gave it a miss entirely.

 How wrong I was, how deceptively brilliant this is! I was expecting I
 would have to at least input child documents, but it worked its magic
 on the master document itself. Believe me, nothing else ever worked,
 and this is a complex document with LaTeX hacks here and there.

 Sure, there were some issues, like not recognising some (or all) LaTeX
 commands, external inset, and ignoring some BibTeX entries, but I now
 have a usable single-file HTML verbatim copy of the main contents,
 complete with (cross-)references and images.

 The software had been lying dormant as a package in my (GNU/Linux)
 distribution's unofficial buildscripts repository [1] with no love at
 all, but I'll be promoting it directly to a supported binary
 repository as soon as I get some time -- no-one should miss this.



 [1] https://aur.archlinux.org/packages/elyxer/


Glad you are doing this. I will add you to the list of maintainers if you
want, and send you any announcements directly.

Thanks,

Alex.


Re: eLyXer 1.2.4 released

2013-03-17 Thread Alex Fernandez
Hi Ray,

On Sun, Mar 17, 2013 at 1:35 AM, Ray Rashif <schivmeis...@gmail.com> wrote:

> On 17 March 2013 07:12, Alex Fernandez <ely...@gmail.com> wrote:
> > As Liviu discovered, just to let you all know that I had to release 1.2.5
> > because of problems with the 1.2.4 release (the binary lacked a couple of
> > patches; otherwise the source code was fine).
>
> Alex, when I first heard of eLyXer -- amidst mounting frustrations
> resulting from several failed attempts at converting a 350-page
> document to any other usable format -- I thought it was just another
> deceptive solution and gave it a miss entirely.
>
> How wrong I was, how deceptively brilliant this is! I was expecting I
> would have to at least input child documents, but it worked its magic
> on the master document itself. Believe me, nothing else ever worked,
> and this is a complex document with LaTeX hacks here and there.
>
> Sure, there were some issues, like not recognising some (or all) LaTeX
> commands, external inset, and ignoring some BibTeX entries, but I now
> have a usable single-file HTML verbatim copy of the main contents,
> complete with (cross-)references and images.
>
> The software had been lying dormant as a package in my (GNU/Linux)
> distribution's unofficial buildscripts repository [1] with no love at
> all, but I'll be promoting it directly to a supported binary
> repository as soon as I get some time -- no-one should miss this.


>
> [1] https://aur.archlinux.org/packages/elyxer/


Glad you are doing this. I will add you to the list of maintainers if you
want, and send you any announcements directly.

Thanks,

Alex.


Re: eLyXer 1.2.4 released

2013-03-16 Thread Alex Fernandez
On Sat, Mar 16, 2013 at 10:28 PM, Liviu Andronic landronim...@gmail.comwrote:

  Version 1.2.4 of eLyXer, the LyX - HTML converter, has just been
 released
  after a long hiatus. This version features a Russian translation, several
  more commands and a fix for having both hover and end footnotes. See the
  full changelog at:
http://alexfernandez.github.com/elyxer/changelog.html


Ubuntu binaries for 1.2.5 are available at the PPA:

https://launchpad.net/~lyx-devel/+archive/release


As Liviu discovered, just to let you all know that I had to release 1.2.5
because of problems with the 1.2.4 release (the binary lacked a couple of
patches; otherwise the source code was fine).

Alex.


Re: eLyXer 1.2.4 released

2013-03-16 Thread Alex Fernandez
On Sat, Mar 16, 2013 at 10:28 PM, Liviu Andronic landronim...@gmail.comwrote:

  Version 1.2.4 of eLyXer, the LyX - HTML converter, has just been
 released
  after a long hiatus. This version features a Russian translation, several
  more commands and a fix for having both hover and end footnotes. See the
  full changelog at:
http://alexfernandez.github.com/elyxer/changelog.html


Ubuntu binaries for 1.2.5 are available at the PPA:

https://launchpad.net/~lyx-devel/+archive/release


As Liviu discovered, just to let you all know that I had to release 1.2.5
because of problems with the 1.2.4 release (the binary lacked a couple of
patches; otherwise the source code was fine).

Alex.


Re: eLyXer 1.2.4 released

2013-03-16 Thread Alex Fernandez
On Sat, Mar 16, 2013 at 10:28 PM, Liviu Andronic wrote:

> > Version 1.2.4 of eLyXer, the LyX -> HTML converter, has just been
> released
> > after a long hiatus. This version features a Russian translation, several
> > more commands and a fix for having both hover and end footnotes. See the
> > full changelog at:
> >   http://alexfernandez.github.com/elyxer/changelog.html
>

Ubuntu binaries for 1.2.5 are available at the PPA:
>
https://launchpad.net/~lyx-devel/+archive/release
>

As Liviu discovered, just to let you all know that I had to release 1.2.5
because of problems with the 1.2.4 release (the binary lacked a couple of
patches; otherwise the source code was fine).

Alex.


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


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


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: LyXHTML Visual Appearance

2012-05-07 Thread Alex Fernandez
On Mon, May 7, 2012 at 11:27 AM, Gour g...@atmarama.net wrote:

 I'm also curios if there is plan for LyXHTML/eLyXer to add some JS-based
 search like it's done in Sphinx (http://sphinx.pocoo.org/index.html)


Definitely not for eLyXer, at least at the moment.

Alex.


Re: LyXHTML Visual Appearance

2012-05-07 Thread Alex Fernandez
On Mon, May 7, 2012 at 11:27 AM, Gour g...@atmarama.net wrote:

 I'm also curios if there is plan for LyXHTML/eLyXer to add some JS-based
 search like it's done in Sphinx (http://sphinx.pocoo.org/index.html)


Definitely not for eLyXer, at least at the moment.

Alex.


Re: LyXHTML Visual Appearance

2012-05-07 Thread Alex Fernandez
On Mon, May 7, 2012 at 11:27 AM, Gour  wrote:

> I'm also curios if there is plan for LyXHTML/eLyXer to add some JS-based
> search like it's done in Sphinx (http://sphinx.pocoo.org/index.html)
>

Definitely not for eLyXer, at least at the moment.

Alex.


Re: LyXHTML Visual Appearance

2012-05-06 Thread Alex Fernandez
Hi Gour,

On Sun, May 6, 2012 at 3:06 PM, Gour g...@atmarama.net wrote:

 Moreover, we're curios if LyXHTML can be configured to produce chunked
 XHTML output with navigation links?


You can try eLyXer, which does output paged content with navigation links.
  http://elyxer.nongnu.org/userguide.html
You can download it from the front page:
  http://elyxer.nongnu.org/index.html

Thanks,

Alex.


Re: LyXHTML Visual Appearance

2012-05-06 Thread Alex Fernandez
On Sun, May 6, 2012 at 5:07 PM, Gour g...@atmarama.net wrote:

 On Sun, 6 May 2012 15:49:41 +0200
 Alex Fernandez ely...@gmail.com wrote:

  You can try eLyXer, which does output paged content with navigation
  links. http://elyxer.nongnu.org/userguide.html

 Thank you. It works OK. I knew about it, but considered that it is
 (maybe) obsolete considering that LyX now ships with its own LyXHTML
 converter.


If it works for you, then it is not obsolete! :)

Alex.


Re: LyXHTML Visual Appearance

2012-05-06 Thread Alex Fernandez
On Sun, May 6, 2012 at 10:24 PM, Gour g...@atmarama.net wrote:

 On Sun, 6 May 2012 20:31:52 +0200
 Alex Fernandez ely...@gmail.com wrote:

  If it works for you, then it is not obsolete! :)

 Sure...just wonder what is the objective of 'internal' converter if not
 just duplicating the feature(s) ?


Hard for me to say since I am not involved with the internal converter, but
I gather it is not there yet in many respects.

Alex.


Re: LyXHTML Visual Appearance

2012-05-06 Thread Alex Fernandez
Hi Gour,

On Sun, May 6, 2012 at 3:06 PM, Gour g...@atmarama.net wrote:

 Moreover, we're curios if LyXHTML can be configured to produce chunked
 XHTML output with navigation links?


You can try eLyXer, which does output paged content with navigation links.
  http://elyxer.nongnu.org/userguide.html
You can download it from the front page:
  http://elyxer.nongnu.org/index.html

Thanks,

Alex.


Re: LyXHTML Visual Appearance

2012-05-06 Thread Alex Fernandez
On Sun, May 6, 2012 at 5:07 PM, Gour g...@atmarama.net wrote:

 On Sun, 6 May 2012 15:49:41 +0200
 Alex Fernandez ely...@gmail.com wrote:

  You can try eLyXer, which does output paged content with navigation
  links. http://elyxer.nongnu.org/userguide.html

 Thank you. It works OK. I knew about it, but considered that it is
 (maybe) obsolete considering that LyX now ships with its own LyXHTML
 converter.


If it works for you, then it is not obsolete! :)

Alex.


Re: LyXHTML Visual Appearance

2012-05-06 Thread Alex Fernandez
On Sun, May 6, 2012 at 10:24 PM, Gour g...@atmarama.net wrote:

 On Sun, 6 May 2012 20:31:52 +0200
 Alex Fernandez ely...@gmail.com wrote:

  If it works for you, then it is not obsolete! :)

 Sure...just wonder what is the objective of 'internal' converter if not
 just duplicating the feature(s) ?


Hard for me to say since I am not involved with the internal converter, but
I gather it is not there yet in many respects.

Alex.


Re: LyXHTML Visual Appearance

2012-05-06 Thread Alex Fernandez
Hi Gour,

On Sun, May 6, 2012 at 3:06 PM, Gour  wrote:

> Moreover, we're curios if LyXHTML can be configured to produce chunked
> XHTML output with navigation links?
>

You can try eLyXer, which does output paged content with navigation links.
  http://elyxer.nongnu.org/userguide.html
You can download it from the front page:
  http://elyxer.nongnu.org/index.html

Thanks,

Alex.


Re: LyXHTML Visual Appearance

2012-05-06 Thread Alex Fernandez
On Sun, May 6, 2012 at 5:07 PM, Gour <g...@atmarama.net> wrote:

> On Sun, 6 May 2012 15:49:41 +0200
> Alex Fernandez <ely...@gmail.com> wrote:
>
> > You can try eLyXer, which does output paged content with navigation
> > links. http://elyxer.nongnu.org/userguide.html
>
> Thank you. It works OK. I knew about it, but considered that it is
> (maybe) obsolete considering that LyX now ships with its own LyXHTML
> converter.
>

If it works for you, then it is not obsolete! :)

Alex.


Re: LyXHTML Visual Appearance

2012-05-06 Thread Alex Fernandez
On Sun, May 6, 2012 at 10:24 PM, Gour <g...@atmarama.net> wrote:

> On Sun, 6 May 2012 20:31:52 +0200
> Alex Fernandez <ely...@gmail.com> wrote:
>
> > If it works for you, then it is not obsolete! :)
>
> Sure...just wonder what is the objective of 'internal' converter if not
> just duplicating the feature(s) ?
>

Hard for me to say since I am not involved with the internal converter, but
I gather it is not there yet in many respects.

Alex.


Re: HTML Pagination Issues (elyxer)

2012-04-26 Thread Alex Fernandez
Hi Ray,

On Fri, Apr 27, 2012 at 12:27 AM, Raymond Lillard rlill...@sonic.netwrote:

 I'm not clear on these things, but it looks like
 Elyxer is not maintained by the Lyx project.  Should
 I take silly little problem elsewhere?


Sure, you can email me directly. I have received other requests to remove
parsing errors from the output; I should probably do that for the next
version.

OK, I made an incorrect assumption when I wrote the above.
 I didn't realize the HTML was being created directly from
 lyx code.  I was thinking it was going through some common
 intermediate format.  Since not, the problem is between me
 and elyxer and probably insoluble since neither HTML or
 Lyx code have a any concept of a letter sized page.


Yes, your intentions (output numbered by actual paper pages) is quite alien
to eLyXer and even to the HTML format itself. Apart from cutting pages at a
fixed number of words, or doing some troff-like abomination (the kind you
see on RFCs: http://www.rfc-editor.org/rfc/rfc1866.txt), I don't see how
that would even work. The natural way to do what you want would be to cut
the output by sections; and frankly I don't understand why that solution
doesn't cut it for you (pun intended).

Another request I have received, and which I need myself, is to output
section names as page names, the kind of dash-separated-titles that you see
on blog posts. I should take out some time to work on eLyXer!

Alex.


Re: HTML Pagination Issues (elyxer)

2012-04-26 Thread Alex Fernandez
Hi Ray,

On Fri, Apr 27, 2012 at 12:27 AM, Raymond Lillard rlill...@sonic.netwrote:

 I'm not clear on these things, but it looks like
 Elyxer is not maintained by the Lyx project.  Should
 I take silly little problem elsewhere?


Sure, you can email me directly. I have received other requests to remove
parsing errors from the output; I should probably do that for the next
version.

OK, I made an incorrect assumption when I wrote the above.
 I didn't realize the HTML was being created directly from
 lyx code.  I was thinking it was going through some common
 intermediate format.  Since not, the problem is between me
 and elyxer and probably insoluble since neither HTML or
 Lyx code have a any concept of a letter sized page.


Yes, your intentions (output numbered by actual paper pages) is quite alien
to eLyXer and even to the HTML format itself. Apart from cutting pages at a
fixed number of words, or doing some troff-like abomination (the kind you
see on RFCs: http://www.rfc-editor.org/rfc/rfc1866.txt), I don't see how
that would even work. The natural way to do what you want would be to cut
the output by sections; and frankly I don't understand why that solution
doesn't cut it for you (pun intended).

Another request I have received, and which I need myself, is to output
section names as page names, the kind of dash-separated-titles that you see
on blog posts. I should take out some time to work on eLyXer!

Alex.


Re: HTML Pagination Issues (elyxer)

2012-04-26 Thread Alex Fernandez
Hi Ray,

On Fri, Apr 27, 2012 at 12:27 AM, Raymond Lillard wrote:

> I'm not clear on these things, but it looks like
> Elyxer is not maintained by the Lyx project.  Should
> I take silly little problem elsewhere?
>

Sure, you can email me directly. I have received other requests to remove
parsing errors from the output; I should probably do that for the next
version.

OK, I made an incorrect assumption when I wrote the above.
> I didn't realize the HTML was being created directly from
> lyx code.  I was thinking it was going through some common
> intermediate format.  Since not, the problem is between me
> and elyxer and probably insoluble since neither HTML or
> Lyx code have a any concept of a letter sized page.
>

Yes, your intentions (output numbered by actual paper pages) is quite alien
to eLyXer and even to the HTML format itself. Apart from cutting pages at a
fixed number of words, or doing some troff-like abomination (the kind you
see on RFCs: http://www.rfc-editor.org/rfc/rfc1866.txt), I don't see how
that would even work. The natural way to do what you want would be to cut
the output by sections; and frankly I don't understand why that solution
doesn't cut it for you (pun intended).

Another request I have received, and which I need myself, is to output
section names as page names, the kind of dash-separated-titles that you see
on blog posts. I should take out some time to work on eLyXer!

Alex.


Re: word2lyx (Word to LyX Translator): Status Update

2012-03-09 Thread Alex Fernandez
Hi,

On Thu, Mar 8, 2012 at 4:36 PM, Rob Oakes lyx-de...@oak-tree.us wrote:
 I'm sympathetic to this point. I understand that having a way to go from one 
 to the other is important. I've deliberately avoided creating an export to 
 Word option, though, because it would essentially require that I recode large 
 portions of LyX in Python. I'm resistant to doing that because it's a a lot 
 of extra code to maintain. There are already two implementations of LyX 
 document parsing libraries: eLyXer and that found in LyX itself. Adding a 
 third and trying to keep it in some sort of synchronization would be a huge 
 pain. I'm looking into using eLyXer for Word conversion from LyX, but that is 
 lesser priority than making Word import work correctly. (At least at the 
 moment.) If there is someone (maybe Alex or another eLyXer dev) who would be 
 interest in collaborating and handling the export part, I'd be happy to 
 coordinate with them so that we're able to round-trip.

That would be great. Unfortunately eLyXer is pretty much a solo
project at the moment, and I don't have the time (or even the
inclination) to do the job. But it might be a great project to have
someone else started on the eLyXer codebase, and I would provide all
the assistance needed to learn their way around. Interested parties
are encouraged to contact me if you
feel that you might want to tackle this project, always with Rob's coordination.

Alex.


Re: word2lyx (Word to LyX Translator): Status Update

2012-03-09 Thread Alex Fernandez
Hi,

On Thu, Mar 8, 2012 at 4:36 PM, Rob Oakes lyx-de...@oak-tree.us wrote:
 I'm sympathetic to this point. I understand that having a way to go from one 
 to the other is important. I've deliberately avoided creating an export to 
 Word option, though, because it would essentially require that I recode large 
 portions of LyX in Python. I'm resistant to doing that because it's a a lot 
 of extra code to maintain. There are already two implementations of LyX 
 document parsing libraries: eLyXer and that found in LyX itself. Adding a 
 third and trying to keep it in some sort of synchronization would be a huge 
 pain. I'm looking into using eLyXer for Word conversion from LyX, but that is 
 lesser priority than making Word import work correctly. (At least at the 
 moment.) If there is someone (maybe Alex or another eLyXer dev) who would be 
 interest in collaborating and handling the export part, I'd be happy to 
 coordinate with them so that we're able to round-trip.

That would be great. Unfortunately eLyXer is pretty much a solo
project at the moment, and I don't have the time (or even the
inclination) to do the job. But it might be a great project to have
someone else started on the eLyXer codebase, and I would provide all
the assistance needed to learn their way around. Interested parties
are encouraged to contact me if you
feel that you might want to tackle this project, always with Rob's coordination.

Alex.


Re: word2lyx (Word to LyX Translator): Status Update

2012-03-09 Thread Alex Fernandez
Hi,

On Thu, Mar 8, 2012 at 4:36 PM, Rob Oakes  wrote:
> I'm sympathetic to this point. I understand that having a way to go from one 
> to the other is important. I've deliberately avoided creating an export to 
> Word option, though, because it would essentially require that I recode large 
> portions of LyX in Python. I'm resistant to doing that because it's a a lot 
> of extra code to maintain. There are already two implementations of LyX 
> document parsing libraries: eLyXer and that found in LyX itself. Adding a 
> third and trying to keep it in some sort of synchronization would be a huge 
> pain. I'm looking into using eLyXer for Word conversion from LyX, but that is 
> lesser priority than making Word import work correctly. (At least at the 
> moment.) If there is someone (maybe Alex or another eLyXer dev) who would be 
> interest in collaborating and handling the export part, I'd be happy to 
> coordinate with them so that we're able to round-trip.

That would be great. Unfortunately eLyXer is pretty much a solo
project at the moment, and I don't have the time (or even the
inclination) to do the job. But it might be a great project to have
someone else started on the eLyXer codebase, and I would provide all
the assistance needed to learn their way around. Interested parties
are encouraged to contact me if you
feel that you might want to tackle this project, always with Rob's coordination.

Alex.


Re: eLyXer for Document Parsing

2012-02-09 Thread Alex Fernandez
Hi Steve,

On 2/5/12, Rob Oakes lyx-de...@oak-tree.us wrote:
 Extremely good point, I'm also more comfortable with the HTML export
 available in LyX. I initially was interested in eLyXer because I thought I
 might be able to use it to help with an import filter as well. I'm not sure
 that it can, though. As you note in your email, it doesn't create a document
 model.

I am not sure what you mean by document model. For the record,
eLyXer creates an in-memory representation of the complete LyX
document since version 0.36 (released back in 2009):
  http://elyxer.nongnu.org/changelog.html
When using the --lowmem option, this in-memory representation is
created and flushed for each document block independently. Otherwise
you load the entire document in memory.

Alex.


Re: eLyXer for Document Parsing

2012-02-09 Thread Alex Fernandez
On 2/9/12, Steve Litt sl...@troubleshooters.com wrote:
 I am not sure what you mean by document model. For the record,
 eLyXer creates an in-memory representation of the complete LyX
 document since version 0.36 (released back in 2009):

 I'm pretty sure he meant Document Object Model, or DOM, the object
 hierarchy used to express HTML web pages.

Ah, OK. Always hated DOM. eLyXer's in-memory representation is for the
LyX document, not of the resulting HTML document. Much tighter this
way, IMHO.

Alex.


Re: eLyXer for Document Parsing

2012-02-09 Thread Alex Fernandez
On 2/9/12, Rob Oakes lyx-de...@oak-tree.us wrote:
 On 2/9/2012 11:42 AM, Alex Fernandez wrote:
 Ah, OK. Always hated DOM. eLyXer's in-memory representation is for the
 LyX document, not of the resulting HTML document. Much tighter this
 way, IMHO.

 Is there an example of how I might be able to access the in-memory
 representation for the LyX document? If possible, I'd like to be able to
 get some sort of iterable object that could be used to translate the
 structure into the XML structure used by Microsoft Word.

I don't know of any examples outside eLyXer. The source code should be
quite readable. I would point you to main.convert.eLyXerConverter and
proc.process.Processor as starting points; there are actually a few
ways to do what you want (iterate over Containers). If you want I can
give you further explanations offlist.

Alex.


Re: eLyXer for Document Parsing

2012-02-09 Thread Alex Fernandez
Hi Steve,

On 2/5/12, Rob Oakes lyx-de...@oak-tree.us wrote:
 Extremely good point, I'm also more comfortable with the HTML export
 available in LyX. I initially was interested in eLyXer because I thought I
 might be able to use it to help with an import filter as well. I'm not sure
 that it can, though. As you note in your email, it doesn't create a document
 model.

I am not sure what you mean by document model. For the record,
eLyXer creates an in-memory representation of the complete LyX
document since version 0.36 (released back in 2009):
  http://elyxer.nongnu.org/changelog.html
When using the --lowmem option, this in-memory representation is
created and flushed for each document block independently. Otherwise
you load the entire document in memory.

Alex.


Re: eLyXer for Document Parsing

2012-02-09 Thread Alex Fernandez
On 2/9/12, Steve Litt sl...@troubleshooters.com wrote:
 I am not sure what you mean by document model. For the record,
 eLyXer creates an in-memory representation of the complete LyX
 document since version 0.36 (released back in 2009):

 I'm pretty sure he meant Document Object Model, or DOM, the object
 hierarchy used to express HTML web pages.

Ah, OK. Always hated DOM. eLyXer's in-memory representation is for the
LyX document, not of the resulting HTML document. Much tighter this
way, IMHO.

Alex.


Re: eLyXer for Document Parsing

2012-02-09 Thread Alex Fernandez
On 2/9/12, Rob Oakes lyx-de...@oak-tree.us wrote:
 On 2/9/2012 11:42 AM, Alex Fernandez wrote:
 Ah, OK. Always hated DOM. eLyXer's in-memory representation is for the
 LyX document, not of the resulting HTML document. Much tighter this
 way, IMHO.

 Is there an example of how I might be able to access the in-memory
 representation for the LyX document? If possible, I'd like to be able to
 get some sort of iterable object that could be used to translate the
 structure into the XML structure used by Microsoft Word.

I don't know of any examples outside eLyXer. The source code should be
quite readable. I would point you to main.convert.eLyXerConverter and
proc.process.Processor as starting points; there are actually a few
ways to do what you want (iterate over Containers). If you want I can
give you further explanations offlist.

Alex.


Re: eLyXer for Document Parsing

2012-02-09 Thread Alex Fernandez
Hi Steve,

On 2/5/12, Rob Oakes  wrote:
> Extremely good point, I'm also more comfortable with the HTML export
> available in LyX. I initially was interested in eLyXer because I thought I
> might be able to use it to help with an import filter as well. I'm not sure
> that it can, though. As you note in your email, it doesn't create a document
> model.

I am not sure what you mean by "document model". For the record,
eLyXer creates an in-memory representation of the complete LyX
document since version 0.36 (released back in 2009):
  http://elyxer.nongnu.org/changelog.html
When using the --lowmem option, this in-memory representation is
created and flushed for each document block independently. Otherwise
you load the entire document in memory.

Alex.


Re: eLyXer for Document Parsing

2012-02-09 Thread Alex Fernandez
On 2/9/12, Steve Litt  wrote:
>> I am not sure what you mean by "document model". For the record,
>> eLyXer creates an in-memory representation of the complete LyX
>> document since version 0.36 (released back in 2009):

> I'm pretty sure he meant "Document Object Model", or DOM, the object
> hierarchy used to express HTML web pages.

Ah, OK. Always hated DOM. eLyXer's in-memory representation is for the
LyX document, not of the resulting HTML document. Much tighter this
way, IMHO.

Alex.


Re: eLyXer for Document Parsing

2012-02-09 Thread Alex Fernandez
On 2/9/12, Rob Oakes <lyx-de...@oak-tree.us> wrote:
> On 2/9/2012 11:42 AM, Alex Fernandez wrote:
>> Ah, OK. Always hated DOM. eLyXer's in-memory representation is for the
>> LyX document, not of the resulting HTML document. Much tighter this
>> way, IMHO.
>
> Is there an example of how I might be able to access the in-memory
> representation for the LyX document? If possible, I'd like to be able to
> get some sort of iterable object that could be used to translate the
> structure into the XML structure used by Microsoft Word.

I don't know of any examples outside eLyXer. The source code should be
quite readable. I would point you to main.convert.eLyXerConverter and
proc.process.Processor as starting points; there are actually a few
ways to do what you want (iterate over Containers). If you want I can
give you further explanations offlist.

Alex.


Re: eLyXer for Document Parsing

2012-02-05 Thread Alex Fernandez
Hi all,

I am currently travelling so excuse my android top-posting. Actually
building a reusable in-memory representation for Python scripting of LyX
documents was a requisite for eLyXer. You should not have trouble with
large documents as my puny netbook eats 1000 page documents for lunch. Look
at the Container class, and best of luck! Please ask in private any further
questions.

Alex.
El 04/02/2012 18:03, Rob Oakes lyx-de...@oak-tree.us escribió:

 Dear eLyXer Users and Developers,

 I'm still at work on the import/export module for Microsoft Word
 documents. I'm making pretty good progress. I've got a rough prototype that
 works pretty well and I'm now starting to refine it.

 My approach up to now has been to use regular expressions to match
 portions of the document and then use a library to translate those to the
 corresponding Word XML structures. It's working pretty well with my simple
 test documents.

 Before going too far with this approach, though, I wanted to post (another
 general query).

 In the eLyXer library, there is already a robust set of tools used for
 converting LyX documents to HTML. Does anyone know if the library is
 written in such as way that getting a generic in-memory representation of
 the document would be possible? It would be awesome to re-use as much
 existing code for the Word document export as possible. That would allow me
 to support a broader number of features, and gives me a framework for
 working with maths.

 Any thoughts Alex (and others)? I've downloaded the sources and have begun
 to work through them, but before spending hours to days trying to wrap my
 head around them, I thought I would ask.

 Cheers,

 Rob


Re: eLyXer for Document Parsing

2012-02-05 Thread Alex Fernandez
Hi all,

I am currently travelling so excuse my android top-posting. Actually
building a reusable in-memory representation for Python scripting of LyX
documents was a requisite for eLyXer. You should not have trouble with
large documents as my puny netbook eats 1000 page documents for lunch. Look
at the Container class, and best of luck! Please ask in private any further
questions.

Alex.
El 04/02/2012 18:03, Rob Oakes lyx-de...@oak-tree.us escribió:

 Dear eLyXer Users and Developers,

 I'm still at work on the import/export module for Microsoft Word
 documents. I'm making pretty good progress. I've got a rough prototype that
 works pretty well and I'm now starting to refine it.

 My approach up to now has been to use regular expressions to match
 portions of the document and then use a library to translate those to the
 corresponding Word XML structures. It's working pretty well with my simple
 test documents.

 Before going too far with this approach, though, I wanted to post (another
 general query).

 In the eLyXer library, there is already a robust set of tools used for
 converting LyX documents to HTML. Does anyone know if the library is
 written in such as way that getting a generic in-memory representation of
 the document would be possible? It would be awesome to re-use as much
 existing code for the Word document export as possible. That would allow me
 to support a broader number of features, and gives me a framework for
 working with maths.

 Any thoughts Alex (and others)? I've downloaded the sources and have begun
 to work through them, but before spending hours to days trying to wrap my
 head around them, I thought I would ask.

 Cheers,

 Rob


Re: eLyXer for Document Parsing

2012-02-05 Thread Alex Fernandez
Hi all,

I am currently travelling so excuse my android top-posting. Actually
building a reusable in-memory representation for Python scripting of LyX
documents was a requisite for eLyXer. You should not have trouble with
large documents as my puny netbook eats 1000 page documents for lunch. Look
at the Container class, and best of luck! Please ask in private any further
questions.

Alex.
El 04/02/2012 18:03, "Rob Oakes"  escribió:

> Dear eLyXer Users and Developers,
>
> I'm still at work on the import/export module for Microsoft Word
> documents. I'm making pretty good progress. I've got a rough prototype that
> works pretty well and I'm now starting to refine it.
>
> My approach up to now has been to use regular expressions to match
> portions of the document and then use a library to translate those to the
> corresponding Word XML structures. It's working pretty well with my simple
> test documents.
>
> Before going too far with this approach, though, I wanted to post (another
> general query).
>
> In the eLyXer library, there is already a robust set of tools used for
> converting LyX documents to HTML. Does anyone know if the library is
> written in such as way that getting a generic in-memory representation of
> the document would be possible? It would be awesome to re-use as much
> existing code for the Word document export as possible. That would allow me
> to support a broader number of features, and gives me a framework for
> working with maths.
>
> Any thoughts Alex (and others)? I've downloaded the sources and have begun
> to work through them, but before spending hours to days trying to wrap my
> head around them, I thought I would ask.
>
> Cheers,
>
> Rob


Re: Pass LyX comments through eLyXer?

2011-12-06 Thread Alex Fernandez
Hi, Steve and Guenter,

On Tue, Dec 6, 2011 at 10:46 AM, Guenter Milde mi...@users.sf.net wrote:
 On 2011-12-06, Steve Litt wrote:
 Hi Alex,

 I found that my LyX comments don't get through to the finished HTML
 file, and eLyXer's Options class appears to have no option for passing
 through LyX comments.

 How difficult would it be to add code so there's an option to convert
 LyX comments to !-- HTML comments --? Comments would be an excellent
 way to pass through eBook-only data, without it showing up in a book
 printed from the same LyX file.

 IMO, LyX notes are just for LyX - they are also stripped from the LaTeX.

 OTOH, Comments (InsertNoteComment) are put as comments in the LaTeX and
 should be put in the HTML, too.

 In the *.lyx file, comments look like:

 \begin_inset Note Comment
 status open

 \begin_layout Plain Layout
 a comment
 \end_layout

 \end_inset

Sounds reasonable. Steve, are you willing to try out a test version? I
can send it to you privately.

Alex.


Re: Pass LyX comments through eLyXer?

2011-12-06 Thread Alex Fernandez
Hi Steve,

On Tue, Dec 6, 2011 at 6:06 PM, Steve Litt sl...@troubleshooters.com wrote:
 Abso-Lutely, but I just had another thought. After seeing how LyXHTML
 handled comments, I'm beginning to wonder if the metadata not already
 provided in LyX (Title, Author and Date) should simply be put in a
 tiny XML file.

 Doing it separately kinda sorta makes sense when you think about it.
 In my opinion, the LyX file should always be about how it looks in
 PDF, with another file(s) providing looks/metadata in a flowing text
 eBook. Actually, it might end up with three files, one for Kindle, one
 for iPad, and one for Nook, and one for Open ePad (yeah, I have
 trouble counting :-).

 If you already have something that passes through comments, I'll be
 glad to test it today or in the next few days. Such a thing is
 probably a good thing in general. However, if you're doing it just for
 this specific thing, I'm thinking maybe hold off until all of us give
 it more thought.

OK, I will wait to hear from you.

 I'm most of the way through a post processor for eLyXer-derived HTML
 files that turns them into everything needed to make a Kindle. My
 script is ugly, probably crashy in other circumstances, limited in
 what situations it can handle, featureless, and pre-pre-alpha, but
 when I get it working it can at least serve as a platform for
 discussions on how to do it right the next time.

Ideally, that post-processor should be integrated within eLyXer to
generate EPUB or Kindle documents. I would be glad to add new options:
  $ elyxer.py --epub input.lyx output.html
or, for Kindle:
  $ elyxer.py --kindle input.lyx output.azw
(if that is indeed the extension for Amazon Kindle). The problem I
found when I looked into supporting EPUB was the definition of the
format itself: the supposedly open validator rejected a lot of the
constructs which eLyXer uses in its output, but they worked fine in
e.g. Calibre to generate a full EPUB document.
  http://en.wikipedia.org/wiki/EPUB#Validation
Perhaps newer versions of the specification have improved in that respect.

 Thanks for eLyXer. When you're making a Kindle book, it's the coolest
 thing since sliced cheese.

Thanks :)  I have copied the eLyXer-users list, if you want to discuss
eLyXer-specific stuff we can continue the discussion over there.

Alex.


Re: Pass LyX comments through eLyXer?

2011-12-06 Thread Alex Fernandez
Hi, Steve and Guenter,

On Tue, Dec 6, 2011 at 10:46 AM, Guenter Milde mi...@users.sf.net wrote:
 On 2011-12-06, Steve Litt wrote:
 Hi Alex,

 I found that my LyX comments don't get through to the finished HTML
 file, and eLyXer's Options class appears to have no option for passing
 through LyX comments.

 How difficult would it be to add code so there's an option to convert
 LyX comments to !-- HTML comments --? Comments would be an excellent
 way to pass through eBook-only data, without it showing up in a book
 printed from the same LyX file.

 IMO, LyX notes are just for LyX - they are also stripped from the LaTeX.

 OTOH, Comments (InsertNoteComment) are put as comments in the LaTeX and
 should be put in the HTML, too.

 In the *.lyx file, comments look like:

 \begin_inset Note Comment
 status open

 \begin_layout Plain Layout
 a comment
 \end_layout

 \end_inset

Sounds reasonable. Steve, are you willing to try out a test version? I
can send it to you privately.

Alex.


Re: Pass LyX comments through eLyXer?

2011-12-06 Thread Alex Fernandez
Hi Steve,

On Tue, Dec 6, 2011 at 6:06 PM, Steve Litt sl...@troubleshooters.com wrote:
 Abso-Lutely, but I just had another thought. After seeing how LyXHTML
 handled comments, I'm beginning to wonder if the metadata not already
 provided in LyX (Title, Author and Date) should simply be put in a
 tiny XML file.

 Doing it separately kinda sorta makes sense when you think about it.
 In my opinion, the LyX file should always be about how it looks in
 PDF, with another file(s) providing looks/metadata in a flowing text
 eBook. Actually, it might end up with three files, one for Kindle, one
 for iPad, and one for Nook, and one for Open ePad (yeah, I have
 trouble counting :-).

 If you already have something that passes through comments, I'll be
 glad to test it today or in the next few days. Such a thing is
 probably a good thing in general. However, if you're doing it just for
 this specific thing, I'm thinking maybe hold off until all of us give
 it more thought.

OK, I will wait to hear from you.

 I'm most of the way through a post processor for eLyXer-derived HTML
 files that turns them into everything needed to make a Kindle. My
 script is ugly, probably crashy in other circumstances, limited in
 what situations it can handle, featureless, and pre-pre-alpha, but
 when I get it working it can at least serve as a platform for
 discussions on how to do it right the next time.

Ideally, that post-processor should be integrated within eLyXer to
generate EPUB or Kindle documents. I would be glad to add new options:
  $ elyxer.py --epub input.lyx output.html
or, for Kindle:
  $ elyxer.py --kindle input.lyx output.azw
(if that is indeed the extension for Amazon Kindle). The problem I
found when I looked into supporting EPUB was the definition of the
format itself: the supposedly open validator rejected a lot of the
constructs which eLyXer uses in its output, but they worked fine in
e.g. Calibre to generate a full EPUB document.
  http://en.wikipedia.org/wiki/EPUB#Validation
Perhaps newer versions of the specification have improved in that respect.

 Thanks for eLyXer. When you're making a Kindle book, it's the coolest
 thing since sliced cheese.

Thanks :)  I have copied the eLyXer-users list, if you want to discuss
eLyXer-specific stuff we can continue the discussion over there.

Alex.


Re: Pass LyX comments through eLyXer?

2011-12-06 Thread Alex Fernandez
Hi, Steve and Guenter,

On Tue, Dec 6, 2011 at 10:46 AM, Guenter Milde  wrote:
> On 2011-12-06, Steve Litt wrote:
>> Hi Alex,
>
>> I found that my LyX comments don't get through to the finished HTML
>> file, and eLyXer's Options class appears to have no option for passing
>> through LyX comments.
>
>> How difficult would it be to add code so there's an option to convert
>> LyX comments to ? Comments would be an excellent
>> way to pass through eBook-only data, without it showing up in a book
>> printed from the same LyX file.
>
> IMO, LyX notes are just for LyX - they are also stripped from the LaTeX.
>
> OTOH, Comments (Insert>Note>Comment) are put as comments in the LaTeX and
> should be put in the HTML, too.
>
> In the *.lyx file, comments look like:
>
> \begin_inset Note Comment
> status open
>
> \begin_layout Plain Layout
> a comment
> \end_layout
>
> \end_inset

Sounds reasonable. Steve, are you willing to try out a test version? I
can send it to you privately.

Alex.


Re: Pass LyX comments through eLyXer?

2011-12-06 Thread Alex Fernandez
Hi Steve,

On Tue, Dec 6, 2011 at 6:06 PM, Steve Litt  wrote:
> Abso-Lutely, but I just had another thought. After seeing how LyXHTML
> handled comments, I'm beginning to wonder if the metadata not already
> provided in LyX (Title, Author and Date) should simply be put in a
> tiny XML file.
>
> Doing it separately kinda sorta makes sense when you think about it.
> In my opinion, the LyX file should always be about how it looks in
> PDF, with another file(s) providing looks/metadata in a flowing text
> eBook. Actually, it might end up with three files, one for Kindle, one
> for iPad, and one for Nook, and one for Open ePad (yeah, I have
> trouble counting :-).
>
> If you already have something that passes through comments, I'll be
> glad to test it today or in the next few days. Such a thing is
> probably a good thing in general. However, if you're doing it just for
> this specific thing, I'm thinking maybe hold off until all of us give
> it more thought.

OK, I will wait to hear from you.

> I'm most of the way through a post processor for eLyXer-derived HTML
> files that turns them into everything needed to make a Kindle. My
> script is ugly, probably crashy in other circumstances, limited in
> what situations it can handle, featureless, and pre-pre-alpha, but
> when I get it working it can at least serve as a platform for
> discussions on how to do it right the next time.

Ideally, that post-processor should be integrated within eLyXer to
generate EPUB or Kindle documents. I would be glad to add new options:
  $ elyxer.py --epub input.lyx output.html
or, for Kindle:
  $ elyxer.py --kindle input.lyx output.azw
(if that is indeed the extension for Amazon Kindle). The problem I
found when I looked into supporting EPUB was the definition of the
format itself: the supposedly open validator rejected a lot of the
constructs which eLyXer uses in its output, but they worked fine in
e.g. Calibre to generate a full EPUB document.
  http://en.wikipedia.org/wiki/EPUB#Validation
Perhaps newer versions of the specification have improved in that respect.

> Thanks for eLyXer. When you're making a Kindle book, it's the coolest
> thing since sliced cheese.

Thanks :)  I have copied the eLyXer-users list, if you want to discuss
eLyXer-specific stuff we can continue the discussion over there.

Alex.


Re: LyX and Kindle books

2011-12-03 Thread Alex Fernandez
Hi Rob,

On Fri, Dec 2, 2011 at 3:34 PM, Rob Oakes lyx-de...@oak-tree.us wrote:
 I am working on an ePub compatible module right now (document class at any 
 rate). It's for a talk I'm giving at a publishing conference next week. I 
 will try and post something about it next week.

 Does anyone know of a visual CSS editor that is open source? I'm trying to 
 find something that can spit out just CSS code.

I don't know of anything similar, I usually hand-tune the CSS. Do you
need anything from eLyXer at the moment? I suggest that you start with
the CSS classes in eLyXer, which are the result of careful tuning:
  http://elyxer.nongnu.org/lyx.css
There is also a separate file math.css which contains just the styles
for the equations:
  http://elyxer.nongnu.org/math.css

Alex.


Re: LyX and Kindle books

2011-12-03 Thread Alex Fernandez
Hi Rob,

On Fri, Dec 2, 2011 at 3:34 PM, Rob Oakes lyx-de...@oak-tree.us wrote:
 I am working on an ePub compatible module right now (document class at any 
 rate). It's for a talk I'm giving at a publishing conference next week. I 
 will try and post something about it next week.

 Does anyone know of a visual CSS editor that is open source? I'm trying to 
 find something that can spit out just CSS code.

I don't know of anything similar, I usually hand-tune the CSS. Do you
need anything from eLyXer at the moment? I suggest that you start with
the CSS classes in eLyXer, which are the result of careful tuning:
  http://elyxer.nongnu.org/lyx.css
There is also a separate file math.css which contains just the styles
for the equations:
  http://elyxer.nongnu.org/math.css

Alex.


Re: LyX and Kindle books

2011-12-03 Thread Alex Fernandez
Hi Rob,

On Fri, Dec 2, 2011 at 3:34 PM, Rob Oakes  wrote:
> I am working on an ePub compatible module right now (document class at any 
> rate). It's for a talk I'm giving at a publishing conference next week. I 
> will try and post something about it next week.
>
> Does anyone know of a visual CSS editor that is open source? I'm trying to 
> find something that can spit out just CSS code.

I don't know of anything similar, I usually hand-tune the CSS. Do you
need anything from eLyXer at the moment? I suggest that you start with
the CSS classes in eLyXer, which are the result of careful tuning:
  http://elyxer.nongnu.org/lyx.css
There is also a separate file math.css which contains just the styles
for the equations:
  http://elyxer.nongnu.org/math.css

Alex.


Re: LyX and Kindle books

2011-12-02 Thread Alex Fernandez
Hi,

On Fri, Dec 2, 2011 at 11:12 AM, Steve Litt sl...@troubleshooters.com wrote:
 The internal HTML output should be usable for eBook creation as
 well.

 Any work on eBook modules and backands should be compatible with
 both HTML writers.

 OK. I'll make sure any work I do is compatible with both, although I
 could swear LyX's internal HTML exporter is simply eLyXer, as it
 outputs eLyXer messages.

eLyXer can be used from within LyX, and indeed it was one of the main
use cases considered. In the meantime LyX developed its own limited
XHTML export.

 IMO, LyX (as open source software) should concentrate on supporting
 the open ePub format.

 ePub shouldn't be neglected, but it shouldn't be concentrated either.
 A well employed list is a happy and productive list, and Kindle/iPad
 provides a revenue stream for authors (most of whom do quite a bit of
 open contributions). For example, many of the LyX derived print books
 we discussed in this afternoon's thread are proprietary -- you can't
 download them and must pay for them.

 Generating of kindle (or other proprietary)
 eBook formats would then pick up the relevant information from the
 ePub document.

 That sounds good on the surface, but my experience with ePub and
 Kindle tells me it's a detour where you'd get complex with the ePub,
 only to unwind the ePub back into simple HTML to be used by kindlegen.

Just let me know what you need from eLyXer which it doesn't currently
output! TOC and Index are already output given the appropriate
options.

 What would be excellent is for some loosely formed group of people
 list all the data needed to generate a Kindle, necessary to generate
 an iPad book, a Nook book, and an open ePub. If we can get that list
 complete, then we have a list of what needs to go in the LyX file or
 possibly a companion file. Once we have those specifications, writing
 the actual converters would be a secretarial task. As a matter of
 fact, if the additional data was put in a companion file, then eLyXer
 and the internal converter wouldn't have to change all that much, and
 the whole thing might be more modular.

Yes, that would be fine. Outputting text or binary documents with
formats and indexes is not too hard.

 Splitting a document into several HTML files is non-trivial, as we
 need to consider the cross-links. Maybe we can support a set of
 cross-linked HTML from Master/Child documents?

 Alex -- how does eLyXer work with Master/Child documents?

Master/Child documents are too rigid (but eLyXer works fine). eLyXer
has the option --splitpart which can divide a document into chapters,
sections or subsections. I think it is much more interesting for this
task.

Alex.


Re: LyX and Kindle books

2011-12-02 Thread Alex Fernandez
Hi,

On Fri, Dec 2, 2011 at 11:12 AM, Steve Litt sl...@troubleshooters.com wrote:
 The internal HTML output should be usable for eBook creation as
 well.

 Any work on eBook modules and backands should be compatible with
 both HTML writers.

 OK. I'll make sure any work I do is compatible with both, although I
 could swear LyX's internal HTML exporter is simply eLyXer, as it
 outputs eLyXer messages.

eLyXer can be used from within LyX, and indeed it was one of the main
use cases considered. In the meantime LyX developed its own limited
XHTML export.

 IMO, LyX (as open source software) should concentrate on supporting
 the open ePub format.

 ePub shouldn't be neglected, but it shouldn't be concentrated either.
 A well employed list is a happy and productive list, and Kindle/iPad
 provides a revenue stream for authors (most of whom do quite a bit of
 open contributions). For example, many of the LyX derived print books
 we discussed in this afternoon's thread are proprietary -- you can't
 download them and must pay for them.

 Generating of kindle (or other proprietary)
 eBook formats would then pick up the relevant information from the
 ePub document.

 That sounds good on the surface, but my experience with ePub and
 Kindle tells me it's a detour where you'd get complex with the ePub,
 only to unwind the ePub back into simple HTML to be used by kindlegen.

Just let me know what you need from eLyXer which it doesn't currently
output! TOC and Index are already output given the appropriate
options.

 What would be excellent is for some loosely formed group of people
 list all the data needed to generate a Kindle, necessary to generate
 an iPad book, a Nook book, and an open ePub. If we can get that list
 complete, then we have a list of what needs to go in the LyX file or
 possibly a companion file. Once we have those specifications, writing
 the actual converters would be a secretarial task. As a matter of
 fact, if the additional data was put in a companion file, then eLyXer
 and the internal converter wouldn't have to change all that much, and
 the whole thing might be more modular.

Yes, that would be fine. Outputting text or binary documents with
formats and indexes is not too hard.

 Splitting a document into several HTML files is non-trivial, as we
 need to consider the cross-links. Maybe we can support a set of
 cross-linked HTML from Master/Child documents?

 Alex -- how does eLyXer work with Master/Child documents?

Master/Child documents are too rigid (but eLyXer works fine). eLyXer
has the option --splitpart which can divide a document into chapters,
sections or subsections. I think it is much more interesting for this
task.

Alex.


Re: LyX and Kindle books

2011-12-02 Thread Alex Fernandez
Hi,

On Fri, Dec 2, 2011 at 11:12 AM, Steve Litt  wrote:
>> The internal HTML output should be usable for eBook creation as
>> well.
>>
>> Any work on "eBook" modules and backands should be compatible with
>> both HTML writers.
>
> OK. I'll make sure any work I do is compatible with both, although I
> could swear LyX's internal HTML exporter is simply eLyXer, as it
> outputs eLyXer messages.

eLyXer can be used from within LyX, and indeed it was one of the main
use cases considered. In the meantime LyX developed its own limited
XHTML export.

>> IMO, LyX (as open source software) should concentrate on supporting
>> the open ePub format.
>
> ePub shouldn't be neglected, but it shouldn't be concentrated either.
> A well employed list is a happy and productive list, and Kindle/iPad
> provides a revenue stream for authors (most of whom do quite a bit of
> open contributions). For example, many of the LyX derived print books
> we discussed in this afternoon's thread are proprietary -- you can't
> download them and must pay for them.
>
>> Generating of kindle (or other proprietary)
>> eBook formats would then pick up the relevant information from the
>> ePub document.
>
> That sounds good on the surface, but my experience with ePub and
> Kindle tells me it's a detour where you'd get complex with the ePub,
> only to unwind the ePub back into simple HTML to be used by kindlegen.

Just let me know what you need from eLyXer which it doesn't currently
output! TOC and Index are already output given the appropriate
options.

> What would be excellent is for some loosely formed group of people
> list all the data needed to generate a Kindle, necessary to generate
> an iPad book, a Nook book, and an open ePub. If we can get that list
> complete, then we have a list of what needs to go in the LyX file or
> possibly a companion file. Once we have those specifications, writing
> the actual converters would be a secretarial task. As a matter of
> fact, if the additional data was put in a companion file, then eLyXer
> and the internal converter wouldn't have to change all that much, and
> the whole thing might be more modular.

Yes, that would be fine. Outputting text or binary documents with
formats and indexes is not too hard.

>> Splitting a document into several HTML files is non-trivial, as we
>> need to consider the cross-links. Maybe we can support a set of
>> cross-linked HTML from Master/Child documents?
>
> Alex -- how does eLyXer work with Master/Child documents?

Master/Child documents are too rigid (but eLyXer works fine). eLyXer
has the option --splitpart which can divide a document into chapters,
sections or subsections. I think it is much more interesting for this
task.

Alex.


Re: Again eLyXer, but bibtex this time

2011-09-16 Thread Alex Fernandez
Hi Günter,

On Fri, Sep 16, 2011 at 9:04 AM, Guenter Milde mi...@users.berlios.de wrote:
 In all modern LaTeX distributions, bibtex databases are searched along
 the bibpath with the kpathsea library. There is the command line utility
 kpsewhich for use by other programs.

Aha, I always supposed that the .bib file had to be stored along with
the .lyx file.

 E.g. bibtex file ``foo.bib`` can be found with the command::

   kpsewhich -format bib foo.bib

 (if the filename extension is ``.bib``, the -format specifier can be omitted).

Good idea, it should not take too much effort to write a wrapper.
There is already one for ImageMagick's convert.

 May be there is even a Python wrapper. Looking at the Python-based bibtex
 engines could give more info. There are (at least):

         * CrossTeX_, a backwards-compatible, improved bibtex
           re-implementation in Python (including HTML export).
           (development stalled since 2 years)

         * Pybtex_,a drop-in replacement for BibTeX written in Python.

           * BibTeX styles  (experimental) pythonic style API.
           * Database in BibTeX, BibTeXML and YAML formats.
           * full Unicode support.
           * Write to TeX, HTML and plain text.

 .. _CrossTeX: http://www.cs.cornell.edu/people/egs/crosstex/
 .. _Pybtex:   http://pybtex.sourceforge.net/


 BTW: How about using Pybtex for the citation-formatting?

Perhaps a bit too involved at this stage, it would have been nice to
integrate instead of writing my own stuff (but it sure was fun!).

Alex.


Re: Again eLyXer, but bibtex this time

2011-09-16 Thread Alex Fernandez
Hi Günter,

On Fri, Sep 16, 2011 at 9:04 AM, Guenter Milde mi...@users.berlios.de wrote:
 In all modern LaTeX distributions, bibtex databases are searched along
 the bibpath with the kpathsea library. There is the command line utility
 kpsewhich for use by other programs.

Aha, I always supposed that the .bib file had to be stored along with
the .lyx file.

 E.g. bibtex file ``foo.bib`` can be found with the command::

   kpsewhich -format bib foo.bib

 (if the filename extension is ``.bib``, the -format specifier can be omitted).

Good idea, it should not take too much effort to write a wrapper.
There is already one for ImageMagick's convert.

 May be there is even a Python wrapper. Looking at the Python-based bibtex
 engines could give more info. There are (at least):

         * CrossTeX_, a backwards-compatible, improved bibtex
           re-implementation in Python (including HTML export).
           (development stalled since 2 years)

         * Pybtex_,a drop-in replacement for BibTeX written in Python.

           * BibTeX styles  (experimental) pythonic style API.
           * Database in BibTeX, BibTeXML and YAML formats.
           * full Unicode support.
           * Write to TeX, HTML and plain text.

 .. _CrossTeX: http://www.cs.cornell.edu/people/egs/crosstex/
 .. _Pybtex:   http://pybtex.sourceforge.net/


 BTW: How about using Pybtex for the citation-formatting?

Perhaps a bit too involved at this stage, it would have been nice to
integrate instead of writing my own stuff (but it sure was fun!).

Alex.


Re: Again eLyXer, but bibtex this time

2011-09-16 Thread Alex Fernandez
Hi Günter,

On Fri, Sep 16, 2011 at 9:04 AM, Guenter Milde  wrote:
> In all modern LaTeX distributions, bibtex databases are searched along
> the bibpath with the kpathsea library. There is the command line utility
> kpsewhich for use by other programs.

Aha, I always supposed that the .bib file had to be stored along with
the .lyx file.

> E.g. bibtex file ``foo.bib`` can be found with the command::
>
>   kpsewhich -format bib foo.bib
>
> (if the filename extension is ``.bib``, the -format specifier can be omitted).

Good idea, it should not take too much effort to write a wrapper.
There is already one for ImageMagick's convert.

> May be there is even a Python wrapper. Looking at the Python-based bibtex
> engines could give more info. There are (at least):
>
>         * CrossTeX_, a backwards-compatible, improved bibtex
>           re-implementation in Python (including HTML export).
>           (development stalled since 2 years)
>
>         * Pybtex_,a drop-in replacement for BibTeX written in Python.
>
>           * BibTeX styles & (experimental) pythonic style API.
>           * Database in BibTeX, BibTeXML and YAML formats.
>           * full Unicode support.
>           * Write to TeX, HTML and plain text.
>
> .. _CrossTeX: http://www.cs.cornell.edu/people/egs/crosstex/
> .. _Pybtex:   http://pybtex.sourceforge.net/
>
>
> BTW: How about using Pybtex for the citation-formatting?

Perhaps a bit too involved at this stage, it would have been nice to
integrate instead of writing my own stuff (but it sure was fun!).

Alex.


Re: HTML export: some small problems...

2011-09-15 Thread Alex Fernandez
Hi Murat,

On Thu, Sep 15, 2011 at 5:21 PM, Murat Yildizoglu myi...@gmail.com wrote:
 I am trying the HTML export possibilities of LyX. I have the last
 version of Elyxer installed on my Mac (OSX 10.6 French) and I use Lyx
 2.0.1.

 I am preparing a page where I would like to set the text colour and
 use an horizontal rule in some places.

 I used the Document Properties/Coulours tab to fix the implicit colour
 of text in my document, but when the file is exported to HTML by
 Elyxer, the texte is black (the same is also true for LyxHTML export).

Colors work but only when inserted in the page. I have never set
default colors...

 I have inserted an horizontal rule in the page, but I get in the HTML
 the Lyx code instead of the rule:

 \begin_inset CommandInset lineLatexCommand ruleoffset 0.5exwidth
 100col%height 1pt\end_inset 

To the best of my knowledge horizontal rules work, but apparently not always.

 Am I doing something stupid, or am I demanding too much from Elyxer?

Nothing that cannot be fixed easily :)  Could you provide me privately
with a small sample document which shows both issues?

 I Have used Latex2HTML under Linux some years ago and this kind of
 cosmetics was a piece of cake for it... I have never used it under OSX
 and I like the HTML generated by Elyxer otherwise.

Thanks!

 I know that I can correct these problems by hand or by CSS editing,
 but would like to know if I can handle them directly in Lyx, instead
 of having to da another step of conversion (especially because I am
 using Lyx to quickly setup a web page from existing material in Latex
 and Lyx. Yes, I am very late on this task, and trying to catch the gap
 :-)  ).

Sure, that way everyone benefits.

Alex.


Re: Again eLyXer, but bibtex this time

2011-09-15 Thread Alex Fernandez
Hi again,

On Thu, Sep 15, 2011 at 7:08 PM, Murat Yildizoglu myi...@gmail.com wrote:
 I am meeting another problem with elyxer conversion. If I do not put
 the .bib files in the same folder as the .lyx file, elyxer does not
 seem able to find them, and the bibliography is empty. If I put them
 in the same folder, I get the bibliography.

You can also use relative paths, and they are supposed to work! Where
are you placing the .bib files?

 Also, I have not been able to find a way to generate a standard agsm
 (harvard) style bibliography reference. I only get a number between
 brackets [1] as reference, even if I choose author-name in the options
 of natbib in the document properties box.

 Only author-name2 gives me a real author-name type of reference (but
 brackets, and also with the key typed in the beginning of the full
 reference in the typest bibliography).

Let me explain you a little bit how BibTeX support works in eLyXer: it
keeps its own templates to transform the variables into references and
formats. These templates can be located in src/conf/base.conf. For
example the one you are using (I assume it is authordate2) looks like
this:

[BibStylesConfig.authordate2]
cite:$surname, $year
default:$authors. $year. i$title/i. $publisher.{ URL a
href=$url$url/a.}{ $note.}
@article:$authors. $year. $title. i$journal/i,
b$volume/b($number), $pages.{ URL a href=$url$url/a.}{
$note.}
@book:$authors. $year. i$title/i. $publisher.{ URL a
href=$url$url/a.}{ $note.}

As you see, the first line defines the style, authordate2; the second
line the citing style, in this case author surname and year. I am
afraid the cites always show the brackets right now. After that you
can see how eLyXer will display the default document type, then an
article and a book.

 These are very commonly necessary functions, so I assume that I am
 doing something strange. How can I correct these problems?

It is just that these templates are user-contributed; apparently you
are the first to request the agsm format. If you want you can edit
your elyxer.py file and insert a new style: just go after the
vancouver style and insert this:

[BibStylesConfig.vancouver]
...

[BibStylesConfig.agsm]
cite:$surname, $year
default:$authors. $title; {$publisher, }$year.{ $howpublished.}{ URL:
a href=$url$url/a.}{ $note.}
@article:$authors. $title. i$journal/i,
$year{;{b$volume/b}{($number)}{:$pages}}.{ URL: a
href=$url$url/a.}{ $note.}
@book:$authors. $title. {$publisher, }$year.{ URL: a
href=$url$url/a.}{ $note.}

Note that each document type (@article) has variables ($title) which
are taken from the .bib file, and some HTML code (i$journal/i) to
format the text.

Now you can play with it until you like the result, and then send it
my way. Alternatively, you can send me another sample privately and I
will work on it.

Thanks,

Alex.


Re: HTML export: some small problems...

2011-09-15 Thread Alex Fernandez
Hi Murat,

On Thu, Sep 15, 2011 at 5:21 PM, Murat Yildizoglu myi...@gmail.com wrote:
 I am trying the HTML export possibilities of LyX. I have the last
 version of Elyxer installed on my Mac (OSX 10.6 French) and I use Lyx
 2.0.1.

 I am preparing a page where I would like to set the text colour and
 use an horizontal rule in some places.

 I used the Document Properties/Coulours tab to fix the implicit colour
 of text in my document, but when the file is exported to HTML by
 Elyxer, the texte is black (the same is also true for LyxHTML export).

Colors work but only when inserted in the page. I have never set
default colors...

 I have inserted an horizontal rule in the page, but I get in the HTML
 the Lyx code instead of the rule:

 \begin_inset CommandInset lineLatexCommand ruleoffset 0.5exwidth
 100col%height 1pt\end_inset 

To the best of my knowledge horizontal rules work, but apparently not always.

 Am I doing something stupid, or am I demanding too much from Elyxer?

Nothing that cannot be fixed easily :)  Could you provide me privately
with a small sample document which shows both issues?

 I Have used Latex2HTML under Linux some years ago and this kind of
 cosmetics was a piece of cake for it... I have never used it under OSX
 and I like the HTML generated by Elyxer otherwise.

Thanks!

 I know that I can correct these problems by hand or by CSS editing,
 but would like to know if I can handle them directly in Lyx, instead
 of having to da another step of conversion (especially because I am
 using Lyx to quickly setup a web page from existing material in Latex
 and Lyx. Yes, I am very late on this task, and trying to catch the gap
 :-)  ).

Sure, that way everyone benefits.

Alex.


Re: Again eLyXer, but bibtex this time

2011-09-15 Thread Alex Fernandez
Hi again,

On Thu, Sep 15, 2011 at 7:08 PM, Murat Yildizoglu myi...@gmail.com wrote:
 I am meeting another problem with elyxer conversion. If I do not put
 the .bib files in the same folder as the .lyx file, elyxer does not
 seem able to find them, and the bibliography is empty. If I put them
 in the same folder, I get the bibliography.

You can also use relative paths, and they are supposed to work! Where
are you placing the .bib files?

 Also, I have not been able to find a way to generate a standard agsm
 (harvard) style bibliography reference. I only get a number between
 brackets [1] as reference, even if I choose author-name in the options
 of natbib in the document properties box.

 Only author-name2 gives me a real author-name type of reference (but
 brackets, and also with the key typed in the beginning of the full
 reference in the typest bibliography).

Let me explain you a little bit how BibTeX support works in eLyXer: it
keeps its own templates to transform the variables into references and
formats. These templates can be located in src/conf/base.conf. For
example the one you are using (I assume it is authordate2) looks like
this:

[BibStylesConfig.authordate2]
cite:$surname, $year
default:$authors. $year. i$title/i. $publisher.{ URL a
href=$url$url/a.}{ $note.}
@article:$authors. $year. $title. i$journal/i,
b$volume/b($number), $pages.{ URL a href=$url$url/a.}{
$note.}
@book:$authors. $year. i$title/i. $publisher.{ URL a
href=$url$url/a.}{ $note.}

As you see, the first line defines the style, authordate2; the second
line the citing style, in this case author surname and year. I am
afraid the cites always show the brackets right now. After that you
can see how eLyXer will display the default document type, then an
article and a book.

 These are very commonly necessary functions, so I assume that I am
 doing something strange. How can I correct these problems?

It is just that these templates are user-contributed; apparently you
are the first to request the agsm format. If you want you can edit
your elyxer.py file and insert a new style: just go after the
vancouver style and insert this:

[BibStylesConfig.vancouver]
...

[BibStylesConfig.agsm]
cite:$surname, $year
default:$authors. $title; {$publisher, }$year.{ $howpublished.}{ URL:
a href=$url$url/a.}{ $note.}
@article:$authors. $title. i$journal/i,
$year{;{b$volume/b}{($number)}{:$pages}}.{ URL: a
href=$url$url/a.}{ $note.}
@book:$authors. $title. {$publisher, }$year.{ URL: a
href=$url$url/a.}{ $note.}

Note that each document type (@article) has variables ($title) which
are taken from the .bib file, and some HTML code (i$journal/i) to
format the text.

Now you can play with it until you like the result, and then send it
my way. Alternatively, you can send me another sample privately and I
will work on it.

Thanks,

Alex.


Re: HTML export: some small problems...

2011-09-15 Thread Alex Fernandez
Hi Murat,

On Thu, Sep 15, 2011 at 5:21 PM, Murat Yildizoglu  wrote:
> I am trying the HTML export possibilities of LyX. I have the last
> version of Elyxer installed on my Mac (OSX 10.6 French) and I use Lyx
> 2.0.1.
>
> I am preparing a page where I would like to set the text colour and
> use an horizontal rule in some places.
>
> I used the Document Properties/Coulours tab to fix the implicit colour
> of text in my document, but when the file is exported to HTML by
> Elyxer, the texte is black (the same is also true for LyxHTML export).

Colors work but only when inserted in the page. I have never set
default colors...

> I have inserted an horizontal rule in the page, but I get in the HTML
> the Lyx code instead of the rule:
>
> "\begin_inset CommandInset lineLatexCommand ruleoffset "0.5ex"width
> "100col%"height "1pt"\end_inset "

To the best of my knowledge horizontal rules work, but apparently not always.

> Am I doing something stupid, or am I demanding too much from Elyxer?

Nothing that cannot be fixed easily :)  Could you provide me privately
with a small sample document which shows both issues?

> I Have used Latex2HTML under Linux some years ago and this kind of
> cosmetics was a piece of cake for it... I have never used it under OSX
> and I like the HTML generated by Elyxer otherwise.

Thanks!

> I know that I can correct these problems by hand or by CSS editing,
> but would like to know if I can handle them directly in Lyx, instead
> of having to da another step of conversion (especially because I am
> using Lyx to quickly setup a web page from existing material in Latex
> and Lyx. Yes, I am very late on this task, and trying to catch the gap
> :-)  ).

Sure, that way everyone benefits.

Alex.


Re: Again eLyXer, but bibtex this time

2011-09-15 Thread Alex Fernandez
Hi again,

On Thu, Sep 15, 2011 at 7:08 PM, Murat Yildizoglu  wrote:
> I am meeting another problem with elyxer conversion. If I do not put
> the .bib files in the same folder as the .lyx file, elyxer does not
> seem able to find them, and the bibliography is empty. If I put them
> in the same folder, I get the bibliography.

You can also use relative paths, and they are supposed to work! Where
are you placing the .bib files?

> Also, I have not been able to find a way to generate a standard agsm
> (harvard) style bibliography reference. I only get a number between
> brackets [1] as reference, even if I choose author-name in the options
> of natbib in the document properties box.
>
> Only author-name2 gives me a real author-name type of reference (but
> brackets, and also with the key typed in the beginning of the full
> reference in the typest bibliography).

Let me explain you a little bit how BibTeX support works in eLyXer: it
keeps its own templates to transform the variables into references and
formats. These templates can be located in src/conf/base.conf. For
example the one you are using (I assume it is authordate2) looks like
this:

[BibStylesConfig.authordate2]
cite:$surname, $year
default:$authors. $year. $title. $publisher.{ URL $url.}{ $note.}
@article:$authors. $year. $title. $journal,
$volume($number), $pages.{ URL $url.}{
$note.}
@book:$authors. $year. $title. $publisher.{ URL $url.}{ $note.}

As you see, the first line defines the style, authordate2; the second
line the citing style, in this case author surname and year. I am
afraid the cites always show the brackets right now. After that you
can see how eLyXer will display the default document type, then an
article and a book.

> These are very commonly necessary functions, so I assume that I am
> doing something strange. How can I correct these problems?

It is just that these templates are user-contributed; apparently you
are the first to request the agsm format. If you want you can edit
your elyxer.py file and insert a new style: just go after the
vancouver style and insert this:

[BibStylesConfig.vancouver]
...

[BibStylesConfig.agsm]
cite:$surname, $year
default:$authors. $title; {$publisher, }$year.{ $howpublished.}{ URL:
$url.}{ $note.}
@article:$authors. $title. $journal,
$year{;{$volume}{($number)}{:$pages}}.{ URL: $url.}{ $note.}
@book:$authors. $title. {$publisher, }$year.{ URL: $url.}{ $note.}

Note that each document type (@article) has variables ($title) which
are taken from the .bib file, and some HTML code ($journal) to
format the text.

Now you can play with it until you like the result, and then send it
my way. Alternatively, you can send me another sample privately and I
will work on it.

Thanks,

Alex.


Re: [Pub-forum] ebook follies

2011-09-12 Thread Alex Fernandez
Hi,

On Mon, Sep 12, 2011 at 11:11 PM, Richard Heck rgh...@comcast.net wrote:
 Last time I looked, elyxer did pretty much the same sort of thing, but had
 footnotes styled with things like float: right;, rather than with the
 appearing and disappearing act they do in LyX. But the real issue, as we
 discussed before, is somehow to defer them to the end.

Actually, with eLyXer you can choose several styles for your footnotes:
  - hover, where the footnote appears when you place the pointer over them;
  - margin, where they appear on the right;
  - and end, where they are deferred to the end.
They can be combined so footnotes appear at several places.

Allow me to refer you to the relevant section of the user guide:
  http://elyxer.nongnu.org/userguide.html#sub:Footnotes

Alex.


Re: [Pub-forum] ebook follies

2011-09-12 Thread Alex Fernandez
Hi,

On Mon, Sep 12, 2011 at 11:11 PM, Richard Heck rgh...@comcast.net wrote:
 Last time I looked, elyxer did pretty much the same sort of thing, but had
 footnotes styled with things like float: right;, rather than with the
 appearing and disappearing act they do in LyX. But the real issue, as we
 discussed before, is somehow to defer them to the end.

Actually, with eLyXer you can choose several styles for your footnotes:
  - hover, where the footnote appears when you place the pointer over them;
  - margin, where they appear on the right;
  - and end, where they are deferred to the end.
They can be combined so footnotes appear at several places.

Allow me to refer you to the relevant section of the user guide:
  http://elyxer.nongnu.org/userguide.html#sub:Footnotes

Alex.


Re: [Pub-forum] ebook follies

2011-09-12 Thread Alex Fernandez
Hi,

On Mon, Sep 12, 2011 at 11:11 PM, Richard Heck  wrote:
> Last time I looked, elyxer did pretty much the same sort of thing, but had
> footnotes styled with things like "float: right;", rather than with the
> appearing and disappearing act they do in LyX. But the real issue, as we
> discussed before, is somehow to defer them to the end.

Actually, with eLyXer you can choose several styles for your footnotes:
  - hover, where the footnote appears when you place the pointer over them;
  - margin, where they appear on the right;
  - and end, where they are deferred to the end.
They can be combined so footnotes appear at several places.

Allow me to refer you to the relevant section of the user guide:
  http://elyxer.nongnu.org/userguide.html#sub:Footnotes

Alex.


Re: [Pub-forum] ebook follies

2011-09-10 Thread Alex Fernandez
On Sat, Sep 10, 2011 at 7:21 AM, Steve Litt sl...@troubleshooters.com wrote:
 Progress on the LyX-eBook front!
 I open it in Okular and it's justified correctly, but there are obvious
 mistakes, including bullet lists that have lots of blank bullets
 tacked on the end. I installed Mozilla's epubreader plugin, and the
 .epub then looks great in Mozilla Firefox, except the table of
 contents starts with an extraneous copy of chapter 2, which is true of
 several of the readers.

 Anyway, the bottom line is, this was a proof of concept, and I took a
 LyX authored book and within a few minutes made it into an ePub.

Good to know! If you want we can work through the issues one by one.

While I am not ready to devote time to an --epub switch in eLyXer
(which produces EPUB-clean HTML), as present in the feature wish-list,
I would not mind adding features to eLyXer which allow it to better
process all HTML files.

For example, the author is probably taken from a META tag which eLyXer
is not producing right now. It would be easy to add.

Alex.


Re: [Pub-forum] ebook follies

2011-09-10 Thread Alex Fernandez
On Sat, Sep 10, 2011 at 7:21 AM, Steve Litt sl...@troubleshooters.com wrote:
 Progress on the LyX-eBook front!
 I open it in Okular and it's justified correctly, but there are obvious
 mistakes, including bullet lists that have lots of blank bullets
 tacked on the end. I installed Mozilla's epubreader plugin, and the
 .epub then looks great in Mozilla Firefox, except the table of
 contents starts with an extraneous copy of chapter 2, which is true of
 several of the readers.

 Anyway, the bottom line is, this was a proof of concept, and I took a
 LyX authored book and within a few minutes made it into an ePub.

Good to know! If you want we can work through the issues one by one.

While I am not ready to devote time to an --epub switch in eLyXer
(which produces EPUB-clean HTML), as present in the feature wish-list,
I would not mind adding features to eLyXer which allow it to better
process all HTML files.

For example, the author is probably taken from a META tag which eLyXer
is not producing right now. It would be easy to add.

Alex.


Re: [Pub-forum] ebook follies

2011-09-10 Thread Alex Fernandez
On Sat, Sep 10, 2011 at 7:21 AM, Steve Litt  wrote:
> Progress on the LyX->eBook front!
> I open it in Okular and it's justified correctly, but there are obvious
> mistakes, including bullet lists that have lots of blank bullets
> tacked on the end. I installed Mozilla's epubreader plugin, and the
> .epub then looks great in Mozilla Firefox, except the table of
> contents starts with an extraneous copy of chapter 2, which is true of
> several of the readers.
>
> Anyway, the bottom line is, this was a proof of concept, and I took a
> LyX authored book and within a few minutes made it into an ePub.

Good to know! If you want we can work through the issues one by one.

While I am not ready to devote time to an --epub switch in eLyXer
(which produces EPUB-clean HTML), as present in the feature wish-list,
I would not mind adding features to eLyXer which allow it to better
process all HTML files.

For example, the author is probably taken from a META tag which eLyXer
is not producing right now. It would be easy to add.

Alex.


eLyXer 1.2.3 released

2011-08-30 Thread Alex Fernandez
Hi all,

Version 1.2.3 of eLyXer, the LyX to HTML converter, has just been
released. It contains a number of bug fixes and improvements. The main
improvements are:
* --mathjax remote now runs MathJax off the MathJax CDN:
  http://www.mathjax.org/download/mathjax-cdn-terms-of-service/
* Added most commands in Günter Milde's excellent list:
  http://milde.users.sourceforge.net/LUCR/Math/
* Several bug fixes.

Be sure to read the change log:
 http://elyxer.nongnu.org/changelog.html
for full details.

Download from nongnu.org mirrors:
 https://savannah.nongnu.org/files/?group=elyxer

If the new version has not reached the mirrors yet:
 http://download-mirror.savannah.gnu.org/releases/elyxer/

Thanks,

Alex Fernández.


eLyXer 1.2.3 released

2011-08-30 Thread Alex Fernandez
Hi all,

Version 1.2.3 of eLyXer, the LyX to HTML converter, has just been
released. It contains a number of bug fixes and improvements. The main
improvements are:
* --mathjax remote now runs MathJax off the MathJax CDN:
  http://www.mathjax.org/download/mathjax-cdn-terms-of-service/
* Added most commands in Günter Milde's excellent list:
  http://milde.users.sourceforge.net/LUCR/Math/
* Several bug fixes.

Be sure to read the change log:
 http://elyxer.nongnu.org/changelog.html
for full details.

Download from nongnu.org mirrors:
 https://savannah.nongnu.org/files/?group=elyxer

If the new version has not reached the mirrors yet:
 http://download-mirror.savannah.gnu.org/releases/elyxer/

Thanks,

Alex Fernández.


eLyXer 1.2.3 released

2011-08-30 Thread Alex Fernandez
Hi all,

Version 1.2.3 of eLyXer, the LyX to HTML converter, has just been
released. It contains a number of bug fixes and improvements. The main
improvements are:
* --mathjax remote now runs MathJax off the MathJax CDN:
  http://www.mathjax.org/download/mathjax-cdn-terms-of-service/
* Added most commands in Günter Milde's excellent list:
  http://milde.users.sourceforge.net/LUCR/Math/
* Several bug fixes.

Be sure to read the change log:
 http://elyxer.nongnu.org/changelog.html
for full details.

Download from nongnu.org mirrors:
 https://savannah.nongnu.org/files/?group=elyxer

If the new version has not reached the mirrors yet:
 http://download-mirror.savannah.gnu.org/releases/elyxer/

Thanks,

Alex Fernández.


Re: html5 presentation support?

2011-07-08 Thread Alex Fernandez
Hi Rainer,

Sorry for the delay.

On Wed, Jun 29, 2011 at 9:07 AM, Rainer M Krug r.m.k...@gmail.com wrote:
 It sounds interesting, but I am not looking into it at the moment.
 However (and here comes the inevitable contribution request), I accept
 patches :)  If you try it you will find eLyXer very flexible in terms
 of twisting its output.

 Unfortunately I don't have time at hand and do not know the inner workings
 of html5 - I ust saw the org-mode exporter and thought - would be nice for
 LyX.

Cool indeed.

  I think it would be absolutely great if this could be included in LyX.
  For
  an example of export exporter for emacs org-mode,
  see  https://gist.github.com/509761

 I agree.

 Let's hope that somebody finds some time for this. Do you have a bug / issue
 tracker for eLyXer to put the feature request in?

I have Savannah's at:
  https://savannah.nongnu.org/bugs/?group=elyxer
However it is more practical to keep it in the wish list:
  http://elyxer.nongnu.org/userguide.html#toc-Subsection-3.2
I have just added it.

Alex.


Re: html5 presentation support?

2011-07-08 Thread Alex Fernandez
Hi Rainer,

Sorry for the delay.

On Wed, Jun 29, 2011 at 9:07 AM, Rainer M Krug r.m.k...@gmail.com wrote:
 It sounds interesting, but I am not looking into it at the moment.
 However (and here comes the inevitable contribution request), I accept
 patches :)  If you try it you will find eLyXer very flexible in terms
 of twisting its output.

 Unfortunately I don't have time at hand and do not know the inner workings
 of html5 - I ust saw the org-mode exporter and thought - would be nice for
 LyX.

Cool indeed.

  I think it would be absolutely great if this could be included in LyX.
  For
  an example of export exporter for emacs org-mode,
  see  https://gist.github.com/509761

 I agree.

 Let's hope that somebody finds some time for this. Do you have a bug / issue
 tracker for eLyXer to put the feature request in?

I have Savannah's at:
  https://savannah.nongnu.org/bugs/?group=elyxer
However it is more practical to keep it in the wish list:
  http://elyxer.nongnu.org/userguide.html#toc-Subsection-3.2
I have just added it.

Alex.


Re: html5 presentation support?

2011-07-08 Thread Alex Fernandez
Hi Rainer,

Sorry for the delay.

On Wed, Jun 29, 2011 at 9:07 AM, Rainer M Krug  wrote:
>> It sounds interesting, but I am not looking into it at the moment.
>> However (and here comes the inevitable contribution request), I accept
>> patches :)  If you try it you will find eLyXer very flexible in terms
>> of twisting its output.
>
> Unfortunately I don't have time at hand and do not know the inner workings
> of html5 - I ust saw the org-mode exporter and thought - would be nice for
> LyX.

Cool indeed.

>> > I think it would be absolutely great if this could be included in LyX.
>> > For
>> > an example of export exporter for emacs org-mode,
>> > see  https://gist.github.com/509761
>>
>> I agree.
>
> Let's hope that somebody finds some time for this. Do you have a bug / issue
> tracker for eLyXer to put the feature request in?

I have Savannah's at:
  https://savannah.nongnu.org/bugs/?group=elyxer
However it is more practical to keep it in the wish list:
  http://elyxer.nongnu.org/userguide.html#toc-Subsection-3.2
I have just added it.

Alex.


Re: html5 presentation support?

2011-06-28 Thread Alex Fernandez
Hi Rainer,

On Tue, Jun 28, 2011 at 4:48 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 I just saw some html5 presentations (e.g. http://slides.html5rocks.com ) and
 they seem to a be a great alternative to pdf presentations with beamer et
 al. Is there anybody looking into the possibility of creating those via e.g.
 eLyXer?

It sounds interesting, but I am not looking into it at the moment.
However (and here comes the inevitable contribution request), I accept
patches :)  If you try it you will find eLyXer very flexible in terms
of twisting its output.

 I think it would be absolutely great if this could be included in LyX. For
 an example of export exporter for emacs org-mode,
 see  https://gist.github.com/509761

I agree.

Thanks,

Alex.


Re: html5 presentation support?

2011-06-28 Thread Alex Fernandez
Hi Rainer,

On Tue, Jun 28, 2011 at 4:48 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 I just saw some html5 presentations (e.g. http://slides.html5rocks.com ) and
 they seem to a be a great alternative to pdf presentations with beamer et
 al. Is there anybody looking into the possibility of creating those via e.g.
 eLyXer?

It sounds interesting, but I am not looking into it at the moment.
However (and here comes the inevitable contribution request), I accept
patches :)  If you try it you will find eLyXer very flexible in terms
of twisting its output.

 I think it would be absolutely great if this could be included in LyX. For
 an example of export exporter for emacs org-mode,
 see  https://gist.github.com/509761

I agree.

Thanks,

Alex.


Re: html5 presentation support?

2011-06-28 Thread Alex Fernandez
Hi Rainer,

On Tue, Jun 28, 2011 at 4:48 PM, Rainer M Krug  wrote:
> I just saw some html5 presentations (e.g. http://slides.html5rocks.com ) and
> they seem to a be a great alternative to pdf presentations with beamer et
> al. Is there anybody looking into the possibility of creating those via e.g.
> eLyXer?

It sounds interesting, but I am not looking into it at the moment.
However (and here comes the inevitable contribution request), I accept
patches :)  If you try it you will find eLyXer very flexible in terms
of twisting its output.

> I think it would be absolutely great if this could be included in LyX. For
> an example of export exporter for emacs org-mode,
> see  https://gist.github.com/509761

I agree.

Thanks,

Alex.


eLyXer 1.2.2 released

2011-06-11 Thread Alex Fernandez
Hi all,

Version 1.2.2 of eLyXer, the LyX to HTML converter, has just been
released. It contains a lot of small improvements and bug fixes
suggested by users from all around the world. This is the first
version to properly support LyX 2.0: eLyXer no longer complains about
unsupported format.

Be sure to read the change log:
 http://elyxer.nongnu.org/changelog.html
for details.

Download from nongnu.org mirrors:
 https://savannah.nongnu.org/files/?group=elyxer

If the new version has not reached the mirrors yet:
 http://download-mirror.savannah.gnu.org/releases/elyxer/

One last note: there was not much enthusiasm about making eLyXer into
a generic LaTeX - HTML converter. So apparently people are happy with
the existing converters, and I will devote whatever small time I can
to improving eLyXer as a LyX - HTML converter.

Thanks,

Alex Fernández.


eLyXer 1.2.2 released

2011-06-11 Thread Alex Fernandez
Hi all,

Version 1.2.2 of eLyXer, the LyX to HTML converter, has just been
released. It contains a lot of small improvements and bug fixes
suggested by users from all around the world. This is the first
version to properly support LyX 2.0: eLyXer no longer complains about
unsupported format.

Be sure to read the change log:
 http://elyxer.nongnu.org/changelog.html
for details.

Download from nongnu.org mirrors:
 https://savannah.nongnu.org/files/?group=elyxer

If the new version has not reached the mirrors yet:
 http://download-mirror.savannah.gnu.org/releases/elyxer/

One last note: there was not much enthusiasm about making eLyXer into
a generic LaTeX - HTML converter. So apparently people are happy with
the existing converters, and I will devote whatever small time I can
to improving eLyXer as a LyX - HTML converter.

Thanks,

Alex Fernández.


eLyXer 1.2.2 released

2011-06-11 Thread Alex Fernandez
Hi all,

Version 1.2.2 of eLyXer, the LyX to HTML converter, has just been
released. It contains a lot of small improvements and bug fixes
suggested by users from all around the world. This is the first
version to properly support LyX 2.0: eLyXer no longer complains about
unsupported format.

Be sure to read the change log:
 http://elyxer.nongnu.org/changelog.html
for details.

Download from nongnu.org mirrors:
 https://savannah.nongnu.org/files/?group=elyxer

If the new version has not reached the mirrors yet:
 http://download-mirror.savannah.gnu.org/releases/elyxer/

One last note: there was not much enthusiasm about making eLyXer into
a generic LaTeX -> HTML converter. So apparently people are happy with
the existing converters, and I will devote whatever small time I can
to improving eLyXer as a LyX -> HTML converter.

Thanks,

Alex Fernández.


Re: elyxer options for export to word?

2011-05-31 Thread Alex Fernandez
Hi Neal,

On Wed, Jun 1, 2011 at 1:20 AM, Neal Becker ndbeck...@gmail.com wrote:
 It seems if I use elyxer for the purpose of export to 'word', only --html 
 seems
 to produce something word (2007) will recognize.

 With defaults, word seems to show the xhtml structure instead of a formatted
 document.

Yes, this is a known feature of Word 2007: it will only import HTML documents.

 I also tried lyxHTML export to xhtml.  This produced a file.xhtml, which
 word(2007) refused to open.

XHTML is not good enough for Word, it seems :(

Alex.


Re: elyxer options for export to word?

2011-05-31 Thread Alex Fernandez
Hi Neal,

On Wed, Jun 1, 2011 at 1:20 AM, Neal Becker ndbeck...@gmail.com wrote:
 It seems if I use elyxer for the purpose of export to 'word', only --html 
 seems
 to produce something word (2007) will recognize.

 With defaults, word seems to show the xhtml structure instead of a formatted
 document.

Yes, this is a known feature of Word 2007: it will only import HTML documents.

 I also tried lyxHTML export to xhtml.  This produced a file.xhtml, which
 word(2007) refused to open.

XHTML is not good enough for Word, it seems :(

Alex.


Re: elyxer options for export to word?

2011-05-31 Thread Alex Fernandez
Hi Neal,

On Wed, Jun 1, 2011 at 1:20 AM, Neal Becker  wrote:
> It seems if I use elyxer for the purpose of export to 'word', only --html 
> seems
> to produce something word (2007) will recognize.
>
> With defaults, word seems to show the xhtml structure instead of a formatted
> document.

Yes, this is a known "feature" of Word 2007: it will only import HTML documents.

> I also tried lyxHTML export to xhtml.  This produced a file.xhtml, which
> word(2007) refused to open.

XHTML is not good enough for Word, it seems :(

Alex.


Re: export to HTML, math equation quality

2011-05-28 Thread Alex Fernandez
Hi jong,

The problems with display equations has already been reported and will be
solved for the next version of elyxer. I will send a message to the list
when it's ready, as usual.

Cheers,

Alex.

Good
El 28/05/2011 23:55, jong jongkooks...@hotmail.com escribió:
 Liviu Andronic landronimirc at gmail.com writes:


 On Fri, Apr 1, 2011 at 4:33 AM, Jong Kook Shin jongkookshin at
hotmail.com
 wrote:
  Hi,
 
  I want to have high resolution images (300ppi?) of math equations when
I
  export my lyx files into html, which will ultimately be converted to
MSword
  file.
  Currently, it seems that the math equations and other figures are
converted
  to 72ppi. For screen display, it works perfect but I need this
ultimately
  for printing. Googling or search the mailing archive did not find a
  satisfactory solution to address this issue.
 
 What about elyxer, have you tried that?
 Liviu

  Just FYI, I tried exporting with many other formats - e.g. often
recommended
  open office or rtf, etc. But they did not produce satisfactory results.
 
  I would be much obliged if somebody can provide a hint to this issue.
 
  Best,
  Jong
 



 @Liviu/// Thanks for the suggestion. But I gave up elyxer because I
couldn't
 install in in my laptop (Windows 7 machine). Although I consider myself
one of
 the skilled users of windows computers, I was completely lost when I tried
to
 install elyxer and python stuff.

 Then, my laptop became almost unusable after the bloody Windows 7 SP1
update.
 For some reason, it started to ground my HDD constantly as if it caught a
sort
 of virus or something. (Before this update I had very good impression
about
 Windows 7 and my laptop).

 So I switched to Ubuntu 11.04 with Lyx2.0

 It came with two html export option (html and Lyxhtml) - It seems that one
of
 these two utilize elyxer but not sure which one is which.

 The first export option (html) was not successful in producing the display
 equations (all of them showed in '*')

 The second export option (Lyxhtml) really worked!! It produced all details
of
 math expressions(integral, tilde, hat, etc) flawlessly. And they are all
vector
 graphics therefore can be scalable! The only problem left for me is to
find a
 way to convert xhtml to rtf or word or openoffice so that I can satisfy
those
 who want the bloody '.doc' files.

 -Jong



Re: export to HTML, math equation quality

2011-05-28 Thread Alex Fernandez
Hi jong,

The problems with display equations has already been reported and will be
solved for the next version of elyxer. I will send a message to the list
when it's ready, as usual.

Cheers,

Alex.

Good
El 28/05/2011 23:55, jong jongkooks...@hotmail.com escribió:
 Liviu Andronic landronimirc at gmail.com writes:


 On Fri, Apr 1, 2011 at 4:33 AM, Jong Kook Shin jongkookshin at
hotmail.com
 wrote:
  Hi,
 
  I want to have high resolution images (300ppi?) of math equations when
I
  export my lyx files into html, which will ultimately be converted to
MSword
  file.
  Currently, it seems that the math equations and other figures are
converted
  to 72ppi. For screen display, it works perfect but I need this
ultimately
  for printing. Googling or search the mailing archive did not find a
  satisfactory solution to address this issue.
 
 What about elyxer, have you tried that?
 Liviu

  Just FYI, I tried exporting with many other formats - e.g. often
recommended
  open office or rtf, etc. But they did not produce satisfactory results.
 
  I would be much obliged if somebody can provide a hint to this issue.
 
  Best,
  Jong
 



 @Liviu/// Thanks for the suggestion. But I gave up elyxer because I
couldn't
 install in in my laptop (Windows 7 machine). Although I consider myself
one of
 the skilled users of windows computers, I was completely lost when I tried
to
 install elyxer and python stuff.

 Then, my laptop became almost unusable after the bloody Windows 7 SP1
update.
 For some reason, it started to ground my HDD constantly as if it caught a
sort
 of virus or something. (Before this update I had very good impression
about
 Windows 7 and my laptop).

 So I switched to Ubuntu 11.04 with Lyx2.0

 It came with two html export option (html and Lyxhtml) - It seems that one
of
 these two utilize elyxer but not sure which one is which.

 The first export option (html) was not successful in producing the display
 equations (all of them showed in '*')

 The second export option (Lyxhtml) really worked!! It produced all details
of
 math expressions(integral, tilde, hat, etc) flawlessly. And they are all
vector
 graphics therefore can be scalable! The only problem left for me is to
find a
 way to convert xhtml to rtf or word or openoffice so that I can satisfy
those
 who want the bloody '.doc' files.

 -Jong



Re: export to HTML, math equation quality

2011-05-28 Thread Alex Fernandez
Hi jong,

The problems with display equations has already been reported and will be
solved for the next version of elyxer. I will send a message to the list
when it's ready, as usual.

Cheers,

Alex.

Good
El 28/05/2011 23:55, "jong"  escribió:
> Liviu Andronic  gmail.com> writes:
>
>>
>> On Fri, Apr 1, 2011 at 4:33 AM, Jong Kook Shin 
hotmail.com>
> wrote:
>> > Hi,
>> >
>> > I want to have high resolution images (300ppi?) of math equations when
I
>> > export my lyx files into html, which will ultimately be converted to
MSword
>> > file.
>> > Currently, it seems that the math equations and other figures are
converted
>> > to 72ppi. For screen display, it works perfect but I need this
ultimately
>> > for printing. Googling or search the mailing archive did not find a
>> > satisfactory solution to address this issue.
>> >
>> What about elyxer, have you tried that?
>> Liviu
>>
>> > Just FYI, I tried exporting with many other formats - e.g. often
recommended
>> > open office or rtf, etc. But they did not produce satisfactory results.
>> >
>> > I would be much obliged if somebody can provide a hint to this issue.
>> >
>> > Best,
>> > Jong
>> >
>>
>
>
> @Liviu/// Thanks for the suggestion. But I gave up elyxer because I
couldn't
> install in in my laptop (Windows 7 machine). Although I consider myself
one of
> the skilled users of windows computers, I was completely lost when I tried
to
> install elyxer and python stuff.
>
> Then, my laptop became almost unusable after the bloody Windows 7 SP1
update.
> For some reason, it started to ground my HDD constantly as if it caught a
sort
> of virus or something. (Before this update I had very good impression
about
> Windows 7 and my laptop).
>
> So I switched to Ubuntu 11.04 with Lyx2.0
>
> It came with two html export option (html and Lyxhtml) - It seems that one
of
> these two utilize elyxer but not sure which one is which.
>
> The first export option (html) was not successful in producing the display
> equations (all of them showed in '*')
>
> The second export option (Lyxhtml) really worked!! It produced all details
of
> math expressions(integral, tilde, hat, etc) flawlessly. And they are all
vector
> graphics therefore can be scalable! The only problem left for me is to
find a
> way to convert xhtml to rtf or word or openoffice so that I can satisfy
those
> who want the bloody '.doc' files.
>
> -Jong
>


Re: elyxer trouble

2011-05-26 Thread Alex Fernandez
Hi again,

On Thu, May 26, 2011 at 12:58 AM, Neal Becker ndbeck...@gmail.com wrote:
 What browser are you using? Some old versions of IE may show HTML
 better than XHTML. Anyway you can add the --html option within LyX,
 adding it to the Converters section in the Preferences:
   http://www.nongnu.org/elyxer/userguide.html#toc-Subsubsection--12

 This is wierd.  If run from lyx export html, I see:

 Line 3: * Warning: unsupported new format version 413
 Line 150: * Formula beginning \begin_inset Formula  is unknown
 Line 150: * Unparsed formula line \begin_inset Formula
 Line 151: * Unparsed formula line \[
 Line 152: * Unparsed formula line F_{n}=\sum r_{i}x_{i}^{*}e^{2\pi 
 i\Delta_{f}n}
 Line 153: * Unparsed formula line \]

 But if run from command line:
 elyxer.py ../non-periodic.lyx ./non-periodic.html
 Line 55: Title: ... (no error/warning)

It would appear that something is different between both situations.
Maybe you are running two different versions of eLyXer, or perhaps you
are exporting the document to another LyX format. The first error
appears when parsing formulas in LyX 2.0 -- it has already been
corrected in git and will be there for the next version.

As this problem is a bit specific of eLyXer, I suggest that we stop
CC'ing lyx-users, if you want.

Alex.


Re: elyxer trouble

2011-05-26 Thread Alex Fernandez
Hi again,

On Thu, May 26, 2011 at 12:58 AM, Neal Becker ndbeck...@gmail.com wrote:
 What browser are you using? Some old versions of IE may show HTML
 better than XHTML. Anyway you can add the --html option within LyX,
 adding it to the Converters section in the Preferences:
   http://www.nongnu.org/elyxer/userguide.html#toc-Subsubsection--12

 This is wierd.  If run from lyx export html, I see:

 Line 3: * Warning: unsupported new format version 413
 Line 150: * Formula beginning \begin_inset Formula  is unknown
 Line 150: * Unparsed formula line \begin_inset Formula
 Line 151: * Unparsed formula line \[
 Line 152: * Unparsed formula line F_{n}=\sum r_{i}x_{i}^{*}e^{2\pi 
 i\Delta_{f}n}
 Line 153: * Unparsed formula line \]

 But if run from command line:
 elyxer.py ../non-periodic.lyx ./non-periodic.html
 Line 55: Title: ... (no error/warning)

It would appear that something is different between both situations.
Maybe you are running two different versions of eLyXer, or perhaps you
are exporting the document to another LyX format. The first error
appears when parsing formulas in LyX 2.0 -- it has already been
corrected in git and will be there for the next version.

As this problem is a bit specific of eLyXer, I suggest that we stop
CC'ing lyx-users, if you want.

Alex.


Re: elyxer trouble

2011-05-26 Thread Alex Fernandez
Hi again,

On Thu, May 26, 2011 at 12:58 AM, Neal Becker  wrote:
>> What browser are you using? Some old versions of IE may show HTML
>> better than XHTML. Anyway you can add the --html option within LyX,
>> adding it to the Converters section in the Preferences:
>>   http://www.nongnu.org/elyxer/userguide.html#toc-Subsubsection--12
>
> This is wierd.  If run from lyx export html, I see:
>
> Line 3: * Warning: unsupported new format version 413
> Line 150: * Formula beginning \begin_inset Formula  is unknown
> Line 150: * Unparsed formula line \begin_inset Formula
> Line 151: * Unparsed formula line \[
> Line 152: * Unparsed formula line F_{n}=\sum r_{i}x_{i}^{*}e^{2\pi 
> i\Delta_{f}n}
> Line 153: * Unparsed formula line \]
>
> But if run from command line:
> elyxer.py ../non-periodic.lyx ./non-periodic.html
> Line 55: Title: ... (no error/warning)

It would appear that something is different between both situations.
Maybe you are running two different versions of eLyXer, or perhaps you
are exporting the document to another LyX format. The first error
appears when parsing formulas in LyX 2.0 -- it has already been
corrected in git and will be there for the next version.

As this problem is a bit specific of eLyXer, I suggest that we stop
CC'ing lyx-users, if you want.

Alex.


Re: elyxer trouble

2011-05-25 Thread Alex Fernandez
Hi,

The nongnu.org site was down, it should be working now.

You can use the option --css.

Cheers,

Alex.


Re: elyxer trouble

2011-05-25 Thread Alex Fernandez
On Wed, May 25, 2011 at 5:31 PM, Neal Becker ndbeck...@gmail.com wrote:
 One more problem.  Running elyxer from lyx (2.0) gui, the displayed math is
 missing.  But, run elyxer from command line (using --html), works much better.
 What's going on?

What browser are you using? Some old versions of IE may show HTML
better than XHTML. Anyway you can add the --html option within LyX,
adding it to the Converters section in the Preferences:
  http://www.nongnu.org/elyxer/userguide.html#toc-Subsubsection--12

Alex.


Re: elyxer trouble

2011-05-25 Thread Alex Fernandez
Hi,

The nongnu.org site was down, it should be working now.

You can use the option --css.

Cheers,

Alex.


Re: elyxer trouble

2011-05-25 Thread Alex Fernandez
On Wed, May 25, 2011 at 5:31 PM, Neal Becker ndbeck...@gmail.com wrote:
 One more problem.  Running elyxer from lyx (2.0) gui, the displayed math is
 missing.  But, run elyxer from command line (using --html), works much better.
 What's going on?

What browser are you using? Some old versions of IE may show HTML
better than XHTML. Anyway you can add the --html option within LyX,
adding it to the Converters section in the Preferences:
  http://www.nongnu.org/elyxer/userguide.html#toc-Subsubsection--12

Alex.


Re: elyxer trouble

2011-05-25 Thread Alex Fernandez
Hi,

The nongnu.org site was down, it should be working now.

You can use the option --css.

Cheers,

Alex.


Re: elyxer trouble

2011-05-25 Thread Alex Fernandez
On Wed, May 25, 2011 at 5:31 PM, Neal Becker  wrote:
> One more problem.  Running elyxer from lyx (2.0) gui, the displayed math is
> missing.  But, run elyxer from command line (using --html), works much better.
> What's going on?

What browser are you using? Some old versions of IE may show HTML
better than XHTML. Anyway you can add the --html option within LyX,
adding it to the Converters section in the Preferences:
  http://www.nongnu.org/elyxer/userguide.html#toc-Subsubsection--12

Alex.


eLyXer 1.2.1 released

2011-03-06 Thread Alex Fernandez
Hi all,

Version 1.2.1 of eLyXer, the LyX to HTML converter, has just been
released. The main features for this version are:
- an option --googlecharts to output images (which you can checkout at ),
- support for formatted and named references,
- better --splitpart behavior e.g. with --tocfor,
and the usual pile of fixes and wish list items.

Be sure to read the change log (it might take a while to update due to
server issues):
 http://elyxer.nongnu.org/changelog.html
for details. For the state of the art please check out how the latest
LyX's detailed Math manual converts:
 http://elyxer.nongnu.org/lyx/Math.html

Download from nongnu.org mirrors:
 https://savannah.nongnu.org/files/?group=elyxer

If the new version has not reached the mirrors yet:
 http://download-mirror.savannah.gnu.org/releases/elyxer/

Thanks,

Alex Fernández.


  1   2   3   4   >