On Sat, 01 Feb 2014 05:25:58 +1100
Alan L Tyree <alanty...@gmail.com> wrote:

> Sorry for the top posting, but this is short. My own view is that an
> ePub exporter for LyX would make it a killer application. 
> 
> Thanks for your comments, Steve. Have you looked at Pandoc?
> 
> Cheers,
> Alan

Hi Alan,

I hadn't known about Pandoc. Thanks for the heads-up. I looked up Pandoc
here:

http://johnmacfarlane.net/pandoc/

For the following ascii art, please switch to monospace font...

           .___.               .______.
LyXformat->|LyX|->LaTeXformat->|Pandoc|->ePubFormat
           `````               ````````

The preceding looked simple enough, so I downloaded and installed
Pandoc, and tried it on one of my simpler books. It indeed produced an
ePub, and in certain respects a good one. But not nearly good enough to
sell. No table of contents. No cover. No images: all images referred to
only by their Alt text. All cross reference labels exposed as text with
arbitrary subscript formatting in places. The good news is it managed
to keep footnotes and the like, but that's not good enough. I spoze
theoretically I could have used other options on my lyx -export
command, or on my pandoc command, so these things wouldn't happen, or
perhaps I could have made restrictions on the authoring of my book in
LyX, but these things would need to be examined later.

Another way to use Pandoc might be this:

           .___.               .______.
LyXformat->|LyX|->LaTeXformat->|Pandoc|->xhtml-.
           `````               ````````        |
 .---------------------------------------------'
 |
 |  ._____________.         ._____________.
 `->|xhtml Tweaker|->xhtml->|My xhtml2epub|->ePub
    ```````````````         ```````````````

The preceding would depend on:

A) Pandoc retaining enough info, including semantic styles, to make all
   book elements
B) Pandoc producing xhtml sane enough that the tweaker is something
   that can actually be written.

So I tried using Pandoc to convert my LaTeX book to (X)html. The result
had no <head> (and this might be an advantage), it had all sorts of
garbage characters (perhaps this could be fixed in the <head> I would
insert), but, the kiss of death is this: It took all my semantic styles
(environments and character styles), kinda-sorta converted them to
presentation, and discarded the semantic styles, so that in my <head>
I can't specify the link between semantic styles and presentation.
Once those semantic styles are gone, no matter how clever a programmer
I am, I don't have the necessary input info to govern the look of my
eBook. This is a showstopper that cannot be recovered from. 

So unless somebody knows of a way to prevent Pandoc from pulling an
MSWord move and prematurely converting semantic to presentational, my
opinion is that Pandoc is worthless for this task.

Thanks,

SteveT

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

Reply via email to