On 07/08/2013 09:52 PM, Steve Litt wrote:
Hi all,

I'm making a postprocessor to make the output of LyX's LyXHTML
xhtml export more compatible with ePub. Before I code my postprocessor,
I'd like to know the design intent of the LyXHTML exporter, so I don't
accidentally throw away a good thing.

First, I notice every container start tag is followed by an anchor with
an id like "magicparlabel-1140", like this:

<div class="standard"><a id='magicparlabel-1140' />

1) What was the reason you gave an <a> to every container?

This is so things like links to references are guaranteed to work.

2) Why did you use an <a> instead of
    <div class="standard" id='magicparlabel-1140'>

At the time this was written, there were too many browsers still active
that did not fully support links to id tags on other elements. Now that
they do, this has been changed for 2.1.x. The id is on the main element.

3) Why did you use doublequotes in the class, but singlequotes in the
    <a> id?

No idea. Just one of those things. For all I know, it is different in 2.1.

I have some questions about your mapping in xhtml exports of sectional
type environments to <h1>-<h6>. On the conversion of my book, Part and
Chapter both map to <h1>, with Section mapping to <h2>, Subsection to
<h3>, and so on. Did you do that so you wouldn't run past <h6>? If not,
what was the reason?

Part is not that commonly used. It seemed wrong to make chapters
h2 by default. As we've discussed previously, this can be changed
using layouts.

Thank you, thank you, THANK YOU for, in your xhtml conversion, passing
through every single environment and character style I used in my
book, and making CSS styles for them. That's a class act, and the single
most important thing in converting to ePub.

In a way, the idea behind the XHTML output (again, this is not eLyXer)
is (a) to respect what is in the layout files, so you don't have to write a
lot of duplicate code and (b) to mimic what is on the screen, generally
speaking. So if you define a character style, then, by default, we create
CSS to mimic how it looks on screen. If you want to output something
else, then that can easily be done in the layout file, as well.

Richard

Reply via email to