View Full Version : (x)html ebook specification


rogue_ronin
05-18-2009, 01:17 AM
I'd like to get some brains on this subject.

I'm (slowly) assembling and editing a giant library of HTML ebooks. I've been using an idiosyncratic mix of HTML 3.2 and XHTML that I've picked up over the years.

I use an obsolete reader -- but a very functional one! (The REB1100.) I'm looking to upgrade, though, soon. And I'd like to do this only once, the editing/organizing.

I use an awesome text editor, NoteTab Pro, which lets you assemble libraries of macros -- anything you can do to text, you can do with the macros, it's got an enormous language. So I've built a library with a hundred or two macros, that do everything from regex to boilerplate to file manipulation and database entries.

So I need some advice on a better 'spec' for the format -- I should be able to rewrite the macros to the new one, and write a few that auto-adapt the old stuff I've done already. Creating macros to write CSS for any reader should be dead-simple, or writing converters to straight HTML, also -- once the format is set and consistent. There are a lot of ideas out there, and I have my own, which I'll start with:

This spec should use XHTML, and CSS. But the document markup should be as simple as possible.

Here are the elements that I think are important in an ebook, primarily fiction books -- a mix of meta-data and structure -- the meta is often explicitly expressed in the book: please add on if I've missed something.

Book Meta: Author(s), Illustrator(s), Publisher, ISBN, Publishing Date, Publishing City, Copyright Owner, Copyright Date, Series Name, Title, Sub-Title

File Meta: Version Number, Version Date, Original Conversion Date, Scanner, Proofreader(s), Original Source

Structure: Cover, Front Matter, Title Page, Verso Page (book meta info page), Inscription, Acknowledgments, Preface, Foreword, Table of Illustrations/Maps, Table of Contents, Prologue, Parts, Chapters, Epigrams, Sections, Sub-Sections, Paragraphs, Epilogue, Afterword, Endnotes, Glossary, Index, End Matter

If I've missed anything, please add or suggest. In my next post, I'm going to add my current methods, and ask for advice on improvements.

Thanks for reading!

m a r

pepak
05-18-2009, 01:54 AM
Creating macros to write CSS for any reader should be dead-simple,
You don't need macros for that - as long as your (X)HTML files are created with styling in mind, the CSS will be a sompletely standalone part of your book - likely you will have most CSS for all books in one file, with perhaps an additional "supporting" CSS file for particular books. The whole point of CSS is, if you want to change the appearance of a HTML, you make your changes only in the separate CSS file, nowhere else.

As for organizing everything neatly, you may want to look at my "Calibre preprocessor" H2LRF (http://www.mobileread.com/forums/showthread.php?t=28501).

rogue_ronin
05-18-2009, 06:50 AM
Read your thread/link. It's funny, I already do something like that, too, with all the meta-data. More than what you've got. Anal-retentively more.

'Course, I'm not using Calibre (yet.) And the utility I use is my text editor, not a pre-processor to call Calibre... I think what I'm shooting for here is a utility/software/reader neutral way to present an ebook in simplest HTML -- consistency being the key. Then anyone can take it and convert it pretty easily. Heck, you could use it for your h2lrf, almost without effort -- just a minor change to the meta you look for.

As for the CSS macros -- I think what I'm talking about is that each ebook reader (hardware) should probably have its own CSS, right? I mean, what looks good on a 5" JetBook, probably doesn't look as good on an 11" DS1000. So you'd want to answer a few questions in a dialog (well, I would) about what sort of reader you're trying to make an EPUB for. Then, boom, CSS created. Maybe it calls some common defaults in a common.css file or such.

Now that I re-read my thoughts above, I think I'm talking about two separate things. Common, single CSS will be all that's necessary. Later in the process, when I want to make a package for a hardware reader, then an additional CSS macro might be necessary. You're right, as usual pepak.

Anyway, gonna dig out my old Barsoom folder, and grab A Princess of Mars to use as an example for the next stuff.

Back later,

m a r

JSWolf
05-18-2009, 09:38 AM
Since you are coding XHTML, why not have a look at ePub? It would do quite well for you (IMHO).

rogue_ronin
05-18-2009, 11:01 AM
Yeah, I can't seem to find a clear set of guidelines/tutorial for ePub -- they all (so far) seem to assume a level of familiarity with XML that I don't have. I'm never happy if I just mimic without understanding -- and that takes a while.

I think I might use this thread to teach myself how to do it (ePub) properly, and modularly, with great metadata, and good in-book navigation. Just do it a piece at a time, and hope folks chime in when I'm screwing up.

It's the XML spine, etc. where I start to get truly lost. 'Course, if I figure it out once, I can just macro the heck out of it.

m a r

DaleDe
05-18-2009, 12:39 PM
The wiki can help in your research. It has most of the topics you have expressed interest in and can provide a starting point. If you find any deficiencies you can correct them! or ask for help.

Dale

pepak
05-18-2009, 04:34 PM
Since you are coding XHTML, why not have a look at ePub? It would do quite well for you (IMHO).
You can convert XHTML to anything easily. You can't do that with EPUB, even though it uses XHTML as its basis (e.g. with EPUB your converter needs to be able to handle multiple source files).

gwynevans
05-18-2009, 07:36 PM
The way I've been doing it when creating ePubs has been to just create the XHTML as below and run it through Calibre to create the actual ePub, as that way I can work with a single source but use Calibre to do the file-splitting & 'twiddly bits' to create a valid ePub.

rogue_ronin
05-19-2009, 02:42 AM
Okay, yeah, after being swayed by the wind, I'm back in the simple (x)HTML camp. I want to produce single-file ebooks (other than images/sounds, of course.)

So, let me get started: I dug out my old file of A Princess of Mars (it's in the public domain) and updated it -- it was still in my old format (easy but not trivial to fix.)

I'm going to go through it a piece at a time (I won't post entire chapters, just relevant stuff.)

Here's the current start of the file, through the head:


<html>

<head>

<!-- Conversion Started May/20/2004 -->
<!-- Revision # 0.80 on May/18/2009 -->

<!-- META INFO USED BY THE REB1100 FOR DISPLAY ON THE ABOUT PAGE -->

<title>A Princess of Mars</title>
<meta name="author" content="Burroughs, Edgar Rice">
<meta name="publisher" content="Found Text">
<meta name="genre" content="Science Fiction::General">
<meta name="ISBN" content="Found Text: #0085 v. 0.80">

<!-- META INFO USED BY THE REB1100 NOTETAB CLIPBOOK -->

<meta name="theme" content="Negative">
<meta name="number" content="0085">
<meta name="name" content="APrincessOfMars">
<meta name="version" content="0.80">
<meta name="title" content="A Princess of Mars">
<meta name="subtitle" content="Barsoom #01">
<meta name="series" content="Barsoom">
<meta name="seriesnumber" content="01">
<meta name="authorlast" content="Burroughs">
<meta name="authorfirst" content="Edgar">
<meta name="authormiddle" content="Rice">
<meta name="authorfull" content="Burroughs, Edgar Rice">
<meta name="rebgenre" content="Science Fiction::General">
<meta name="conversiondate" content="May/20/2004">
<meta name="source" content="University of Virginia Electronic Text Center">
<meta name="scanner" content="Judy Boss">
<meta name="proofer" content="Kelly Tetterton, Peter-John Byrnes, Found Text">
<meta name="revisiondate" content="May/18/2009">
<meta name="shortpath" content="REB1100\eBookProjects\Found Text\Burroughs_Edgar_Rice\Barsoom\01_APrincessOfMa rs\APrincessOfMars.html">

<!-- ENDNOTE COUNT -->

<meta name="endnotecount" content="0">

<!-- GOTO MENU -->

<meta name="rocket-menu" content="Table of Contents=#toc">
<meta name="rocket-menu" content="About this Version=#verso">

</head>


I looked at gwynevans source code, which is sweet-and-clean:


<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML>
<HEAD>
<META NAME="Author" CONTENT="Konrath, J.A"/>
<style type="text/css">
<!--
p { text-indent: 1em; margin: 0; }
h1 { page-break-before: always; font-style: italic; }
div.drink { page-break-before: always; }
div.drink p { text-indent: 8em; }
-->
</style>
</HEAD>


Now, of course, my stuff has a bunch of kludges in there, specific to the REB1100. But it also has some good stuff, I think. And I have a few comments about gwynevans (not critical of you, gwynevans, everyone has their own preferences) to use as a jumping off point.

Let's start with a couple of questions:

1) Is there a reason to prefer XHTML 1.0 over XHTML 1.1?

2) How to choose the encoding? ie: what's best, most universal, least hassle? I'm an english speaker (my thai is terrible! my japanese has faded, my french really sucks, but I can read a little of all of them -- I could be talked into some single way of seeing everything, as long as it won't hamper sharing, or over-complicate.)

3) gwynevans -- did you whip this out as an example, or was it something you have? I ask because it has no title, for instance.

4) I'm thinking to move all CSS to a separate file, any reason I shouldn't? (BTW, the page-break-before: always; part -- is that specific to ebooks, or part of XHTML? 'Cause I've been wondering about how to hard-code that.

And now to rip apart my gunk:

A) It has no DTD or -- what is it called when you specify html vs xml, etc?

B) For readability of the source (something that is very important to me) I keep a lot of sectioning with vertical space. I see (and have seen elsewhere) horizontal tabbing as a visual aid. Any good reason to prefer one over the other? Or to not combine them? I understand why the tabbing is there, but glancing at a page it is hard to find related sections -- they just don't stand out. And when there are a lot of sections to a document, I find that I have to right-scroll a lot, or that word wrap wrecks the layout.

C) Lower case tags: correct usage for XHTML, right?

D) Version information in comments -- I think this is a good practice, but for sharing would there be a better method? For instance, I don't name where to find the history/source, or what the numbers mean. I do have a set of guidelines for the numbers, should I include the guidelines? Or something else? It's going to be repeated later, but isn't it nice to open a file, and see the version, boom!, right there? Should I keep a list of all updates, instead of just first and latest?

E) REB1100 meta-info: well the <title> has to stay! And the next four <meta> tags are staying too, I think. (The ISBN tag is one I hijacked to display the collection number -- it would simply be returned to its original function.) Just gonna get rid of the comment, and merge the <meta> tags into a more general Meta section. Reasonable, right?

F) NoteTab ClipBook meta-info: For the goals of this thread, I am certain these <meta> tags are mixed up, and that as a pure source file, some should not be there. Just a comment on the meta/genre tag -- I found a collection of what looked like standard, official book-seller classifications (http://www.bisg.org/standards/bisac_subject/major_subjects.html) online, and I wrote a macro to give me a drop-down list of genres. So it's got some universal sensibility, not just my personal conceits.


i) <meta name="theme"... : I have sets of icons and images that are used as links (ie: next chapter, previous chapter, toc, an end-of-book image that "closes" the book by linking to the cover, etc.) This just names it for the macro-library, and could be used to repair a broken folder, although I don't do that now. It should go, it's not necessary. But I still want to include such images!

ii) <meta name="number"... : this is a project number for the "publisher" , in this example named Found Text. The "publisher" is just a conceit, but it makes it convenient to group books, by genre or author, whatever. Still, not necessary? Or could it be adapted into a DocumentID, UID or something like that?

iii) <meta name="name"... : Both the filename(.html) and the project name in my database/filetree. I don't know. I can sort of see this either way. Useful? Or redundant? Need a better name itself? I always camel-case the title of the book and remove spaces.

iv) <meta version, title, subtitle, series, seriesnumber... : I think these stay. Can't see any reason not to have them. Maybe they need better names?

v) <meta authorlast, authormiddle, authorfirst, authorfull ... : Why do I not just use "author"? Well, sometimes you need to manipulate the name for display, other times you need to sort by last name. I think FBreader, for one, let's you choose the sorting tag. Also, the macros I write let me collect names as I add them, so why have to re-type "Edgar" when I add Poe to my collection? I could see adding an author <meta>, or re-jiggering authorfull, and changing the name of the current authorfull to something else (author-by-last, authoralphabetical?) My current rule is when you have an initial, you don't use a period. I let the macros sort it out. But that may not be best. Does this all make sense? Regardless, I don't think a simple <meta name="author" content="Edgar Rice Burroughs"> is enough.

vi) <meta rebgenre ... : It's just here because I wanted to keep the REB1100 functional stuff separated from the NoteTab Clip stuff. It made it a lot easier to parse the file when updating. Redundant, gone.

vii) <meta conversiondate, source, scanner, proofer, revisiondate ... : All necessary, I think. Maybe need better names? For example, should conversiondate, be initialconversiondate? or xhtmlconversiondate? Or something else, others?

viii) <meta shortpath ... : this is specific to the filetree, and makes setting things up in the macros easier. Unnecessary. Gone.

ix) The entire endnote part should go, I think. I keep the number to allow for adding new endnotes as the text is processed. It's really just a backup (in a way, all these meta-info are, given that I keep it all in a database, too.) Gone.

x) GOTO-MENU section: Gone. This is a section for the REB1100 (and specifically for rbmake, I believe); it allows for up to seven (that's right, folks, a whole seven!) pop-up TOC links.



So what do you think? I know this is a super-long post: don't feel that you have to respond to everything, just whatever you think is good or bad. I'm looking to develop a best-practice here, and I don't see a lot of discussion about embedding meta-info.

Thanks for reading,

m a r

gwynevans
05-19-2009, 05:24 AM
> 1) Is there a reason to prefer XHTML 1.0 over XHTML 1.1?

None that I know of - I guess I just had the 1.0 header to hand & for this particular use, I don't think there was any difference between 1.0 & 1.1.

> 3) gwynevans -- did you whip this out as an example, or was it something you have? I ask because it has no title, for instance.

At the time I'd not considered custom metadata & pre-processing, so just had a 'build_ePub.bat' in the folder which set some of the metadata via the Caliber command-line, e.g. 'html2epub --margin-right=10 --level1-toc="//h2" --chapter="//h2" --cover="Konrath, J.A - Jack Daniels 01 - Whiskey Sour.png" -t "Whiskey Sour" -a "Konrath, J.A" "Konrath, J.A - Jack Daniels 01 - Whiskey Sour.html"'

> 4) I'm thinking to move all CSS to a separate file, any reason I shouldn't?

If you've come up with a standard set of styles that you want to reuse, then it's worth considering, although the main reason to do so in the web-site case is to allow global changes by editing the one file, which may be less of an issue in this particular usage.

> (BTW, the page-break-before: always; part -- is that specific to ebooks, or part of XHTML? 'Cause I've been wondering about how to hard-code that.

Standard, but it's less well known as it's focussing on the print side of things - http://www.w3schools.com/Css/pr_print_pagebb.asp

pepak
05-19-2009, 05:41 AM
1) Is there a reason to prefer XHTML 1.0 over XHTML 1.1?
XHTML 1.1 is a bit "cleaner" (from the technical point of view), which makes it a bit more restrictive. That's a good thing, IMHO.

2) How to choose the encoding? ie: what's best, most universal, least hassle?
If you want "one encoding to rule them all", go with UTF-8. Personally, I use the encoding that is best suited to each book in my OS (e.g. us-ascii for english books, windows-1250 for czech books). It helps with your 'readability of source" - it is far easier to read "&acirc;" that a sequence of two special symbols.

