james said:
>   I am interested in trying out your tool.

cool.  let's mount it as a demo project.


>   I'm currently working on a book
>   that has a special meaning to me
>   but which is hell to format.

ok.

>   http://www.archive.org/details/studyofbhagavata00benaiala

i'll check it out.


>   I've more or less committed myself to
>   doing family tree tables using ASCII text.

i'd suggest doing them as text _and_ images,
and putting both in the book, as a fall-back...
text can be copied; images preserve the look.


>   There are a LOT of these in the book.
>    I'd need some way to indicate that these
>   should be surrounded by "pre" tags in the HTML.

that's easy enough to do.


>   Second, I need to have some illustrations. 
>   How would your tool handle those?

with simplicity, grace, and elegance, of course.     ;+)


>   My understanding of your ideas is that
>   I can make a file with some simple markup
>   and generate many different formats from that.

you understand correctly.


>   I used the HTML generator in guiguts for
>   my PG submissions so far.  I'm not entirely happy
>   with it, especially the way it uses "span" tags
>   to indicate indented text.  I end up going through
>   and replacing these with "blockquotes". 
>   The style sheet guiguts gives me is good for HTML
>   but needs to be tweaked to produce a good Kindle book. 
>   And of course once I've generated my HTML
>   I now have two files to correct.

i hear everything you're saying.


>   Also, if the book has multiple levels of headings,
>   how would you deal with that?

you simply indicate the level of the heading
by the number of blank lines preceding it...

for instance:
>   h1 heading = 14 blank lines preceding
>   h2 heading = 12 blank lines preceding
>   h3 heading = 10 blank lines preceding
>   h4 heading = 8 blank lines preceding
>   h5 heading = 6 blank lines preceding
>   h6 heading = 4 blank lines preceding

or, if you prefer:
>   h1 heading = 9 blank lines preceding
>   h2 heading = 8 blank lines preceding
>   h3 heading = 7 blank lines preceding
>   h4 heading = 6 blank lines preceding
>   h5 heading = 5 blank lines preceding
>   h6 heading = 4 blank lines preceding

note it's the _relative_ number that counts.

(the absolute number merely determines
how much vertical space the header uses
when the book is output in .pdf format...
some designers like to put it way down.)

the program creates a nice _outline-style_
indented list of the headings for you, and
keeps track of any change that happens, so
once you've determined the outline is right,
you can pretty much stop thinking about it.

(if you've already used the h1-h6 terms,
you can just do a global replace on them.
if you like, you can _leave_in_ the h1-h6
terms, in addition to the blank lines, and
wait to take them out until you "go final".)

***

so i'll mount the scans.  send me the text,
and i'll incorporate it into the public demo.

however...

...here comes the bad news...

it might well be the case that what you want
is impossible.  because the kindle can't do it.
is _incapable_ of doing it.  not just kindle, but
_any_ screen that's "too small" (e.g., a phone).

for instance, most of the family trees that you
gave as examples in your december 18th post
_won't_ work -- dependably -- in _any_ system.

>   http://lists.pglaf.org/mailman/private/gutvol-d/2011-December/008590.html

not as text, anyway.

you can "fool yourself" into thinking they work,
by setting the text-size down to a small level...

but if you want a test, do the opposite instead:
set the text-size to its biggest level, and then
see how many characters fit on a kindle screen.

you will then be tempted to say something like
"well, as long as the text is a reasonable size..."

but again, that's just fooling yourself, because
if you ask a 50-year-old person, you might get
a totally different answer
m a 20-year-old as to
what text-size constitutes "a reasonable size"...

and your problem is worse than the "poetry" one,
because your lines, if split, _become_gibberish_.

so you are going to have disaster.  perhaps not
all the time, on all of your trees.  but sometimes.

and you need to face that fact before you start,
or you're only gonna be disappointed later...

so, if you wanna work with me, send me the text.

-bowerbird