Re: Thanks for your help
Lee Passey <[email protected]>
| Newsgroups | gmane.culture.literature.ebook-community |
|---|---|
| Message-ID | <[email protected]> |
joseph harris wrote:
> Lee,
>
> Thank you for a most informative and valuable description. Though I lack
> the $300 fee to offer ;-), can I ask two questions.
The offer was really tongue in cheek. Learning HTML is so simple
(really, it is) that I figure that anyone who is unwilling to do so
deserves to pay through the nose for conversion services. :-)
> First, how close is rtf to html [it does remove the need to know html at
> all, but I'm not certain technically of its closeness]?
It's kind of like the difference between an apple and an orange; you can
make a tart from either of them, but they have to be handled very
differently.
In XHTML (the XML variant of HTML) you have opening tags and closing
tags. Everything between them is classified according to the nature of
the tag. For example, in HTML if you were to see:
<div>
<h3>Introductory Note</h3>
<p>BENJAMIN FRANKLIN was born in Milk Street, Boston, ... </p>
<p>Meantime Franklin was concerning himself more and ... </p>
</div>
you would know that the phrase "Introductory Note" is a level-three
header (title), followed by a paragraph, both of which make up a
discrete division of the text.
What you wouldn't know is how level-three headers should be painted on
the end user's screen. Should it be centered? In a larger font? Bold
face? An alternate font? You also don't know whether the paragraphs
should be double-spaced or not, or indented or not.
BUT...
As an author or editor, you don't need to know anything about how these
elements will be drawn. Seriously. Give it up. Trust that the software
which is doing the actual drawing knows what it's doing. You have no
hope of figuring out what the final "canvas" will be, so just quit
trying to force your customers to share your aesthetics.
RTF (Rich Text Format is composed of groups delimited by curly braces.
Each group can contains unformatted text, "control words", "control
symbols", and other groups. Generally, control words affect the
formatting of everything inside the group.
The above snippet from Benjamin Franklin's Biography would look like
this (highly edited) in RTF:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033
\viewkind4\uc1\pard\f0\fs20\par
\pard\qc\fs28 Introductory Note\par
\pard\fs20\par
\tab BENJAMIN FRANKLIN was born in Milk Street, Boston, ....
\par \tab Meantime Franklin was concerning himself more and ...
}
Now we know that this snippet is formatted using the first version of
RTF, and is encoded in the Windows 1252 encoding. The control word
"\par" means start a new paragraph with the formatting of the previous
paragraph. "\pard\qc\fs28" means "reset to the default paragraph
properties, add paragraph centering, and use a font size of 28." At the
end of "Introductory note" we will start a new paragraph, reset the
properties (no more centering) and set the font size to 20. We then move
to the first tab stop before writing text. At some arbitrary point we
start a new paragraph, move to the first tab stop and continue drawing
text, continuing thusly to the end of the document.
At this point we have a pretty good idea of how the document looked in
your editor, and have a pretty good idea of how the document will look
if it is printed. However, we don't know anything about the editorial
components of this document. We are lead to believe that the phrase
"Introductory Note" starts a paragraph, and that the sentence starting
"Meantime Franklin was concerning himself" also starts a paragraph.
Because you and I both know that this is not true, we can only conclude
the the "\par" control word does not represent the beginning of a
paragraph, but only a certain presentation that we typically associate
with paragraphs.
So suppose an end user wants a "full-block" presentation of the document
(don't try to make the user justify his or her preferences--just accept
them). In the full block style all headers are left justified,
paragraphs are not indented, and each paragraph is separated by an empty
line (this is the default style for most web browsers). If I were
responsible for algorithmically converting this RTF snippet to block
style, how would I figure out which "paragraphs" are headers and which
are really centered paragraphs? How can I distinguish between real
paragraphs and some text that kind of resembles a paragraph but isn't?
(There are, of course, heuristics I could use, but there is also a
margin of error.)
RTF suffers from much of the same drawback as PDF: it was designed to
draw a well-defined image to a canvas of fixed parameters. The markup
language is designed to define a single, fixed instance of a document
and an RTF document cannot be readily be modified to fit the needs of a
different device or user, except by a human being.
Now, one of the drawbacks to HTML is that as it has evolved it has moved
from a presentational orientation to a semantic one. The semantic
orientation is the one we want, but the presentational orientation
remains for backwards compatibility. When you convert RTF to HTML it
will preserve the presentation aspects of the RTF but will not, and
cannot, imply the semantic aspects of HTML. You end up with HTML that is
purely presentational in orientation and captures but a single instance
of the document. It does not have the flexibility that is otherwise
HTML's greatest strength.
So while you can convert RTF to HTML, it really doesn't obviate the need
to actually learn the fundamentals of HTML. You can use HTML converted
from RTF as input to a number of e-book creation programs, but you will
likely be disappointed with the results. A WYSIWYG editor is not what
you want, because while You Will Get What You See, you will /only/ get
What You See, and not what you probably really want, which is a document
which will look good no matter where it's deployed.
My opinion is that if you want to create the best e-books possible you
must learn the fundamentals of HTML. There are no shortcuts (although
you don't need to become an HTML guru, with all the arcane knowledge of
its quirks to be effective).
Personally, to develop HTML I use the Microsoft Visual Studio HTML
editor. It has a "design" tab that shows a default presentation of the
HTML, a "source" tab that shows the actual HTML. It also has a "cookie
crumb" trail at the bottom that tracks the position of the cursor in the
DOM tree.
Believe it or not, Microsoft Word can actually be used to build correct
HTML, if you're careful and you understand the structure of HTML. What
you do is create styles to mimic HTML tags, and then you use those
styles religiously. But you must understand the fundamentals of HTML to
make this work.
> Second, would you like to put this up somewhere [in html naturally] so I
> - and others - can recommend it where appropriate?
While I am flattered by the suggestion, for the time being, you're going
to have to rely on the Yahoo groups archive. As with most things there
are time trade-offs, and blogging (which is essentially what that would
be) is not high on my list of priorities. I am going to try to put
together some soft of document that explains how to use MS Word, as
alluded to above, and when I do I'll try to find some other blogger (Mr.
Rothman?) to post it for me.
------------------------------------
------------------------------------------------------
Post a message: ebook-community [[at]] *
Unsubscribe: ebook-community-unsubscribe [[at]] *
Switch to digest: ebook-community-digest [[at]] *
Switch to normal: ebook-community-normal [[at]] *
Put mail on hold: ebook-community-nomail [[at]] *
Administrator: ebook-community-owner [[at]] *
(* == yahoogroups.com)
-------------------------------------------------------Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ebook-community/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ebook-community/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[email protected]
mailto:ebook-community-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to:
ebook-community-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/