4) I'm thinking to move all CSS to a separate file, any reason I shouldn't?
You definitely should!

(BTW, the page-break-before: always; part -- is that specific to ebooks, or part of XHTML? 'Cause I've been wondering about how to hard-code that.
It's a CSS2 specification - every reader that supports CSS2 should be able to handle it, provided that the display medium can (e.g. page-breaks don't make sense with an "endless" screen of browsers).

B) For readability of the source (something that is very important to me) I keep a lot of sectioning with vertical space. I see (and have seen elsewhere) horizontal tabbing as a visual aid. Any good reason to prefer one over the other? Or to not combine them?
It doesn't matter to XHTML - blank space is reduced to one space by a standard-compliant reader. Choose what appeals to you more.

C) Lower case tags: correct usage for XHTML, right?
Yes. XHTML requires proper (which tends to be lower) case.

D) Version information in comments -- I think this is a good practice, but for sharing would there be a better method?
Put it into metadata. <meta name="version" content="..." />

pdurrant
05-19-2009, 06:10 AM
If you want "one encoding to rule them all", go with UTF-8. Personally, I use the encoding that is best suited to each book in my OS (e.g. us-ascii for english books, windows-1250 for czech books). It helps with your 'readability of source" - it is far easier to read "&acirc;" that a sequence of two special symbols.


I'm moving to using UTF-8 entirely. But then, I have a good UTF-8 text editor - BBEdit. This means I have access to all of unicode, and see the characters as they should be, and don't have to use the entities. If any particular reader software needs entities rather than UTF-8, the production process can do the substitution. I much prefer editing with “ and ” rather than &ldquo; and &rdquo;

rogue_ronin
05-19-2009, 07:07 AM
Okay, thanks for the link, I've started to read the tutorial on CSS.

I've found this example of a 1.1 header elsewhere:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

I'll use it for now, until I know more.

I understand about using Calibre. That makes a lot of sense as a way to just get it done quickly and adequately.

'Course, I'm goin' all ballistic on this right now... :)

So, looking at my first post, and my second long post, and a new idea or two here's my proposed start of a new file with good meta-info (using the old data, and faking where necessary):



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>A Princess of Mars</title>

<!-- BEGIN: DOCUMENT HISTORY -->

<!-- Created on 20/May/2004 -->
<!-- Revision # 0.10 on 30/Jun/2004 -->
<!-- Revision # 0.20 on 28/Dec/2004 -->
<!-- Revision # 0.40 on 13/Apr/2005 -->
<!-- Revision # 0.70 on 30/Sep/2006 -->
<!-- Current Revision # 0.80 on 18/May/2009 -->

<!-- END: DOCUMENT HISTORY -->

<!-- BEGIN: EBOOK META INFORMATION -->

<meta name="filename" content="APrincessOfMars">
<meta name="fileid" content="FoundText0085">
<meta name="filecreationdate" content="20/May/2004">
<meta name="fileversion" content="0.80">
<meta name="filerevisiondate" content="18/May/2009">
<meta name="filesource" content="University of Virginia Electronic Text Center">
<meta name="filescanner" content="Judy Boss">
<meta name="fileproofer" content="Kelly Tetterton, Peter-John Byrnes, Found Text">

<meta name="title" content="A Princess of Mars">
<meta name="subtitle" content="Barsoom #01">
<meta name="series" content="Barsoom">
<meta name="seriesnumber" content="01">
<meta name="genre" content="Science Fiction::General">

<meta name="author" content="Edgar Rice Burroughs">
<meta name="authorlast" content="Burroughs">
<meta name="authorfirst" content="Edgar">
<meta name="authormiddle" content="Rice">
<meta name="authoralpha" content="Burroughs, Edgar Rice">

<meta name="illustrator" content="Frank Frazetta"
<meta name="illustratorlast" content="Frazetta">
<meta name="illustratorfirst" content="Frank">
<meta name="illustratormiddle" content="">
<meta name="illustratoralpha" content="Frazetta, Frank">

<meta name="publisher" content="Found Text">
<meta name="publicationdate" content="08/July/2010">
<meta name="publicationcity" content="Honolulu">

<meta name="copyrightholder" content="">
<meta name="copyrightdate" content="">

<meta name="isbn" content="">

<!-- END: EBOOK META INFORMATION -->

</head>



So, a lot cleaner than what I started with. Title, CreationDate and RevisionDate are repeated, but that seems reasonable to me: I think that whatever parser you might use on the meta shouldn't have to make an exception for the title, and I still think that a doc history makes sense at the top.

If there are more than one author or illustrator, append ## to the name attribute: ie, author01, for the 2nd author, illustrator03 for the 4th illustrator. I think 100 authors and illustrators is enough. Let the parser figure it out. Or should I start with author01? Or author00? I don't think so, but...

The only inconsistency this leaves is with the proofer: I can't see a reason though why you might need more than a simple, comma-separated list. Can anyone?

And, I guess, sometimes publishers have more than one city -- but a simple list would do there, too, wouldn't it?

All dates in dd/mmm/yyyy format. Use leading 0's for all numbers less than 10.

I really do appreciate any input to this typing-out-loud, thanks,

m a r

rogue_ronin
05-19-2009, 07:17 AM
Hmmm, another thought. Does it make sense to include the following two things?

#1: versioning info. Often when I get a file, the version number is basically meaningless. Here's the versioning ranks I use:


0.10 Initial Conversion
0.20 Cover and Frontispiece
0.30 Sections, Chapters and TOC
0.40 Endnotes and/or Blockquotes
0.50 Initial Spellcheck
0.60 Mdashes and Hyphens and Ellipses
0.70 Italics, Bold, and Pre-Formatted Text
0.80 Reading Proof
0.90 Checked against Canonical Source
1.00 Touched Up and Packaged For Release


#2: structure hints. Should someone have to examine the entire source for a clue to how it's been assembled? Or could you add something like this as a comment?:


Title: h1 class="title"
Subtitle: h3 class="subtitle"
Chapter: h3 class="chapter"
Paragraph: p class="normal"
Epigram: p class="epigram"
etc. etc.


m a r

