View Single Post
Old 01-20-2008, 06:05 PM   #14
kati42
Member
kati42 began at the beginning.
 
Posts: 17
Karma: 42
Join Date: Jan 2008
Device: PRS-505
An aside on HTML, etc.

Quote:
Originally Posted by The Old Man View Post
Putting the tag <h1> or <h2> in the code seems to work most of the time but not all. I assume this is what is meant by the h[12] in the first block. If not, what tag do I use?
I also assume the text within the <h1> needs an </h2> - correct?
h1 and h2 tags are used to emphasize headers (the 'h' stands for 'h'eader). So the idea is that a book will emphasize the chapter headings, and libprs will automatically insert the page break before them:

Quote:
<h1>Chapter One</h1>
<p>It was a dark and stormy night...</p>
Note that a beginning <h1> tag needs to have an associated </h1> end tag. h2 is also a header tag, for subheadings. For example, you could have:

Quote:
<h1>PART ONE</h1>
<h2>Chapter One</h2>
<p> It was a dark and stormy night...</p>
Note that the subheader has a beginning <h2> tag and an ending </h2> tag. Basically your "ending" tag needs to match your "beginning" tag.

The h[12] entry on libprs is something called a "regular expression" that tells it to find tags h1 or h2 (the values in the square bracket mean "any one of these"). So if you had an ebook where the chapter headings all used h1 tags, but there was setting or time information in h2 tags, like:

Quote:
<h1>Chapter One</h1>
<h2>Living Room, 8pm</h2>
<p>It was a dark and stormy night...</p>
Then you would want to change h[12] to h[1] or h1, because you wouldn't want the page break before h2 tags.

Not sure that this information helps at all...
kati42 is offline   Reply With Quote