View Single Post
Old 07-21-2009, 09:06 AM   #29
rogue_ronin
Banned
rogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-books
 
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
Quote:
Originally Posted by AlexBell View Post
I don't think it's a matter of being up to date - HTML Tidy and the W3C validator service have different (even if overlapping) functions. Tidying up lint and errors is not the same as validating to W3C standards, as I think you found out when you used the validation service.
Yup, the validator definitely looks to structure. So I'll use both; as the online is a bit less convenient to use, it'll be done near the end. Plus, the CSS validator is far more up-to-date -- although there is a CSStidy, too.

Quote:
I don't think I can be of much more help to you, partly because I have only just started to learn something of XHTML 1.1 (the template I uploaded last night asking for comments is in XHTML 1.0) and partly because my taste lies towards the simple, even austere, in markup.
Missed it, I'll look for it, see if I see anything.

Quote:
I don't doubt for a moment that your XHTML and CSS are organised logically and systematically, but they are so complex that at my level I can't comprehend the pattern.
Y'know, I get that a lot. I only started working on XHTML and CSS in the last month or so, but I have a tendency to put together intricate little things. Perhaps overly intricate. And I've got a lot of free time right now.

Still, I don't do it by hand -- once I figure something out, I just make it automatic. The hard/fun part is making all the interrelated things work together. And trying to find a way to keep it all in as few places as possible.

You probably don't want to even see the macro code that exports the books. It's much more complex under the hood. But now it's stupidly easy to make a book. I did the attached book in about an hour. And it only took that long because of the Table of Contents -- starting with an HTML file that has a complex TOC as the source makes it necessary to double-check a lot of stuff. The cover took longer to make.

The macros even copy all the files into an Author/Series/Title directory structure for me, so zipping 'em up is easy. (The only problem is that I am basically a Linux user, except for my text-editor -- I have to do a shared folder thing under VMware that's a bit of a hassle.)

The XHTML is basically just divs with uls or ols for links and imgs to spice things up. Every div is basically a page. Every page has a header, although they're often suppressed in the CSS. All the meta information is available in the head. The rest (what I think probably looks complicated) is just interlinking for easy in-book navigation, and trying to keep the source code human-readable.

I don't know what reader you use, but try to convert it and tell me what happens. It should just work, I hope, maybe finding most of the meta information. And if you ever wanted to change something, it should be fairly easy to target whatever you don't like with some specificity.

On a related note, now that the programming is mostly done, and the format spec is mostly settled, it will be easy to write some macros to export to different formats, using scriptable utilities, or writing OPF files, etc. OPF in particular should be pretty easy, and I can probably write a decent OPT file for rbmake to export to the REB1100. Is there a decent ePub command line tool? (Calibre?)

Quote:
I've found it very hard to get much information about XHTML 1.1; could you tell me please what sources you used?
Almost everything I read came from w3schools.org -- they have a CSS tutorial and reference, and one for (X)HTML. The reference is good enough for beginning, but every now and then I needed something else, and I mostly used Mr. Google's advice. And that advice mostly concerned the haphazard support that Internet Explorer has for standards and how to work around them.

XHTML, even 1.1, is mostly HTML, as I think you know; I don't remember exactly, but I think that there are only 2 or 3 minor differences between XHTML 1.0 and 1.1.

Overall, it's pretty easy, really: your HTML gets much, much simpler. It's the CSS that gets complicated. And that's just art. And iterate, iterate, iterate.

m a r

ps: if you're not yet attached to a text editor, consider NoteTab! I'll gladly share my Clips (macros.)

EDIT: In the attachment, there are minor additions to the CSS (tables, in particular) and some tweaks to the XHTML for some things.
Attached Files
File Type: zip 02_TheGodsOfMars.zip (1.15 MB, 646 views)

Last edited by rogue_ronin; 07-21-2009 at 09:09 AM. Reason: Forgot attachment.
rogue_ronin is offline   Reply With Quote