This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
RE: [docbook-apps] Mathematics and DocBook
- From: Peter Ring <pri at magnus dot dk>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Tue, 5 Aug 2003 10:06:21 +0200
- Subject: RE: [docbook-apps] Mathematics and DocBook
Option #3 works for me; but then math isn't the primary content in the
documents that I see.
The idea of some sort of macro that expands into the proper markup is
intriguing. I presume that you want to write and read raw DocBook XML the
way that you'd work with LaTeX. IMHO, there are two fundamental issues
involved here:
- While usually suitable for human consumption,
DocBook really is an exchange format. It's widely
used as an authoring and storage format, but it was
designed as an exchange format.
- Simple replacement of text is easy enough with entities.
But it won't work as macros. General entities must
be well formed, i.e., you can't just break the
<inlineequation> gibberish into three parts. You could
have a couple of entity references within an entity
declaration as placeholders, but you'll only get one
shot at redeclaration -- not much good.
A quick hack could involve some m4 macro trickery, picking up parameters
from a processing instruction.
Or maybe a sprinkle of XSLT or DSSSL, depending on your tool chain. That
could prove quite useful as a general mechanism, not just for writing math.
kind regards
Peter Ring
-----Original Message-----
From: Kevin S. Van Horn [mailto:kvanhorn@ksvanhorn.com]
Sent: 4. august 2003 20:01
To: docbook-apps@lists.oasis-open.org
Subject: [docbook-apps] Mathematics and DocBook
I'm getting ready to write documentation for some mathematical software,
and so I've been looking into how to put mathematics into DocBook
documents. (I'm new to DocBook.) What I've found so far has been very
disheartening, as the options are either inadequate to produce nicely
typeset mathematics, or are excruciatingly painful to use. These
options are given in Bob Stayton's book, _DocBook XSL: The Complete Guide_:
<snip />
3. DBTeXMath. You can produce nicely typeset math this way, but you
still have the problem of excruciatingly verbose input for the simplest
thing. For example, just to reference a mathematical variable N I have
to write
<inlineequation>
<inlinemediaobject>
<imageobject role="html">
<imagedata fileref="texmath1.png" format="PNG"/>
</imageobject>
<textobject role="tex"><phrase>$N$</phrase></textobject>
</inlinemediaobject>
</inlineequation>
<snip />
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org