pepak
05-19-2009, 07:21 AM
The only inconsistency this leaves is with the proofer: I can't see a reason though why you might need more than a simple, comma-separated list. Can anyone?
Theoretically, and keeping in mind that I do all my books myself and for myself (they are still covered by copyrights, I can't spread them), you may want to contact a proofer or another - so you need an e-mail and possibly some IM. You can add them to the list (into parentheses, or something), but if the amount of data still increases, the list will become even less readable.

Do you have any specific reason why you don't want to use multiple meta's?

<meta name="proofer" content="Person A" />
<meta name="proofer" content="Person B" />
<meta name="proofer" content="Person C" />

Consistently, you could do all multiple-value metas this way, e.g. for author. Reason being, it makes sense to place a book by A. Smith and B. Johnson both among "Smith books" and "Johnson books". A book can belong to multiple series (e.g. Feist's Daughter of the Empire belongs to Empire Saga as book 1, but can also be considered to belong to Midkemia series as book 4(5)).

All dates in dd/mmm/yyyy format. Use leading 0's for all numbers less than 10.
Personally, I prefer the SQL-standard of yyyy-mm-dd, which is easy to sort even in textual form.

pepak
05-19-2009, 07:27 AM
Hmmm, another thought. Does it make sense to include the following two things?
It does make sense, but seems a bit too detailed to me. It may be interesting, but:
- the book should never leave your computer in the intermediate stages
- after version 1.00, most of the changes will be along the lines of "fixed typo on page 123 line 15".

#2: structure hints. Should someone have to examine the entire source for a clue to how it's been assembled? Or could you add something like this as a comment?:
Personally, I prefer the "no-clue" approach. If someone wants to see the clues, he can easily do that (for all books at one stroke) by modifying CSS, e.g.

h1.title:before { content: "Title: "; }


But once again, I must stress that I do the books for myself, to suit my needs, and not for public consumption. If you want to provide a standardized framework, the opposite approach might be better - if you use a proper tagging, hiding all "clues" would be even easier:

.clue { display: none; }

rogue_ronin
05-19-2009, 07:35 AM
You may want to contact a proofer or another - so you need an e-mail and possibly some IM. You can add them to the list (into parentheses, or something), but if the amount of data still increases, the list will become even less readable.

Hadn't thought of contacting them, that makes sense. Given the below comments, I think I would go with putting them into parentheses.

Do you have any specific reason why you don't want to use multiple meta's?

<meta name="proofer" content="Person A" />
<meta name="proofer" content="Person B" />
<meta name="proofer" content="Person C" />

Consistently, you could do all multiple-value metas this way, e.g. for author. Reason being, it makes sense to place a book by A. Smith and B. Johnson both among "Smith books" and "Johnson books".

I assumed that all the meta names needed to be unique. If they don't, then I'm for not numbering them, and just adding multiple meta's as necessary.

Personally, I prefer the SQL-standard of yyyy-mm-dd, which is easy to sort even in textual form.

Just as easy the other way, and closer to how we (well, americans) speak. At least I'm abandoning the american, mmm/dd/yyyy, which is the way it is because it's exactly the way we speak. Plus, I'll get confused if I do it that way, I know I will. :)

Oh, and looking at your example, I realize I didn't terminate the meta tags with />...

m a r

rogue_ronin
05-19-2009, 07:52 AM
It does make sense, but seems a bit too detailed to me. It may be interesting, but:
- the book should never leave your computer in the intermediate stages
- after version 1.00, most of the changes will be along the lines of "fixed typo on page 123 line 15".

Your analysis of my words is correct, but I might release earlier -- some of the sources I don't have, so I cannot go past 0.80 on that scale, yet there's no reason to keep them locked up on my hard drive. I should probably reword as follows:


0.10 Initial Conversion
0.20 Cover and Frontispiece
0.30 Sections, Chapters and TOC
0.40 Endnotes and/or Blockquotes
0.50 Initial Spellcheck
0.60 Mdashes and Hyphens and Ellipses
0.70 Italics, Bold, and Pre-Formatted Text
0.80 Reading Proof
0.90 Checked Against Canonical Source
1.00 Final Version -- Optimal
1.00+ Minor Error Corrections


I think that including it would suggest to someone how to add value and version it consistently. I can think of arguments for releasing at 0.50 and 0.60 as well.

Personally, I prefer the "no-clue" approach. If someone wants to see the clues, he can easily do that (for all books at one stroke) by modifying CSS, e.g.

h1.title:before { content: "Title: "; }


You've got me there, I can't follow you yet -- just starting to get into the CSS.

If you use a proper tagging, hiding all "clues" would be even easier:

.clue { display: none; }



I assume you mean to put the "clues" into a special container. I'm just thinking to put it into a comment. Could you explain more fully?

Thanks as always for your insightful comments,

m a r

ps: did you start your regex thread?

rogue_ronin
05-19-2009, 09:37 AM
So, minor update after discussion above:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>A Princess of Mars</title>

<!-- BEGIN: DOCUMENT HISTORY -->

<!-- Created on 20/May/2004 -->
<!-- Revision # 0.10 on 30/Jun/2004 -->
<!-- Revision # 0.20 on 28/Dec/2004 -->
<!-- Revision # 0.40 on 13/Apr/2005 -->
<!-- Revision # 0.70 on 30/Sep/2006 -->
<!-- Current Revision # 0.80 on 18/May/2009 -->

<!-- END: DOCUMENT HISTORY -->

<!-- BEGIN: REVISION GUIDELINE -->

<!--
0.10 Initial Conversion
0.20 Cover and Frontispiece
0.30 Sections, Chapters and TOC
0.40 Endnotes and/or Blockquotes
0.50 Initial Spellcheck
0.60 M-dashes and Hyphens and Ellipses
0.70 Italics, Bold, and Pre-Formatted Text
0.80 Reading Proof
0.90 Checked Against Canonical Source
1.00 Final Version -- Optimal
1.00+ Minor Error Corrections
-->

<!-- END: REVISION GUIDELINE -->

<!-- BEGIN: EBOOK META INFORMATION -->

<meta name="filename" content="APrincessOfMars" />
<meta name="fileid" content="FoundText0085" />
<meta name="filecreationdate" content="20/May/2004" />
<meta name="fileversion" content="0.80" />
<meta name="filerevisiondate" content="18/May/2009" />
<meta name="filesource" content="University of Virginia Electronic Text Center" />
<meta name="filescanner" content="Judy Boss" />
<meta name="fileproofer" content="Kelly Tetterton" />
<meta name="fileproofer" content="Peter-John Byrnes" />
<meta name="fileproofer" content="Found Text (foundtext@gmail.com)" />

<meta name="title" content="A Princess of Mars" />
<meta name="subtitle" content="Barsoom #01" />
<meta name="series" content="Barsoom" />
<meta name="seriesnumber" content="01" />
<meta name="genre" content="Science Fiction::General" />

<meta name="author" content="Edgar Rice Burroughs" />
<meta name="authorlast" content="Burroughs" />
<meta name="authorfirst" content="Edgar" />
<meta name="authormiddle" content="Rice" />
<meta name="authoralpha" content="Burroughs, Edgar Rice" />

<meta name="illustrator" content="Frank Frazetta" />
<meta name="illustratorlast" content="Frazetta" />
<meta name="illustratorfirst" content="Frank" />
<meta name="illustratormiddle" content="" />
<meta name="illustratoralpha" content="Frazetta, Frank" />

<meta name="publisher" content="Found Text" />
<meta name="publicationdate" content="08/July/2010" />
<meta name="publicationcity" content="Honolulu" />
<meta name="publicationcity" content="Bangkok" />

<meta name="copyrightholder" content="" />
<meta name="copyrightdate" content="" />

<meta name="isbn" content="" />

<!-- END: EBOOK META INFORMATION -->

<!-- BEGIN: STRUCTURE HINTS -->

<!--
Title: h1 class="title"
Subtitle: h3 class="subtitle"
Chapter: h3 class="chapter"
Paragraph: p class="normal"
Epigram: p class="epigram"
Psionic: em class="psionic"
etc. etc.
-->

<!-- END: STRUCTURE HINTS -->

</head>



I'm sort of liking this; I think it achieves two things -- it is parseable for utilities/macros and it is human-readable and human-editable. Oh, and completely invisible to a person just reading the book. Hopefully it puts everything that you need to know about the following file right at the top, where you can use it to re-write CSS, or pick a version number, or whatever.

If for some reason a person only had this file, would it be easy to recreate the rest?

I guess the final thing it could need is a manifest of image/sounds that it references.

m a r

pepak
05-19-2009, 10:10 AM
I assume you mean to put the "clues" into a special container. I'm just thinking to put it into a comment. Could you explain more fully?
You should definitely read up on CSS, it will make things a lot more clear. But, without going into details, there are three main "identifiers" of what a given CSS option-set should affect:
something { ... } - this CSS applies to tag something
.something { ... } - this CSS applies to any tag that has (or contains) a class something
#something { ... } - this CSS applies to any tag that has id (or name) something.
You can combine and nest these identifiers, but that's not important. The important thing is that if you put your "clues" into your document as either a special tag, or as a tag with a given class, you could style them using CSS quite easily, including the possibility to hide the clue altogether.

E.g. <h2><clue>Chapter:</clue> Chapter 10</h2> could use a styling such as clue { display: none; }.

The problem with the above example is that there is no clue tag in XHTML - you would have to define it yourself. That's why you may want to prefer to use e.g. a span: <h2><span class="clue">Chapter:</span> Chapter 10</h2> and hide it with .clue { display: none; }.

ps: did you start your regex thread?
Nope. I will add to it if someone starts it, but I don't want to start it myself.

pepak
05-19-2009, 10:14 AM
But, on the other hand, it would be just as simple to use:
<h2 class="chapter">Chapter 10</h2> and .chapter:before { content: "Chapter: "; }, which saves on one tag, or even
<div class="chapter"><h2>Chapter 10</h2><p>...</p><p>...</p></div>, which keeps an extra tag (div), but makes a clear distinction of where a chapter begins and ends (h2 only marks where the chapter's title begins and ends, not the chapter itself; it is only implied that a chapter ends where a next chapter begins, but that may not necessarily be true for all books).

rogue_ronin
05-20-2009, 04:27 AM
Okay, I read the W3C Schools CSS tutorial yesterday, I'm following you better. 'Course, I'm not a wizard. Yet. :D

Yeah, I posted above you with my current solution. I'll be adding a manifest, then I think I'm pretty complete with meta -- but of course, I'm still open to suggestions/improvements.

I don't want to clutter the markup with too many classes and pseudo-classes. At least for the meta-info, I'd pretty much like to keep it all in the head, and use it consistently so that it becomes easy for anyone to write new CSS, to extract data for conversion to other formats, etc.

And I think I disagree with you only because I don't want any of this stuff to appear in the book as one reads (except for some stuff in the verso) so there's no reason to add more code to obscure it or reveal it. It's just there for tools/utilities, and for reference when someone wants to look under the hood for any reason. Meta on the structure is just a polite thing: "Here's every element, class and relevant ID we're using in the document, and how we're using them -- no need to try to determine it all again by hand and eye."

Not home now, but I'm gonna keep going with this. I'll add the manifest next, then I think I'll move on to determining elements and classes and etc. for the various pieces of a book.

Your comments about <h> vs. <div>s are right on (and thanks for educating me regarding <div>s.) I'll definitely be doing that, or some variant of it.

m a r

gwynevans
05-20-2009, 05:05 AM
There's some CSS 'RefCardz'(!) at DZone that might be worth a look
- http://refcardz.dzone.com/refcardz/corecss-part1
- http://refcardz.dzone.com/refcardz/corecss2 &
- http://refcardz.dzone.com/refcardz/corecss3

Registration required, but it's a legit site.

rogue_ronin
05-20-2009, 11:56 AM
There's some CSS 'RefCardz'(!) at DZone that might be worth a look
- http://refcardz.dzone.com/refcardz/corecss-part1
- http://refcardz.dzone.com/refcardz/corecss2 &
- http://refcardz.dzone.com/refcardz/corecss3

Registration required, but it's a legit site.

They look good, but I'm remaining anonymous!

:cool:

m a r

rogue_ronin
05-21-2009, 08:43 AM
Back home again for a while, so here we go...

I think this will do as a tentative final format for the head, and all meta info. You can't use <div>s in the head, right?


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>A Princess of Mars</title>

<!-- BEGIN: DOCUMENT HISTORY -->

<!-- Created on 20/May/2004 -->
<!-- Revision # 0.10 on 30/Jun/2004 -->
<!-- Revision # 0.20 on 28/Dec/2004 -->
<!-- Revision # 0.40 on 13/Apr/2005 -->
<!-- Revision # 0.70 on 30/Sep/2006 -->
<!-- Current Revision # 0.80 on 18/May/2009 -->

<!-- END: DOCUMENT HISTORY -->

<!-- BEGIN: REVISION GUIDELINE -->

<!--
0.10 :: Initial Conversion
0.20 :: Cover and Frontispiece
0.30 :: Sections, Chapters and TOC
0.40 :: Endnotes and/or Blockquotes
0.50 :: Initial Spellcheck
0.60 :: M-dashes and Hyphens and Ellipses
0.70 :: Italics, Bold, and Pre-Formatted Text
0.80 :: Reading Proof
0.90 :: Checked Against Canonical Source
1.00 :: Final Version -- Optimal
1.00+ :: Minor Error Corrections
-->

<!-- END: REVISION GUIDELINE -->

<!-- BEGIN: EBOOK META INFORMATION -->

<meta name="filename" content="APrincessOfMars" />
<meta name="fileid" content="FoundText0085" />
<meta name="filecreationdate" content="20/May/2004" />
<meta name="fileversion" content="0.80" />
<meta name="filerevisiondate" content="18/May/2009" />
<meta name="filesource" content="University of Virginia Electronic Text Center" />
<meta name="filescanner" content="Judy Boss" />
<meta name="fileproofer" content="Kelly Tetterton" />
<meta name="fileproofer" content="Peter-John Byrnes" />
<meta name="fileproofer" content="Found Text (foundtext@gmail.com)" />

<meta name="title" content="A Princess of Mars" />
<meta name="subtitle" content="Barsoom #01" />
<meta name="series" content="Barsoom" />
<meta name="seriesnumber" content="01" />
<meta name="genre" content="Science Fiction::General" />

<meta name="author" content="Edgar Rice Burroughs" />
<meta name="authorlast" content="Burroughs" />
<meta name="authorfirst" content="Edgar" />
<meta name="authormiddle" content="Rice" />
<meta name="authoralpha" content="Burroughs, Edgar Rice" />

<meta name="illustrator" content="Frank Frazetta" />
<meta name="illustratorlast" content="Frazetta" />
<meta name="illustratorfirst" content="Frank" />
<meta name="illustratormiddle" content="" />
<meta name="illustratoralpha" content="Frazetta, Frank" />

<meta name="publisher" content="Found Text" />
<meta name="publicationdate" content="08/July/2010" />
<meta name="publicationcity" content="Honolulu" />
<meta name="publicationcity" content="Bangkok" />

<meta name="copyrightholder" content="" />
<meta name="copyrightdate" content="" />

<meta name="isbn" content="" />

<!-- END: EBOOK META INFORMATION -->

<!-- BEGIN: STRUCTURE HINTS -->

<!--
<h1 class="title"> :: Title of book
<h2 class="subtitle"> :: Subtitle of book
<h3 class="chapter"> :: Chapter headings
<p class="normal"> :: regular paragraph
<p class="epigram"> :: quotation that opens chapters
<em class="psionic"> :: telepathic communication
etc. etc.
-->

<!-- END: STRUCTURE HINTS -->

<!-- BEGIN: MANIFEST -->

<!--
APrincessOfMars.html :: main document, this file
images\cover.png :: cover image, 1-bit, 314x480px
images\arrow_down.png :: chapter navigation down button, 1-bit, 30x30px
images\arrow_up.png :: chapter navigation up button, 1-bit, 30x30px
images\bar.png :: decoration, 1-bit, 150x9px
images\book_plate.png :: series logo, or frontispiece image, 1-bit, 314x224px
images\end_of_book.png :: colophon image, closes book, 1-bit, 250x170px
images\logo.png :: publisher logo, 1-bit, 70x70px
images\return.png :: endnote return button, 1-bit, 40x13px
images\toc.png :: navigation button, links to Table of Contents, 1-bit, 30x30px
sounds\logo.wav :: publisher logo sound, 8 bit, unsigned single channel (mono), 16khz sample rate, 16KB/s
-->

<!-- END: MANIFEST -->

</head>


Using the format of "item :: description" for the comments/info. The structure hints are the actual tag, the manifest uses relative path.

I guess that leaves me with only two questions remaining for meta info: 1) If <div>s can be used in the head, then maybe the BEGIN and END comments should be changed to <div>s? And 2) When/if there are more than one author or illustrator, should there be a numbering system -- as there are 4 entries for each name, would it be easier (or necessary) to parse based on numbers or positioning?

Moving on to structure, this is what I'm thinking most books have. I got a lot of this from a page on book structure years ago, from the "George A. Smathers Libraries Digital Library Center". (The page is gone now.)

I've modified some of the pieces a bit for ebook use...


Cover (links to the first of Preface, Foreword, Part or Chapter; quick start)
Frontispiece (Half-title, illustration, and/or series list)
Front Matter (generic for pre-book junk)
Title Page (Title, Author, Illustrator)
Verso Page (book meta info page)
Inscription ("To So-and-So")
Acknowledgments ("Thanks!")
Preface (usually by another author/editor)
Table of Illustrations/Maps (with links)
Table of Contents (with links)
Foreword (comments by the author)
Parts (sometimes called "Books", has navigation links)

Prologue (has navigation links)
Chapters (has navigation links)

Chapter Title (name of the chapter)
Epigrams (quotations that open chapters)
Illustrations/Images/Maps/Tables
Scene Break (blank lines or "* * *")
Sections

Sub-Sections

Paragraphs


Pull-Quotes (quotations from the text)

Epilogue (has navigation links)

Afterword (comments by the author, has navigation links)
About the Author Page (pic and bio)
Colophon (production notes and link to cover -- "closes" book)
Endnotes (definitely linked and back-linked)
Glossary (possibly with links)
Index (preferably with links)
End Matter (generic for post-book junk)


Is there anything else I should add, remove, rename or re-arrange? Next step will be to pick tags for each piece, once I'm happy with the overall structure. Not every book has everything, I'm just trying to come up with a master structure that should serve 90%, or more, of books.

m a r

pdurrant
05-21-2009, 08:56 AM
I don't think you should be so prescriptive about the order of things between the cover and the parts.

Indeed, in a fiction ebook I much prefer to nearly all that stuff at the back of the book, with links to it from the contents menu.




Cover (links to the first of Preface, Foreword, Part or Chapter; quick start)
Frontispiece (Half-title, illustration, and/or series list)
Front Matter (generic for pre-book junk)
Title Page (Title, Author, Illustrator)
Verso Page (book meta info page)
Inscription ("To So-and-So")
Acknowledgments ("Thanks!")
Preface (usually by another author/editor)
Table of Illustrations/Maps (with links)
Table of Contents (with links)
Foreword (comments by the author)
Parts (sometimes called "Books", has navigation links)

Prologue (has navigation links)
Chapters (has navigation links)

Chapter Title (name of the chapter)
Epigrams (quotations that open chapters)
Illustrations/Images/Maps/Tables
Scene Break (blank lines or "* * *")
Sections

Sub-Sections

Paragraphs


Pull-Quotes (quotations from the text)

Epilogue (has navigation links)

Afterword (comments by the author, has navigation links)
About the Author Page (pic and bio)
Colophon (production notes and link to cover -- "closes" book)
Endnotes (definitely linked and back-linked)
Glossary (possibly with links)
Index (preferably with links)
End Matter (generic for post-book junk)


Is there anything else I should add, remove, rename or re-arrange? Next step will be to pick tags for each piece, once I'm happy with the overall structure. Not every book has everything, I'm just trying to come up with a master structure that should serve 90%, or more, of books.

m a r

rogue_ronin
05-21-2009, 09:12 AM
So, you would have:

Cover
Table of Contents
Parts, Chapters, etc
Everything that normally comes before the Parts
Afterword, etc.

Is that right? Do you do this so that you can get right into the book? Does your reader have a touchscreen, or way to navigate links?

m a r

pdurrant
05-21-2009, 09:38 AM
Personally, I'd have

Cover
Title Page
(Possibly Dedication)
Parts
Everything else

I generally read Mobipocket format eBooks. They have a "Go To" menu that's usually populated with links to Start of Book, Table of Contents, etc. So to navigate in the book, I just bring up that menu and choose.

For example, the book I'm reading now "Morality for Beautiful Girls" has the following items on the "Go To" menu:

First Page
Start Reading
Table of Contents
Last Page

So getting to the Table of Contents takes the same time no matter where it is. So there's no point in having it at the front, although this book does do that.

I have a CyBook, so no touch screen. When reading a book it's quite quick to being up the main menu, select to the Go To menu, and then choose a desination from there.

So, you would have:

Cover
Table of Contents
Parts, Chapters, etc
Everything that normally comes before the Parts
Afterword, etc.

Is that right? Do you do this so that you can get right into the book? Does your reader have a touchscreen, or way to navigate links?

m a r

pepak
05-21-2009, 09:49 AM
Back home again for a while, so here we go...
A few comments:
- I think you will have trouble with authorfirst/authorlast/illustratorfirst/illustratorlast if a book has multiple authors/illustrators.
- The classes seem superfluous: Personally, I prefer to use classes only to modify the default structural information. E.g. <h1>, as the "top header", is always used for title, unless class specifies something else. Similarly, <p> is always a common paragraph; I will only add class if I want to specify that it is not a normal paragraph after all.
- Not sure what would the navigation buttons be used for.

You can't use <div>s in the head, right?
You can't.

1) If <div>s can be used in the head, then maybe the BEGIN and END comments should be changed to <div>s?
You can't. Even if you could, that would make the metainformation visible, which is not a good thing, IMO.

And 2) When/if there are more than one author or illustrator, should there be a numbering system -- as there are 4 entries for each name, would it be easier (or necessary) to parse based on numbers or positioning?
I would combine all info about one author into one meta, then used multiple instances of said meta to describe multiple authors:
<meta name="author" content="Raymond E. Feist|Feist|Raymond E.|feist@midkemia.com" />
<meta name="author" content="Janny Wurts|Wurts|Janny|" />

rogue_ronin
05-21-2009, 12:25 PM
Personally, I'd have

Cover
Title Page
(Possibly Dedication)
Parts
Everything else

I generally read Mobipocket format eBooks. They have a "Go To" menu that's usually populated with links to Start of Book, Table of Contents, etc. So to navigate in the book, I just bring up that menu and choose.

For example, the book I'm reading now "Morality for Beautiful Girls" has the following items on the "Go To" menu:

First Page
Start Reading
Table of Contents
Last Page

So getting to the Table of Contents takes the same time no matter where it is. So there's no point in having it at the front, although this book does do that.

I have a CyBook, so no touch screen. When reading a book it's quite quick to being up the main menu, select to the Go To menu, and then choose a desination from there.

The REB1100 has a GoTo menu, also. (Only 7 items, but still useful.) And I usually automatically populate it with a TOC link, First Page link and a Verso link (info about the book.) In addition, I add Next Chapter, Last Chapter and TOC buttons at each chapter heading. So you can just bounce through the book -- but that's for a touch screen of course, or for some other way of selecting links.

Given that you're looking to jump to the TOC, nothing about the structure I've offered would stop you from populating that GoTo menu exactly as you've described, and getting to it immediately. If you don't have a limit on the number of entries, you could include every chapter and other element too (Preface, About the Author, etc.) The difference only comes when you page manually through the book.

There are two things, I think, that your comments (thankfully) suggest to me.

One is that there is a difference between the format for the reader and the purpose of the XHTML specification that I'm trying to work out. Given a comprehensive, rational spec, anyone could transform it easily (ridiculously, scriptably easily) into any form, order or format that works for them and for their hardware. Slap it into Calibre, you've got ePub -- properly separated, etc. rbmake would love this spec, (you might have to use some regex on it for new-pages, but rbmake itself lets you do that) and smack it right into an RB file. I'm sure that the mobipocket converter would recognize it -- might even be able to generate that TOC automatically, but I've no experience with it. I'm certain that someone expert could do it easily.

