View Single Post
Old 01-11-2014, 10:28 PM   #110
capidamonte
Not who you think I am...
capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.
 
capidamonte's Avatar
 
Posts: 374
Karma: 30283
Join Date: Jan 2010
Location: Honolulu
Device: PocketBook 360 -- Ivory
Steve,

I'm not familiar with YAML, but if I'm following you correctly then you'll be writing a config file for every individual book -- redefining H1 as chapter if there are no Parts, for instance.

If that is what you wish to do, go forth and be productive.

I'm more of a mind that one should try to produce an ideal form of XHTML structure that covers all the elements that you can find in a book, and code appropriately for the structure of the book. (It will mean iteration as you find new and surprising elements.)

For instance:

Quote:
<div class="_pagebreak_"/> right above the <p class=foreward/>
Why not simply wrap all elements in a book's Foreword in a set of <div class="foreword">...</div> tags? Simple, and you can define all the paragraphs either with literal <p class="foreword">...</p> or with inheritance, or with child selectors, or whatever, in the CSS.

Putting things into the structural markup for visual reasons (pagebreak, etc.) is probably too much work.

Sigil lets you use a marker for import from HTML:

Code:
<hr class="sigilChapterBreak" />
It breaks up the html, then removes the marker. It's excellent if you're working towards using Sigil. (Much like its metadata import -- excellent for creating basic HTML documents as an archive format.) But working toward Sigil means abandoning your archival format at some point. I don't mean to imply that you are doing this -- I merely mean that form follows goal -- and that it's always easy to fall into the fingerpainting of display in the least likely places.

If you want to do something like that, sure, what you suggest will work. I think, though, that you'd ultimately be on a better course to develop a pure and strict format for the markup, and put most of your efforts into the converters. When your converter sees a <div class="foreword">...</div> then it generates a pagebreak for the target format without needing anyone to explicitly code it.

Perhaps that's what you mean to do with YAML?

Have you looked at FB2? It'd be a good start from which to develop a book schema for XHTML. If I get some time, I intend to do so myself.

Related to this, and to other discussion I've recently read on MR -- there is no reason to be chintzy with the names of classes, ids, styles, etc. Call things "ChapterName", "ChapterNumber", "letter-signature" or the like. CSS should be as readable and informative as possible -- names like "ChNm" or "ls" are pretty difficult for anyone who comes after.

I think that one of the goals of proper book coding would be to make it easy for someone to crack it open and understand what's going on. One can do everything with cascading styles, such that you'd have to use tools like Firebug to trace inhertance. But why obfuscate it? Make it as easy and explicit as possible for the next gal.

I may have drifted from topic, or conflated several ideas here.

The community should develop a "MobileRead" house style in XML or XHTML.

With that final off-topic blurt,

Aloha.
capidamonte is offline   Reply With Quote