[lug] Typesetting Programs
David Morris
lists at morris-clan.net
Fri Dec 13 12:51:41 MST 2002
On Fri, Dec 13, 2002 at 12:01:58PM +0100, rm at fabula.de wrote:
> Sorry to jump in so late ...
Hey, for a post as good as this I can wait! :)
> XML _is_ a good choice as an intermediate storage format, so if one needs
> to process the data with various tools converting to XML would be a good
> choice. BUT: XML itself is only a markup language specification, the more
> important question is: what DTD/schema to use (i.e. what set of markup
> tags/attributes to allow). Since DocBook was mentioned in this thread more
> than once let me stress one thing here: DocBook is _not_ a general Book/
> Documentation markup language. It was designed specifically for the docu-
> mentation of software programs (and even here, it's only usefull for
> Programs written in ALGOL-like languages, writing Haskell Books with
> DocBook isn't fun). Unless you need to do exactly this you end up spending
> your time fighting the DTD :-/
> If the project is sufficiently large it might be worth the time to develop
> your own DTD (but if you do so: safe yourself a lot of time and effort
> and read 'Structuring XML Documents' by D. Meggison before you start. It's
> worth the time and money).
It sounds like I have another book to get tonight and read
over the weekend....I have no doubt I *would* need to write
my own DTD, and from all you (and others) say, XML sounds
like it might be a good solution.
> Which leaves us with the formatting part. Sadly there's no really con-
> vincing solution available for Linux these days. There's OpenJade
> (the tool used by the DocBook toolchain) which uses DSSSL as a stylesheet
> language, but the LaTeX output (which is used for producing the postscript
> and pdf versions as well!) is horrible -- have a look at the TeX code
> emitted to see what i mean. Jade uses LaTeX as a pure renderer (i.e. "put
> these three words here" etc.) and doesn't take advantage of TeX excellent
> typography. The same goes for ReportLab and similar solutions
> (BTW, is a lot of this sounds frustrated it's because i've fought a long
> battle with many of the above solutions). Another approach would be
> to write your own transformer in one of the en-vogue scripting languages
> like Perl/Python/CL/scheme etc.
The documents I am creating will not be complex, just
lengthy. The basic "look and feel" of most of the documents
will be the exact same, just with the same small bit of
formatting repeated over and over and over again....For this
task, at least, I can probably get by with something that
does "good enough".
My concern, though, is with page layout...If I write
documents in XML, can I specify Headers, Footers, etc.?
> [snip]
> Another point to consider: If your data will end up in huge tables
> think twice about using LaTeX. Typesetting tables isn't the strongest
> virtue of TeX.
Aye, I did notice this as I do have a fair number of
tables....the LaTeX method is officially, I would say, a
cludge.
> If this is for a larger commercial project i'd _strongly_ suggest using
> a tool like FrameMaker (that can use XML as the source of data). You
> get excellent formating, professional tables etc. The tool was really
> designed for such tasks.
> Yes, i know, it doesn't run under Linux (they _had_ a beta version out
> for one year but decided to not sell it :-/).
> I'm currently running Frame under Basilisk Mac-Emulation without any
> problems so far.
That is a decent thought, but it is massive overkill for
this project. In this case, simplicity is better as we are
not making a commercial product.
Thanks for the note...a lot of *very* good points in there I
will have to consider....and based on them perhaps do a bit
of experimentation.
--David
More information about the LUG
mailing list