On Saturday, September 10, 2011 01:21:02 AM Steve Litt wrote: > Hi all, > > Progress on the LyX->eBook front! > > My book is written in LyX (lastchance.lyx), and I converted it to > ePub. Here's how.
[clip] > Now I use the elyxer program (I believe it's available on Windows > also) to convert my LyX book to HTML. If I had wanted, I could have > specified a CSS file for elyxer to use and customize appearance, > but this is a proof of concept and I didn't want to complicate > matters. So I just did the simplest possible elyxer command to > convert lastchance.lyx to test.html: [clip] > calibre ./test.html [clip] > So now it's converted. But not saved. Before saving I'm going to > make sure it's OK, so in Calibre I make sure my book is still > highlighted on the list, go over to the right, and click the EPUB > link. A nice ePub viewer pops up with my book in it. The > formatting is plain vanilla, with no space between paragraphs nor > indentation at the beginning of paragraphs, and there are a couple > other minor problems, but it basically looks good. Sha-Zam!!!! I got spaces between the paragraphs. First, it should have been obvious that in the LyX document properties I should have separated paragraphs by space instead of by first line indentation. Just doing that provides space between the paragraph (and gets rid of the indented first line, which I think in an ePub is ugly. Only trouble is, elyxer's conversion ignores whether the LyX defined inter paragraph space is Smallskip, Medskip, Largeskip, or even Custom 10em! Kludge time. I downloaded elyxer's default CSS file, http://www.nongnu.org/elyxer/lyx.css, and added this one line to the definition of div.Standard: margin-top:2em; Then I ran elyxer with the --css option to use the modified CSS file on my hard disk. This gives JUST the right interparagraph space in the ePub. 1em is too little, 5em is too much, 2em is perfect in my opinion. Festive! By the way, if you open the resulting book in Sigil and look at its CSS, you see that margin-top=2em right in the definition of .Standard. Just speaking for myself, I think LyX is the best ePub authoring environment imaginable because you want your ePub formatting absolutely uniform, entirely styles-based, with no one-off manipulations or fingerpainting. And it just so happens that consistency and styles-based authoring are what LyX does the best. SteveT Steve Litt Author: The Key to Everyday Excellence http://www.troubleshooters.com/bookstore/key_excellence.htm Twitter: http://www.twitter.com/stevelitt