It's an archiving spec, essentially, although it's readable by anything that reads HTML. It's hardware neutral. It's easily parseable. It's human readable. It is as simple as possible, without losing information. It accurately represents the structure of a book.

Second, if I do this properly, with meta and structure strictly controlled, CSS can do things like change layout such that you reorder the book (at least I think so; wizards please chime in.) At the very least, the CSS would be able to suppress any undesired pieces of the book, given that they will be properly labeled (ie: div.frontispiece { display: none } ) . Just offer you a custom CSS file -- easy to do -- and every book that you get from this spec will appear as you wish it to.

As a corollary to the above ideas: I like opening books and seeing the stuff before the TOC. Real, physical books I mean. I know that we're not talking about the same thing, and that we're not bound to forms that grow from different media -- but I like the traditions of offering you the mental framework of reading, the experience of it. I'm not a typography nut, nor do I read every detail of the printing history of a book when I open it. But I think that the stuff that opens a book (aside from the modern addition of advertisements) are a reflection of the wisdom of crowds -- generations of people kept the best practices and added new ones when they thought of them. The structure of a book is integral to the way it works, and it works in more ways than reading the stories, and I'd like to support that if I can.

So this is a long way of saying that we can both have what we want from this; but the archival nature of the spec means (to me) that the structure of books must be reflected in the structure of the spec. Traditionally, Prefaces appear before TOCs -- but TOCs usually make reference to them, which is great in the new world of links.

When I finish this, I'll convert A Princess of Mars into it; take a look at it (in your browser, even) and I think you'll like the functionality, and hopefully I'll even make a CSS that adds beauty to it. We'll see.

Thanks for provoking me,

m a r

pepak
05-21-2009, 12:30 PM
if I do this properly, with meta and structure strictly controlled, CSS can do things like change layout such that you reorder the book (at least I think so; wizards please chime in.)
Tim the Enchanter quoth, 'Yes'.

DaleDe
05-21-2009, 12:43 PM
I would add: Language and rights to the meta tags. language=en and rights="public domain" (this is the ePUB name for license). There should also be a unique identifier, ISBN or equivalent. id="xxxxx". A personal favorite of mine is the description. This is a short description of the eBook. It is often used by dealer to describe the book and can be viewed in some reader programs before opening the book. The metadata wiki article has some ideas. DublinCore has the official name for terms. You may want to conform.

You might want to make the latest revision machine readable by pulling it out of the comment.

Dale

rogue_ronin
05-21-2009, 12:52 PM
A few comments:
- I think you will have trouble with authorfirst/authorlast/illustratorfirst/illustratorlast if a book has multiple authors/illustrators.

I think so too, re: "should they have numbers?" I think I'm trying to predict incompatibilities -- I mean, in my head I'm assuming that a <meta> like "Author" is so common that I need to use it in a "traditional" way. But your idea below--


I would combine all info about one author into one meta, then used multiple instances of said meta to describe multiple authors:

<meta name="author" content="Raymond E. Feist|Feist|Raymond E.|feist@midkemia.com" />
<meta name="author" content="Janny Wurts|Wurts|Janny|" />



--made me think of this:

<meta name="author" content="Raymond|E.|Feist|" />
<meta name="author" content="Janny||Wurts|" />
<meta name="author" content="T.|K. F.|Weisskopf|" />

Which is stupid-easy to parse for separate values, and if it got read by some meta-utility as a single value, it would still be readable. What do you think? Similar for Illustrator, too, of course.

Twice now you've suggested email addresses. Given what I've suggested above, perhaps a different solution occurs to you? I don't want to put the email in the author slot, although I think it works in the proofer slot because it's so much less important, and not likely to be used for organizing...

The classes seem superfluous: Personally, I prefer to use classes only to modify the default structural information. E.g. <h1>, as the "top header", is always used for title, unless class specifies something else. Similarly, <p> is always a common paragraph; I will only add class if I want to specify that it is not a normal paragraph after all.

Yeah, I think you're right -- any class names, or element names above are really just placeholders for now. Just using them to nail down the meta-section pattern. I've laid out some structural elements in a post above -- I'm open to your suggestions.

- Not sure what would the navigation buttons be used for.

Look at the my response to pdurrant above -- navigating from place to place in the book. (You can't create links via CSS can you?)


You can't [put <div>s in the head.] Even if you could, that would make the metainformation visible, which is not a good thing, IMO.


Right. 'nuff said, no <div>s in the head.

m a r

rogue_ronin
05-21-2009, 01:14 PM
I would add: Language and rights to the meta tags. language=en and rights="public domain" (this is the ePUB name for license).

Like the language idea. I'll add it. The rights idea -- I have a "copyrightholder" tag already, I could simply use "public domain" as its value.

There should also be a unique identifier, ISBN or equivalent. id="xxxxx".

Both "ISBN" and "fileid" are already in the proposal.

A personal favorite of mine is the description. This is a short description of the eBook. It is often used by dealer to describe the book and can be viewed in some reader programs before opening the book.

Another good idea. It's in!

The metadata wiki article has some ideas. DublinCore has the official name for terms. You may want to conform.

I may. If you know the terms, you could save me some research. :rolleyes:

You might want to make the latest revision machine readable by pulling it out of the comment.

It's in both places. The commented version is for easy human readable access. Look farther down and you'll see both version number and revision date in the <meta> file section.

m a r

rogue_ronin
05-21-2009, 01:51 PM
Okay, after input from both DaleDe and pepak, here is an updated and rearranged example of a meta-head:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>A Princess of Mars</title>

<!-- BEGIN: DOCUMENT HISTORY -->

<!-- Created on 20/May/2004 -->
<!-- Revision # 0.10 on 30/Jun/2004 -->
<!-- Revision # 0.20 on 28/Dec/2004 -->
<!-- Revision # 0.40 on 13/Apr/2005 -->
<!-- Revision # 0.70 on 30/Sep/2006 -->
<!-- Current Revision # 0.80 on 18/May/2009 -->

<!-- END: DOCUMENT HISTORY -->

<!-- BEGIN: REVISION GUIDELINE -->

<!--
0.10 :: Initial Conversion
0.20 :: Cover and Frontispiece
0.30 :: Sections, Chapters and TOC
0.40 :: Endnotes and/or Blockquotes
0.50 :: Initial Spellcheck
0.60 :: M-dashes and Hyphens and Ellipses
0.70 :: Italics, Bold, and Pre-Formatted Text
0.80 :: Reading Proof
0.90 :: Checked Against Canonical Source
1.00 :: Final Version -- Optimal
1.00+ :: Minor Error Corrections
-->

<!-- END: REVISION GUIDELINE -->

<!-- BEGIN: EBOOK META INFORMATION -->

<meta name="filename" content="APrincessOfMars" />
<meta name="fileid" content="FoundText0085" />
<meta name="filecreationdate" content="20/May/2004" />
<meta name="fileversion" content="0.80" />
<meta name="filerevisiondate" content="18/May/2009" />
<meta name="filesource" content="University of Virginia Electronic Text Center" />
<meta name="filescanner" content="Judy Boss" />
<meta name="fileproofer" content="Kelly Tetterton" />
<meta name="fileproofer" content="Peter-John Byrnes" />
<meta name="fileproofer" content="Found Text (foundtext@gmail.com)" />

<meta name="title" content="A Princess of Mars" />
<meta name="subtitle" content="Barsoom #01" />
<meta name="series" content="Barsoom" />
<meta name="seriesnumber" content="01" />

<meta name="author" content="Edgar|Rice|Burroughs|" />
<meta name="illustrator" content="Frank||Frazetta|" />

<meta name="genre" content="Science Fiction::General" />
<meta name="isbn" content="" />
<meta name="language" content="en" />
<meta name="description" content="" />

<meta name="publisher" content="Found Text" />
<meta name="publicationdate" content="08/July/2010" />
<meta name="publicationcity" content="Honolulu" />
<meta name="publicationcity" content="Bangkok" />

<meta name="copyrightholder" content="Public Domain" />
<meta name="copyrightdate" content="" />

<!-- END: EBOOK META INFORMATION -->

<!-- BEGIN: STRUCTURE HINTS -->

<!--
<h1> :: Title of book
<h2 class="subtitle"> :: Subtitle of book
<h3 class="chapter"> :: Chapter headings
<p> :: regular paragraph
<p class="epigram"> :: quotation that opens chapters
<em class="psionic"> :: telepathic communication
etc. etc.
-->

<!-- END: STRUCTURE HINTS -->

<!-- BEGIN: MANIFEST -->

<!--
APrincessOfMars.html :: main document, this file
images\cover.png :: cover image, 1-bit, 314x480px
images\arrow_down.png :: chapter navigation down button, 1-bit, 30x30px
images\arrow_up.png :: chapter navigation up button, 1-bit, 30x30px
images\bar.png :: decoration, 1-bit, 150x9px
images\book_plate.png :: series logo, or frontispiece image, 1-bit, 314x224px
images\end_of_book.png :: colophon image, closes book, 1-bit, 250x170px
images\logo.png :: publisher logo, 1-bit, 70x70px
images\return.png :: endnote return button, 1-bit, 40x13px
images\toc.png :: navigation button, links to Table of Contents, 1-bit, 30x30px
sounds\logo.wav :: publisher logo sound, 8 bit, unsigned single channel (mono), 16khz sample rate, 16KB/s
-->

<!-- END: MANIFEST -->

</head>

DaleDe
05-21-2009, 03:36 PM
copyright holder is slightly different I think especially for creative commons licenses. Here is the location of the dublin core specifications. This is currently used in ePUB and earlier forms of this documentation. http://dublincore.org/
As I mentioned there is also metadata as a topic in our wiki.

Dale

rogue_ronin
05-22-2009, 04:53 AM
copyright holder is slightly different I think especially for creative commons licenses. Here is the location of the dublin core specifications. This is currently used in ePUB and earlier forms of this documentation. http://dublincore.org/
As I mentioned there is also metadata as a topic in our wiki.

Dale

I looked a the metadata page on the wiki. But the DublinCore stuff is way to involved to scan: and it's focused on XML. I'm trying to keep it simple... :)

And I want to be careful not to try and re-create ePub here.

Still, there are a few things from the wiki that are worth discussing:

keywords: effectively tags. Worth adding?

comments: Not sure that I need to do this, but I'm open to argument.

identifier: the main issue is, should I rename "fileid" to "identifier"? Can't think of a good reason -- identifier seems too abstract.

editor: might add this -- it's not from the wiki, exactly, but is mentioned in the "creator/contributor" section. Creator and contributor seem too general to me, but I'm open to arguments.

subject: isn't genre enough? Also, I should maybe show y'all the genre list I found and use. It's really more like a subject list.

date: I'm thinking maybe it should be yyyy/mmm/dd, but not yyyy/mm/dd -- the numbers are confusing, but 3-letter code for months is optimal.

rights: I'm not sure about this. Open Source, Public Domain, Creative Commons -- and what do you put for something under copyright? Is there anything else?

m a r

gwynevans
05-22-2009, 05:29 AM
date: I'm thinking maybe it should be yyyy/mmm/dd, but not yyyy/mm/dd -- the numbers are confusing, but 3-letter code for months is optimal.


Optimal?

I think you'd be better off going with the yyyy-mm-dd format of the ISO 8601 (http://en.wikipedia.org/wiki/ISO_8601) standard.

One of the problems you'll have with mmm is Locale - for example, in French, the first three letters of June and July are both 'jui' (juin and juillet)!

rogue_ronin
05-22-2009, 05:44 AM
Optimal?

Bad use of word. "Preferable to my limited sensibilities" is more accurate.


I think you'd be better off going with the yyyy-mm-dd format of the ISO 8601 (http://en.wikipedia.org/wiki/ISO_8601) standard.

One of the problems you'll have with mmm is Locale - for example, in French, the first three letters of June and July are both 'jui' (juin and juillet)!

I surrender to you, to pepak, to the wiki, to ePub, to wikipedia, to ISO 8601 etc. I'll switch it to yyyy/mm/dd. :o



:)

m a r

pepak
05-22-2009, 07:49 AM
We won! Yahooo!!!! :-)

rogue_ronin
05-23-2009, 12:23 AM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>A Princess of Mars</title>

<!-- BEGIN: FILE HISTORY -->

<!-- Created on 2004/05/20 -->
<!-- Revision # 0.10 on 2004/06/30 -->
<!-- Revision # 0.20 on 2004/12/28 -->
<!-- Revision # 0.40 on 2005/04/13 -->
<!-- Revision # 0.70 on 2006/09/30 -->
<!-- Current Revision # 0.80 on 2009/05/18 -->

<!-- END: FILE HISTORY -->

<!-- BEGIN: REVISION GUIDELINE -->

<!--
0.10 :: Initial Conversion
0.20 :: Cover and Frontispiece
0.30 :: Sections, Chapters and TOC
0.40 :: Endnotes and/or Blockquotes
0.50 :: Initial Spellcheck
0.60 :: M-dashes and Hyphens and Ellipses
0.70 :: Italics, Bold, and Pre-Formatted Text
0.80 :: Reading Proof
0.90 :: Checked Against Canonical Source
1.00 :: Final Version -- Optimal
1.++ :: Minor Error Corrections
-->

<!-- END: REVISION GUIDELINE -->

<!-- BEGIN: EBOOK META INFORMATION -->

<meta name="filename" content="APrincessOfMars" />
<meta name="fileid" content="FoundText0085" />
<meta name="filecreationdate" content="2004/05/20" />
<meta name="fileversion" content="0.80" />
<meta name="filerevisiondate" content="2009/05/18" />
<meta name="filesource" content="University of Virginia Electronic Text Center" />
<meta name="filescanner" content="Judy Boss" />
<meta name="fileproofer" content="Kelly Tetterton" />
<meta name="fileproofer" content="Peter-John Byrnes" />
<meta name="fileproofer" content="Found Text (foundtext@gmail.com)" />
<meta name="filecomment" content="This file has been proofed by reading, but not checked against a paper source. Wikipedia has a nice article about this title. FOUND TEXT RAWX!!1!" />

<meta name="title" content="A Princess of Mars" />
<meta name="subtitle" content="Barsoom #01" />
<meta name="series" content="Barsoom" />
<meta name="seriesnumber" content="01" />

<meta name="author" content="Edgar|Rice|Burroughs|" />
<meta name="illustrator" content="Frank|E.|Schoonover" />
<meta name="editor" content="Newell|Metcalf" />

<meta name="genre" content="Science Fiction::General" />
<meta name="isbn" content="" />
<meta name="language" content="en" />
<meta name="description" content="" />
<meta name="keywords" content="Mars, classics, swords, planetary romance" />

<meta name="publisher" content="Found Text" />
<meta name="publicationdate" content="2010/07/08" />
<meta name="publicationcity" content="Honolulu" />
<meta name="publicationcity" content="Bangkok" />

<meta name="copyrightholder" content="" />
<meta name="copyrightdate" content="" />
<meta name="copyrightlicense" content="Public Domain" />

<!-- END: EBOOK META INFORMATION -->

<!-- BEGIN: STRUCTURE HINTS -->

