This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: docbook vs latex
- From: Ramon Casellas <casellas at infres dot enst dot fr>
- To: Doug du Boulay <ddb at R3401 dot rlem dot titech dot ac dot jp>
- Cc: docbook at lists dot oasis-open dot org
- Date: Tue, 03 Sep 2002 09:56:43 +0200 (MEST)
- Subject: Re: DOCBOOK: docbook vs latex
On Tue, 3 Sep 2002, Doug du Boulay wrote:
>
> My understanding was that DocBook output was a product of the
> toolchain and not DocBook itself. We should expect the tools
> to improve in due course. On the other hand the DocBook mathematical
> construct deficiencies could probably be addressed rather quickly once
> they were identified (and perhaps Ramon has already done that part).
>
Not very much. In fact, I have no experience with DTDs, but more or less
this is what I use (and to me, it has been good enough to write my
dissert. in networking/computer science. Of course, I would like more
experienced/knowledgeable people to give their opinions. Maybe if this is
made a proposal, Oasis could get in touch with AMS). I apologize for not
being formal and not give a proper content model.
<mathelement>
</mathelement> is the wrapper. I don't think it is really needed.
<mathhypothesis>
<mathproposition>
<mathlemma>
<mathremark>
<mathexample>
<mathdefinition>
<maththeorem>
are the "big" blocks. Personally, I think they should be at the
"formalpara" level.
Each "big" block has all common attributes (id, role, etc) and an optional
<title> and one or more of the following
<para>, <mathcondition>, <mathassertion>,...
<mathcondition> and <mathassertion> have 1+ <para>... etc.
The last "bit" is <mathproof>. IMVHO, I think it should be part of the big
blocks (à la proof of the theorem) but people using LaTeX tend to put it
after, that is
\begin{theorem}
\end{theorem}
\begin{proof}
\end{proof}
For example:
<mathelement>
<mathhypothesis id="chapter:hyp:1">
<title>Boredom</title>
<para>All Tasks are boring.<para>
</mathhypothesis>
<mathelement>
<mathelement>
<maththeorem id="chapter:theorem:name">
<title>Lazy Man</title>
<mathcondition><para>Given a Task T</para></mathcondition>
<mathassertion>
<para>Do it tomorrow</para>
<equation>
....
</equation>
</mathassertion>
<mathproof>
<para>By <xref linkend="chapter:hyp:1"/> we can start by
proving the lazy nature of mankind...</para>
</mathproof>
</maththeorem>
</mathelement>
There is another point regarding the boolean expression of conditions,
but I usually put just one single composed condition (if and b or c)
Of course, bear in mind that I used them "as is" for my own purposes.
in mathelem.mod.xsl (DB2LaTeX) most templates are of the form
<!--
##########################################
#
# \begin{thm}[title]
#
# \end{thm}
#
##########################################
-->
<xsl:template match="mathelement/maththeorem">
<xsl:text>\begin{thm}[</xsl:text>
<xsl:call-template name="normalize-scape">
<xsl:with-param name="string" select="title"/>
</xsl:call-template>
<xsl:text>] </xsl:text>
<xsl:variable name="id"> <xsl:call-template name="label.id"/>
</xsl:variable>
<xsl:apply-templates/>
<xsl:text>\end{thm} </xsl:text>
</xsl:template>
time for "café"
Thanks for reading
Ramon