View Single Post
Old 01-31-2007, 01:43 AM   #1
Falstaff
Member
Falstaff has a complete set of Star Wars action figures.Falstaff has a complete set of Star Wars action figures.Falstaff has a complete set of Star Wars action figures.
 
Posts: 21
Karma: 289
Join Date: Dec 2006
Device: Sony eReader
Span tags in LRS and LRF files -- do I understand them?

From looking at lrf dumps and lrs2lrf, here are some conclusions about the Span tag, which is used to embed text style changes in the text of an LRF file. Please agree or disagree if you know about this stuff.

The example:
<Span fontsize="60">hi</Span> there

When compiled by lrs2lrf, this adds the fontsize attribute to the text stream, but also adds the "undo" of the attribute automatically. So "hi" would be followed by a fontsize=100, assuming that was the old value. lrf2lrs reveals this extra attribute, by decompiling the above to:

<Span fontsize="60">hi</Span><Span fontsize="100">there</Span>

I am assuming that the old value comes from the settings in the textstyle (or book style, I guess.)

It looks like lrf2lrs has some code to try to not print the undo attributes, but the section is commented out.

Does this description seem correct?
Falstaff is offline   Reply With Quote