<!--
<h1> :: Title of book
<h2 class="subtitle"> :: Subtitle of book
<h3 class="chapter"> :: Chapter headings
<p> :: regular paragraph
<p class="epigram"> :: quotation that opens chapters
<em class="psionic"> :: telepathic communication
etc. etc.
-->

<!-- END: STRUCTURE HINTS -->

<!-- BEGIN: MANIFEST -->

<!--
APrincessOfMars.html :: main document, this file
images\cover.png :: cover image, 1-bit, 314x480px
images\arrow_down.png :: chapter navigation down button, 1-bit, 30x30px
images\arrow_up.png :: chapter navigation up button, 1-bit, 30x30px
images\bar.png :: decoration, 1-bit, 150x9px
images\book_plate.png :: series logo, or frontispiece image, 1-bit, 314x224px
images\end_of_book.png :: colophon image, closes book, 1-bit, 250x170px
images\logo.png :: publisher logo, 1-bit, 70x70px
images\return.png :: endnote return button, 1-bit, 40x13px
images\toc.png :: navigation button, links to Table of Contents, 1-bit, 30x30px
sounds\logo.wav :: publisher logo sound, 8 bit, unsigned single channel (mono), 16khz sample rate, 16KB/s
-->

<!-- END: MANIFEST -->

</head>


Changes!

Renamed DOCUMENT HISTORY to FILE HISTORY for consistency.

keywords: added as "keywords" in the book-itself-info section. I imagine it would be useful for search, assuming it doesn't repeat things in the other tags.

comments: added as "filecomments". I guess there could be something important to know. Or folks could use it to brag.

identifier: staying with "fileid" -- which should be a reasonable attempt at a unique ID.

editor: added, using same format as "author" and "illustrator", so multiple editors are possible.

subject: staying with simply "genre", at least for now.

date: switched all to yyyy/mm/dd. And there was much rejoicing!

rights: Added it, as "copyrightlicense": I can see where it might be useful. "Open Source", "Public Domain", "Creative Commons", "CopyLeft" -- What do you put for something under copyright? "Closed" or "Private" or "Commercial"? Is there any other license?

If you think of anything else let me know. I'm still looking for a good idea about email addresses that doesn't "pollute" the name entries. How about a single "contact" entry?

Anyone want my assembled list of genres?

m a r

rogue_ronin
05-24-2009, 02:08 AM
This is what I'm thinking...

It took a while, and I'm probably still missing things and making mistakes. I first over-used the "id" attribute. I think I pruned it pretty well, and only used classes where necessary, and at the highest levels I could.

Anything in ALL CAPS is a value determined by your naming convention or content needs. Hope you're not confused by the outline: I thought it best to name what I'm working on...



1. Cover
<div class="Spine" id="Cover">
<a href="#START_OF_BOOK ID">
<img src="images/cover.png" />
</a>
</div>

2. Frontispiece
<div class="Spine" id="Frontispiece">
<h2>TITLE/SERIES NAME</h2>
<ul>
<li>SERIES LIST TITLES</li>
</ul>
<img src="images/frontispiece.png" />
</div>

3. Front Matter
<div class="Spine" id="FrontMatter">
<h2>FRONT MATTER HEADING</h2>
<p>FRONT MATTER CONTENT (BLURBS, JUNK, ADS, WHATEVER)</p>
</div>

4. Title Page
<div class="Spine" id="TitlePage">
<h1>TITLE</h1>
<p id="Subtitle">SUBTITLE</p>
<p id="Author">AUTHOR</p>
<p id="Illustrator">ILLUSTRATOR</p>
</div>

5. Verso
<div class="Spine" id="Verso">
<h2>VERSO HEADING</h2>
<a href="sounds/logo.wav">
<img src="images/logo.png">
</a>
<p id="PublisherBlurb">PUBLISHER BLURB</p>
<p id="VersionNumber">VERSION NUMBER</p>
<p id="RevisionDate">REVISION DATE</p>
<p id="OriginalSource">ORIGINAL SOURCE</p>
<p id="Scanner">SCANNER</p>
<p id="Proofer">PROOFER(S)</p>
</div>

6. Inscription
<div class="Spine" id="Inscription">
<h2>INSCRIPTION HEADING</h2>
<p>INSCRIPTION CONTENT</p>
</div>

7. Acknowledgment
<div class="Spine" id="Acknowledgment">
<h2>ACKNOWLEDGMENT HEADING</h2>
<p>ACKNOWLEDGMENT CONTENT</p>
</div>

8. Preface
<div class="Spine" id="Preface">
<h2>PREFACE HEADING</h2>
<p>PREFACE CONTENT</p>
</div>

9. Table of Illustrations
<div class="Spine" id="TableOfIllustrations">
<h2>TABLE OF ILLUSTRATIONS HEADING</h2>
<ul>
<li>
<a href="#ILLUSTRATION ID">ILLUSTRATION NAME</a>
</li>
</ul>
</div>

10. Table of Maps
<div class="Spine" id="TableOfMaps">
<h2>TABLE OF MAPS HEADING</h2>
<ul>
<li>
<a href="#MAP ID">MAP NAME</a>
</li>
</ul>
</div>

11. Table of Tables
<div class="Spine" id="TableOfTables">
<h2>TABLE OF TABLES HEADING</h2>
<ul>
<li>
<a href="#TABLE ID">TABLE NAME</a>
</li>
</ul>
</div>

12. Table of Contents
<div class="Spine" id="TableOfContents">
<h2>TABLE OF CONTENTS HEADING</h2>
<ul>
<li>
<a href="#CONTENT ID">CONTENT NAME</a>
</li>
</ul>
</div>

13. Introduction
<div class="Spine" id="Introduction">
<h2>INTRODUCTION HEADING</h2>
<p>INTRODUCTION CONTENT</p>
</div>


14. Parts
<div class="Spine" id="PART ID">
<h2>PART HEADING</h2>
<p>PART BLURB<p>
</div>

A. Prologue
<div class="Body" id="Prologue">
<h3>PROLOGUE HEADING</h3>
<ul class="NavLinks"
<li>
<a href="#PREVIOUS CHAPTER ID">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT CHAPTER ID">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p class="Epigram">EPIGRAM</p>
<p class="PullQuote">PULL QUOTE</p>
<p>APPENDIX CONTENT</p>
<p class="SceneBreak">&nbsp;</p>
<img id="MAP ID" class="Map" src="images/MAPNAME.EXT" />
<img id="ILLUSTRATION ID" class="Illustration" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID">TABLE CONTENTS</table>
<a id="LINK-TO-ENDNOTE ID" class="EndNoteLink" href="END NOTE ID">LINK-TO-ENDNOTE NAME</a>
</div>

B. Chapters
<div class="Body" id="CHAPTER ID">
<h3>CHAPTER HEADING</h3>
<ul class="NavLinks"
<li>
<a href="#PREVIOUS CHAPTER ID">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT CHAPTER ID">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p class="Epigram">EPIGRAM</p>
<p class="PullQuote">PULL QUOTE</p>
<p>APPENDIX CONTENT</p>
<p class="SceneBreak">&nbsp;</p>
<img id="MAP ID" class="Map" src="images/MAPNAME.EXT" />
<img id="ILLUSTRATION ID" class="Illustration" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID">TABLE CONTENTS</table>
<a id="LINK-TO-ENDNOTE ID" class="EndNoteLink" href="END NOTE ID">LINK-TO-ENDNOTE NAME</a>
</div>

C. Epilogue
<div class="Body" id="Epilogue">
<h3>EPILOGUE HEADING</h3>
<ul class="NavLinks"
<li>
<a href="#PREVIOUS CHAPTER ID">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT CHAPTER ID">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p class="Epigram">EPIGRAM</p>
<p class="PullQuote">PULL QUOTE</p>
<p>APPENDIX CONTENT</p>
<p class="SceneBreak">&nbsp;</p>
<img id="MAP ID" class="Map" src="images/MAPNAME.EXT" />
<img id="ILLUSTRATION ID" class="Illustration" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID">TABLE CONTENTS</table>
<a id="LINK-TO-ENDNOTE ID" class="EndNoteLink" href="END NOTE ID">LINK-TO-ENDNOTE NAME</a>
</div>

D. Appendices
<div class="Body" id="APPENDIX ID">
<h3>APPENDIX HEADING</h3>
<ul class="NavLinks"
<li>
<a href="#PREVIOUS CHAPTER ID">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT CHAPTER ID">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p class="Epigram">EPIGRAM</p>
<p class="PullQuote">PULL QUOTE</p>
<p>APPENDIX CONTENT</p>
<p class="SceneBreak">&nbsp;</p>
<img id="MAP ID" class="Map" src="images/MAPNAME.EXT" />
<img id="ILLUSTRATION ID" class="Illustration" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID">TABLE CONTENTS</table>
<a id="LINK-TO-ENDNOTE ID" class="EndNoteLink" href="END NOTE ID">LINK-TO-ENDNOTE NAME</a>
</div>


15. Afterword
<div class="Spine" id="Afterword">
<h2>AFTERWORD HEADING</h2>
<p>AFTERWORD CONTENT<p>
</div>

16. About the Author Page
<div class="Spine" id="AboutTheAuthor">
<h2>ABOUT THE AUTHOR HEADING</h2>
<p>ABOUT THE AUTHOR CONTENT<p>
<img id="ILLUSTRATION ID" class="Illustration" src="images/author.png" />
</div>

17. Colophon
<div class="Spine" id="Colophon">
<h2>COLOPHON HEADING</h2>
<p>COLOPHON CONTENT<p>
<a href="Cover">
<img src="images/colophon.png" />
</a>
</div>

18. Endnotes
<div class="Spine" id="Endnotes">
<h2>ENDNOTES HEADING</h2>
<p id="END NOTE ID">
ENDNOTE CONTENT
<a class="BackLink" href="LINK-TO-ENDNOTE ID">
<img src="images/return.png" />
</a>
<p>
</div>

19. Glossary
<div class="Spine" id="Glossary">
<h2>GLOSSARY HEADING</h2>
<p>GLOSSARY CONTENT<p>
</div>

20. Index
<div class="Spine" id="Index">
<h2>INDEX HEADING</h2>
<p>INDEX CONTENT<p>
</div>

21. End Matter
<div class="Spine" id="EndMatter">
<h2>END MATTER HEADING</h2>
<p>END MATTER CONTENT (BLURBS, JUNK, ADS, WHATEVER)<p>
</div>



