![]() |
#16 | ||
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
Quote:
- 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". Quote:
Code:
h1.title:before { content: "Title: "; } Code:
.clue { display: none; } |
||
![]() |
![]() |
![]() |
#17 | |||
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
Quote:
Quote:
Quote:
![]() Oh, and looking at your example, I realize I didn't terminate the meta tags with />... m a r |
|||
![]() |
![]() |
![]() |
#18 | |||
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
Quote:
Code:
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 Quote:
Quote:
Thanks as always for your insightful comments, m a r ps: did you start your regex thread? |
|||
![]() |
![]() |
![]() |
#19 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
So, minor update after discussion above:
Code:
<!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> 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 |
![]() |
![]() |
![]() |
#20 | ||
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
Quote:
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; }. Quote:
|
||
![]() |
![]() |
![]() |
#21 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
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). |
![]() |
![]() |
![]() |
#22 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
Okay, I read the W3C Schools CSS tutorial yesterday, I'm following you better. 'Course, I'm not a wizard. Yet.
![]() 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 |
![]() |
![]() |
![]() |
#23 |
Wizzard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,402
Karma: 2000000
Join Date: Nov 2007
Location: UK
Device: iPad 2, iPhone 6s, Kindle Voyage & Kindle PaperWhite
|
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. |
![]() |
![]() |
![]() |
#24 | |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
Quote:
![]() m a r |
|
![]() |
![]() |
![]() |
#25 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
Brevity is the soul of wit!
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? Code:
<!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> 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...
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 |
![]() |
![]() |
![]() |
#26 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 71,510
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
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. Quote:
|
|
![]() |
![]() |
![]() |
#27 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
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 |
![]() |
![]() |
![]() |
#28 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 71,510
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
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. Quote:
|
|
![]() |
![]() |
![]() |
#29 | |||
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
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. Quote:
Quote:
Quote:
Code:
<meta name="author" content="Raymond E. Feist|Feist|Raymond E.|feist@midkemia.com" /> <meta name="author" content="Janny Wurts|Wurts|Janny|" /> |
|||
![]() |
![]() |
![]() |
#30 | |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
Quote:
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 |
|
![]() |
![]() |
![]() |
Tags |
html, library, meta, structure, xhtml |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Any ongoing work on the epub specification? | b.tarde | ePub | 10 | 03-18-2010 08:33 PM |
ePub and top margin specification | tompe | Upload Help | 6 | 01-02-2010 11:24 AM |
Ask about specification | bthoven | PocketBook | 35 | 11-13-2009 12:33 PM |
BeBook 2 Specification | keng2000 | BeBook | 6 | 11-02-2009 01:17 PM |
PRS-500 lrf file specification | Dave Berk | Sony Reader Dev Corner | 2 | 05-01-2007 02:12 AM |