View Single Post
Old 06-19-2008, 03:08 PM   #23
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 3,463
Karma: 10684861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
Quote:
Originally Posted by radius View Post
I'm a professional bit-twiddler too (mostly C and assembly language programming) and reading RTF gives me a headache

Lets say I want this sentence centred on one line:

The quick brown fox jumps over the lazy dog.
Please do not blame rtf format for slopy programming of modern editors.

Try creating html file in MSWord and have a look at the resulting mess.

You can make hand-crafted rtf file JUST as nice as a well formated html file.
Look:
::::::::::::::::: start of rtf file :::::::::::::::::::::
{\rtf1\ansi
\deff6
{\fonttbl
{\f6\fswiss\fcharset0 Helvetica;}
}
{\info
}
\paperw12240\paperh15840\margl1800\margr1800\margt 1440\margb1440
\ftnbj\aenddoc\ftnrstcont\aftnrstcont\ftnnar\aftnn rlc
\sectd
\pard\fi-1\li1\ri1\qc\plain\f6\fs20
The \b quick\b0 \i brown\i0 fox jumped over the lazy dog.\par
}
::::::::::::::::: end of rtf file :::::::::::::::::::::

That is it.

I am sure that I could delete a few more tags and still keep a working rtf file.

You can make rtf file for your Reader using a few simple macros.
That is what I do.
*MY* rtf files are typically 50% smaller than equivalent file created by OpenOffice.org or MSWord

Take first eleven lines from my example. This is equivalent to the html file header.
line with "The quick ..." is the body
and think of the last line with } as if it was </body>

\b is equivalent to the <b>
\b0 is equivalent to the </b>
\i is equivalent to the <i>
\i0 is equivalent to the </i>
\par is the same thing as <p>

THAT IS IT.

on Unix use Ted word processor to produce a very clean, standard compliant rtf file.
On windows make an example using Write.

Last edited by kacir; 06-19-2008 at 03:16 PM.
kacir is offline   Reply With Quote