Nothing in this is required exactly. (For instance, I cannot think of an example of an Inscription header. So just don't use it.) And CONTENT can include anything, right? But if something needs to explicitly be moved, let me know.

I moved Appendices under Parts; I just thought that it made sense -- formatting in an Appendix would likely be similar to a Chapter, and they seem to me to be of equivalent "rank".

How'd I do?

m a r

DaleDe
05-25-2009, 12:56 PM
You may want to check the wiki on genre and add some of your favorites with explanation if they are missing.

Dale

gwynevans
05-25-2009, 02:36 PM
date: switched all to yyyy/mm/dd. And there was much rejoicing!

While it's your choice, I feel that I need to flag the fact that if you intended the date to be the ISO 8601 standard format (http://en.wikipedia.org/wiki/ISO_8601), those date-element seperators should be hyphens (or not present)...

rogue_ronin
05-25-2009, 10:07 PM
@gwynevans: I'll switch the format. I didn't read the spec, just relying on good advice here.

@dalede: I already have a list of genres, scavenged from the BISAC Subject Headings. (http://www.bisg.org/standards/bisac_subject/major_subjects.html) I expect that they cannot be posted on the wiki.

Anyone have comments on the structure and tag choices?

m a r

rogue_ronin
05-29-2009, 07:07 AM
Here's the spec, without any references to A Princess of Mars. Maybe you can use it.

If anyone sees anything I can improve, I'd love to hear it.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>TITLE</title>

<!-- BEGIN: FILE HISTORY -->

<!-- Created on YYYY-MM-DD -->
<!-- Revision # 0.10 on YYYY-MM-DD -->
<!-- Revision # 0.20 on YYYY-MM-DD -->
<!-- Current Revision # 0.80 on YYYY-MM-DD -->

<!-- END: FILE HISTORY -->

<!-- BEGIN: REVISION GUIDELINE -->

<!--
0.10 :: Initial Conversion
0.20 :: Cover and Frontispiece
0.30 :: Sections, Chapters and TOC
0.40 :: Endnotes and/or Blockquotes
0.50 :: Initial Spellcheck
0.60 :: M-Dashes, Hyphens and Ellipses
0.70 :: Italics, Bold, and Pre-Formatted Text
0.80 :: Reading Proof
0.90 :: Checked Against Canonical Source
1.00 :: Final Version -- Optimal
1.++ :: Minor Error Corrections
-->

<!-- END: REVISION GUIDELINE -->

<!-- BEGIN: EBOOK META INFORMATION -->

<meta name="filename" content="FILENAME" />
<meta name="fileid" content="UNIQUE ID" />
<meta name="filecreationdate" content="YYYY-MM-DD" />
<meta name="fileversion" content="VERSION NUMBER" />
<meta name="filerevisiondate" content="YYYY-MM-DD" />
<meta name="filesource" content="FILE SOURCE" />
<meta name="filescanner" content="NAME OF SCANNER" />
<meta name="fileproofer" content="NAME OF PROOFER (CONTACT INFO)" />
<meta name="filecomment" content="COMMENT" />

<meta name="title" content="TITLE" />
<meta name="subtitle" content="SUBTITLE" />
<meta name="series" content="SERIES NAME" />
<meta name="seriesnumber" content="POSITION IN SERIES" />

<meta name="author" content="FIRST NAME|MIDDLE NAMES|LAST NAME|" />
<meta name="illustrator" content="FIRST NAME|MIDDLE NAMES|LAST NAME|" />
<meta name="editor" content="FIRST NAME|MIDDLE NAMES|LAST NAME|" />

<meta name="genre" content="GENRE/SUBJECT" />
<meta name="isbn" content="ISBN NUMBER" />
<meta name="language" content="TWO-LETTER LOCALE CODE" />
<meta name="description" content="SHORT DESCRIPTION OF BOOK" />
<meta name="keywords" content="TAGS/KEYWORDS" />

<meta name="publisher" content="PUBLISHER" />
<meta name="publicationdate" content="YYYY-MM-DD" />
<meta name="publicationcity" content="CITY NAME" />

<meta name="copyrightholder" content="NAME OF COPYRIGHT HOLDER" />
<meta name="copyrightdate" content="YEAR OF COPYRIGHT" />
<meta name="copyrightlicense" content="COPYRIGHT STATUS OR LICENSE" />

<!-- END: EBOOK META INFORMATION -->

<!-- BEGIN: STRUCTURE HINTS -->

<!--
ELEMENTS USED :: PURPOSE OF ELEMENT IN EBOOK
-->

<!-- END: STRUCTURE HINTS -->

<!-- BEGIN: MANIFEST -->

<!--
LIST OF LINKED FILES BY RELATIVE LOCATION :: DESCRIPTION OF FILE
-->

<!-- END: MANIFEST -->

</head>

<body>

<div class="Spine" id="Cover">
<a href="#START_OF_BOOK ID">
<img src="images/cover.png" />
</a>
</div>


<div class="Spine" id="Frontispiece">
<h2>TITLE/SERIES NAME</h2>
<ul>
<li>SERIES LIST TITLES</li>
</ul>
<img src="images/frontispiece.png" />
</div>


<div class="Spine" id="FrontMatter">
<h2>FRONT MATTER HEADING</h2>
<p>FRONT MATTER CONTENT (BLURBS, JUNK, ADS, WHATEVER)</p>
</div>


<div class="Spine" id="TitlePage">
<h1>TITLE</h1>
<p id="Subtitle">SUBTITLE</p>
<p id="Author">AUTHOR</p>
<p id="Illustrator">ILLUSTRATOR</p>
</div>


<div class="Spine" id="Verso">
<h2>VERSO HEADING</h2>
<a href="sounds/logo.wav">
<img src="images/logo.png">
</a>
<p id="PublisherBlurb">PUBLISHER BLURB</p>
<p id="VersionNumber">VERSION NUMBER</p>
<p id="RevisionDate">REVISION DATE</p>
<p id="OriginalSource">ORIGINAL SOURCE</p>
<p id="Scanner">SCANNER</p>
<p id="Proofer">PROOFER(S)</p>
</div>


<div class="Spine" id="Inscription">
<h2>INSCRIPTION HEADING</h2>
<p>INSCRIPTION CONTENT</p>
</div>


<div class="Spine" id="Acknowledgment">
<h2>ACKNOWLEDGMENT HEADING</h2>
<p>ACKNOWLEDGMENT CONTENT</p>
</div>


<div class="Spine" id="Preface">
<h2>PREFACE HEADING</h2>
<p>PREFACE CONTENT</p>
</div>


<div class="Spine" id="TableOfIllustrations">
<h2>TABLE OF ILLUSTRATIONS HEADING</h2>
<ul>
<li>
<a href="#ILLUSTRATION ID">ILLUSTRATION NAME</a>
</li>
</ul>
</div>


<div class="Spine" id="TableOfMaps">
<h2>TABLE OF MAPS HEADING</h2>
<ul>
<li>
<a href="#MAP ID">MAP NAME</a>
</li>
</ul>
</div>


<div class="Spine" id="TableOfTables">
<h2>TABLE OF TABLES HEADING</h2>
<ul>
<li>
<a href="#TABLE ID">TABLE NAME</a>
</li>
</ul>
</div>


<div class="Spine" id="TableOfContents">
<h2>TABLE OF CONTENTS HEADING</h2>
<ul>
<li>
<a href="#CONTENT ID">CONTENT NAME</a>
</li>
</ul>
</div>


<div class="Spine" id="Introduction">
<h2>INTRODUCTION HEADING</h2>
<p>INTRODUCTION CONTENT</p>
</div>


<div class="Spine" id="PART ID">
<h2>PART HEADING</h2>
<p>PART CONTENT<p>


<div class="Body" id="Prologue">
<h3>PROLOGUE HEADING</h3>
<ul class="NavLinks"
<li>
<a href="#PREVIOUS CHAPTER ID">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT CHAPTER ID">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p class="Epigram">EPIGRAM</p>
<p class="PullQuote">PULL QUOTE</p>
<p>APPENDIX CONTENT</p>
<p class="SceneBreak">&nbsp;</p>
<img id="MAP ID" class="Map" src="images/MAPNAME.EXT" />
<img id="ILLUSTRATION ID" class="Illustration" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID">TABLE CONTENTS</table>
<a id="LINK-TO-ENDNOTE ID" class="EndNoteLink" href="END NOTE ID">LINK-TO-ENDNOTE NAME</a>
</div>


<div class="Body" id="CHAPTER ID">
<h3>CHAPTER HEADING</h3>
<ul class="NavLinks"
<li>
<a href="#PREVIOUS CHAPTER ID">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT CHAPTER ID">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p class="Epigram">EPIGRAM</p>
<p class="PullQuote">PULL QUOTE</p>
<p>APPENDIX CONTENT</p>
<p class="SceneBreak">&nbsp;</p>
<img id="MAP ID" class="Map" src="images/MAPNAME.EXT" />
<img id="ILLUSTRATION ID" class="Illustration" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID">TABLE CONTENTS</table>
<a id="LINK-TO-ENDNOTE ID" class="EndNoteLink" href="END NOTE ID">LINK-TO-ENDNOTE NAME</a>
</div>


<div class="Body" id="Epilogue">
<h3>EPILOGUE HEADING</h3>
<ul class="NavLinks"
<li>
<a href="#PREVIOUS CHAPTER ID">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT CHAPTER ID">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p class="Epigram">EPIGRAM</p>
<p class="PullQuote">PULL QUOTE</p>
<p>APPENDIX CONTENT</p>
<p class="SceneBreak">&nbsp;</p>
<img id="MAP ID" class="Map" src="images/MAPNAME.EXT" />
<img id="ILLUSTRATION ID" class="Illustration" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID">TABLE CONTENTS</table>
<a id="LINK-TO-ENDNOTE ID" class="EndNoteLink" href="END NOTE ID">LINK-TO-ENDNOTE NAME</a>
</div>


<div class="Body" id="APPENDIX ID">
<h3>APPENDIX HEADING</h3>
<ul class="NavLinks"
<li>
<a href="#PREVIOUS CHAPTER ID">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT CHAPTER ID">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p class="Epigram">EPIGRAM</p>
<p class="PullQuote">PULL QUOTE</p>
<p>APPENDIX CONTENT</p>
<p class="SceneBreak">&nbsp;</p>
<img id="MAP ID" class="Map" src="images/MAPNAME.EXT" />
<img id="ILLUSTRATION ID" class="Illustration" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID">TABLE CONTENTS</table>
<a id="LINK-TO-ENDNOTE ID" class="EndNoteLink" href="END NOTE ID">LINK-TO-ENDNOTE NAME</a>
</div>


</div>


<div class="Spine" id="Afterword">
<h2>AFTERWORD HEADING</h2>
<p>AFTERWORD CONTENT<p>
</div>


<div class="Spine" id="AboutTheAuthor">
<h2>ABOUT THE AUTHOR HEADING</h2>
<p>ABOUT THE AUTHOR CONTENT<p>
<img id="ILLUSTRATION ID" class="Illustration" src="images/author.png" />
</div>


<div class="Spine" id="Colophon">
<h2>COLOPHON HEADING</h2>
<p>COLOPHON CONTENT<p>
<a href="Cover">
<img src="images/colophon.png" />
</a>
</div>


<div class="Spine" id="Endnotes">
<h2>ENDNOTES HEADING</h2>
<p id="END NOTE ID">
ENDNOTE CONTENT
<a class="BackLink" href="LINK-TO-ENDNOTE ID">
<img src="images/return.png" />
</a>
</p>
</div>


<div class="Spine" id="Glossary">
<h2>GLOSSARY HEADING</h2>
<p>GLOSSARY CONTENT<p>
</div>


<div class="Spine" id="Index">
<h2>INDEX HEADING</h2>
<p>INDEX CONTENT<p>
</div>


<div class="Spine" id="EndMatter">
<h2>END MATTER HEADING</h2>
<p>END MATTER CONTENT (BLURBS, JUNK, ADS, WHATEVER)<p>
</div>

</body>

</head>

</html>


I changed the date format as gwynevans suggested.

I think I'll convert A Princess of Mars to this layout, and then I'll try to develop a CSS for it.

Help always appreciated.

m a r

radius
07-02-2009, 10:59 AM
Looks like an interesting project (and an interesting choice of scripting language to program it in)...

One comment I have is that you might want to consider changing epigrams from being special paragraphs into being divs.

Some reasons:

- Although they are typically short, you may run into multi-paragraph epigrams
- If you want to right align an attribution its probably easier to do it within the "box" of a div
- If you want to do some CSS styling like draw a box around the epigram, change the background colour etc. it is easier to do for a div than for separate paragraphs


In fact, now that I think about it, you might also created a div for chapter "endnotes" (but I'm not sure what the real name for this is). I don't mean a list of references used en lieu of footnotes.

Consider an anthology of short stories where there is a blurb about the author, or some kind of comment by the anthology editor at the end of each story (Eric Flint from Baen books often does this in story collections, if you need to see a real world example). If my arguments above are valid, then this should probably be its own div as well.

rogue_ronin
07-02-2009, 12:51 PM
Hey, I'll definitely check it out -- I've been trying to use divs for as large a 'box' as possible. Basically, pure chunks o' structure.

The spec is in flux right now -- I'm building the macros, and that's leading to some experimentation, and recognition of errors, too!

If I keep at it, I should have it done this weekend, I think, and I'll post the revised spec.

m a r

ps: an 'afterword', maybe for the post-discussion things? Or maybe just a 'comment' as there is often an Afterword for the entire book?

llasram
07-02-2009, 07:07 PM
For metadata, why not just use OPF w/ the Dublin Core metadata elements? Then you could put the HTML, OPF, and any image files in a ZIP archive, to keep them all together. Then you could call it EPUB. ;)

I do like the idea of an HTML book microformat. It's something people have discussed before (http://microformats.org/wiki/book-brainstorming).

rogue_ronin
07-03-2009, 12:22 AM
Awesome link. I'm now reading about the boom microformat that page linked to. I may have to add elements! :D

I think that the reason I'm not doing the .epub thing is that it is so complex. I mean, no individual piece is complex, but altogether it's difficult to encompass. I don't like it when books are broken into multiple parts. If I want to edit an error, or change the layout in an EPUB it is unnecessarily complicated, I find. Just imagine changing chapter headings in it. How many documents might you have to open? Ridiculous. It's a web of interrelated documents, TOC, OPF, multiple chapters, size-breaks for readers, obsolescent folder structures, etc.

Making an OPF and EPUB from this should be trivial, for someone familiar with it. I am not an expert at HTML, XHTML or EPUB, OPF etc. Just trying to make something that is transparent, simple and transformable with minimal fuss.

The Dublin Core names for the meta-elements is probably something that I should do. But again, I find that DC is obscure at points (contributor, etc.) and I lean away.

This is all ground trod before, (DocBook, FB2, boom, etc.) but I can't help myself -- if I can make something lean and intuitively readable and editable, I'll be pleased. I want an archive format that doesn't require multiple steps to access and edit, or knowledge beyond basic XHTML/CSS. Hopefully it will carry its own "documentation" within it.

Plus, it's something to do. :)

m a r

Jellby
07-03-2009, 06:17 AM
I think that the reason I'm not doing the .epub thing is that it is so complex. I mean, no individual piece is complex, but altogether it's difficult to encompass. I don't like it when books are broken into multiple parts. If I want to edit an error, or change the layout in an EPUB it is unnecessarily complicated, I find. Just imagine changing chapter headings in it. How many documents might you have to open? Ridiculous.

Hmmm... I believe the NCX file is not compulsory. The OPF file has no information about chapter headings, it's just filenames. It's also not compulsory to have multiple files, one for each chapter (although it may be needed for mobile readers). And if you want to change just the look of the chapter headings, you only have to modify the CSS file ;)

But you're right, it would be nice to have a tool to semi-automatically create OPF (at least manifest and spine) and NCX files.

rogue_ronin
07-03-2009, 07:01 AM
Hmmm... I believe the NCX file is not compulsory. The OPF file has no information about chapter headings, it's just filenames. It's also not compulsory to have multiple files, one for each chapter (although it may be needed for mobile readers). And if you want to change just the look of the chapter headings, you only have to modify the CSS file ;)

But you're right, it would be nice to have a tool to semi-automatically create OPF (at least manifest and spine) and NCX files.

I just searched randomly on the web for an EPUB, and found Jules Verne's 20,000 Leagues Under the Sea from ePubBooks.com.

61 files in 4 subdirectories inside a zip file. (46 chapters, 2 parts, footnotes, title, ncx, opf, etc.) Only one image, and that's the ePubBooks.com logo. All this, and not even a cover!

What's the simplest way to structure an EPUB? Whatever it is, why don't folks do that more?

Back to my current simple (ha!) work...

m a r

rogue_ronin
07-03-2009, 07:17 AM
One comment I have is that you might want to consider changing epigrams from being special paragraphs into being divs.

snip

In fact, now that I think about it, you might also created a div for chapter "endnotes" (but I'm not sure what the real name for this is).


Still need a better name than "endnotes"... maybe "commentary"?

And I applied thinkjuice (caffeine suspensions) to the problem of epigrams (and pullquotes, too) and realized that blockquotes were the answer. They can contain paragraphs, and CSS will let you do anything that you can do to divs.

And they're both quotes, right?

Should work for "commentaries" as well.

I'm avoiding divs inside divs wherever I can, as it makes programming the macro-scripts easier. Also, I think it makes sense to keep 'em as big as possible, basically pieces of the book. (The only exception I have, is Chapters/Prologues/Epilogues/Appendices inside Parts.)

m a r

ps: I almost went with qs, but they're supposed to be short. Maybe for pullquotes...

AlexBell
07-03-2009, 08:01 AM
[QUOTE=rogue_ronin;511121]

And I applied thinkjuice (caffeine suspensions) to the problem of epigrams (and pullquotes, too) and realized that blockquotes were the answer. They can contain paragraphs, and CSS will let you do anything that you can do to divs.

I think you'll find that there are differences between the Mobipocket version of HTML and real HTML set out according to W3C standards. One of them is that W3C standards require that you put text in <p></p> tags in blockquotes - like
<blockquote>
<p>line of text</p>
</blockquote>
But if you do that then Mobipocket will not indent the text, which is the whole point of using blockquote. Mobipocket requires that you not use a <p></p> tag, which means that the HTML will not validate.

I look forward to the day when ePub becomes the format of choice, and expect that it will use valid HTML. So I am trying to use valid HTML.

Regards, Alex

rogue_ronin
07-03-2009, 09:11 AM
[QUOTE=rogue_ronin;511121]

And I applied thinkjuice (caffeine suspensions) to the problem of epigrams (and pullquotes, too) and realized that blockquotes were the answer. They can contain paragraphs, and CSS will let you do anything that you can do to divs.

I think you'll find that there are differences between the Mobipocket version of HTML and real HTML set out according to W3C standards. One of them is that W3C standards require that you put text in <p></p> tags in blockquotes - like
<blockquote>
<p>line of text</p>
</blockquote>
But if you do that then Mobipocket will not indent the text, which is the whole point of using blockquote. Mobipocket requires that you not use a <p></p> tag, which means that the HTML will not validate.

I look forward to the day when ePub becomes the format of choice, and expect that it will use valid HTML. So I am trying to use valid HTML.

Regards, Alex

Well, mobipocket is getting up there... but I don't think it's as old as my REB1100. ;)

It shouldn't be an issue here -- even though I don't use mobipocket, I could certainly write a macro that found ps inside blockquotes and removed them, replacing with br or whatever works, as part of the conversion process.

That's actually my goal, to have a good, valid XHTML source, and write whatever macros I need to make whatever target file I need. NoteTab can do some amazing stuff, including run other programs, so...

'course, I think Calibre will be able to do it too, (convert) and I am going to try it out once I'm finished with this. I think it makes an effort to produce good output for its target. I read that Kovid Goyal intends to produce a touch-up editor -- which may put my work here to complete death...

And EPUB will be great when there are easy tools to use. Until then I'll keep editing source...

m a r

