On Mon, 3 Feb 2014 07:53:49 +0100 Liviu Andronic <landronim...@gmail.com> wrote:
> Dear Steve and Alex, > > On Mon, Feb 3, 2014 at 2:48 AM, Steve Litt > <sl...@troubleshooters.com> wrote: > > On Fri, 31 Jan 2014 22:33:02 +0100 > > Alex Fernandez <ely...@gmail.com> 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 > > > > > Last year we actually had a GSoC project specifically dealing with > ePub. Josh and Richard made progress on this front, Did the progress include an Xhtml export that preserved semantics and respected HTML semantics such as using <h?> for leveled headings, <p> for paragraphs, and <pre> for lyx-code and environments derived from it, and <span> for character styles? If you got that far and can write it to disk, I can take it from there. > and the code > simply awaits someone with the motivation and the skills to finish the > job. The almost finished feature is available in several GIT branches > here: http://git.lyx.org/?p=gsoc.git;a=summary . If I ever get a day or two to familiarize myself with it, I will. But of course, I'm really lousy at C++, and in fact hate C++. I think there are several missed opportunities: 1) If LyX insists on having a native format of XML, which by its nature is human-confusing, it should at least be *well formed* XML so that it can be handled by an XML parser, and if the programmer is more skilled than I, XSLT. The day LyX native format is well formed, and maybe even with a DTD, I'll make the converter: me, myself and I. 2) The ePub converter shouldn't be a part of LyX: Most of it should be standalone. There's no reason for LyX to need to know *anything* about ePub. Just provide a sane Xhtml export, one that doesn't substitute <div> for <p>, or <p> for <h?>, and calls a <pre> a <pre>. Don't throw away the semantics: Don't convert styles to appearances, and don't use <div> instead of HTML structural elements like <p>, <pre>, and <h?>. Give me that, and I can do the rest. 3) I honestly don't think you're ever going to get one programmer to do this whole thing. The likelihood is infinitesimal of finding one person who: A) has a burning ePub itch to scratch and B) is great at C++ and C) Is familiar with LyX's code base. The way to do this is as a pipeline, where person A exports what person B needs, and person B converts that to what person C needs, etc. The beauty of this would be is that, as LyX changes, only person A would need to change his code, unless, of course, the rest of the chain needs an enhancement. The way I envision it would be either that person A would be the person who makes a sane Xhtml export, and person B is me. Or, perhaps, if LyX native format is ever well formed and valid XML, Person A is me, converting LyX to an Xhtml subset, and person B is me, converting the subset to ePub. That way, as LyX changed, I'd need to change only the first program. 4) Back when Josh was doing this, neither I nor Rob Oakes knew what we know about ePub today. If we had, we could have given Josh and his crew much better guidance about what was needed. If anybody wants to continue on the road to LyX->ePub, I suggest that person(s) ask us lots of questions. Thanks, SteveT Steve Litt * http://www.troubleshooters.com/ Troubleshooting Training * Human Performance