DaleDe
07-03-2009, 11:38 AM
I just searched randomly on the web for an EPUB, and found Jules Verne's 20,000 Leagues Under the Sea from ePubBooks.com.

61 files in 4 subdirectories inside a zip file. (46 chapters, 2 parts, footnotes, title, ncx, opf, etc.) Only one image, and that's the ePubBooks.com logo. All this, and not even a cover!

What's the simplest way to structure an EPUB? Whatever it is, why don't folks do that more?

Back to my current simple (ha!) work...

m a r

Calibre is the easiest tool to use to create an ePUB. It does generate the TOC ncx file for you based on headings in the files. It can directly take the zip file. If simplifies the process completely. there is a forum here for Calibre or you can look at the wiki.

Dale

radius
07-03-2009, 11:43 PM
And I applied thinkjuice (caffeine suspensions) to the problem of epigrams (and pullquotes, too) and realized that blockquotes were the answer. They can contain paragraphs, and CSS will let you do anything that you can do to divs.

ps: I almost went with qs, but they're supposed to be short. Maybe for pullquotes...

That sounds like a good solution and I agree with you in theory. Blockquotes are not only able to contain paragraphs, but in fact are only supposed to contain block level elements (ie: not plain old text). And you should be able to style blockquotes however you like with CSS. However, I find that web browsers seem to have their own ideas about how blockquotes should be presented and my CSS styling efforts don't always give predictable results. I'm guessing that ebook readers will probably end up being the same.

And you shouldn't use plain quotes for the same reason I think a single paragraph isn't enough (because they are just for short, in-line quotes).

For purely semantic storage though, blockquotes sound like a good idea.

rogue_ronin
07-04-2009, 01:23 AM
That sounds like a good solution and I agree with you in theory. ...SNIP... However, I find that web browsers seem to have their own ideas about how blockquotes should be presented and my CSS styling efforts don't always give predictable results. I'm guessing that ebook readers will probably end up being the same.

For purely semantic storage though, blockquotes sound like a good idea.

It was the caffeine suspensions that did it. This is largely archival, though any browser should be able to read it. And I think that your implication that I should not depend on the browser/reader is dead on. You did imply that, right? :cool:

Didn't quote you, but thanks for the info that blockquotes should only contain block elements. Didn't know that.

And you shouldn't use plain quotes for the same reason I think a single paragraph isn't enough (because they are just for short, in-line quotes).

I'm with ya, there. I am currently, however, trying q tags for pull-quotes -- they should be short quotes, after all.

And I went with <blockquote class="Commentary"> for your after-discussion example. It should apply to other cases, as well -- such as old texts with discussion by later authors, such as Sun-Tzu's Art of War, for example. (Although, usually the readily available versions of that book don't include the commentary!)

m a r

nrapallo
07-04-2009, 02:01 AM
For metadata, why not just use OPF w/ the Dublin Core metadata elements? Then you could put the HTML, OPF, and any image files in a ZIP archive, to keep them all together. Then you could call it EPUB. ;)

I do like the idea of an HTML book microformat. It's something people have discussed before (http://microformats.org/wiki/book-brainstorming).

Thanks, nice link!

Here's another link to a .pdf (http://www.randomhouse.biz/vendors/pdf_files/RHI_File_Naming_Map_eBook.pdf) prepared by/for Random House showcasing all the eBook Content Files (or think of them as sections/classes).

This .pdf has been around for a few years (since 2006). In particular, the Element 4 column dissects the component parts of an ebook (from a year 2006 perspective).

rogue_ronin
07-07-2009, 09:01 AM
Well, I think I have a final version. I'm calling it xBook. :rolleyes:

I've written 90% of the macro/scripts, so I can semi-automate the conversion of a file. They should be complete soon. If anyone else is using NoteTab, I'd be glad to share them -- maybe I should start a new thread. (If you don't use NoteTab, you should!)

Anyhow, here is the spec:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<link rel="stylesheet" type="text/css" href="xBook.css" />

<title>TITLE</title>

<!-- BEGIN: FILE HISTORY -->

<!-- Created on YYYY-MM-DD -->
<!-- Revision # 0.10 on YYYY-MM-DD -->
<!-- Revision # 0.20 on YYYY-MM-DD -->
<!-- Revision # ETC... on YYYY-MM-DD -->
<!-- Current Revision # 0.80 on YYYY-MM-DD -->

<!-- END: FILE HISTORY -->

<!-- BEGIN: REVISION GUIDELINE -->

<!--
0.10 :: Initial Conversion
0.20 :: Cover and Frontispiece
0.30 :: Sections, Chapters and TOC
0.40 :: Endnotes and/or Blockquotes
0.50 :: Initial Spellcheck
0.60 :: M-Dashes, Hyphens and Ellipses
0.70 :: Italics, Bold, and Pre-Formatted Text
0.80 :: Reading Proof
0.90 :: Checked Against Canonical Source
1.00 :: Final Version -- Optimal
1.++ :: Minor Error Corrections
-->

<!-- END: REVISION GUIDELINE -->

<!-- BEGIN: EBOOK META INFORMATION -->

<meta name="FileName" content="FILENAME" />
<meta name="FileID" content="UNIQUE ID" />
<meta name="FileCreationDate" content="YYYY-MM-DD" />
<meta name="FileVersion" content="VERSION NUMBER" />
<meta name="FileRevisionDate" content="YYYY-MM-DD" />
<meta name="FileSource" content="FILE SOURCE" />
<meta name="FileScanner" content="NAME OF SCANNER (CONTACT INFO)" />
<meta name="FileProofer" content="NAME OF PROOFER (CONTACT INFO)" />
<meta name="FileComment" content="COMMENT" />

<meta name="Title" content="TITLE" />
<meta name="Subtitle" content="SUBTITLE" />
<meta name="Series" content="SERIES NAME" />
<meta name="SeriesNumber" content="POSITION IN SERIES" />

<meta name="Author" content="FIRST NAME·MIDDLE NAMES·LAST NAME·" />
<meta name="Illustrator" content="FIRST NAME·MIDDLE NAMES·LAST NAME·" />
<meta name="Editor" content="FIRST NAME·MIDDLE NAMES·LAST NAME·" />
<meta name="CoverDesigner" content="NAME" />

<meta name="Genre" content="GENRE/SUBJECT" />
<meta name="ISBN" content="ISBN NUMBER" />
<meta name="Language" content="TWO-LETTER LOCALE CODE" />
<meta name="Description" content="SHORT DESCRIPTION OF BOOK" />
<meta name="keywords" content="TAGS/KEYWORDS" />

<meta name="Publisher" content="PUBLISHER" />
<meta name="PublicationDate" content="YYYY-MM" />
<meta name="PublicationCity" content="CITY NAME" />

<meta name="CopyrightHolder" content="NAME OF COPYRIGHT HOLDER" />
<meta name="CopyrightDate" content="YEAR OF COPYRIGHT" />
<meta name="CopyrightLicense" content="COPYRIGHT STATUS OR LICENSE" />

<!-- END: EBOOK META INFORMATION -->

<!-- BEGIN: STRUCTURE HINTS -->

<!--
ELEMENTS USED :: PURPOSE OF ELEMENT IN EBOOK
-->

<!-- END: STRUCTURE HINTS -->

<!-- BEGIN: MANIFEST -->

<!--
xBook.css :: Style Sheet
FILENAME OF THIS FILE :: MAIN FILE OF THIS XBOOK
LIST OF LINKED FILES BY RELATIVE LOCATION :: DESCRIPTION OF FILE
-->

<!-- END: MANIFEST -->

</head>

<body>

<div class="Spine" id="Cover">
<a href="#TableOfContents">
<img src="images/cover.EXT" />
</a>
</div>

<div class="Spine" id="Frontispiece">
<h2>HEADING / SERIES NAME</h2>
<ul>
<li>SERIES LIST TITLE #1</li>
<li>SERIES LIST TITLE #2</li>
<li>ETC...</li>
</ul>
<img src="images/frontispiece.EXT" />
</div>

<div class="Spine" id="FrontMatter">
<h2>FRONT MATTER HEADING</h2>
<p>FRONT MATTER CONTENT (BLURBS, JUNK, ADS, WHATEVER)</p>
</div>

<div class="Spine" id="TitlePage">
<h1>TITLE</h1>
<p id="SubTitle">SUBTITLE</p>
<p id="Author">AUTHOR</p>
<p id="Illustrator"><em>Art:</em> ILLUSTRATOR</p>
<p id="Editor"><em>Editor:</em> EDITOR</p>
<p id="CoverDesigner"><em>Cover Design:</em> COVER DESIGNER</p>
</div>

<div class="Spine" id="Verso">
<h2>VERSO HEADING</h2>
<a href="sounds/logo.wav">
<img src="images/logo.png">
</a>
<p id="FileVersion"><em>Version:</em> VERSION NUMBER</p>
<p id="FileRevisionDate"><em>Revision Date:</em> REVISION DATE</p>
<p id="FileSource"><em>Original Source:</em> ORIGINAL SOURCE</p>
<p id="FileScanner"><em>Scanner:</em> SCANNER</p>
<p id="FileProofer"><em>Proofer(s):</em> PROOFER(S)</p>
<p id="ISBN"><em>ISBN:</em> ISBN NUMBER</p>
<p id="Publisher"><em>Publisher:</em> PUBLISHER NAME</p>
<p id="PublicationDate"><em>Publication Date:</em> DATE OF PUBLICATION</p>
<p id="PublicationCity"><em>Publication City:</em> CITY OF PUBLICATION</p>
<p id="CopyrightDate"><em>Copyright Date:</em> YEAR OF COPYRIGHT</p>
<p id="CopyrightHolder"><em>Copyright Holder:</em> HOLDER OF COPYRIGHT</p>
<p id="CopyrightLicense"><em>License:</em> DISTRIBUTION RIGHTS</p>
</div>

<div class="Spine" id="Inscription">
<h2>INSCRIPTION HEADING</h2>
<p>INSCRIPTION CONTENT</p>
</div>

<div class="Spine" id="Acknowledgement">
<h2>ACKNOWLEDGEMENT HEADING</h2>
<p>ACKNOWLEDGEMENT CONTENT</p>
</div>

<div class="Spine" id="Preface">
<h2>PREFACE HEADING</h2>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>PREFACE CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Written"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="TABLE CAPTION">TABLE CONTENTS</table>
</div>

<div class="Spine" id="TableOfIllustrations">
<h2>TABLE OF ILLUSTRATIONS HEADING</h2>
<ol>
<li id="TOI_Link_To_ILLUSTRATION ID">
<a href="#ILLUSTRATION ID">ILLUSTRATION NAME</a>
</li>
</ol>
</div>

<div class="Spine" id="TableOfMaps">
<h2>TABLE OF MAPS HEADING</h2>
<ol>
<li id="TOM_Link_To_MAP ID">
<a href="#MAP ID">MAP NAME</a>
</li>
</ol>
</div>

<div class="Spine" id="TableOfTables">
<h2>TABLE OF TABLES HEADING</h2>
<ol>
<li id="TOT_Link_To_TABLE ID">
<a href="#TABLE ID">TABLE NAME</a>
</li>
</ol>
</div>

<div class="Spine" id="TableOfContents">
<h2>TABLE OF CONTENTS HEADING</h2>
<img src="images/toc.png">
<ol>
<li id="TOC_Link_To_PART ID">
<a href="#PART ID">PART NAME</a>
<ol>
<li id="TOC_Link_To_CHAPTER ID">
<a href="#CHAPTER ID">CHAPTER NAME</a>
</li>
</ol>
</li>
</ol>
</div>

<div class="Spine" id="Foreword">
<h2>FOREWORD HEADING</h2>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>FOREWORD CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Written"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="TABLE CAPTION">TABLE CONTENTS</table>
</div>

<div class="Spine" class="Part" id="PART ID">
<h2>PART HEADING</h2>
<ul class="NavLinks">
<li>
<a href="#PREVIOUS PART ID OR #FOREWORD ID OR #TableOfContents">
<img src="images/part_up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT PART ID">
<img src="images/part_down.png" />
</a>
</li>
</ul>
<p>PART CONTENT, COMMENT, ETC.<p>

<div class="Body" class="Logue" id="Prologue">
<h3>PROLOGUE HEADING</h3>
<ul class="NavLinks">
<li>
<a href="#PARENT-PART ID OR #TableOfContents">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT CHAPTER ID">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>PROLOGUE CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Written"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="TABLE CAPTION">TABLE CONTENTS</table>
</div>

<div class="Body" class="Chapter" id="CHAPTER ID">
<h3>CHAPTER HEADING</h3>
<ul class="NavLinks">
<li>
<a href="#PREVIOUS CHAPTER ID OR #Prologue OR #PARENT-PART ID OR #TableOfContents OR #PARENT-PART ID">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT CHAPTER ID or #Epilogue OR #APPENDIX ID OR #Afterword OR #Colophon">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>CHAPTER CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Written"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="TABLE CAPTION">TABLE CONTENTS</table>
</div>

<div class="Body" class="Logue" id="Epilogue">
<h3>EPILOGUE HEADING</h3>
<ul class="NavLinks">
<li>
<a href="#PREVIOUS CHAPTER ID">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#APPENDIX ID OR #Afterword OR #Colophon">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>EPILOGUE CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Written"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="TABLE CAPTION">TABLE CONTENTS</table>
</div>

<div class="Body" class="Appendix" id="APPENDIX ID">
<h3>APPENDIX HEADING</h3>
<ul class="NavLinks">
<li>
<a href="#Epilogue OR #PREVIOUS CHAPTER ID">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#Afterword OR #Colophon">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>APPENDIX CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Written"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="TABLE CAPTION">TABLE CONTENTS</table>
</div>

</div>

<div class="Spine" id="Afterword">
<h2>AFTERWORD HEADING</h2>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>AFTERWORD CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Written"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="TABLE CAPTION">TABLE CONTENTS</table>
</div>

<div class="Spine" id="AboutTheAuthor">
<h2>ABOUT THE AUTHOR HEADING</h2>
<p>ABOUT THE AUTHOR CONTENT<p>
<img id="ILLUSTRATION ID" class="Illustration" src="images/author.png" />
</div>

<div class="Spine" id="Colophon">
<h2>COLOPHON HEADING</h2>
<p>COLOPHON CONTENT<p>
<a href="Cover">
<img src="images/colophon.png" />
</a>
</div>

<div class="Spine" id="Endnotes" title="NUMBER VALUE">
<h2>ENDNOTES HEADING</h2>
<ul>
<li id="END NOTE ID">
<p>ENDNOTE CONTENT</p>
<a class="EndNoteBackLink" href="#LINK-TO-ENDNOTE ID">
<img class="Return" src="images/return.png" />
</a>
</li>
</ul>
</div>

<div class="Spine" id="Glossary">
<h2>GLOSSARY HEADING</h2>
<p>GLOSSARY CONTENT<p>
</div>

<div class="Spine" id="Index">
<h2>INDEX HEADING</h2>
<p>INDEX CONTENT<p>
</div>

<div class="Spine" id="EndMatter">
<h2>END MATTER HEADING</h2>
<p>END MATTER CONTENT (BLURBS, JUNK, ADS, WHATEVER)<p>
</div>

</body>

</html>


Anything CAPITALIZED is content, or some naming convention of the file editor. None of the elements is required, most books won't have everything.

As always, I'm looking for feedback. There are undoubtedly typos, or logical errors. I still need to write up the Structure Hints section -- it should be pretty simple to do, now that the spec is done.

I will finish up the macros, and I will convert A Princess of Mars to the format. The conversion should take less than an hour, probably less than half an hour, if the macros work properly.

After that, it's going to need a basic CSS -- anyone feeling inspired? :D

m a r

PS: Re-reading this, I think the TOC needs entries for front matter (Verso, Acknowledgement, Preface...) and end matter (Afterword, Glossary, Index, About the Author...). Not too hard to add, but not tonight.

rogue_ronin
07-12-2009, 02:13 AM
Well, I've been working hard on this for the last week or so, to the detriment of my social life. But it's been a weird kind of fun!

So, I've been going through it, and actually using it to see if it works, and it seems to. But there were a bunch of bugs in my macros, so I'm glad I didn't release them earlier.

I've prepared A Princess of Mars using the tools I've made for NoteTab. If you're willing to use the best text editor ever, you can use them too! :cool:

Some minor changes to the spec:

1) I think it was Pepak that suggested that the Structural Hints section wasn't necessary, and it's been rattling around in my head since he said it. I've made the hints, but I've removed the section in the HEAD. I still want it, but it probably belongs as a comment in the CSS. It would make the HEAD even more unreasonably large! ;)

2) The CSS file will have the same base name as the main document file, it will not be called xBook.css. So for the project below, with the name APrincessOfMars.html, the CSS is called APrincessOfMars.css. Rational, and specific, and easy to do. If there is a need for a generic CSS template, it can be called from the specific style sheet.

3) A bunch of little changes to make the spec doc more accurate, and consistent. Some errors had crept in from indiscriminate use of copy and paste...


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<link rel="stylesheet" type="text/css" href="PROJECTNAME.css" />

<title>TITLE</title>

<!-- BEGIN: FILE HISTORY -->

<!-- Created on YYYY-MM-DD -->
<!-- Revision # 0.10 on YYYY-MM-DD -->
<!-- Revision # 0.20 on YYYY-MM-DD -->
<!-- Revision # ETC... on YYYY-MM-DD -->
<!-- Current Revision # 0.80 on YYYY-MM-DD -->

<!-- END: FILE HISTORY -->

<!-- BEGIN: REVISION GUIDELINE -->

<!--
0.10 :: Initial Conversion
0.20 :: Cover and Frontispiece
0.30 :: Sections, Chapters and TOC
0.40 :: Endnotes and/or Blockquotes
0.50 :: Initial Spellcheck
0.60 :: M-Dashes, Hyphens and Ellipses
0.70 :: Italics, Bold, and Pre-Formatted Text
0.80 :: Reading Proof
0.90 :: Checked Against Canonical Source
1.00 :: Final Version -- Optimal
1.++ :: Minor Error Corrections
-->

<!-- END: REVISION GUIDELINE -->

<!-- BEGIN: EBOOK META INFORMATION -->

<meta name="FileName" content="FILENAME" />
<meta name="FileID" content="UNIQUE ID" />
<meta name="FileCreationDate" content="YYYY-MM-DD" />
<meta name="FileVersion" content="VERSION NUMBER" />
<meta name="FileRevisionDate" content="YYYY-MM-DD" />
<meta name="FileSource" content="FILE SOURCE" />
<meta name="FileScanner" content="NAME OF SCANNER (CONTACT INFO)" />
<meta name="FileProofer" content="NAME OF PROOFER (CONTACT INFO)" />
<meta name="FileComment" content="COMMENT" />

<meta name="Title" content="TITLE" />
<meta name="Subtitle" content="SUBTITLE" />
<meta name="Series" content="SERIES NAME" />
<meta name="SeriesNumber" content="POSITION IN SERIES" />

<meta name="Author" content="FIRST NAME·MIDDLE NAMES·LAST NAME·" />
<meta name="Illustrator" content="FIRST NAME·MIDDLE NAMES·LAST NAME·" />
<meta name="Editor" content="FIRST NAME·MIDDLE NAMES·LAST NAME·" />
<meta name="CoverDesigner" content="NAME" />

<meta name="Genre" content="GENRE/SUBJECT" />
<meta name="ISBN" content="ISBN NUMBER" />
<meta name="Language" content="TWO-LETTER LOCALE CODE" />
<meta name="Description" content="SHORT DESCRIPTION OF BOOK" />
<meta name="keywords" content="TAGS/KEYWORDS" />

<meta name="Publisher" content="PUBLISHER" />
<meta name="PublicationDate" content="YYYY-MM" />
<meta name="PublicationCity" content="CITY NAME" />

<meta name="CopyrightHolder" content="NAME OF COPYRIGHT HOLDER" />
<meta name="CopyrightDate" content="YEAR OF COPYRIGHT" />
<meta name="CopyrightLicense" content="COPYRIGHT STATUS OR LICENSE" />

<!-- END: EBOOK META INFORMATION -->

<!-- BEGIN: MANIFEST -->

<!--
xBook.css :: Style Sheet
FILENAME OF THIS FILE :: MAIN FILE OF THIS XBOOK
LIST OF LINKED FILES BY RELATIVE LOCATION :: DESCRIPTION OF FILE
-->

<!-- END: MANIFEST -->

</head>

<body>

<div class="Spine" id="Cover">
<a href="#TableOfContents">
<img src="images/cover.EXT" />
</a>
</div>

<div class="Spine" id="Frontispiece">
<h2>HEADING / SERIES NAME</h2>
<ul>
<li>SERIES LIST TITLE #1</li>
<li>SERIES LIST TITLE #2</li>
<li>ETC...</li>
</ul>
<img src="images/frontispiece.EXT" />
</div>

<div class="Spine" id="FrontMatter">
<h2>FRONT MATTER HEADING</h2>
<p>FRONT MATTER CONTENT (BLURBS, JUNK, ADS, WHATEVER)</p>
</div>

<div class="Spine" id="TitlePage">
<h1>TITLE</h1>
<p id="SubTitle">SUBTITLE</p>
<p id="Author">AUTHOR</p>
<p id="Illustrator"><em>Art:</em> ILLUSTRATOR</p>
<p id="Editor"><em>Editor:</em> EDITOR</p>
<p id="CoverDesigner"><em>Cover Design:</em> COVER DESIGNER</p>
</div>

<div class="Spine" id="Verso">
<h2>VERSO HEADING</h2>
<a href="sounds/logo.wav">
<img src="images/logo.png">
</a>
<p id="FileVersion"><em>Version:</em> VERSION NUMBER</p>
<p id="FileRevisionDate"><em>Revision Date:</em> REVISION DATE</p>
<p id="FileSource"><em>Original Source:</em> ORIGINAL SOURCE</p>
<p id="FileScanner"><em>Scanner:</em> SCANNER</p>
<p id="FileProofer"><em>Proofer(s):</em> PROOFER(S)</p>
<p id="ISBN"><em>ISBN:</em> ISBN NUMBER</p>
<p id="Publisher"><em>Publisher:</em> PUBLISHER NAME</p>
<p id="PublicationDate"><em>Publication Date:</em> DATE OF PUBLICATION</p>
<p id="PublicationCity"><em>Publication City:</em> CITY OF PUBLICATION</p>
<p id="CopyrightDate"><em>Copyright Date:</em> YEAR OF COPYRIGHT</p>
<p id="CopyrightHolder"><em>Copyright Holder:</em> HOLDER OF COPYRIGHT</p>
<p id="CopyrightLicense"><em>License:</em> DISTRIBUTION RIGHTS</p>
</div>

<div class="Spine" id="Inscription">
<h2>INSCRIPTION HEADING</h2>
<p>INSCRIPTION CONTENT</p>
</div>

<div class="Spine" id="Acknowledgement">
<h2>ACKNOWLEDGEMENT HEADING</h2>
<p>ACKNOWLEDGEMENT CONTENT</p>
</div>

<div class="Spine" id="Preface">
<h2>PREFACE HEADING</h2>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>PREFACE CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Writing"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="TABLE CAPTION">TABLE CONTENTS</table>
</div>

<div class="Spine" id="TableOfIllustrations">
<h2>TABLE OF ILLUSTRATIONS HEADING</h2>
<ol>
<li id="TOI_Link_To_ILLUSTRATION ID">
<a href="#ILLUSTRATION ID">ILLUSTRATION NAME</a>
</li>
</ol>
</div>

<div class="Spine" id="TableOfMaps">
<h2>TABLE OF MAPS HEADING</h2>
<ol>
<li id="TOM_Link_To_MAP ID">
<a href="#MAP ID">MAP NAME</a>
</li>
</ol>
</div>

<div class="Spine" id="TableOfTables">
<h2>TABLE OF TABLES HEADING</h2>
<ol>
<li id="TOT_Link_To_TABLE ID">
<a href="#TABLE ID">TABLE NAME</a>
</li>
</ol>
</div>

<div class="Spine" id="TableOfContents">
<h2>TABLE OF CONTENTS HEADING</h2>
<img src="images/toc.png">
<ol>
<li id="TOC_Link_To_PART ID">
<a href="#PART ID">PART NAME</a>
<ol>
<li id="TOC_Link_To_CHAPTER ID">
<a href="#CHAPTER ID">CHAPTER NAME</a>
</li>
</ol>
</li>
</ol>
</div>

<div class="Spine" id="Foreword">
<h2>FOREWORD HEADING</h2>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>FOREWORD CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Writing"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="TABLE CAPTION">TABLE CONTENTS</table>
</div>

<div class="Spine" class="Part" id="PART ID">
<h2>PART HEADING</h2>
<ul class="NavLinks">
<li>
<a href="#PREVIOUS PART ID OR #FOREWORD ID OR #TableOfContents">
<img src="images/part_up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT PART ID">
<img src="images/part_down.png" />
</a>
</li>
</ul>
<p>PART CONTENT, COMMENT, ETC.<p>

<div class="Body" class="Logue" id="Prologue">
<h3>PROLOGUE HEADING</h3>
<ul class="NavLinks">
<li>
<a href="#PARENT-PART ID OR #TableOfContents">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT CHAPTER ID">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>PROLOGUE CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Writing"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="TABLE CAPTION">TABLE CONTENTS</table>
</div>

<div class="Body" class="Chapter" id="CHAPTER ID">
<h3>CHAPTER HEADING</h3>
<ul class="NavLinks">
<li>
<a href="#PREVIOUS CHAPTER ID OR #Prologue OR #PARENT-PART ID OR #TableOfContents">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#NEXT CHAPTER ID or #Epilogue OR #APPENDIX ID OR #Afterword OR #Colophon OR #NEXT-PART ID">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>CHAPTER CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Writing"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="TABLE CAPTION">TABLE CONTENTS</table>
</div>

<div class="Body" class="Logue" id="Epilogue">
<h3>EPILOGUE HEADING</h3>
<ul class="NavLinks">
<li>
<a href="#PREVIOUS CHAPTER ID">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#APPENDIX ID OR #Afterword OR #Colophon">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>EPILOGUE CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Writing"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="TABLE CAPTION">TABLE CONTENTS</table>
</div>

<div class="Body" class="Appendix" id="APPENDIX ID">
<h3>APPENDIX HEADING</h3>
<ul class="NavLinks">
<li>
<a href="#Epilogue OR #PREVIOUS CHAPTER ID">
<img src="images/up.png" />
</a>
</li>
<li>
<a href="#TableOfContents">
<img src="images/toc.png" />
</a>
</li>
<li>
<a href="#Afterword OR #Colophon">
<img src="images/down.png" />
</a>
</li>
</ul>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>APPENDIX CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Writing"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="TABLE CAPTION">TABLE CONTENTS</table>
</div>

</div>

<div class="Spine" id="Afterword">
<h2>AFTERWORD HEADING</h2>
<h4>SECTION HEADING</h4>
<h5>SUBSECTION HEADING</h5>
<p>AFTERWORD CONTENT</p>
<a class="EndNoteLink" id="LINK-TO-ENDNOTE ID" href="#END NOTE ID">ENDNOTE NUMBER</a>
<blockquote class="Epigram"><p>EPIGRAM</p></blockquote>
<q class="PullQuote">PULL QUOTE</q>
<blockquote class="Writing"><p>LETTERS/NOTES/SIGNS</p></blockquote>
<blockquote class="Commentary"><p>COMMENTARY</p></blockquote>
<hr class="SceneBreak" />
<hr class="PageBreak" />
<img class="Map" id="MAP ID" title="CAPTION" src="images/MAPNAME.EXT" />
<img class="Illustration" id="ILLUSTRATION ID" title="CAPTION" src="images/ILLUSTRATIONNAME.EXT" />
<table id="TABLE ID" title="CAPTION">TABLE CONTENTS</table>
</div>

<div class="Spine" id="AboutTheAuthor">
<h2>ABOUT THE AUTHOR HEADING</h2>
<img id="ILLUSTRATION ID" class="Illustration" src="images/author.png" />
<p>ABOUT THE AUTHOR CONTENT<p>
</div>

<div class="Spine" id="Colophon">
<h2>COLOPHON HEADING</h2>
<p>COLOPHON CONTENT<p>
<a href="Cover">
<img src="images/colophon.png" />
</a>
</div>

<div class="Spine" id="Endnotes" title="NUMBER VALUE">
<h2>ENDNOTES HEADING</h2>
<ul>
<li id="END NOTE ID">
<p>ENDNOTE CONTENT</p>
<a class="EndNoteBackLink" href="#LINK-TO-ENDNOTE ID">
<img class="Return" src="images/return.png" />
</a>
</li>
</ul>
</div>

<div class="Spine" id="Glossary">
<h2>GLOSSARY HEADING</h2>
<p>GLOSSARY CONTENT<p>
</div>

<div class="Spine" id="Index">
<h2>INDEX HEADING</h2>
<p>INDEX CONTENT<p>
</div>

<div class="Spine" id="EndMatter">
<h2>END MATTER HEADING</h2>
<p>END MATTER CONTENT (BLURBS, JUNK, ADS, WHATEVER)<p>
</div>

</body>

</html>


Attached are the files: A Princess of Mars (zipped) and the NoteTab macros. The macros are 2 inter-related libraries and 2 support libraries, with one toolbar; all the setup and support files for the libraries are kept in a sub-folder. Just extract the zip into your NoteTab Libraries sub-folder. The macros look there for everything, so don't get cute! :)

For those of you thinking that the zipped book is nearly an OEB file, you're right. It should be stupid-easy to make one from this.

I will start another thread for discussion of the NoteTab macros. [The thread is here.] (http://www.mobileread.com/forums/showthread.php?p=518957)

What I would really love is if someone took a swing at a CSS for the ebook -- the next thing that I have to do is learn to make something beautiful with it. If you view the file as-is, without CSS, you are going to be disappointed! (BTW, there are some nice buttons and images in the ebook file -- ornate, but not overwhelming, to suit the book.)

Thanks for reading this far!

m a r

ps: NoteTab Light is here, (http://notetab.com/downloads.php?product=notetab) and it's no-nag and free! I wrote this set of macros with the Pro version, however, and it has faster Search/Replace, and Clipbars (buttons for your macros.) But it should still work.... (fingers crossed) 'Course, you could get the Pro trial version...