More fixes
authorJelmer Vernooij <jelmer@samba.org>
Tue, 12 Aug 2003 18:22:39 +0000 (18:22 +0000)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 12 Aug 2003 18:22:39 +0000 (18:22 +0000)
(This used to be commit ec02b2cfa4d913c91dd78bc1b2bdb02d7d560c59)

62 files changed:
docs/docbook/xslt/db2latex/VERSION.xml
docs/docbook/xslt/db2latex/abstract.mod.xsl
docs/docbook/xslt/db2latex/admonition.mod.xsl
docs/docbook/xslt/db2latex/authorgroup.mod.xsl
docs/docbook/xslt/db2latex/biblio.mod.xsl
docs/docbook/xslt/db2latex/block.mod.xsl
docs/docbook/xslt/db2latex/book-article.mod.xsl
docs/docbook/xslt/db2latex/bridgehead.mod.xsl
docs/docbook/xslt/db2latex/callout.mod.xsl
docs/docbook/xslt/db2latex/citation.mod.xsl
docs/docbook/xslt/db2latex/common/common.xsl
docs/docbook/xslt/db2latex/common/de.xml
docs/docbook/xslt/db2latex/common/l10n.xsl
docs/docbook/xslt/db2latex/component.mod.xsl
docs/docbook/xslt/db2latex/dingbat.mod.xsl
docs/docbook/xslt/db2latex/docbook.xsl
docs/docbook/xslt/db2latex/email.mod.xsl
docs/docbook/xslt/db2latex/errors.mod.xsl
docs/docbook/xslt/db2latex/example.mod.xsl
docs/docbook/xslt/db2latex/figure.mod.xsl
docs/docbook/xslt/db2latex/font.mod.xsl
docs/docbook/xslt/db2latex/footnote.mod.xsl
docs/docbook/xslt/db2latex/formal.mod.xsl
docs/docbook/xslt/db2latex/glossary.mod.xsl
docs/docbook/xslt/db2latex/graphic.mod.xsl
docs/docbook/xslt/db2latex/html.mod.xsl
docs/docbook/xslt/db2latex/index.mod.xsl
docs/docbook/xslt/db2latex/info.mod.xsl
docs/docbook/xslt/db2latex/inline.mod.xsl
docs/docbook/xslt/db2latex/keywords.mod.xsl
docs/docbook/xslt/db2latex/labelid.mod.xsl
docs/docbook/xslt/db2latex/latex.mapping.xsl
docs/docbook/xslt/db2latex/lists.mod.xsl
docs/docbook/xslt/db2latex/mathelem.mod.xsl
docs/docbook/xslt/db2latex/mathml/mathml.content.constsymb.mod.xsl
docs/docbook/xslt/db2latex/mathml/mathml.content.functions.mod.xsl
docs/docbook/xslt/db2latex/mathml/mathml.content.mod.xsl
docs/docbook/xslt/db2latex/mathml/mathml.content.token.mod.xsl
docs/docbook/xslt/db2latex/mathml/mathml.mod.xsl
docs/docbook/xslt/db2latex/mathml/mathml.presentation.mod.xsl
docs/docbook/xslt/db2latex/mediaobject.mod.xsl
docs/docbook/xslt/db2latex/msgset.mod.xsl
docs/docbook/xslt/db2latex/normalize-scape.mod.xsl
docs/docbook/xslt/db2latex/para.mod.xsl
docs/docbook/xslt/db2latex/part-chap-app.mod.xsl
docs/docbook/xslt/db2latex/pi.mod.xsl
docs/docbook/xslt/db2latex/preamble.mod.xsl
docs/docbook/xslt/db2latex/procedure.mod.xsl
docs/docbook/xslt/db2latex/qandaset.mod.xsl
docs/docbook/xslt/db2latex/refentry.mod.xsl
docs/docbook/xslt/db2latex/revision.mod.xsl
docs/docbook/xslt/db2latex/sections.mod.xsl
docs/docbook/xslt/db2latex/set.mod.xsl
docs/docbook/xslt/db2latex/sgmltag.mod.xsl
docs/docbook/xslt/db2latex/synop-oop.mod.xsl
docs/docbook/xslt/db2latex/synop-struct.mod.xsl
docs/docbook/xslt/db2latex/table.mod.xsl
docs/docbook/xslt/db2latex/texmath.mod.xsl
docs/docbook/xslt/db2latex/vars.mod.xsl
docs/docbook/xslt/db2latex/verbatim.mod.xsl
docs/docbook/xslt/db2latex/xref.mod.xsl
docs/docbook/xslt/latex.xsl

index 70bbf95e88778a722015b141c38297b308cb3702..a76a06a5a535c419d67081e65ff87a6cad0535c8 100644 (file)
@@ -1,20 +1,16 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+ |     $Id: VERSION.xml,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
  |- #############################################################################
+ |     $Author: jelmer $
  |                                                                                                             
  |   PURPOSE:
  + ############################################################################## -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
-<xsl:variable name="VERSION">0.7.1</xsl:variable>
-<xsl:variable name="LASTRELEASE">0.7</xsl:variable>
-<xsl:variable name="TAG">
-  <xsl:variable name="RCSTAG" select="substring-before(substring-after('$Name:  $',concat('$','Name: ')),'$')"/>
-  <xsl:choose>
-    <xsl:when test="normalize-space($RCSTAG)=''">HEAD</xsl:when>
-    <xsl:otherwise><xsl:value-of select="$RCSTAG" /></xsl:otherwise>
-  </xsl:choose>
-</xsl:variable>
+<xsl:variable name="VERSION">0.7pre5</xsl:variable>
+<xsl:variable name="TAG">APRIL2003</xsl:variable>
+<xsl:variable name="CVSVERSION">$Id: VERSION.xml,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $</xsl:variable>
 
 
 </xsl:stylesheet>
index a9bc2e02ce104475c6f2598d9847434dfd0dfa8f..b2e82c2de3e7692f866f837af9c27247ca4f8607 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: abstract.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="abstract" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: abstract.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
            <authorgroup>
                <author><firstname>Ramon</firstname> <surname>Casellas</surname></author>
@@ -59,7 +62,7 @@
                % --------------------------------------------
                \begin{abstract}
            </screen>
-           <para> Calls "apply-templates" for all the children, and calls template
+           <para> Calls "apply-templates" for all the children, and call template
                <xref linkend="map.end"/>(<literal>map.end</literal>) to output the closing
                command.</para>
            <formalpara><title>Remarks and Bugs</title>
index 56042a610eca4d58ad86422f83d7ca1788ca135e..62f37ccd3a80012186511a19b419f64689820ea6 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: admonition.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $              
 |- #############################################################################
+|      $Author: jelmer $
 |
 |   PURPOSE: Admonition templates. 
 + ############################################################################## -->
@@ -15,6 +17,7 @@
     <doc:reference name="admonition" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: admonition.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
                <authorgroup>
                <author><firstname>Ramon</firstname> <surname>Casellas</surname></author>
                </example>
        </refdescription>
     </doc:param>
+    <!--############################################################################# -->
 
-<!--############################################################################# -->
-<xsl:variable name="latex.admonition.environment">
-<xsl:text>% ---------------------------------------------- &#10;</xsl:text>
-<xsl:text>% Define a new LaTeX environment (adminipage)    &#10;</xsl:text>
-<xsl:text>% ---------------------------------------------- &#10;</xsl:text>
-<xsl:text>\newenvironment{admminipage}%&#10;</xsl:text>
-<xsl:text>{ % this code corresponds to the \begin{adminipage} command&#10;</xsl:text>
-<xsl:text> \begin{Sbox}%&#10;</xsl:text>
-<xsl:text> \begin{minipage}%&#10;</xsl:text>
-<xsl:text>} %done&#10;</xsl:text>
-<xsl:text>{ % this code corresponds to the \end{adminipage} command&#10;</xsl:text>
-<xsl:text> \end{minipage}&#10;</xsl:text>
-<xsl:text> \end{Sbox}&#10;</xsl:text>
-<xsl:text> \fbox{\TheSbox}&#10;</xsl:text>
-<xsl:text>} %done&#10;</xsl:text>
-<xsl:text>% ---------------------------------------------- &#10;</xsl:text>
-<xsl:text>% Define a new LaTeX length (admlength)          &#10;</xsl:text>
-<xsl:text>% ---------------------------------------------- &#10;</xsl:text>
-<xsl:text>\newlength{\admlength}&#10;</xsl:text>
-<xsl:text>% ---------------------------------------------- &#10;</xsl:text>
-<xsl:text>% Define a new LaTeX environment (admonition)    &#10;</xsl:text>
-<xsl:text>% With 2 parameters:                             &#10;</xsl:text>
-<xsl:text>% #1 The file (e.g. note.pdf)                    &#10;</xsl:text>
-<xsl:text>% #2 The caption                                 &#10;</xsl:text>
-<xsl:text>% ---------------------------------------------- &#10;</xsl:text>
-<xsl:text>\newenvironment{admonition}[2] &#10;</xsl:text>
-<xsl:text>{ % this code corresponds to the \begin{admonition} command&#10;</xsl:text>
-<xsl:text> \hspace{0mm}\newline\hspace*\fill\newline&#10;</xsl:text>
-<xsl:text> \noindent&#10;</xsl:text>
-<xsl:text> \setlength{\fboxsep}{5pt}&#10;</xsl:text>
-<xsl:text> \setlength{\admlength}{\linewidth}&#10;</xsl:text>
-<xsl:text> \addtolength{\admlength}{-10\fboxsep}&#10;</xsl:text>
-<xsl:text> \addtolength{\admlength}{-10\fboxrule}&#10;</xsl:text>
-<xsl:text> \admminipage{\admlength}&#10;</xsl:text>
-<xsl:text> {\bfseries \sc\large{#2}}</xsl:text>
-<xsl:text> \newline&#10;</xsl:text>
-<xsl:text> \\[1mm]&#10;</xsl:text>
-<xsl:text> \sffamily&#10;</xsl:text>
-<!--
-If we cannot find the latex.admonition.path;
-Comment out the next line (\includegraphics).
-This tactic is to avoid deleting the \includegraphics
-altogether, as that could confuse a person trying to
-find the use of parameter #1 in the environment.
--->
-<xsl:if test="$latex.admonition.path=''">
-       <xsl:text>%</xsl:text>
-</xsl:if>
-<xsl:text> \includegraphics[</xsl:text> <xsl:value-of select="$latex.admonition.imagesize" /> <xsl:text>]{#1}&#10;</xsl:text>
-<xsl:text> \addtolength{\admlength}{-1cm}&#10;</xsl:text>
-<xsl:text> \addtolength{\admlength}{-20pt}&#10;</xsl:text>
-<xsl:text> \begin{minipage}[lt]{\admlength}&#10;</xsl:text>
-<xsl:text> \parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt&#10;</xsl:text>
-<xsl:text>} %done&#10;</xsl:text>
-<xsl:text>{ % this code corresponds to the \end{admonition} command&#10;</xsl:text>
-<xsl:text> \vspace{5mm} &#10;</xsl:text>
-<xsl:text> \end{minipage}&#10;</xsl:text>
-<xsl:text> \endadmminipage&#10;</xsl:text>
-<xsl:text> \vspace{.5em}&#10;</xsl:text>
-<xsl:text> \par&#10;</xsl:text>
-<xsl:text>}&#10;</xsl:text>
-</xsl:variable>
-
-
-
+    <xsl:variable name="latex.admonition.environment">
+       <xsl:text>\newenvironment{admminipage}{\begin{Sbox}\begin{minipage}}{\end{minipage}\end{Sbox}\fbox{\TheSbox}}&#10;</xsl:text>
+       <xsl:text>\newlength{\admlength}&#10;</xsl:text>
+       <xsl:text>\newenvironment{admonition}[2] {&#10;</xsl:text>
+       <xsl:text> \hspace{0mm}\newline\hspace*\fill\newline&#10;</xsl:text>
+       <xsl:text> \noindent&#10;</xsl:text>
+       <xsl:text> \setlength{\fboxsep}{5pt}&#10;</xsl:text>
+       <xsl:text> \setlength{\admlength}{\linewidth}&#10;</xsl:text>
+       <xsl:text> \addtolength{\admlength}{-10\fboxsep}&#10;</xsl:text>
+       <xsl:text> \addtolength{\admlength}{-10\fboxrule}&#10;</xsl:text>
+       <xsl:text> \admminipage{\admlength}&#10;</xsl:text>
+       <xsl:text> {\bfseries \sc\large{#2}} \newline&#10;</xsl:text>
+       <xsl:text> \\[1mm]&#10;</xsl:text>
+       <xsl:text> \sffamily&#10;</xsl:text>
+       <xsl:if test="$latex.admonition.path=''">
+               <xsl:text>%</xsl:text>
+               <!--
+                       Comment out the next line (\includegraphics).
+                       This tactic is to avoid deleting the \includegraphics
+                       altogether, as that could confuse a person trying to
+                       find the use of parameter #1 in the environment.
+               -->
+       </xsl:if>
+       <xsl:text> \includegraphics[</xsl:text>
+       <xsl:value-of select="$latex.admonition.imagesize" />
+       <xsl:text>]{#1}&#10;</xsl:text>
+       <xsl:text> \addtolength{\admlength}{-1cm}&#10;</xsl:text>
+       <xsl:text> \addtolength{\admlength}{-20pt}&#10;</xsl:text>
+       <xsl:text> \begin{minipage}[lt]{\admlength}&#10;</xsl:text>
+       <xsl:text> \parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt&#10;</xsl:text>
+       <xsl:text>}{&#10;</xsl:text>
+       <xsl:text> \vspace{5mm} &#10;</xsl:text>
+       <xsl:text> \end{minipage}&#10;</xsl:text>
+       <xsl:text> \endadmminipage&#10;</xsl:text>
+       <xsl:text> \vspace{.5em}&#10;</xsl:text>
+       <xsl:text> \par&#10;</xsl:text>
+       <xsl:text>}&#10;</xsl:text>
+    </xsl:variable>
 
     <!--############################################################################# -->
     <!-- DOCUMENTATION                                                                -->
index 6ec7460def52738fac6a94588293d243c5ec744d..fd40f3cb4c0df0438df64c2289321a053877849f 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: authorgroup.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $                                                                                               
 |                                                                                                              
 |   PURPOSE: Manage Authorgroups 
 + ############################################################################## -->
@@ -17,6 +19,7 @@
     <doc:reference id="authorgroup" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: authorgroup.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
                <authorgroup>
                <author><firstname>Ramon</firstname> <surname>Casellas</surname></author>
index 9524015b1e1e2003de80b44b8e7e2eadc7627951..3d3e9f70f0361281681084401807425400c74977 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: biblio.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $                                                                                               
 |                                                                                                              
 |   PURPOSE: Manage Bibliography.
 + ############################################################################## -->
@@ -17,6 +19,7 @@
     <doc:reference id="biblio" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: biblio.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
            <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
     </xsl:template>
 
     <xsl:template name="biblioentry.output">
-       <xsl:variable name="biblioentry.label">
+       <xsl:variable name="biblioentry.tag">
            <xsl:choose>
                <xsl:when test="@xreflabel">
                    <xsl:value-of select="normalize-space(@xreflabel)"/> 
                    <xsl:value-of select="normalize-space(@id)"/> 
                </xsl:when>
                <xsl:otherwise>
-               </xsl:otherwise>
-           </xsl:choose>
-       </xsl:variable>
-       <xsl:variable name="biblioentry.id">
-           <xsl:choose>
-               <xsl:when test="abbrev">
-                   <xsl:apply-templates select="abbrev" mode="bibliography.mode"/> 
-               </xsl:when>
-               <xsl:otherwise>
-                       <xsl:call-template name="generate.label.id"/>
+                   <xsl:text>UNKNOWN</xsl:text>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
        <xsl:text>&#10;</xsl:text>
        <xsl:text>% -------------- biblioentry &#10;</xsl:text>
-       <xsl:choose>
-               <xsl:when test="$biblioentry.label=''">
-                       <xsl:text>\bibitem</xsl:text> 
-               </xsl:when>
-               <xsl:otherwise>
-                       <xsl:text>\bibitem[</xsl:text>
-                       <xsl:call-template name="normalize-scape">
-                               <xsl:with-param name="string" select="$biblioentry.label"/>
-                       </xsl:call-template>
-                       <xsl:text>]</xsl:text> 
-               </xsl:otherwise>
-       </xsl:choose>
-       <xsl:text>{</xsl:text>
-       <xsl:value-of select="$biblioentry.id"/>
-       <xsl:text>}\docbooktolatexbibaux{</xsl:text> 
-       <xsl:call-template name="generate.label.id"/> 
-       <xsl:text>}{</xsl:text> 
-       <xsl:value-of select="$biblioentry.id"/>
-       <xsl:text>}&#10;\hypertarget{</xsl:text> 
-       <xsl:call-template name="generate.label.id"/> 
-       <xsl:text>}{\emph{</xsl:text> <xsl:apply-templates select="title" mode="bibliography.mode"/> <xsl:text>}}</xsl:text>
+       <xsl:text>\bibitem[</xsl:text><xsl:value-of select="$biblioentry.tag"/><xsl:text>]</xsl:text> 
+       <xsl:text>{</xsl:text><xsl:value-of select="$biblioentry.tag"/><xsl:text>}&#10;</xsl:text> 
+       <xsl:text>\emph{</xsl:text> <xsl:apply-templates select="title" mode="bibliography.mode"/><xsl:text>} </xsl:text>
        <xsl:value-of select="$biblioentry.item.separator"/>
        <xsl:apply-templates select="author|authorgroup" mode="bibliography.mode"/>
        <xsl:for-each select="child::copyright|child::publisher|child::pubdate|child::pagenums|child::isbn|child::editor|child::releaseinfo">
            <xsl:value-of select="$biblioentry.item.separator"/>
            <xsl:apply-templates select="." mode="bibliography.mode"/> 
        </xsl:for-each>
-       <xsl:text>.</xsl:text>
+       <xsl:text>. </xsl:text>
+       <xsl:call-template name="label.id"/> 
        <xsl:text>&#10;&#10;</xsl:text>
     </xsl:template>
 
index 49aba64ca23f8b6e5d25eaff033fb5b8178e4c4d..ac270a35618fd12b4a99eba0115103e2ad5f6997 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: block.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="block" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: block.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
            <authorgroup>
                <author><firstname>Ramon</firstname> <surname>Casellas</surname></author>
index 042ec556aa0a024f6670acca832ee268735ec74b..b9a230554cb9005a9e171a880f65198d7f497acb 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: book-article.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $                                                                                               
 |                                                                                                              
 |   PURPOSE:
 |      This template matches a book / article
@@ -18,6 +20,7 @@
     <doc:reference id="book-article" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: book-article.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
            <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
                        <xsl:apply-templates select="bookinfo/authorgroup"/>
            </xsl:when>
            <xsl:otherwise>
-                       <xsl:for-each select="bookinfo/author">
-                               <xsl:apply-templates select="."/>
-                               <xsl:if test="not(position()=last())">
-                                       <xsl:text> \and </xsl:text>
-                               </xsl:if>
-                       </xsl:for-each>
+                       <xsl:apply-templates select="bookinfo/author"/>
            </xsl:otherwise>
        </xsl:choose>
        <xsl:text>}&#10;</xsl:text>
                        <xsl:text>}}</xsl:text>
        </xsl:if>
 
-       <!-- book:7b: maketitle and set up pagestyle -->
-       <xsl:value-of select="$latex.maketitle"/>
-       <!-- book:8: - APPLY TEMPLATES -->
+       <!-- book:7b: maketitle -->
+       <xsl:text>{\pagestyle{empty}\maketitle</xsl:text>
+       <!-- book:8: page Style ? fancyheaders or plain ? -->
+       <xsl:call-template name="generate.latex.pagestyle"/>
+       <xsl:text>}&#10;</xsl:text>
+       <!-- book:9: - APPLY TEMPLATES -->
        <xsl:apply-templates/>
-       <!-- book:9:  call map.end -->
+       <!-- book:10:  call map.end -->
        <xsl:call-template name="map.end"/>
     </xsl:template>
 
            <formalpara><title>Tasks</title>
                <itemizedlist>
                    <listitem><para>Calls <literal>generate.latex.article.preamble</literal>.</para></listitem>
-                   <listitem><para>Outputs \title, \author, \date, getting the information from its children.</para></listitem>
+                   <listitem><para>Outputs \title, \author, getting the information from its children.</para></listitem>
                    <listitem><para>Calls <literal>latex.article.begindocument</literal>.</para></listitem>
                    <listitem><para>Calls <literal>latex.article.maketitle.</literal></para></listitem>
                    <listitem><para>Applies templates.</para></listitem>
        <xsl:variable name="article.title">
            <xsl:choose>
                        <xsl:when test="./title"> 
-                               <xsl:apply-templates select="./title"/>
+                               <xsl:value-of select="./title"/>
                        </xsl:when>
                        <xsl:when test="./articleinfo/title">
-                               <xsl:apply-templates select="./articleinfo/title"/>
+                               <xsl:value-of select="./articleinfo/title"/>
                        </xsl:when>
                        <xsl:otherwise>
-                               <xsl:apply-templates select="./artheader/title"/>
+                               <xsl:value-of select="./artheader/title"/>
                        </xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
-       <xsl:text>\begin{center}{</xsl:text>
-       <xsl:value-of select="$latex.book.article.title.style"/>
-       <xsl:text>{</xsl:text>
-       <xsl:value-of select="$article.title"/>
+       <xsl:text>\begin{center}\textsf{\textbf{\Large </xsl:text>
+       <xsl:call-template name="normalize-scape"> 
+           <xsl:with-param name="string" select="$article.title"/>
+       </xsl:call-template>
        <xsl:text>}}\par&#10;</xsl:text>
        <!-- Display author information --> 
        <xsl:choose>
            <xsl:when test="artheader/author">          
                        <xsl:text>\textsf{</xsl:text>
-                       <xsl:for-each select="artheader/author">
-                               <xsl:apply-templates select="."/>
-                               <xsl:if test="not(position()=last())">
-                                       <xsl:text> \and </xsl:text>
-                               </xsl:if>
-                       </xsl:for-each>
+                       <xsl:apply-templates select="artheader/author"/>        
                        <xsl:text>}\par&#10;</xsl:text>
                </xsl:when>
            <xsl:when test="artheader/authorgroup">
                </xsl:when>
            <xsl:when test="articleinfo/author">
                        <xsl:text>\textsf{</xsl:text>
-                       <xsl:for-each select="articleinfo/author">
-                               <xsl:apply-templates select="."/>
-                               <xsl:if test="not(position()=last())">
-                                       <xsl:text> \and </xsl:text>
-                               </xsl:if>
-                       </xsl:for-each>
+                       <xsl:apply-templates select="articleinfo/author"/>
                        <xsl:text>}\par&#10;</xsl:text>
                </xsl:when>
            <xsl:when test="articleinfo/authorgroup">
                </xsl:when>
            <xsl:when test="author">
                        <xsl:text>\textsf{</xsl:text>
-                       <xsl:for-each select="author">
-                               <xsl:apply-templates select="."/>
-                               <xsl:if test="not(position()=last())">
-                                       <xsl:text> \and </xsl:text>
-                               </xsl:if>
-                       </xsl:for-each>
+                       <xsl:apply-templates select="author"/>
                        <xsl:text>}\par&#10;</xsl:text>
                </xsl:when>
        </xsl:choose>
-       <xsl:apply-templates select="artheader|articleinfo" mode="article.within.book"/>
+       <xsl:apply-templates select="artheader" mode="article.within.book"/>
        <xsl:text>\end{center}&#10;</xsl:text>
-       <xsl:apply-templates select="*[not(self::title)]"/>
+       <xsl:apply-templates/>
        </xsl:template>
 
-       <xsl:template match="artheader|articleinfo" mode="article.within.book">
+       <xsl:template match="artheader" mode="article.within.book">
                <xsl:value-of select="."/>
        </xsl:template>
 
        <xsl:variable name="article.title">
            <xsl:choose>
                        <xsl:when test="./title"> 
-                               <xsl:apply-templates select="./title"/>
+                               <xsl:value-of select="./title"/>
                        </xsl:when>
                        <xsl:when test="./articleinfo/title">
-                               <xsl:apply-templates select="./articleinfo/title"/>
+                               <xsl:value-of select="./articleinfo/title"/>
                        </xsl:when>
                        <xsl:otherwise>
-                               <xsl:apply-templates select="./artheader/title"/>
+                               <xsl:value-of select="./artheader/title"/>
                        </xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
        <xsl:text>\title{</xsl:text>
-       <xsl:value-of select="$latex.article.title.style"/>
-       <xsl:text>{</xsl:text>
-       <xsl:value-of select="$article.title"/>
-       <xsl:text>}}&#10;</xsl:text>
-       <!-- Display date and author information --> 
-       <xsl:variable name="article.date">
-               <xsl:apply-templates select="./artheader/date|./articleinfo/date"/>
-       </xsl:variable>
-       <xsl:if test="$article.date!=''">
-               <xsl:text>\date{</xsl:text>
-               <xsl:value-of select="$article.date"/>
-               <xsl:text>}&#10;</xsl:text>
-       </xsl:if>
+       <xsl:call-template name="normalize-scape"> 
+           <xsl:with-param name="string" select="$article.title"/>
+       </xsl:call-template>
+       <xsl:text>}&#10;</xsl:text>
+       <!-- Display author information --> 
        <xsl:text>\author{</xsl:text>
        <xsl:choose>
+           <xsl:when test="artheader/author">          
+                       <xsl:apply-templates select="artheader/author"/>        
+               </xsl:when>
            <xsl:when test="artheader/authorgroup">
                        <xsl:apply-templates select="artheader/authorgroup"/>
                </xsl:when>
+           <xsl:when test="articleinfo/author">
+                       <xsl:apply-templates select="articleinfo/author"/>
+               </xsl:when>
            <xsl:when test="articleinfo/authorgroup">
                        <xsl:apply-templates select="articleinfo/authorgroup"/>
                </xsl:when>
-           <xsl:when test="artheader/author">          
-               <xsl:for-each select="artheader/author">
-                       <xsl:apply-templates select="."/>
-                       <xsl:if test="not(position()=last())">
-                               <xsl:text> \and </xsl:text>
-                       </xsl:if>
-               </xsl:for-each>
-               </xsl:when>
-           <xsl:when test="articleinfo/author">
-               <xsl:for-each select="articleinfo/author">
-                       <xsl:apply-templates select="."/>
-                       <xsl:if test="not(position()=last())">
-                               <xsl:text> \and </xsl:text>
-                       </xsl:if>
-               </xsl:for-each>
-               </xsl:when>
-           <xsl:otherwise>
-               <xsl:for-each select="author">
-                       <xsl:apply-templates select="."/>
-                       <xsl:if test="not(position()=last())">
-                               <xsl:text> \and </xsl:text>
-                       </xsl:if>
-               </xsl:for-each>
-           </xsl:otherwise>
+           <xsl:otherwise><xsl:apply-templates select="author"/></xsl:otherwise>
        </xsl:choose>
        <xsl:text>}&#10;</xsl:text>
        <!-- Display  begindocument command -->
        <xsl:value-of select="$latex.article.begindocument"/>
-       <xsl:value-of select="$latex.maketitle"/>
-       <xsl:apply-templates select="*[not(self::title)]"/>
+       <xsl:value-of select="$latex.article.maketitle"/>
+       <xsl:apply-templates/>
        <xsl:value-of select="$latex.article.end"/>
     </xsl:template>
 
 
-    <xsl:template match="article/title|articleinfo/title|articleinfo/date|artheader/date">
-       <xsl:apply-templates/>
-    </xsl:template>
 
     <xsl:template match="article/artheader|article/articleinfo">
-       <xsl:apply-templates select="legalnotice" />
        <xsl:apply-templates select="abstract"/>
     </xsl:template>
 
     <!-- EMPTY TEMPLATES -->
+    <xsl:template match="article/title"/>
     <xsl:template match="article/subtitle"/>
 
 
     <!--############################################################################# 
     |   Template: legalnotice 
     |-  ############################################################################# -->
-<xsl:template match="legalnotice">
+       <xsl:template match="legalnotice">
        <!-- Support for legalnotice. -->
     <xsl:text>\vspace{-.3em}&#10;</xsl:text>
     <xsl:text>\if@twocolumn&#10;</xsl:text>
        <xsl:apply-templates select="*[not(self::title)]"/>
     <xsl:text>\vspace{0.6em}\par\if@twocolumn\else\endquotation\fi&#10;</xsl:text>
     <xsl:text>\normalsize\rmfamily&#10;</xsl:text>
-</xsl:template>
+       </xsl:template>
 
 
        <xsl:template match="legalnotice/title">
 
 
     <!--############################################################################# 
+    |  $Id: book-article.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
     |- #############################################################################
+    |  $Author: jelmer $
     |                                                                                                          
     |   PURPOSE: Table of Contents, Figures, ...
     + ############################################################################## -->
     <xsl:template match="lotentry"/>
     <xsl:template match="tocpart|tocchap|tocfront|tocback|tocentry"/>
     <xsl:template match="toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"/>
-
-    <doc:template name="generate.latex.pagestyle" xmlns="">
-       <refpurpose> Choose the preferred page style for document body </refpurpose>
-       <refdescription>
-               <para>
-                       If no page style is preferred by the user, the defaults will be
-                       "empty" for articles, "plain" for books, or "fancy" (if the
-                       fancyhdr packages is permitted).
-               </para>
-               <formalpara><title>Pertinent Variables</title>
-               <itemizedlist>
-                       <listitem><simpara><xref linkend="param.pagestyle"/></simpara></listitem>
-                       <listitem><simpara><xref linkend="param.use.fancyhdr"/></simpara></listitem>
-               </itemizedlist>
-               </formalpara>
-       </refdescription>
-    </doc:template>
-       <xsl:template name="generate.latex.pagestyle">
-               <xsl:text>\pagestyle{</xsl:text>
-               <xsl:choose>
-                       <xsl:when test="$latex.pagestyle!=''"><xsl:value-of select="$latex.pagestyle"/></xsl:when>
-                       <xsl:when test="count(//book)&gt;0">
-                               <xsl:choose>
-                                       <xsl:when test="$latex.use.fancyhdr=1"><xsl:text>fancy</xsl:text></xsl:when>
-                                       <xsl:otherwise><xsl:text>plain</xsl:text></xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:when>
-                       <xsl:otherwise><xsl:text>empty</xsl:text></xsl:otherwise>
-               </xsl:choose>
-               <xsl:text>}</xsl:text>
-       </xsl:template>
-       
 </xsl:stylesheet>
 
index a09ca15dda3cf422753956efa8f1506fd471dfc6..609633e04e54324d2f05d77c918abe9d31737d4e 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: bridgehead.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -15,6 +17,7 @@
     <doc:reference id="bridgehead" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: bridgehead.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
                <authorgroup>
                <author><firstname>Ramon</firstname> <surname>Casellas</surname></author>
index ab67cf8e237f2cc4bcafe4222e388a9477b17a69..3eea0cf1bb81a0b3d4d102232e4fa6f9c02ff44c 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: callout.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -15,6 +17,7 @@
     <doc:reference id="callout" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: callout.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
            <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 46c69af0ebb397b0e21430362f70097b7324c8ad..4ab82411a8bbf59d06d9e16cbffd1ee4c137a82c 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: citation.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="citation" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: citation.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
            <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
@@ -53,9 +56,9 @@
 
     <xsl:template match="citation">
        <!-- todo: biblio-citation-check -->
-       <xsl:text>\docbooktolatexcite{</xsl:text>
-               <xsl:value-of select="."/>
-       <xsl:text>}{}</xsl:text>
+       <xsl:text>\cite{</xsl:text>
+               <xsl:apply-templates/>
+       <xsl:text>}</xsl:text>
     </xsl:template>
 
 </xsl:stylesheet>
index 2506bd71edc1bd30f5f45d96c2cc4e8ec8d392ab..67cee9d94dd00f7c50bc46156d76352e2c54c8cd 100644 (file)
@@ -5,6 +5,7 @@
                 version='1.0'>
 
 <!-- ********************************************************************
+     $Id: common.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
      ********************************************************************
 
      Derived from the official DocBook XSL Stylesheets 
@@ -16,6 +17,7 @@
 
 <doc:reference xmlns="">
 <referenceinfo>
+<releaseinfo role="meta"> $Id: common.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $ </releaseinfo>
 <author>
        <surname>Ramon</surname>
        <firstname>Casellas</firstname>
index 8c458b0f5eed9869f3586369e14478711df759a9..33d3e819b4a240d9e082ea3cabb74bfa31e32b40 100644 (file)
@@ -21,9 +21,6 @@
 <gentext key="glossary"                 text="Glossar"/>
 <gentext key="important"                text="WICHTIG"/>
 <gentext key="isbn"                     text="ISBN"/>
-<gentext key="keyword"                  text="Stichwort"/>
-<gentext key="keywords"                text="Stichw&#x00F6;rter"/>
-<gentext key="keywordset"              text="Stichw&#x00F6;rter"/>
 <gentext key="important"                text="Wichtig"/>
 <gentext key="index"                    text="Stichwortverzeichnis"/>
 <gentext key="legalnotice"              text="Rechtlicher Hinweis"/>
index a8b526fc609ab24eb4364c93d58f957e489035e8..f2f2e5ee345135c13d06d3e259d805f01a810725 100644 (file)
@@ -3,6 +3,7 @@
                 version='1.0'>
 
 <!-- ********************************************************************
+     $Id: l10n.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
      ********************************************************************
 
      Derived from the official XSL DocBook Stylesheet distribution.
index aedcadb550186d879f0fe66d627b4348ac3588f0..bdca568f63e1ee14a6474b3476d63b000db5a631 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: component.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -17,6 +19,7 @@
     <doc:reference id="component" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: component.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
            <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 84b579515a22c77691446edf13579e9b2ce74c03..53d970647f0b1689329c6c07ba6617ea37773ae8 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: dingbat.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 |   
@@ -18,6 +20,7 @@
     <doc:reference id="dingbat" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: dingbat.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
            <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 56e000cd026422ea4718a3896f1f117a64e5eaa5..f1ce7ccf9eab2bfb78c0f0f19638bf3e2ce1d867 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: docbook.xsl,v 1.1.2.4 2003/08/12 18:22:39 jelmer Exp $             
 |- #############################################################################
+|      $Author: jelmer $                                                                                               
 |                                                                                                              
 |   PURPOSE: 
 |      This is the "parent" stylesheet. The used "modules" are included here.
@@ -26,8 +28,7 @@
 
     <xsl:include href="book-article.mod.xsl"/>
 
-    <xsl:include href="dedication.mod.xsl"/>
-    <xsl:include href="preface.mod.xsl"/>
+    <xsl:include href="ded-pref.mod.xsl"/>
 
     <xsl:include href="part-chap-app.mod.xsl"/>
 
        <xsl:message> XSLT stylesheets DocBook - LaTeX 2e                                            </xsl:message>
        <xsl:message> Reqs: LaTeX 2e installation common packages                                    </xsl:message>
        <xsl:message>################################################################################</xsl:message>
+       <xsl:message> RELEASE : <xsl:value-of select="$VERSION"/>                                    </xsl:message>
+       <xsl:message> VERSION : <xsl:value-of select="$CVSVERSION"/>                                 </xsl:message>
+       <xsl:message>     TAG : <xsl:value-of select="$TAG"/>                                        </xsl:message>
        <xsl:message>     WWW : http://db2latex.sourceforge.net                                      </xsl:message>
        <xsl:message> SUMMARY : http://www.sourceforge.net/projects/db2latex                         </xsl:message>
        <xsl:message>  AUTHOR : Ramon Casellas   casellas@infres.enst.fr                             </xsl:message>
index 6461334ac889e10c89e4a63432f94a2f3cb98a5f..8f2bcaa146191f2feaef5b4920131f090c2048c5 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: email.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="email" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: email.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
            <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 37b273c01ddc75c67a4129c5649e9ccbc48e34e8..a697d1ff1ef5a317325598092fa82aeda7f33ba1 100644 (file)
@@ -1,7 +1,9 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
     <!--############################################################################# 
+    |  $Id: errors.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
     |- #############################################################################
+    |  $Author: jelmer $
     |                                                                                                          
     |   PURPOSE:
     + ############################################################################## -->
index fb973a27e7f1c0b7d63987186dbc9fb425a95a7b..599f1c0ace03945011efa9277ab9fd8d2944038c 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: example.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -17,6 +19,7 @@
     <doc:reference id="example" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: example.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 823877aa17f0e8b662a7c3ad906e37996cd8745b..3269bb5cfafec93d0a124a6cac2e8b01050a4ba8 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: figure.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $                                                                                               
 |                                                                                                              
 |   PURPOSE: Template for figure tag.
 + ############################################################################## -->
@@ -15,6 +17,7 @@
     <doc:reference id="figure" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: figure.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 20e28145205138970e0183deac2a073e022854bd..40b4550c4f3320f8b317405ffcc8e39397680868 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: font.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="font" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: font.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 6e7d39a36a4b82f8f21424e0122befe6f6f66c74..2d6a6aa8615b574eb6c14cd6a097235146509aaa 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: footnote.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="footnote" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: footnote.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 6908119225ddba17fa8416b89d7d7d0930185744..9857186589373213a949ec66a8bf29c74d1f4e18 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: formal.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="formal" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: formal.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
@@ -86,6 +89,8 @@
 <!-- 2003/07/04 Applied patches from J.Pavlovic -->
 <!-- ========================================  -->
 <xsl:template match="equation">
+<!-- Get LaTeX content if available -->
+<xsl:variable name="tex" select=" mediaobject/textobject[@role='tex' or @role='latex'] | mediaobject/textobject/phrase[@role='tex' or @role='latex']"/>
 <!-- Equation title placement -->
 <xsl:variable name="placement">
        <xsl:call-template name="generate.formal.title.placement">
        <xsl:text>\captionswapskip{}</xsl:text>
 </xsl:if>
 <xsl:choose>
-       <xsl:when test="informalequation">
-               <xsl:apply-templates select="informalequation"/>
+       <xsl:when test="$tex">
+               <xsl:apply-templates select="$tex"/>
        </xsl:when>
        <xsl:otherwise>
-               <xsl:variable name="tex" select="alt[@role='tex' or @role='latex']|mediaobject/textobject[@role='tex' or @role='latex']|mediaobject/textobject/phrase[@role='tex' or @role='latex']"/>
-               <xsl:choose>
-                       <xsl:when test="$tex">
-                               <xsl:apply-templates select="$tex"/>
-                       </xsl:when>
-                       <xsl:when test="alt and $latex.alt.is.preferred='1'">
-                               <xsl:apply-templates select="alt"/>
-                       </xsl:when>
-                       <xsl:when test="mediaobject">
-                               <xsl:apply-templates select="mediaobject"/>
-                       </xsl:when>
-                       <xsl:when test="alt">
-                               <xsl:apply-templates select="alt"/>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:apply-templates select="graphic"/>
-                       </xsl:otherwise>
-               </xsl:choose>
+               <xsl:apply-templates/>
        </xsl:otherwise>
 </xsl:choose>
 <xsl:if test="$placement!='before'"><xsl:value-of select="$caption" /></xsl:if>
 
 
 <xsl:template match="informalequation">
-<xsl:variable name="tex" select="alt[@role='tex' or @role='latex']|mediaobject/textobject[@role='tex' or @role='latex']|mediaobject/textobject/phrase[@role='tex' or @role='latex']"/>
-<xsl:text>&#10;</xsl:text>
+<xsl:variable name="tex" select=" mediaobject/textobject[@role='tex'] | mediaobject/textobject[@role='latex']"/>
+<xsl:call-template name="informal.object"/>
 <xsl:choose>
        <xsl:when test="$tex">
-               <xsl:apply-templates select="$tex"/>
-       </xsl:when>
-       <xsl:when test="alt and $latex.alt.is.preferred='1'">
-               <xsl:apply-templates select="alt"/>
-       </xsl:when>
-       <xsl:when test="mediaobject">
-               <xsl:apply-templates select="mediaobject"/>
-       </xsl:when>
-       <xsl:when test="alt">
-               <xsl:apply-templates select="alt"/>
+               <xsl:text>$</xsl:text><xsl:value-of select="mediaobject/textobject/phrase"/><xsl:text>$&#10;</xsl:text>
        </xsl:when>
        <xsl:otherwise>
-               <xsl:apply-templates select="graphic"/>
+               <xsl:apply-templates/>
        </xsl:otherwise>
 </xsl:choose>
-<xsl:text>&#10;&#10;</xsl:text>
 </xsl:template>
 
 
index f429187aee0e5091771a5bf78a9eb10f78b4cd91..45153cc98c4fdeb8058400a2019071487dff1ccd 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: glossary.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -17,6 +19,7 @@
     <doc:reference id="glossary" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: glossary.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 1c9845c93e1c5a0636198fb78a282b0428181f05..a3861d5c29d5088cc39acef6f3e2df008fa768be 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: graphic.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="graphic" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: graphic.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index a94ac3c80f6b1f0e275a1b192ce3c6bb2292ee0c..e4ad775d186ca06b7a05887203fed6143f99dd90 100644 (file)
@@ -1,7 +1,9 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
     <!--############################################################################# 
+    |  $Id: html.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
     |- #############################################################################
+    |  $Author: jelmer $
     |                                                                                                          
     |   PURPOSE:
     |   
index 0ca975bd5048c5f7815390970ced514a9f84f248..5a33c49f44b605e3e5250a0dde6eb6e9d273d4aa 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: index.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="index" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: index.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
     </doc:reference>
 
 
-<!-- This parameter is for enabeling or disabling of indexterms -->
-<xsl:param name="latex.generate.indexterm">1</xsl:param>
 
-<!-- Our key for ranges -->
-<xsl:key name="indexterm-range" match="indexterm[@class='startofrange']" use="@id"/>
 
-
-
-
-<!-- ############################################################### -->
-<!-- Index                                                           -->
-<!--                                                                 -->
-<!-- ############################################################### -->
-<xsl:template match="index|setindex">
+    <xsl:template match="index|setindex">
        <xsl:call-template name="label.id"/>
        <xsl:text>\printindex&#10;</xsl:text>
-</xsl:template>
+    </xsl:template>
 
-<xsl:template match="index/title"></xsl:template>
-<xsl:template match="index/subtitle"></xsl:template>
-<xsl:template match="index/titleabbrev"></xsl:template>
+    <xsl:template match="index/title"></xsl:template>
+    <xsl:template match="index/subtitle"></xsl:template>
+    <xsl:template match="index/titleabbrev"></xsl:template>
 
-<xsl:template match="index/title" mode="component.title.mode">
+    <xsl:template match="index/title" mode="component.title.mode">
        <xsl:call-template name="label.id"> <xsl:with-param name="object" select=".."/> </xsl:call-template>
-</xsl:template>
+    </xsl:template>
+
+    <xsl:template match="index/subtitle" mode="component.title.mode"/>
+
 
-<xsl:template match="index/subtitle" mode="component.title.mode"/>
 
 
-<!-- ############################################################### -->
-<!-- IndexDiv                                                        -->
-<!--                                                                 -->
-<!-- ############################################################### -->
-<xsl:template match="indexdiv">
+    <xsl:template match="indexdiv">
        <xsl:apply-templates/>
-</xsl:template>
+    </xsl:template>
 
-<xsl:template match="indexdiv/title">
+    <xsl:template match="indexdiv/title">
        <xsl:call-template name="label.id"> <xsl:with-param name="object" select=".."/> </xsl:call-template>
-</xsl:template>
+    </xsl:template>
 
 
 <!-- INDEX TERM CONTENT MODEL
@@ -87,127 +77,49 @@ IndexTerm ::=
 See|SeeAlso+)?)|
 See|SeeAlso+)?)
 -->
-<!-- ############################################################### -->
-<!-- IndexDiv                                                        -->
-<!--                                                                 -->
-<!-- ############################################################### -->
 <xsl:template match="indexterm">
-<xsl:if test="$latex.generate.indexterm != 0">
-<!--
-               <xsl:text>\index{</xsl:text>
-               <xsl:call-template name="normalize-scape">
-                       <xsl:with-param name="string" select="normalize-space(./primary)"/>
-               </xsl:call-template>
-               <xsl:if test="./secondary">
-                       <xsl:text>!</xsl:text>
-                       <xsl:call-template name="normalize-scape">
-                               <xsl:with-param name="string" select="normalize-space(./secondary)"/>
-                       </xsl:call-template>
-               </xsl:if>
-               <xsl:if test="./tertiary">
-                       <xsl:text>!</xsl:text>
-                       <xsl:call-template name="normalize-scape">
-                               <xsl:with-param name="string" select="normalize-space(./tertiary)"/>
-                       </xsl:call-template>
-               </xsl:if>
-               <xsl:if test="./see">
-                       <xsl:text>|see{</xsl:text>
-                       <xsl:call-template name="normalize-scape">
-                               <xsl:with-param name="string" select="normalize-space(./see)"/>
-                       </xsl:call-template>
-                       <xsl:text>}</xsl:text>
-               </xsl:if>
-               <xsl:if test="./seealso">
-                       <xsl:text>|see{</xsl:text>
-                       <xsl:call-template name="normalize-scape">
-                               <xsl:with-param name="string" select="normalize-space(./seealso)"/>
-                       </xsl:call-template>
-                       <xsl:text>}</xsl:text>
-               </xsl:if>
-               <xsl:text>}</xsl:text>
--->
-       <xsl:variable name="idxterm">
-               <xsl:apply-templates mode="indexterm"/>
-       </xsl:variable>
-
-       <xsl:if test="@class and @zone">
-               <xsl:message terminate="yes">Error: Only one attribut (@class or @zone) is in indexterm possible!</xsl:message>
-       </xsl:if>
-
-       <xsl:choose>
-               <xsl:when test="@class='startofrange'">
-                       <xsl:text>\index{</xsl:text>
-                               <xsl:value-of select="normalize-space($idxterm)"/>
-                       <xsl:text>|(}</xsl:text>
-               </xsl:when>
-               <xsl:when test="@class='endofrange'">
-                       <xsl:choose>
-                               <xsl:when test="count(key('indexterm-range',@startref)) = 0">
-                                       <xsl:message terminate="yes"><xsl:text>Error: No indexterm with </xsl:text>
-                                       <xsl:text>id='</xsl:text><xsl:value-of select="@startref"/>
-                                       <xsl:text>' found!</xsl:text>
-                                       <xsl:text>  Check your attributs id/startref in your indexterms!</xsl:text>
-                                       </xsl:message>
-                               </xsl:when>
-                               <xsl:otherwise>
-                                       <xsl:variable name="thekey" select="key('indexterm-range',@startref)"/>
-                                       <xsl:text>\index{</xsl:text>
-                                       <xsl:apply-templates select="$thekey/*"  mode="indexterm"/>
-                                       <xsl:text>|)}</xsl:text>
-                               </xsl:otherwise>
-                       </xsl:choose>
-               </xsl:when>
-               <xsl:otherwise>
-                       <xsl:text>\index{</xsl:text>
-                       <xsl:message terminate="no"><xsl:text>Simple case:</xsl:text></xsl:message>
-                               <xsl:value-of select="normalize-space($idxterm)"/>
-                       <xsl:text>}</xsl:text>
-               </xsl:otherwise>
-       </xsl:choose>
+<xsl:text>\index{</xsl:text>
+<!-- output primary -->
+<xsl:call-template name="normalize-scape">
+       <xsl:with-param name="string" select="normalize-space(./primary)"/>
+</xsl:call-template>
+<!-- output secondary if it exists -->
+<xsl:if test="./secondary">
+       <xsl:text>!</xsl:text>
+       <xsl:call-template name="normalize-scape">
+               <xsl:with-param name="string" select="normalize-space(./secondary)"/>
+       </xsl:call-template>
 </xsl:if>
+<!-- output tertiary if it exists -->
+<xsl:if test="./tertiary">
+       <xsl:text>!</xsl:text>
+       <xsl:call-template name="normalize-scape">
+               <xsl:with-param name="string" select="normalize-space(./tertiary)"/>
+       </xsl:call-template>
+</xsl:if>
+<!-- idem with see/seealso -->
+<xsl:if test="./see">
+       <xsl:text>|see{</xsl:text>
+       <xsl:call-template name="normalize-scape">
+               <xsl:with-param name="string" select="normalize-space(./see)"/>
+       </xsl:call-template>
+       <xsl:text>}</xsl:text>
+</xsl:if>
+<xsl:if test="./seealso">
+       <xsl:text>|see{</xsl:text>
+       <xsl:call-template name="normalize-scape">
+               <xsl:with-param name="string" select="normalize-space(./seealso)"/>
+       </xsl:call-template>
+       <xsl:text>}</xsl:text>
+</xsl:if>
+<xsl:text>}</xsl:text>
 </xsl:template>
 
 
-<!-- ================================================ -->
-<xsl:template match="*" mode="indexterm">
-    <xsl:message>WARNING: Element '<xsl:value-of select="local-name()"/>' in indexterm not supported!</xsl:message>
-</xsl:template>
-
-
-
-<!-- ================================================ -->
-<xsl:template match="primary" mode="indexterm">
-<xsl:apply-templates mode="indexterm"/>
-</xsl:template>
-
-<xsl:template match="secondary" mode="indexterm">
-<xsl:text>!</xsl:text>
-<xsl:apply-templates mode="indexterm"/>
-</xsl:template>
-
-<xsl:template match="tertiary" mode="indexterm">
-<xsl:text>!</xsl:text>
-<xsl:apply-templates mode="indexterm"/>
-</xsl:template>
-
-<xsl:template match="see|seealso" mode="indexterm">
-<xsl:text>|see{</xsl:text>
-<xsl:apply-templates mode="indexterm"/>
-<xsl:text>} </xsl:text>
-</xsl:template>
-
-
-<!-- ================================================ -->
-<!-- A simple example of what can be in an primary,   -->
-<!-- secondary or tertiary.                           -->
-<!-- ================================================ -->
-<xsl:template match="acronym" mode="indexterm">
-<xsl:apply-templates mode="indexterm"/>
-</xsl:template>
 
 
-<xsl:template match="primary|secondary|tertiary|see|seealso"/>
-<xsl:template match="indexentry"/>
-<xsl:template match="primaryie|secondaryie|tertiaryie|seeie|seealsoie"/>
+    <xsl:template match="primary|secondary|tertiary|see|seealso"/>
+    <xsl:template match="indexentry"/>
+    <xsl:template match="primaryie|secondaryie|tertiaryie|seeie|seealsoie"/>
 
 </xsl:stylesheet>
index a2a35d4629a5c1dcafb7439a529bc31bc2d7a327..86fdc19ef1f2fcff2ebc4aba7d36d63fefed612f 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: info.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="info" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: info.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 5a6d8cc214637088ca835412be10fc68f463a47c..864834f7c2db60c177b4f8a78537adcdd0ea1799 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: inline.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -15,6 +17,7 @@
     <doc:reference id="inline" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: inline.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
        <xsl:param name="content">
            <xsl:apply-templates/>
        </xsl:param>
-       <xsl:text>{\texttt{</xsl:text>
+       <xsl:text>{\texttt</xsl:text>
        <xsl:if test="$latex.hyphenation.tttricks='1'"><xsl:value-of select="$hyphenation" /></xsl:if>
        <xsl:text>{</xsl:text>
        <xsl:copy-of select="$content"/>
-       <xsl:text>}}}</xsl:text>
+       <xsl:text>}}</xsl:text>
     </xsl:template>
 
     <xsl:template name="inline.boldseq">
        <xsl:param name="content">
            <xsl:apply-templates/>
        </xsl:param>
-       <xsl:text>{\texttt\bfseries{</xsl:text>
+       <xsl:text>{\texttt\bfseries</xsl:text>
        <xsl:if test="$latex.hyphenation.tttricks='1'"><xsl:value-of select="$hyphenation" /></xsl:if>
        <xsl:text>{</xsl:text>
        <xsl:copy-of select="$content"/>
-       <xsl:text>}}}</xsl:text>
+       <xsl:text>}}</xsl:text>
     </xsl:template>
 
     <xsl:template name="inline.italicmonoseq">
        <xsl:param name="content">
            <xsl:apply-templates/>
        </xsl:param>
-       <xsl:text>{\texttt\itshape{</xsl:text>
+       <xsl:text>{\texttt\itshape</xsl:text>
        <xsl:if test="$latex.hyphenation.tttricks='1'"><xsl:value-of select="$hyphenation" /></xsl:if>
        <xsl:text>{</xsl:text>
        <xsl:copy-of select="$content"/>
-       <xsl:text>}}}</xsl:text>
+       <xsl:text>}}</xsl:text>
     </xsl:template>
 
     <xsl:template name="inline.superscriptseq">
index 80d545719957d133823686da3742857892ce3cb8..c975406ba750940fc6a2e4cb41adf0ed57e6fe19 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: keywords.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="keywords" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: keywords.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 5305e07c5a292828c738de71f24b47d3e1733dc9..ee8faf0000dbc0d6a1ed608dae4dbd46998169b8 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: labelid.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE: When this template is called, it marks the object with a label
 | and an hypertarget.
@@ -18,6 +20,7 @@
     <doc:reference id="labelid" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: labelid.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 2ab53de9bf3a39ca5ca450b1ce35398dfee9fe2f..8cdcde4312665df5cb453a3ffa4b6e3f6a33796a 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--#############################################################################
+|      $Id: latex.mapping.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |
 |   PURPOSE:
 + ############################################################################## -->
@@ -18,6 +20,7 @@
     <doc:reference id="glossary" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: latex.mapping.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
            <author>
                <firstname>Ramon</firstname><surname>Casellas</surname>
index cdd093b3d0fc2da5e6acdc91ea8d86e020d80c0c..351542d1e8e8f685be0344745a8a9955d2fdddce 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: lists.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -17,6 +19,7 @@
     <doc:reference id="lists" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: lists.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
 
     <xsl:template match="itemizedlist">
        <xsl:if test="title"> <xsl:apply-templates select="title"/></xsl:if>
-       <xsl:text>&#10;\begin{itemize}&#10;</xsl:text>
+       <xsl:text>\begin{itemize}&#10;</xsl:text>
        <xsl:apply-templates select="listitem"/>
-       <xsl:text>&#10;\end{itemize}&#10;</xsl:text>
+       <xsl:text>\end{itemize}&#10;</xsl:text>
     </xsl:template>
 
 
     <xsl:template match="orderedlist">
-       <xsl:variable name="numeration">
+       <!-- PARAM numeration : -->
+       <xsl:param name="numeration">
            <xsl:choose>
                <xsl:when test="@numeration">
                    <xsl:value-of select="@numeration"/>
@@ -63,9 +67,9 @@
                    <xsl:value-of select="arabic"/>
                </xsl:otherwise>
            </xsl:choose>
-       </xsl:variable>
+       </xsl:param>
        <xsl:if test="title"> <xsl:apply-templates select="title"/></xsl:if>
-       <xsl:text>&#10;\begin{enumerate}</xsl:text>
+       <xsl:text>\begin{enumerate}</xsl:text>
        <xsl:if test="@numeration">
            <xsl:choose>
                <xsl:when test="@numeration='arabic'">  <xsl:text>[1]</xsl:text>&#10;</xsl:when>
 
 
     <xsl:template match="variablelist">
-       <xsl:if test="title"> 
-               <xsl:apply-templates select="title"/>
-       </xsl:if>
+       <xsl:if test="title"> <xsl:apply-templates select="title"/></xsl:if>
        <xsl:text>&#10;\noindent&#10;</xsl:text> 
-       <xsl:text>&#10;\begin{description}&#10;</xsl:text> 
+       \begin{description}
        <xsl:apply-templates select="varlistentry"/>
-       <xsl:text>&#10;\end{description}&#10;</xsl:text> 
+       \end{description}
     </xsl:template>
 
 
     <xsl:template match="listitem">
-       <xsl:text>&#10;%--- Item&#10;</xsl:text>
-       <xsl:text>\item </xsl:text>
-       <xsl:apply-templates/>
-       <xsl:text>&#10;</xsl:text>
+       \item <xsl:apply-templates/><xsl:text>&#10;</xsl:text>
     </xsl:template>
 
 
     <xsl:template match="varlistentry">
-       <xsl:variable name="id"> 
-               <xsl:call-template name="label.id"/>
-       </xsl:variable>
-       <xsl:text>\item[</xsl:text><xsl:apply-templates select="term"/><xsl:text>]\mbox{} % mbox is a trick to induce different typesetting decisions</xsl:text>
+       <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
+       <xsl:text>\item[</xsl:text><xsl:apply-templates select="term"/><xsl:text>] </xsl:text>
        <xsl:apply-templates select="listitem"/>
     </xsl:template>
 
-
     <xsl:template match="varlistentry/term">
        <xsl:apply-templates/><xsl:text>, </xsl:text>
     </xsl:template>
                    <xsl:apply-templates select="$members[position()=$cell]"/>
                    <xsl:text> </xsl:text> 
                    <xsl:if test="$curcol &lt; $cols">
-                       <xsl:call-template name="generate.latex.cell.separator"/>
+                       <xsl:text>&amp; </xsl:text> 
                    </xsl:if>
                </xsl:when>
            </xsl:choose>
                    <xsl:apply-templates select="$members[position()=$cell]"/>
                    <xsl:text> </xsl:text> 
                    <xsl:if test="$curcol &lt; $cols">
-                       <xsl:call-template name="generate.latex.cell.separator"/>
+                       <xsl:text>&amp; </xsl:text> 
                    </xsl:if>
                </xsl:when>
                <xsl:otherwise>
index 2b085aa98d447aebd5326f2234fa1aa11d4d6bfd..f32d2631a572876180bfbe8c9e57a6c2b0d19a9a 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: mathelem.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $                
 |- #############################################################################
+|      $Author: jelmer $                                                                                               
 |                                                                                                              
 |   PURPOSE: Math Elements as theorems, lemmas, propositions, etc.
 |      Note: these elements are not part of the DocBook DTD. I have extended
@@ -20,6 +22,7 @@
     <doc:reference id="mathelems" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: mathelem.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 585c744109dd45ca507a16f36cad13953d9f5115..d9079b50da64824634fb41f697337af810056503 100644 (file)
@@ -5,7 +5,9 @@
  <!ENTITY % mmlextra PUBLIC "MathML extra" "ent/mmlextra.ent">  %mmlextra;
 ]>
 <!--############################################################################# 
+ |     $Id: mathml.content.constsymb.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
  |- #############################################################################
+ |     $Author: jelmer $                                                                                               
  |                                                                                                             
  |   PURPOSE: MathML content markup, constants and symbols, 4.4.12.
  |     MathML namespace used -> mml
index f197ca1924db15d3e6205cc4a09dc0f1de9663a0..2ae5cc7ccbbdaf36160e14037b758e56741f9547 100644 (file)
@@ -5,7 +5,9 @@
  <!ENTITY % mmlextra PUBLIC "MathML extra" "ent/mmlextra.ent">  %mmlextra;
 ]>
 <!--############################################################################# 
+ |     $Id: mathml.content.functions.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $                
  |- #############################################################################
+ |     $Author: jelmer $                                                                                               
  |                                                                                                             
  |   PURPOSE: MathML content markup.
  |     Note: these elements are not part of the DocBook DTD. I have extended
index d93ea22393d7210807c76947c4a6fab9e4e5f2a1..acdf329e7187b935dbfa890964a5ec07dc7a3ab8 100644 (file)
@@ -5,7 +5,9 @@
  <!ENTITY % mmlextra PUBLIC "MathML extra" "ent/mmlextra.ent">  %mmlextra;
 ]>
 <!--############################################################################# 
+ |     $Id: mathml.content.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $          
  |- #############################################################################
+ |     $Author: jelmer $                                                                                               
  |                                                                                                             
  |   PURPOSE: MathML content markup.
  |     Note: these elements are not part of the DocBook DTD. I have extended
index 1f3f5667634fba36e1919cadeb96d564104136e2..fd9dfdeaa6cafa75d4de32f790cb266d94ec5da9 100644 (file)
@@ -5,7 +5,9 @@
  <!ENTITY % mmlextra PUBLIC "MathML extra" "ent/mmlextra.ent">  %mmlextra;
 ]>
 <!--############################################################################# 
+ |     $Id: mathml.content.token.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
  |- #############################################################################
+ |     $Author: jelmer $                                                                                               
  |     
  |     PURPOSE: MathML Content Markup, tokens (ci, cn, csymbol)
  |     MathML namespace used -> mml
index f37edfb4ed734fb094266d56d862851915bd30fe..37619eb499efb6a7ce02f4086114f40aea9ec90a 100644 (file)
@@ -5,7 +5,9 @@
  <!ENTITY % mmlextra PUBLIC "MathML extra" "ent/mmlextra.ent">  %mmlextra;
 ]>
 <!--############################################################################# 
+ |     $Id: mathml.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $          
  |- #############################################################################
+ |     $Author: jelmer $
  |                                                                                                             
  |   PURPOSE: MathML presentation and content markup.
  |     Note: these elements are not part of the DocBook DTD. I have extended
index ce3c7c9a4d83f9ab0f9e280cc2226e1a652af25a..62f317d3443690da8cbc97373973e8c8ffbb5815 100644 (file)
@@ -5,7 +5,9 @@
  <!ENTITY % mmlextra PUBLIC "MathML extra" "ent/mmlextra.ent">  %mmlextra;
 ]>
 <!--############################################################################# 
+ |     $Id: mathml.presentation.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $             
  |- #############################################################################
+ |     $Author: jelmer $                                                                                               
  |                                                                                                             
  |   PURPOSE: MathML presentation markup.
  |     Note: these elements are not part of the DocBook DTD. I have extended
        <xsl:text>{</xsl:text> <xsl:apply-templates/> <xsl:text>}</xsl:text>
 </xsl:template>
 
-<xsl:variable name="latex.entities.xml" select="document('latex.entities.xml')"/>
-
 
 <!-- TOKENS -->
 <!-- Math Identifier -->
 <xsl:template match="mml:mi">
        <xsl:variable name="fontstyle" select="@fontstyle"/>
        <xsl:variable name="identifier" select="normalize-space(.)"/>
-       <xsl:variable name="equivalent">
-               <xsl:if test="string-length($identifier)=1">
-                       <xsl:value-of select="$latex.entities.xml/latex/character[@entity=$identifier]"/>
-               </xsl:if>
-       </xsl:variable>
        <xsl:choose>
                <xsl:when test="$identifier='&ExponentialE;'">
                        <xsl:text>\textrm{e}</xsl:text>
                <xsl:when test="$identifier='&#x0221E;'"><!--/infty infinity -->
                        <xsl:text>\infty</xsl:text>
                </xsl:when>
-               <!-- currently tries to map single-character identifiers only -->
-               <xsl:when test="$equivalent!=''">
-                       <xsl:text>{</xsl:text>
-                       <xsl:copy-of select="$equivalent"/>
-                       <xsl:text>}</xsl:text>
-               </xsl:when>
                <xsl:otherwise>
-                       <xsl:if test="$fontstyle='normal' or string-length($identifier)&gt;1">
-                               <xsl:text>\textrm</xsl:text>
-                       </xsl:if>
-                       <xsl:text>{</xsl:text>
-                       <xsl:copy-of select="$identifier"/>
-                       <xsl:text>}</xsl:text>
+                       <xsl:text>\textrm{</xsl:text> <xsl:copy-of select="$identifier"/> <xsl:text>}</xsl:text>
                </xsl:otherwise>
        </xsl:choose>
 </xsl:template>
        <xsl:apply-templates/>
 </xsl:template>
 
-<!-- Empty unless $character is a single character -->
-<xsl:template name="generate.equivalent">
-       <xsl:param name="arguments" select="0"/>
-       <xsl:param name="character"/>
-       <xsl:if test="string-length($character)=1">
-               <xsl:choose>
-                       <xsl:when test="$arguments&gt;0">
-                               <xsl:value-of select="$latex.entities.xml/latex/character[@entity=$character and @arguments=$arguments]"/>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:value-of select="$latex.entities.xml/latex/character[@entity=$character and @arguments='']"/>
-                       </xsl:otherwise>
-               </xsl:choose>
-       </xsl:if>
-</xsl:template>
-
 <!-- Math Operator -->
 <xsl:template match="mml:mo">
        <xsl:variable name="operator" select="normalize-space(.)"/>
-       <xsl:variable name="equivalent">
-               <xsl:call-template name="generate.equivalent">
-                       <xsl:with-param name="character" select="$operator"/>
-               </xsl:call-template>
-       </xsl:variable>
        <xsl:choose>
                <xsl:when test="$operator='&ApplyFunction;'">
                        <xsl:text></xsl:text>
                <xsl:when test="$operator='+' or $operator='-' or $operator='/' or $operator='*'">
                        <xsl:value-of select="$operator"/>
                </xsl:when>
-               <xsl:when test="$equivalent">
-                       <xsl:value-of select="$equivalent"/>
-               </xsl:when>
                <xsl:otherwise>
                        <xsl:text>\operatorname{</xsl:text>
                        <xsl:value-of select="$operator" />
 
 <!-- Math Space -->
 <xsl:template match="mml:mspace">
-       <xsl:if test="@width!='' and not(contains(@width,'%'))">
-               <xsl:text>\textrm{\hspace{</xsl:text><!-- kludge! -->
-               <xsl:value-of select="@width"/>
-               <xsl:text>}}</xsl:text>
-       </xsl:if>
-       <xsl:if test="@height!='' or @depth!=''">
-               <xsl:message>Warning: mspace support does not include height or depth.</xsl:message>
-       </xsl:if>
 </xsl:template>
 
 
 <xsl:template match="mml:mmultiscripts">
 </xsl:template>
 
-<xsl:template match="mml:munder">
 <!--
+<xsl:template match="mml:munder">
 <xsl:choose>
        <xsl:when test="*[2] = &#818;">
                <xsl:text>\underline{</xsl:text><xsl:apply-templates select="*[1]"/><xsl:text>}</xsl:text>
        <xsl:text>}{</xsl:text>
                <xsl:apply-templates select="*[1]"/>
        <xsl:text>}</xsl:text>
--->
-       <xsl:text>{</xsl:text>
-       <xsl:apply-templates select="*[1]"/>
-       <xsl:text>_{</xsl:text>
-       <xsl:apply-templates select="*[2]"/>
-       <xsl:text>}}</xsl:text>
-<!--
        </xsl:otherwise>
 </xsl:choose>
--->
 </xsl:template>
+-->
 <xsl:template match="mml:mover">
 <!--<xsl:choose>
        <xsl:when test="normalize-space(*[2]) = &#175;">
        <xsl:when test="normalize-space(*[2]) = &#9140;">
                <xsl:text>\widehat{</xsl:text><xsl:apply-templates select="*[1]"/><xsl:text>}</xsl:text>
        </xsl:when>
-       <xsl:otherwise>
-       </xsl:otherwise>
+       <xsl:otherwise>-->
+       <xsl:text>\overset{</xsl:text>
+               <xsl:apply-templates select="*[2]"/>
+       <xsl:text>}{</xsl:text>
+               <xsl:apply-templates select="*[1]"/>
+       <xsl:text>}</xsl:text>
+<!--   </xsl:otherwise>
 </xsl:choose>-->
-       <xsl:choose>
-               <xsl:when test="@accent='true' or ( local-name(*[2])='mo' and not(@accent='false'))">
-                       <xsl:variable name="equivalent">
-                               <xsl:call-template name="generate.equivalent">
-                                       <xsl:with-param name="arguments" select="1"/>
-                                       <xsl:with-param name="character" select="normalize-space(*[2])"/>
-                               </xsl:call-template>
-                       </xsl:variable>
-                       <xsl:choose>
-                               <xsl:when test="$equivalent!=''">
-                                       <xsl:text>{</xsl:text>
-                                       <xsl:value-of select="$equivalent"/>
-                                       <xsl:text>{</xsl:text>
-                                       <xsl:apply-templates select="*[1]"/>
-                                       <xsl:text>}}</xsl:text>
-                               </xsl:when>
-                               <xsl:otherwise>
-                                       <xsl:text>{</xsl:text>
-                                       <xsl:apply-templates select="*[1]"/>
-                                       <xsl:text>^{</xsl:text>
-                                       <xsl:apply-templates select="*[2]"/>
-                                       <xsl:text>}}</xsl:text>
-                               </xsl:otherwise>
-                       </xsl:choose>
-               </xsl:when>
-               <xsl:otherwise>
-                       <xsl:text>{</xsl:text>
-                       <xsl:apply-templates select="*[1]"/>
-                       <xsl:text>^{</xsl:text>
-                       <xsl:apply-templates select="*[2]"/>
-                       <xsl:text>}}</xsl:text>
-               </xsl:otherwise>
-       </xsl:choose>
 </xsl:template>
 
 
 
 <!-- Math UnderOver -->
 <xsl:template match="mml:munderover">
-       <xsl:text>{</xsl:text>
-       <xsl:apply-templates select="*[1]"/>
-       <xsl:text>_{</xsl:text>
-       <xsl:apply-templates select="*[2]"/>
-       <xsl:text>}</xsl:text>
-       <xsl:text>^{</xsl:text>
-       <xsl:apply-templates select="*[3]"/>
-       <xsl:text>}}</xsl:text>
-       <!--
        <xsl:text>\overset{</xsl:text>
                        <xsl:apply-templates select="*[3]"/>
                <xsl:text>}{\underset{</xsl:text>
                                        <xsl:text>}{</xsl:text>
                                <xsl:apply-templates select="*[1]"/>
        <xsl:text>}}</xsl:text>
-       -->
 </xsl:template>
 
 
                        <xsl:text> {\left\{ </xsl:text>
                </xsl:when>
                <xsl:when test="@open='['">
-                       <xsl:text> {\left[\, </xsl:text>
+                       <xsl:text> {\left[ </xsl:text>
                </xsl:when>
                <xsl:otherwise>
                        <xsl:text> {\left( </xsl:text>
                        <xsl:text> \right\}} </xsl:text>
                </xsl:when>
                <xsl:when test="@close=']'">
-                       <xsl:text> \,\right]} </xsl:text>
+                       <xsl:text> \right]} </xsl:text>
                </xsl:when>
                <xsl:otherwise>
                        <xsl:text> \right)} </xsl:text>
 <xsl:call-template name="mtable.format.tabular"><xsl:with-param name="cols" select="count($rows)"/></xsl:call-template>
 <xsl:text>}\hline&#10;</xsl:text>
        <xsl:apply-templates/>
-<xsl:text>\end{array} </xsl:text>
+\end{array}&#10;
 </xsl:template>
 
 <xsl:template match="mml:mtr">
index bfdd2c8c874ebf92d465621e7d1a278ff6ef7c85..5c996c2d9b98f7295cafc9ce58585bfd2f9ddd71 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: mediaobject.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $                                                                                               
 |                                                                                                              
 |   PURPOSE: Manage Imageobject related tags.
 + ############################################################################## -->
@@ -17,6 +19,7 @@
     <doc:reference id="mediaobject" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: mediaobject.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
     </xsl:template>
 
 
-    <xsl:template match="mediaobject">
-               <xsl:if test="local-name(preceding-sibling::*[1])!='mediaobject'">
-                       <xsl:text>&#10;</xsl:text>
-               </xsl:if>
-               <xsl:call-template name="mediacontent"/>
+    <xsl:template match="mediaobject|inlinemediaobject">
+       <xsl:if test="local-name(.)='mediaobject' and position()=1">
                <xsl:text>&#10;</xsl:text>
-       </xsl:template>
-
-    <xsl:template match="inlinemediaobject">
-               <xsl:call-template name="mediacontent"/>
-       </xsl:template>
-
-    <xsl:template name="mediacontent">
+       </xsl:if>
        <xsl:choose>
                <xsl:when test="count(imageobject)&lt;1">
                        <xsl:apply-templates select="textobject[1]"/>
                </xsl:when>
-               <xsl:when test="$use.role.for.mediaobject='1' and $preferred.mediaobject.role!='' and count(imageobject[@role='$preferred.mediaobject.role'])!=0">
-                       <xsl:apply-templates select="imageobject[@role=$preferred.mediaobject.role]"/>
+               <xsl:when test="$use.role.for.mediaobject='1' and $preferred.mediaobject.role!='' and count(imageobject/imagedata[@role='latex'])!=0">
+                       <xsl:apply-templates select="imageobject/imagedata[@role=$preferred.mediaobject.role]"/>
                </xsl:when>
-               <xsl:when test="$use.role.for.mediaobject='1' and count(imageobject[@role='latex'])!=0">
-                       <xsl:apply-templates select="imageobject[@role='latex']"/>
+               <xsl:when test="$use.role.for.mediaobject='1' and count(imageobject/imagedata[@role='latex'])!=0">
+                       <xsl:apply-templates select="imageobject/imagedata[@role='latex']"/>
                </xsl:when>
-               <xsl:when test="$use.role.for.mediaobject='1' and count(imageobject[@role='tex'])!=0">
-                       <xsl:apply-templates select="imageobject[@role='tex']"/>
+               <xsl:when test="$use.role.for.mediaobject='1' and count(imageobject/imagedata[@role='tex'])!=0">
+                       <xsl:apply-templates select="imageobject/imagedata[@role='tex']"/>
                </xsl:when>
                <xsl:when test="$latex.graphics.formats!='' and count(imageobject/imagedata[@format!=''])!=0">
                        <!-- this is not really the right method: formats to the left of $latex.graphics.formats
        </xsl:if>
        <xsl:text>{\includegraphics[</xsl:text>
        <xsl:choose>
-           <xsl:when test="@scale"> 
-               <xsl:text>scale=</xsl:text>
-               <xsl:value-of select="number(@scale) div 100"/>
-           </xsl:when>
-               <xsl:when test="$width!='' and @scalefit='1'">
+               <xsl:when test="$width!='' and (@scalefit='1' or count(@scale)&lt;1)">
                <xsl:text>width=</xsl:text><xsl:value-of select="normalize-space($width)"/>
                </xsl:when>
-               <xsl:when test="@depth!='' and @scalefit='1'">
-               <xsl:text>height=</xsl:text><xsl:value-of select="normalize-space(@depth)"/>
-               </xsl:when>
+           <xsl:when test="@scale"> 
+               <xsl:text>scale=.</xsl:text><xsl:value-of select="normalize-space(@scale)"/>
+           </xsl:when>
        </xsl:choose>
        <xsl:choose>
            <xsl:when test="@format = 'PRN'"><xsl:text>,angle=270</xsl:text></xsl:when>
                <xsl:value-of select="$filename"/>
            </xsl:otherwise>
        </xsl:choose>
-       <xsl:text>}}}</xsl:text>
+       <xsl:text>}}}&#10;</xsl:text>
+       <!-- xsl:text>}}}\quad&#10;</xsl:text -->
     </xsl:template>
 
 
index 52ad63a87c8f46c65c73bbdfd1916221b73f2f3b..a72074e9f56c226192830b9f1c470050568069cc 100644 (file)
@@ -1,7 +1,9 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
     <!--############################################################################# 
+    |  $Id: msgset.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
     |- #############################################################################
+    |  $Author: jelmer $
     |                                                                                                          
     |   PURPOSE:
     + ############################################################################## -->
index 058695d71dacf7c8ad7ae61a72599ab98c465aad..0ad0f76865e6ca6b52df4195f612ba99d2363e21 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: normalize-scape.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 |      Escape LaTeX and normalize-space templates.
@@ -18,6 +20,7 @@
     <doc:reference id="normalize-scape" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: normalize-scape.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
     <!--############################################################################# -->
 
     <xsl:template match="text()">
-               <xsl:call-template name="trim-outer">
-                       <xsl:with-param name="string">
-                               <xsl:choose>
-                                       <xsl:when test="ancestor::literal|ancestor::email|ancestor::sgmltag">
-                                               <xsl:call-template name="scape-verbatim">
-                                                       <xsl:with-param name="string" select="."/>
-                                               </xsl:call-template>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:call-template name="scape">
-                                                       <xsl:with-param name="string" select="."/>
-                                               </xsl:call-template>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:with-param>
-               </xsl:call-template>
+       <xsl:call-template name="scape">
+           <xsl:with-param name="string" select="."/>
+       </xsl:call-template>
     </xsl:template>
 
     <xsl:template match="text()" mode="xref.text">
-               <xsl:call-template name="trim-outer">
-                       <xsl:with-param name="string">
-                               <xsl:call-template name="scape">
-                                       <xsl:with-param name="string" select="."/>
-                               </xsl:call-template>
-                       </xsl:with-param>
-               </xsl:call-template>
+       <xsl:call-template name="scape">
+           <xsl:with-param name="string" select="."/>
+       </xsl:call-template>
     </xsl:template>
 
     <xsl:template match="text()" mode="xref-to">
-               <xsl:call-template name="trim-outer">
-                       <xsl:with-param name="string">
-                               <xsl:call-template name="scape">
-                                       <xsl:with-param name="string" select="."/>
-                               </xsl:call-template>
-                       </xsl:with-param>
-               </xsl:call-template>
+       <xsl:call-template name="scape">
+           <xsl:with-param name="string" select="."/>
+       </xsl:call-template>
     </xsl:template>
 
     <xsl:template match="text()" mode="latex.verbatim">
-               <!--
-               <xsl:call-template name="trim-outer">
-                       <xsl:with-param name="string">
-                       -->
-                               <xsl:value-of select="."/> 
-                       <!--
-                       </xsl:with-param>
-               </xsl:call-template>
-               -->
+       <xsl:value-of select="."/> 
     </xsl:template>
 
        <!-- this template is noly used by xref.mod.xsl and only when
             $latex.hyphenation.tttricks != 1. -->
     <xsl:template match="text()" mode="slash.hyphen">
-               <xsl:call-template name="trim-outer">
-                       <xsl:with-param name="string">
-                               <xsl:call-template name="scape.slash.hyphen">
-                                       <xsl:with-param name="string" select="." />
-                               </xsl:call-template>
-                       </xsl:with-param>
+               <xsl:call-template name="scape.slash.hyphen">
+                       <xsl:with-param name="string" select="." />
                </xsl:call-template>
        </xsl:template>
 
-       <xsl:template name="trim-outer">
-               <xsl:param name="string"/>
-               <xsl:variable name="trimleft" select="position()=1"/>
-               <xsl:variable name="trimright" select="position()=last()"/>
-               <xsl:choose>
-                       <xsl:when test="$trimleft and not($trimright)">
-                               <xsl:value-of select="substring-before(normalize-space(concat($string,'$$')),'$$')"/>
-                       </xsl:when>
-                       <xsl:when test="$trimright and not($trimleft)">
-                               <xsl:value-of select="substring-after(normalize-space(concat('$$',$string)),'$$')"/>
-                       </xsl:when>
-                       <xsl:when test="$trimleft and $trimright">
-                               <xsl:value-of select="normalize-space($string)"/>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:value-of select="$string"/>
-                       </xsl:otherwise>
-               </xsl:choose>
-       </xsl:template>
-
        <xsl:template name="scape.slash.hyphen">
        <xsl:param name="string" />
        <xsl:choose>
                            <xsl:with-param name="from">&gt;</xsl:with-param>
                            <xsl:with-param name="string">
                                <xsl:call-template name="string-replace">
-                                       <xsl:with-param name="to">\textasciitilde{}</xsl:with-param>
-                                       <xsl:with-param name="from">~</xsl:with-param>
+                                   <xsl:with-param name="to">\{</xsl:with-param>
+                                   <xsl:with-param name="from">{</xsl:with-param>
                                    <xsl:with-param name="string">
                                        <xsl:call-template name="string-replace">
-                                               <xsl:with-param name="to">\^{}</xsl:with-param>
-                                               <xsl:with-param name="from">^</xsl:with-param>
+                                           <xsl:with-param name="to">\}</xsl:with-param>
+                                           <xsl:with-param name="from">}</xsl:with-param>
                                            <xsl:with-param name="string">
                                                <xsl:call-template name="string-replace">
                                                    <xsl:with-param name="to">\&amp;</xsl:with-param>
                                                                                    <xsl:with-param name="from">%</xsl:with-param>
                                                                                    <xsl:with-param name="string">
                                                                                        <xsl:call-template name="string-replace">
-                                                                                               <xsl:with-param name="to">\{</xsl:with-param>
-                                                                                               <xsl:with-param name="from">{</xsl:with-param>
+                                                                                               <xsl:with-param name="to">\^</xsl:with-param>
+                                                                                               <xsl:with-param name="from">^</xsl:with-param>
                                                                                                <xsl:with-param name="string">
                                                                                                <xsl:call-template name="string-replace">
-                                                                                                       <xsl:with-param name="to">\}</xsl:with-param>
-                                                                                                       <xsl:with-param name="from">}</xsl:with-param>
+                                                                                                       <xsl:with-param name="to">\textasciitilde{}</xsl:with-param>
+                                                                                                       <xsl:with-param name="from">~</xsl:with-param>
                                                                                                        <xsl:with-param name="string">
                                                                                                        <xsl:call-template name="string-replace">
-                                                                                                               <xsl:with-param name="to">\textbackslash \ </xsl:with-param>
-                                                                                                               <xsl:with-param name="from">\textbackslash  </xsl:with-param>
-                                                                                                               <xsl:with-param name="string">
-                                                                                                               <xsl:call-template name="string-replace">
-                                                                                                                       <xsl:with-param name="to">\textbackslash </xsl:with-param>
-                                                                                                                       <xsl:with-param name="from">\</xsl:with-param>
-                                                                                                                       <xsl:with-param name="string" select="$string"></xsl:with-param>
-                                                                                                               </xsl:call-template>
-                                                                                                       </xsl:with-param>
-                                                                                               </xsl:call-template></xsl:with-param>
+                                                                                                               <xsl:with-param name="to">\textbackslash{}</xsl:with-param>
+                                                                                                               <xsl:with-param name="from">\</xsl:with-param>
+                                                                                                               <xsl:with-param name="string" select="$string"></xsl:with-param>
+                                                                                                       </xsl:call-template>
+                                                                                               </xsl:with-param>
                                                                                        </xsl:call-template></xsl:with-param>
                                                                                </xsl:call-template></xsl:with-param>
                                                                    </xsl:call-template></xsl:with-param>
        </xsl:call-template>
     </xsl:template>
 
-       <xsl:template name="scape-verbatim" >
-       <xsl:param name="string"/>
-               <xsl:call-template name="string-replace">
-                       <xsl:with-param name="to">\textasciitilde{}</xsl:with-param>
-                       <xsl:with-param name="from">~</xsl:with-param>
-                       <xsl:with-param name="string">
-                       <xsl:call-template name="string-replace">
-                               <xsl:with-param name="to">\^{}</xsl:with-param>
-                               <xsl:with-param name="from">^</xsl:with-param>
-                               <xsl:with-param name="string">
-                               <xsl:call-template name="string-replace">
-                                       <xsl:with-param name="to">\&amp;</xsl:with-param>
-                                       <xsl:with-param name="from">&amp;</xsl:with-param>
-                                       <xsl:with-param name="string">
-                                       <xsl:call-template name="string-replace">
-                                               <xsl:with-param name="to">\#</xsl:with-param>
-                                               <xsl:with-param name="from">#</xsl:with-param>
-                                               <xsl:with-param name="string">
-                                               <xsl:call-template name="string-replace">
-                                                       <xsl:with-param name="to">\_</xsl:with-param>
-                                                       <xsl:with-param name="from">_</xsl:with-param>
-                                                       <xsl:with-param name="string">
-                                                       <xsl:call-template name="string-replace">
-                                                               <xsl:with-param name="to">\$</xsl:with-param>
-                                                               <xsl:with-param name="from">$</xsl:with-param>
-                                                               <xsl:with-param name="string">
-                                                               <xsl:call-template name="string-replace">
-                                                                       <xsl:with-param name="to">\%</xsl:with-param>
-                                                                       <xsl:with-param name="from">%</xsl:with-param>
-                                                                       <xsl:with-param name="string">
-                                                                       <xsl:call-template name="string-replace">
-                                                                               <xsl:with-param name="to">\docbooktolatexgobble\string\{</xsl:with-param>
-                                                                               <xsl:with-param name="from">{</xsl:with-param>
-                                                                               <xsl:with-param name="string">
-                                                                               <xsl:call-template name="string-replace">
-                                                                                       <xsl:with-param name="to">\docbooktolatexgobble\string\}</xsl:with-param>
-                                                                                       <xsl:with-param name="from">}</xsl:with-param>
-                                                                                       <xsl:with-param name="string">
-                                                                                       <xsl:call-template name="string-replace">
-                                                                                               <xsl:with-param name="to">\docbooktolatexgobble\string\\</xsl:with-param>
-                                                                                               <xsl:with-param name="from">\</xsl:with-param>
-                                                                                               <xsl:with-param name="string" select="$string"/>
-                                                                                       </xsl:call-template>
-                                                                               </xsl:with-param>
-                                                                       </xsl:call-template></xsl:with-param>
-                                                               </xsl:call-template></xsl:with-param>
-                                                       </xsl:call-template></xsl:with-param>
-                                               </xsl:call-template></xsl:with-param>
-                                       </xsl:call-template></xsl:with-param>
-                               </xsl:call-template></xsl:with-param>
-                       </xsl:call-template></xsl:with-param>
-               </xsl:call-template></xsl:with-param>
-       </xsl:call-template>
-    </xsl:template>
-
-       <xsl:template name="scape-href" >
-       <xsl:param name="string"/>
-       <!-- maybe we should warn when there are invalid characters -->
-       <xsl:call-template name="string-replace">
-               <xsl:with-param name="to">\&amp;</xsl:with-param>
-               <xsl:with-param name="from">&amp;</xsl:with-param>
-               <xsl:with-param name="string">
-                       <xsl:call-template name="string-replace">
-                               <xsl:with-param name="to">\%</xsl:with-param>
-                               <xsl:with-param name="from">%</xsl:with-param>
-                               <xsl:with-param name="string">
-                                       <xsl:call-template name="string-replace">
-                                               <xsl:with-param name="to">\{</xsl:with-param>
-                                               <xsl:with-param name="from">{</xsl:with-param>
-                                               <xsl:with-param name="string">
-                                                       <xsl:call-template name="string-replace">
-                                                               <xsl:with-param name="to">\{</xsl:with-param>
-                                                               <xsl:with-param name="from">{</xsl:with-param>
-                                                               <xsl:with-param name="string">
-                                                                       <xsl:call-template name="string-replace">
-                                                                               <xsl:with-param name="to">\docbooktolatexgobble\string\\</xsl:with-param>
-                                                                               <xsl:with-param name="from">\</xsl:with-param>
-                                                                               <xsl:with-param name="string" select="$string"/>
-                                                                       </xsl:call-template>
-                                                               </xsl:with-param>
-                                                       </xsl:call-template>
-                                               </xsl:with-param>
-                                       </xsl:call-template>
-                               </xsl:with-param>
-                       </xsl:call-template>
-               </xsl:with-param>
-       </xsl:call-template>
-    </xsl:template>
-
-    <doc:template name="scape-optionalarg" xmlns="">
-       <refpurpose> Escape the ] character in LaTeX optional arguments (experimental)  </refpurpose>
-       <refdescription>
-       </refdescription>
-    </doc:template>
-       <xsl:template name="scape-optionalarg" >
-       <xsl:param name="string"/>
-       <xsl:call-template name="string-replace">
-               <xsl:with-param name="to">{\rbrack}</xsl:with-param>
-               <xsl:with-param name="from">]</xsl:with-param>
-               <xsl:with-param name="string" select="$string"/>
-       </xsl:call-template>
-    </xsl:template>
-
 
 
 
index 9f39916bda72cbfc1b2a44284bddb34276884ea8..8a02fa5eb3eda11a9de7dc396565690c801f2ec6 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: para.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -15,6 +17,7 @@
     <doc:reference id="para" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: para.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
@@ -67,5 +70,7 @@
     <xsl:template match="step/para"> <xsl:apply-templates/> </xsl:template>
     <xsl:template match="entry/para"> <xsl:apply-templates/> </xsl:template>
     <xsl:template match="question/para"> <xsl:apply-templates/> </xsl:template>
+    <xsl:template match="answer/para"> <xsl:apply-templates/> </xsl:template>
+
 
 </xsl:stylesheet>
index 38c15e9331bb07ee12c91e9f2a22ecef611d4032..a0994226b947f899c54ebf7dcd2d0068fc76df4f 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: part-chap-app.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE: Part
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="part-chap-app" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: part-chap-app.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
@@ -53,7 +56,9 @@
 
 
     <!--############################################################################# 
+    |  $Id: part-chap-app.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
     |- #############################################################################
+    |  $Author: jelmer $
     |                                                                                                          
     |   PURPOSE: Chapter
     + ############################################################################## -->
 
 
     <!--############################################################################# 
+    |  $Id: part-chap-app.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
     |- #############################################################################
+    |  $Author: jelmer $
     |                                                                                                          
     |   PURPOSE:
     + ############################################################################## -->
index a4409583c8ea73b1494113ec41369b1a72c40960..4ebf58b786fd90c1748354701a360936ee10a0e3 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: pi.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -18,6 +20,7 @@
     <doc:reference id="abstract" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: pi.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index ec9e5a8afc9fd9cce983b0fd981ae0a45a5f2cc9..140f9294718029bfffbde090fd98506d3bd11452 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: preamble.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $                
 |- #############################################################################
+|      $Author: jelmer $
 |
 |   PURPOSE: Variables and templates to manage LaTeX preamble. 
 + ############################################################################## -->
@@ -13,6 +15,7 @@
     <doc:reference id="preamble" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: preamble.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
                <xsl:value-of select="$latex.article.preamble.pre"/>
                <xsl:call-template name="label.id"/>
                <xsl:call-template name="generate.latex.common.preamble"/>
-               <xsl:call-template name="generate.latex.essential.preamble"/>
                <xsl:value-of select="$latex.article.preamble.post"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$latex.override"/>
-               <xsl:call-template name="generate.latex.essential.preamble"/>
            </xsl:otherwise>
        </xsl:choose>
     </xsl:template>
                <xsl:value-of select="$latex.book.preamble.pre"/>
                <xsl:call-template name="label.id"/>
                <xsl:call-template name="generate.latex.common.preamble"/>
-               <xsl:call-template name="generate.latex.essential.preamble"/>
                <xsl:value-of select="$latex.book.preamble.post"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$latex.override"/>
-               <xsl:call-template name="generate.latex.essential.preamble"/>
            </xsl:otherwise>
        </xsl:choose>
     </xsl:template>
        <xsl:text>\usepackage{latexsym}         &#10;</xsl:text>
        <xsl:text>\usepackage{enumerate}         &#10;</xsl:text>
        <xsl:if test="$latex.use.fancybox=1">
-               <!-- must be before \usepackage{fancyvrb} -->
                <xsl:text>\usepackage{fancybox}      &#10;</xsl:text>
        </xsl:if>
        <xsl:text>\usepackage{float}       &#10;</xsl:text>
                <xsl:text>\usepackage[</xsl:text><xsl:value-of select="$latex.babel.language" /><xsl:text>]{babel} &#10;</xsl:text>
        </xsl:if>
        <xsl:if test="$latex.use.fancyvrb=1">
-               <!-- must be after \usepackage{fancybox} -->
                <xsl:text>\usepackage{fancyvrb}         &#10;</xsl:text>
                <xsl:text>\makeatletter\@namedef{FV@fontfamily@default}{\def\FV@FontScanPrep{}\def\FV@FontFamily{}}\makeatother&#10;</xsl:text>
                <xsl:if test="$latex.fancyvrb.tabsize!=''">
        <xsl:text> \normalsize\rmfamily}&#10;</xsl:text>
 
        <xsl:if test="$latex.math.support=1"><xsl:value-of select="$latex.math.preamble"/></xsl:if>
-       <xsl:if test="$latex.use.hyperref=1">
-               <xsl:call-template name="latex.hyperref.preamble"/>
-       </xsl:if>
+       <xsl:choose>
+               <xsl:when test="$latex.use.hyperref=1">
+                       <xsl:call-template name="latex.hyperref.preamble"/>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:text>\newcommand{\href}[1]{{}}&#10;</xsl:text>
+                       <xsl:text>\newcommand{\hyperlink}[1]{{}}&#10;</xsl:text>
+                       <xsl:text>\newcommand{\hypertarget}[2]{#2}&#10;</xsl:text>
+               </xsl:otherwise>
+       </xsl:choose>
        <xsl:value-of select="$latex.admonition.environment"/>
        <xsl:call-template name="latex.float.preamble"/>
        <xsl:call-template name="latex.graphicext"/>
+       <xsl:text>% --------------------------------------------&#10;</xsl:text>
+       <xsl:text>% A way to honour &lt;footnoteref&gt;s&#10;</xsl:text>
+       <xsl:text>% Blame j-devenish (at) users.sourceforge.net&#10;</xsl:text>
+       <xsl:text><![CDATA[% In any other LaTeX context, this would probably go into a style file.
+\makeatletter
+\newcommand{\docbooktolatexusefootnoteref}[1]{\@ifundefined{@fn@label@#1}%
+  {\hbox{\@textsuperscript{\normalfont ?}}%
+    \@latex@warning{Footnote label `#1' was not defined}}%
+  {\@nameuse{@fn@label@#1}}}
+\newcommand{\docbooktolatexmakefootnoteref}[1]{%
+  \protected@write\@auxout{}%
+    {\global\string\@namedef{@fn@label@#1}{\@makefnmark}}%
+  \@namedef{@fn@label@#1}{\hbox{\@textsuperscript{\normalfont ?}}}%
+  }
+\makeatother]]></xsl:text>
+       <xsl:text>% --------------------------------------------&#10;</xsl:text>
+       <xsl:text>% Hacks for honouring row/entry/@align&#10;</xsl:text>
+       <xsl:text>% (\hspace not effective when in paragraph mode)&#10;</xsl:text>
+       <xsl:text>% Naming convention for these macros is:&#10;</xsl:text>
+       <xsl:text>% 'docbooktolatex' 'align' {alignment-type} {position-within-entry}&#10;</xsl:text>
+       <xsl:text>% where r = right, l = left, c = centre&#10;</xsl:text>
+       <xsl:text>\newcommand{\docbooktolatexalignrl}{\protect\ifvmode\raggedleft\else\hfill\fi}&#10;</xsl:text>
+       <xsl:text>\newcommand{\docbooktolatexalignrr}{\protect}&#10;</xsl:text>
+       <xsl:text>\newcommand{\docbooktolatexalignll}{\protect\ifvmode\raggedright\else\fi}&#10;</xsl:text>
+       <xsl:text>\newcommand{\docbooktolatexalignlr}{\protect\ifvmode\else\hspace*\fill\fi}&#10;</xsl:text>
+       <xsl:text>\newcommand{\docbooktolatexaligncl}{\protect\ifvmode\centering\else\hfill\fi}&#10;</xsl:text>
+       <xsl:text>\newcommand{\docbooktolatexaligncr}{\protect\ifvmode\else\hspace*\fill\fi}&#10;</xsl:text>
        <xsl:choose>
                <xsl:when test='$latex.caption.swapskip=1'>
                        <xsl:text>% --------------------------------------------&#10;</xsl:text>
        </xsl:if>
     </xsl:template>
 
-    <doc:variable name="generate.latex.essential.preamble" xmlns="">
-       <refpurpose> Unavoidable LaTeX preamble shared by articles and books </refpurpose>
-       <refdescription>
-           <para>Contains custom commands <emphasis>that you just can't get rid of!</emphasis></para>
-       </refdescription>
-    </doc:variable>
-       <xsl:template name="generate.latex.essential.preamble">
-       <xsl:text>% --------------------------------------------&#10;</xsl:text>
-       <xsl:text>\makeatletter&#10;</xsl:text>
-       <xsl:if test="$latex.use.hyperref!='1'">
-               <xsl:text>\newcommand{\href}[1]{{}}&#10;</xsl:text>
-               <xsl:text>\newcommand{\hyperlink}[1]{{}}&#10;</xsl:text>
-               <xsl:text>\newcommand{\hypertarget}[2]{#2}&#10;</xsl:text>
-       </xsl:if>
-       <xsl:if test="$latex.use.ucs='1'">
-               <xsl:text>\usepackage[</xsl:text>
-               <xsl:value-of select="$latex.ucs.options"/>
-               <xsl:text>]{ucs}&#10;</xsl:text>
-       </xsl:if>
-       <xsl:if test="$latex.entities='catcode'">
-               <xsl:text>\catcode`\&amp;=\active\def&amp;{\@ifnextchar##{\@docbooktolatexunicode\@gobble}{\&amp;}}&#10;</xsl:text>
-               <xsl:if test="$latex.use.ucs!='1'">
-                       <xsl:text><![CDATA[
-% A few example Unicode characters.
-% For full support, use the unicode pacakge from Dominique Unruh/CTAN.
-\newcommand{\unichar}[1]{%
-       \ifnum#1=8212---%
-       \else\&\##1;\fi%
-}
-]]></xsl:text>
-               </xsl:if>
-               <xsl:text>\def\@docbooktolatexunicode#1;{\edef\@dbtemp{#1}\unichar{\@dbtemp}}&#10;</xsl:text>
-       </xsl:if>
-       <xsl:if test="$latex.entities='unicode'">
-      <xsl:text>\usepackage[utf8]{inputenc}&#10;</xsl:text>
-       </xsl:if>
-       <xsl:text><![CDATA[
-\def\docbooktolatexgobble{\expandafter\@gobble}
-% Facilitate use of \cite with \label
-\newcommand{\docbooktolatexbibaux}[2]{%
-  \protected@write\@auxout{}{\string\global\string\@namedef{docbooktolatexcite@#1}{#2}}
-}
-\newcommand{\docbooktolatexcite}[2]{%
-  \@ifundefined{docbooktolatexcite@#1}%
-  {\cite{#1}}%
-  {\def\@docbooktolatextemp{#2}\ifx\@docbooktolatextemp\@empty%
-   \cite{\@nameuse{docbooktolatexcite@#1}}%
-   \else\cite[#2]{\@nameuse{docbooktolatexcite@#1}}%
-   \fi%
-  }%
-}
-\newcommand{\docbooktolatexbackcite}[1]{%
-  \ifx\Hy@backout\@undefined\else%
-    \@ifundefined{docbooktolatexcite@#1}{%
-      % emit warning?
-    }{%
-      \ifBR@verbose%
-        \PackageInfo{backref}{back cite \string`#1\string' as \string`\@nameuse{docbooktolatexcite@#1}\string'}%
-      \fi%
-      \Hy@backout{\@nameuse{docbooktolatexcite@#1}}%
-    }%
-  \fi%
-}
-% --------------------------------------------
-% A way to honour <footnoteref>s
-% Blame j-devenish (at) users.sourceforge.net
-% In any other LaTeX context, this would probably go into a style file.
-\newcommand{\docbooktolatexusefootnoteref}[1]{\@ifundefined{@fn@label@#1}%
-  {\hbox{\@textsuperscript{\normalfont ?}}%
-    \@latex@warning{Footnote label `#1' was not defined}}%
-  {\@nameuse{@fn@label@#1}}}
-\newcommand{\docbooktolatexmakefootnoteref}[1]{%
-  \protected@write\@auxout{}%
-    {\global\string\@namedef{@fn@label@#1}{\@makefnmark}}%
-  \@namedef{@fn@label@#1}{\hbox{\@textsuperscript{\normalfont ?}}}%
-  }
-% --------------------------------------------
-% Hacks for honouring row/entry/@align
-% (\hspace not effective when in paragraph mode)
-% Naming convention for these macros is:
-% 'docbooktolatex' 'align' {alignment-type} {position-within-entry}
-% where r = right, l = left, c = centre
-\newcommand{\docbooktolatexalignrl}{\protect\ifvmode\raggedleft\else\hfill\fi}
-\newcommand{\docbooktolatexalignrr}{\protect}
-\newcommand{\docbooktolatexalignll}{\protect\ifvmode\raggedright\else\fi}
-\newcommand{\docbooktolatexalignlr}{\protect\ifvmode\else\hspace*\fill\fi}
-\newcommand{\docbooktolatexaligncl}{\protect\ifvmode\centering\else\hfill\fi}
-\newcommand{\docbooktolatexaligncr}{\protect\ifvmode\else\hspace*\fill\fi}
-\ifx\captionswapskip\@undefined\newcommand{\captionswapskip}{}\fi
-\makeatother
-]]></xsl:text>
-       </xsl:template>
-
 
 
     <!--#############################################################################
@@ -796,15 +734,25 @@ Otherwise, declares .pdf, .png, .jpg if using pdflatex and .eps if using latex.
 </xsl:choose>
 </xsl:template>
 
-       <xsl:template name="generate.latex.cell.separator">
+    <doc:template name="generate.latex.pagestyle" xmlns="">
+       <refpurpose> Choose the preferred page style for document body </refpurpose>
+       <refdescription>
+               <formalpara><title>Pertinent Variables</title>
+               <itemizedlist>
+                       <listitem><simpara><xref linkend="param.pagestyle"/></simpara></listitem>
+                       <listitem><simpara><xref linkend="param.use.fancyhdr"/></simpara></listitem>
+               </itemizedlist>
+               </formalpara>
+       </refdescription>
+    </doc:template>
+       <xsl:template name="generate.latex.pagestyle">
+               <xsl:text>\pagestyle{</xsl:text>
                <xsl:choose>
-                       <xsl:when test="$latex.entities='catcode'">
-                               <xsl:text> \catcode`\&amp;=4 &amp;\catcode`\&amp;=\active </xsl:text>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:text> &amp; </xsl:text>
-                       </xsl:otherwise>
+                       <xsl:when test="$latex.pagestyle!=''"><xsl:value-of select="$latex.pagestyle"/></xsl:when>
+                       <xsl:when test="$latex.use.fancyhdr=1"><xsl:text>fancy</xsl:text></xsl:when>
+                       <xsl:otherwise><xsl:text>plain</xsl:text></xsl:otherwise>
                </xsl:choose>
+               <xsl:text>}</xsl:text>
        </xsl:template>
 </xsl:stylesheet>
 
index c53cf39c689d3a85402aca14baa6cd2642ad01b1..e151f7c85c21e6200d8b6c700cffc51d7436a5fc 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: procedure.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -17,6 +19,7 @@
     <doc:reference id="procedure" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: procedure.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
@@ -41,7 +44,7 @@
 
 
 <!--############################################################################# -->
-<doc:template match="procedure" xmlns="">
+<doc:template match="step" xmlns="">
 <refpurpose>Procedure XSL Template.</refpurpose>
 <refdescription>
 <para></para>
@@ -78,7 +81,7 @@
 </xsl:template>
 
 <xsl:template match="procedure/title" mode="procedure.title">
-       <xsl:text>&#10;&#10;{</xsl:text>
+       <xsl:text>{</xsl:text>
        <xsl:value-of select="$latex.procedure.title.style"/>
        <xsl:text>{</xsl:text>
        <xsl:choose>
     <xsl:template match="step">
        <xsl:choose>
            <xsl:when test="title">
-                       <xsl:text>&#10;\item{{</xsl:text>
-                       <xsl:value-of select="$latex.step.title.style"/> <!-- by default \sc -->
-                       <xsl:text>{</xsl:text>
-                       <xsl:apply-templates select="title"/>
-                       <xsl:text>}}&#10;</xsl:text>
+               <xsl:text>\item{{</xsl:text>
+               <xsl:value-of select="$latex.step.title.style"/>
+               <xsl:text>{</xsl:text>
+               <xsl:apply-templates select="title"/><xsl:text>} &#10;</xsl:text>
            </xsl:when>
            <xsl:otherwise>
-                       <xsl:text>&#10;\item{</xsl:text>
+               <xsl:text>\item{{</xsl:text>
            </xsl:otherwise>
        </xsl:choose>
-        <xsl:apply-templates select="*[not(self::title)]"/>
-       <xsl:text>}&#10;</xsl:text>
+       <xsl:apply-templates/>
+       <xsl:text>}}&#10;</xsl:text>
     </xsl:template>
-
-<!-- step/title, just apply templates ########################################### -->
-    <xsl:template match="step/title"> 
-               <xsl:apply-templates/>
-       </xsl:template>
+<!-- Empty step/title ########################################################## -->
+    <xsl:template match="step/title"> </xsl:template>
 
 
 
index c93d56e6b3cb70894cffaed4c5c7ebcb6f852617..b4cdc80b6935ea7277151222a37b9c543193865d 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0"?>
 <!--############################################################################# 
+|      $Id: qandaset.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 |   Portions (c) Norman Walsh, official DocBook XSL stylesheets.
@@ -17,6 +19,7 @@
 <!-- DOCUMENTATION                                                                -->
   <doc:reference xmlns="" id="qandaset">
     <referenceinfo>
+      <releaseinfo role="meta"> $Id: qandaset.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $ </releaseinfo>
        <authorgroup>
        <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
        <author> <firstname>James</firstname> <surname>Devenish</surname> </author>
                <xsl:text>% -----------&#10;</xsl:text>
                <xsl:text>% QandADiv   &#10;</xsl:text>
                <xsl:text>% -----------&#10;</xsl:text>
-               <xsl:text>\noindent\begin{minipage}{\linewidth}&#10;</xsl:text>
-               <xsl:text>\vspace{0.25em}\hrule\vspace{0.25em}&#10;</xsl:text>
                <xsl:choose>
                <xsl:when test="ancestor::sect2">
                        <xsl:text>\paragraph*{</xsl:text>
                                <xsl:text>F.A.Q. Part</xsl:text>
                        </xsl:otherwise>
                </xsl:choose>
-               <xsl:text>}</xsl:text>
+               <xsl:text>}&#10;</xsl:text>
                <xsl:call-template name="label.id"/>
                <xsl:text>&#10;</xsl:text>
-               <xsl:text>\hrule\vspace{0.25em}&#10;</xsl:text>
-               <xsl:text>\end{minipage}&#10;</xsl:text>
 
 <!--
   <xsl:variable name="toc.params">
 -->
 
 <!-- pseudo table of contents -->
-       <!--
+       <xsl:text>\floatstyle{ruled}&#10;</xsl:text>
+       <xsl:text>\newfloat{qandadivtoc}{H}{qdtoc}&#10;</xsl:text>
+       <!-- Either this one : -->
+       <xsl:text>\floatname{qandadivtoc}{</xsl:text>
+       <xsl:call-template name="gentext">
+               <xsl:with-param name="key">TableofContents</xsl:with-param>
+       </xsl:call-template>
+       <xsl:text>}&#10;</xsl:text>
+       <!-- or this one : 
+       <xsl:text>\floatname{qandadivtoc}{}&#10;</xsl:text>
+       -->
+       <xsl:text>\begin{qandadivtoc}&#10;</xsl:text>
        <xsl:choose>
                <xsl:when test="title">
                        <xsl:text>\caption{</xsl:text>
                        <xsl:text>}&#10;</xsl:text>
                </xsl:otherwise>
        </xsl:choose>
-       -->
        <xsl:for-each select="qandaentry">
-       <xsl:text>\noindent{}</xsl:text>
+       <xsl:text>\noindent</xsl:text>
        <xsl:value-of select="position()"/>
        <xsl:text>.~</xsl:text>
        <xsl:apply-templates select="question"/>
-       <xsl:if test="position()!=last()"><xsl:text>\newline&#10;</xsl:text></xsl:if>
        </xsl:for-each>
-       <xsl:text>\vspace{0.25em}\hrule&#10;</xsl:text>
+       <xsl:text>\end{qandadivtoc}&#10;</xsl:text>
+       <xsl:text>\vspace{0.25cm}&#10;</xsl:text>
 
        <xsl:for-each select="qandaentry">
-       <xsl:text>\vspace{1em}&#10;</xsl:text>
-       <xsl:text>\noindent{}</xsl:text>
+       <xsl:text>\noindent</xsl:text>
        <xsl:value-of select="position()"/>
        <xsl:text>.~</xsl:text>
-       <xsl:apply-templates select="question"/>
-       <xsl:text>\newline&#10;</xsl:text>
-       <xsl:apply-templates select="answer"/>
+       <xsl:apply-templates select="question|answer"/>
        </xsl:for-each>
 <!--  <xsl:apply-templates select="qandadiv|qandaentry"/> -->
 <!--  <xsl:apply-templates/> -->
-       <xsl:text>\vspace{1em}&#10;</xsl:text>
 </xsl:template>
 
 
        </xsl:otherwise>
 </xsl:choose>
 -->
-<xsl:text>\textbf{Q:}~\textit{</xsl:text>
+<xsl:text>{\textbf {Q : }}{\em </xsl:text>
 <xsl:apply-templates/>
-<xsl:text>}&#10;</xsl:text>
+<xsl:text>} \newline&#10;</xsl:text>
 </xsl:template>
 
 
 +   ############################################################################# -->
 
 <xsl:template match="answer">
-<xsl:text>\noindent\textbf{A:}~</xsl:text>
+<xsl:text>\noindent{\textbf{A :}}</xsl:text>
 <xsl:apply-templates/>
+<xsl:text>\newline&#10;</xsl:text>
+<xsl:text>\vspace{0.25cm}&#10;</xsl:text>
 <xsl:text>&#10;&#10;</xsl:text>
 </xsl:template>
 
index 52d2b297d527f345f0acbe44df741e805c7c37ed..b8e1251513e010df959f6f038c6301d6c4c084e3 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: refentry.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -17,6 +19,7 @@
     <doc:reference id="refentry" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: refentry.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authogroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index a041aed5c3c32d1dfa66a704a147909714a7c043..40a7400a5aab7cf82828a653b88894ab0a62ef06 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: revision.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -17,6 +19,7 @@
     <doc:reference id="revision" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: revision.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
@@ -88,7 +91,7 @@
        <xsl:variable name="revnumber" select=".//revnumber"/>
        <xsl:variable name="revdate"   select=".//date"/>
        <xsl:variable name="revauthor" select=".//authorinitials"/>
-       <xsl:variable name="revremark" select=".//revremark|.//revdescription"/>
+       <xsl:variable name="revremark" select=".//revremark|../revdescription"/>
        <!-- Row starts here -->
        <xsl:if test="$revnumber">
            <xsl:call-template name="gentext.element.name"/>
        <xsl:text> \\ \hline&#10;</xsl:text>
        <!-- Add Remark Row if exists-->
        <xsl:if test="$revremark"> 
-           <xsl:text>\multicolumn{3}{|l|}{</xsl:text>
+           <xsl:text>\multicolumn{3}{l}{</xsl:text>
            <xsl:apply-templates select="$revremark"/> 
            <!-- End Row here -->
            <xsl:text>} \\ \hline&#10;</xsl:text>
index 2e74ce3890c135b106e28c9f784e7508aa7d0128..db2bd5c6f9be651ab760cdc1ed66d5578626794e 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: sections.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $                                                                                               
 |                                                                                                              
 |   PURPOSE: sections.
 |   PENDING:
@@ -20,6 +22,7 @@
     <doc:reference id="sections" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: sections.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authogroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 8f87fb107151654165117508b74d6d93741d9f8a..6729bf4aef180f3d515318b29c6bc3983bd49689 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: set.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="set" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: set.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
index 893a2b6d4d2ce1ff80d5aff856a32580187d9007..9af9878497f5f626780cdf7a0224eb5b8b7a75ae 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: sgmltag.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -17,6 +19,7 @@
     <doc:reference id="sgmltag" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: sgmltag.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authogroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
@@ -66,9 +69,9 @@
            <xsl:when test="$class='endtag'">
                <xsl:call-template name="inline.monoseq">
                    <xsl:with-param name="content">
-                       <xsl:text>&lt;/</xsl:text>
+                       <xsl:text>\textless{}/</xsl:text>
                        <xsl:apply-templates/>
-                       <xsl:text>&gt;</xsl:text>
+                       <xsl:text>\textgreater{}</xsl:text>
                    </xsl:with-param>
                </xsl:call-template>
            </xsl:when>
            <xsl:when test="$class='pi'">
                <xsl:call-template name="inline.monoseq">
                    <xsl:with-param name="content">
-                       <xsl:text>&lt;?</xsl:text>
+                       <xsl:text>\textless{}?</xsl:text>
                        <xsl:apply-templates/>
-                       <xsl:text>?&gt;</xsl:text>
+                       <xsl:text>?\textgreater{}</xsl:text>
                    </xsl:with-param>
                </xsl:call-template>
            </xsl:when>
            <xsl:when test="$class='xmlpi'">
                <xsl:call-template name="inline.monoseq">
                    <xsl:with-param name="content">
-                       <xsl:text>&lt;?</xsl:text>
+                       <xsl:text>\textless{}?</xsl:text>
                        <xsl:apply-templates/>
-                       <xsl:text>?&gt;</xsl:text>
+                       <xsl:text>?\textgreater{}</xsl:text>
                    </xsl:with-param>
                </xsl:call-template>
            </xsl:when>
            <xsl:when test="$class='starttag'">
                <xsl:call-template name="inline.monoseq">
                    <xsl:with-param name="content">
-                       <xsl:text>&lt;</xsl:text>
+                       <xsl:text>\textless{}</xsl:text>
                        <xsl:apply-templates/>
-                       <xsl:text>&gt;</xsl:text>
+                       <xsl:text>\textgreater{}</xsl:text>
                    </xsl:with-param>
                </xsl:call-template>
            </xsl:when>
            <xsl:when test="$class='emptytag'">
                <xsl:call-template name="inline.monoseq">
                    <xsl:with-param name="content">
-                       <xsl:text>&lt;</xsl:text>
+                       <xsl:text>\textless{}</xsl:text>
                        <xsl:apply-templates/>
-                       <xsl:text>/&gt;</xsl:text>
+                       <xsl:text>/\textgreater{}</xsl:text>
                    </xsl:with-param>
                </xsl:call-template>
            </xsl:when>
            <xsl:when test="$class='sgmlcomment'">
                <xsl:call-template name="inline.monoseq">
                    <xsl:with-param name="content">
-                       <xsl:text>&lt;!--</xsl:text>
+                       <xsl:text>$&lt;$!$--$</xsl:text>
                        <xsl:apply-templates/>
-                       <xsl:text>--&gt;</xsl:text>
+                       <xsl:text>$--&gt;$</xsl:text>
                    </xsl:with-param>
                </xsl:call-template>
            </xsl:when>
index 93b29c12297a811a024cdabb9e01e35962815f42..936ba78115c0e3b39ddf41d157c9dd410ada035f 100644 (file)
@@ -2,7 +2,9 @@
 <!DOCTYPE xsl:stylesheet [ <!ENTITY RE "&#10;"> ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
     <!--############################################################################# 
+    |  $Id: synop-oop.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
     |- #############################################################################
+    |  $Author: jelmer $
     |                                                                                                          
     |   PURPOSE:
     + ############################################################################## -->
index 1ffe2fc46344b8852d0df7205bd952fe172791d7..52516118bd873252b122c173cdf7abca6c82d2e2 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: synop-struct.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
index 0edb4ad2cc44773efc79464a47e6105068590115..f1ef85b85cbc04f4ff564deb200f55f0d1e6856b 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: table.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="table" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: table.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
            <authorgroup>
                <firstname>Ramon</firstname> <surname>Casellas</surname>
            <xsl:when test="$i > $cols"></xsl:when>
            <!-- There are still columns to count -->
            <xsl:otherwise>
-               <xsl:variable name="width">
-                       <xsl:variable name="userchoice" select="colspec[@colnum=$i]/@colwidth"/>
-                       <xsl:variable name="cells" select="thead/row/entry[$i]|tbody/row/entry[$i]"/>
-                       <xsl:choose>
-                               <xsl:when test="string-length($userchoice)=0 and count($cells//itemizedlist|$cells//orderedlist|$cells//variablelist)&gt;0">
-                                       <!-- In these specific circumstances, we MUST use a line-wrapped column
-                                            and yet the user hasn't specified one. -->
-                                       <xsl:value-of select="'1*'"/>
-                               </xsl:when>
-                               <xsl:otherwise>
-                                       <!-- In the general case, we just do what the user wants (may even
-                                            have no pre-specified width). -->
-                                       <xsl:value-of select="$userchoice"/>
-                               </xsl:otherwise>
-                       </xsl:choose>
-               </xsl:variable>
+               <xsl:variable name="width" select="colspec[@colnum=$i]/@colwidth"/>
                <!-- Try to take heed of colspecs -->
                <xsl:choose>
                        <xsl:when test="$width!=''">
             the hsizes for each column are (1/(1+3)*2) and (3/(1+3)*2).
                 The ratio of these to the star values (star values being 1 and 3)
                 is 2/(1+3).
-                BUT it is now very complicated because it takes into account columns
-                where the user has not specified a width but LaTeX requires a
-                fixed-width column (i.e. specialcols may vary).
-                Relies on there being (a) colspecs for every column or (b) no
-                colspecs.
         -->
        <xsl:template name="generate.starfactor">
                <xsl:param name="i" select="1"/>
-               <xsl:param name="cols" select="count(colspec)"/>
                <xsl:param name="sum" select="0"/>
-               <xsl:param name="specialcols" select="count(colspec[contains(@colwidth,'*')])"/>
+               <xsl:param name="nodes" select="colspec[contains(@colwidth,'*')]"/>
                <xsl:choose>
-                       <xsl:when test="$i&lt;=$cols and colspec[position()=$i and contains(@colwidth,'*')]">
-                               <!-- a * column -->
+                       <xsl:when test="$i&lt;=count($nodes)">
                                <xsl:call-template name="generate.starfactor">
                                        <xsl:with-param name="i" select="$i+1"/>
-                                       <xsl:with-param name="cols" select="$cols"/>
-                                       <xsl:with-param name="sum" select="$sum+substring-before(colspec[$i]/@colwidth,'*')"/>
-                                       <xsl:with-param name="specialcols" select="$specialcols"/>
+                                       <xsl:with-param name="sum" select="$sum+substring-before($nodes[$i]/@colwidth,'*')"/>
+                                       <xsl:with-param name="nodes" select="$nodes"/>
                                </xsl:call-template>
                        </xsl:when>
-                       <xsl:when test="$i&lt;=$cols">
-                               <!-- not a * column, but we are going to pretend that it is -->
-                               <xsl:variable name="cells" select="thead/row/entry[$i]|tbody/row/entry[$i]"/>
-                               <xsl:variable name="problems" select="count($cells//itemizedlist|$cells//orderedlist|$cells//variablelist)"/>
-                               <xsl:choose>
-                                       <xsl:when test="$problems &gt; 0">
-                                               <xsl:call-template name="generate.starfactor">
-                                                       <xsl:with-param name="i" select="$i+1"/>
-                                                       <xsl:with-param name="cols" select="$cols"/>
-                                                       <xsl:with-param name="sum" select="$sum+1"/>
-                                                       <xsl:with-param name="specialcols" select="$specialcols+1"/>
-                                               </xsl:call-template>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:call-template name="generate.starfactor">
-                                                       <xsl:with-param name="i" select="$i+1"/>
-                                                       <xsl:with-param name="cols" select="$cols"/>
-                                                       <xsl:with-param name="sum" select="$sum"/>
-                                                       <xsl:with-param name="specialcols" select="$specialcols"/>
-                                               </xsl:call-template>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:when>
                        <xsl:otherwise>
-                               <xsl:value-of select="$specialcols div $sum"/>
+                               <xsl:value-of select="count($nodes) div $sum"/>
                        </xsl:otherwise>
                </xsl:choose>
        </xsl:template>
-       
+
 
     <xsl:template match="tgroup">
        <xsl:variable name="align" select="@align"/>
        <xsl:variable name="colspecs" select="./colspec"/>
        <xsl:variable name="usex">
                <xsl:choose>
-                       <!-- if there are lists within cells, we need tabularx -->
-                       <xsl:when test="$latex.use.tabularx=1 and (descendant::itemizedlist|descendant::orderedlist|descendant::variablelist)">
-                               <xsl:text>1</xsl:text>
-                       </xsl:when>
                        <!-- if there are instances of 1*-style colwidths, we need tabularx -->
                        <xsl:when test="$latex.use.tabularx=1 and contains(colspec/@colwidth,'*')">
                                <xsl:text>1</xsl:text>
        </xsl:variable>
        <xsl:choose>
                <xsl:when test="$usex='1'">
-                       <xsl:text>\begin{tabularx}{\linewidth}{</xsl:text>
+                       <xsl:text>\begin{tabularx}{\columnwidth}{</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                        <xsl:if test="$useminipage='1'"><xsl:text>\begin{minipage}{\linewidth}&#10;</xsl:text></xsl:if>
                <xsl:when test="$usex=1">
                        <xsl:call-template name="table.format.tabularx">
                                <xsl:with-param name="cols" select="@cols"/>
-                               <xsl:with-param name="starfactor">
-                                       <xsl:call-template name="generate.starfactor">
-                                               <xsl:with-param name="cols" select="@cols"/>
-                                       </xsl:call-template>
-                               </xsl:with-param>
+                               <xsl:with-param name="starfactor"><xsl:call-template name="generate.starfactor"/></xsl:with-param>
                        </xsl:call-template>
                </xsl:when>
                <xsl:otherwise>
        <xsl:call-template name="latex.entry.postalign"/>
        <xsl:choose>
                <xsl:when test="position()=last()"><xsl:text> \tabularnewline&#10;</xsl:text></xsl:when>
-               <xsl:otherwise><xsl:call-template name="generate.latex.cell.separator"/></xsl:otherwise>
+               <xsl:otherwise><xsl:text> &amp; </xsl:text></xsl:otherwise>
        </xsl:choose> 
     </xsl:template>
 
        <xsl:call-template name="latex.entry.postalign"/>
        <xsl:choose>
                <xsl:when test="position()=last()"><xsl:text> \tabularnewline&#10;</xsl:text></xsl:when>
-               <xsl:otherwise><xsl:call-template name="generate.latex.cell.separator"/></xsl:otherwise>
+               <xsl:otherwise><xsl:text> &amp; </xsl:text></xsl:otherwise>
        </xsl:choose> 
     </xsl:template>
 
 
        <xsl:template name="latex.entry.prealign">
-       <xsl:variable name="span">
-               <xsl:choose>
-                       <xsl:when test="@spanname!=''">
-                               <xsl:call-template name="calculate.colspan">
-                                       <xsl:with-param name="namest" select="../../../spanspec[@spanname=@spanname]/@namest"/>
-                                       <xsl:with-param name="nameend" select="../../../spanspec[@spanname=@spanname]/@nameend"/>
-                               </xsl:call-template>
-                       </xsl:when>
-                       <xsl:when test="@namest!=''">
-                               <xsl:call-template name="calculate.colspan"/>
-                       </xsl:when>
-                       <xsl:otherwise>-1</xsl:otherwise>
-               </xsl:choose>
-       </xsl:variable>
-       <xsl:if test="$span &gt; 1">
-               <xsl:text>\multicolumn{</xsl:text>
-               <xsl:value-of select="$span"/>
-               <xsl:text>|}{</xsl:text><!-- TODO take heed of @colsep -->
-               <xsl:choose>
-                       <xsl:when test="@align='left'"><xsl:text>l</xsl:text></xsl:when>
-                       <xsl:when test="@align='right'"><xsl:text>r</xsl:text></xsl:when>
-                       <xsl:when test="@align='center'"><xsl:text>c</xsl:text></xsl:when>
-                       <xsl:when test="@align='char'">c<xsl:message>Table entry char alignment is not supported.</xsl:message></xsl:when>
-                       <xsl:otherwise>c</xsl:otherwise>
-               </xsl:choose>
-       <!-- use this as a hook for some general warnings -->
-               <xsl:text>}</xsl:text>
-       </xsl:if>
        <!-- this is used when the entry's align spec wants to override the column default -->
-       <xsl:if test="$span &lt; 1">
-               <xsl:choose>
-                       <xsl:when test="@align='left'"><xsl:text>\docbooktolatexalignll </xsl:text></xsl:when>
-                       <xsl:when test="@align='right'"><xsl:text>\docbooktolatexalignrl </xsl:text></xsl:when>
-                       <xsl:when test="@align='center'"><xsl:text>\docbooktolatexaligncl </xsl:text></xsl:when>
-                       <xsl:when test="@align='char'"><xsl:message>Table entry char alignment is not supported.</xsl:message></xsl:when>
-               </xsl:choose>
-       </xsl:if>
-       <xsl:text>{</xsl:text>
-       <xsl:if test="@rotate='1'">
-               <xsl:text>\rotatebox{90}</xsl:text>
-               <xsl:if test="@align!=''"><xsl:message>entry[@rotate='1' and @align!=''] probably doesn't work.</xsl:message></xsl:if>
-       </xsl:if>
-       <xsl:text>{</xsl:text>
+       <xsl:choose>
+               <xsl:when test="@align='left'"><xsl:text>\docbooktolatexalignll </xsl:text></xsl:when>
+               <xsl:when test="@align='right'"><xsl:text>\docbooktolatexalignrl </xsl:text></xsl:when>
+               <xsl:when test="@align='center'"><xsl:text>\docbooktolatexaligncl </xsl:text></xsl:when>
+               <xsl:when test="@align='char'"><xsl:message>Table entry char alignment is not supported.</xsl:message></xsl:when>
+       </xsl:choose>
        <!-- use this as a hook for some general warnings -->
        <xsl:if test="@morerows!=''"><xsl:message>The morerows attribute is not supported.</xsl:message></xsl:if>
+       <xsl:if test="@spanname!=''"><xsl:message>The spanname attribute is not supported.</xsl:message></xsl:if>
+       <xsl:if test="@namest!=''"><xsl:message>The namest and nameend attributes are not supported.</xsl:message></xsl:if>
        </xsl:template>
 
        <xsl:template name="latex.entry.postalign">
-       <xsl:text>}}</xsl:text>
        <!-- this is used when the entry's align spec wants to override the column default -->
-       <xsl:if test="@namest='' and @spanspec=''"><!-- TODO improve -->
-               <xsl:choose>
-                       <xsl:when test="@align='left'"><xsl:text>\docbooktolatexalignlr </xsl:text></xsl:when>
-                       <xsl:when test="@align='right'"><xsl:text>\docbooktolatexalignrr </xsl:text></xsl:when>
-                       <xsl:when test="@align='center'"><xsl:text>\docbooktolatexaligncr </xsl:text></xsl:when>
-               </xsl:choose>
-       </xsl:if>
+       <xsl:choose>
+               <xsl:when test="@align='left'"><xsl:text>\docbooktolatexalignlr </xsl:text></xsl:when>
+               <xsl:when test="@align='right'"><xsl:text>\docbooktolatexalignrr </xsl:text></xsl:when>
+               <xsl:when test="@align='center'"><xsl:text>\docbooktolatexaligncr </xsl:text></xsl:when>
+       </xsl:choose>
        </xsl:template>
 
 
     </xsl:template>
 
     <xsl:template name="calculate.colspan">
-       <xsl:param name="namest" select="@namest"/>
-       <xsl:param name="nameend" select="@nameend"/>
        <xsl:variable name="scol">
            <xsl:call-template name="colspec.colnum">
-               <xsl:with-param name="colname" select="$namest"/>
+               <xsl:with-param name="colname" select="@namest"/>
            </xsl:call-template>
        </xsl:variable>
        <xsl:variable name="ecol">
            <xsl:call-template name="colspec.colnum">
-               <xsl:with-param name="colname" select="$nameend"/>
+               <xsl:with-param name="colname" select="@nameend"/>
            </xsl:call-template>
        </xsl:variable>
        <xsl:value-of select="$ecol - $scol + 1"/>
index 47036c56aca251d3244ed95282e5a383324c6f83..e3020664c3fff5386fd5d7f5a9ba372e85f68fdf 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: texmath.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -18,6 +20,7 @@
     <doc:reference id="texmath" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: texmath.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
        </partintro>
     </doc:reference>
 
-    <xsl:template match="alt">
+
+    <xsl:template match="alt[@role='tex' or @role='latex']">
        <xsl:choose>
-               <xsl:when test="ancestor::inlineequation and (@role='tex' or @role='latex' or $latex.alt.is.latex='1')">
+               <xsl:when test="ancestor::inlineequation|ancestor::equation|ancestor::informalequation">
                        <xsl:text>\ensuremath{</xsl:text>
                        <xsl:value-of select="."/>
                        <xsl:text>}</xsl:text>
                </xsl:when>
-               <xsl:when test="ancestor::equation|ancestor::informalequation and (@role='tex' or @role='latex' or $latex.alt.is.latex='1')">
-                       <xsl:text>\begin{displaymath}</xsl:text>
-                       <xsl:call-template name="label.id"/>
-                       <xsl:value-of select="."/>
-                       <xsl:text>\end{displaymath}&#10;</xsl:text>
-               </xsl:when>
-               <xsl:when test="$latex.alt.is.latex='1'">
-                       <xsl:value-of select="."/>
-               </xsl:when>
                <xsl:otherwise>
-                       <xsl:apply-templates/>
+                       <xsl:value-of select="."/>
                </xsl:otherwise>
        </xsl:choose>
     </xsl:template>
 
+    <xsl:template match="alt">
+    </xsl:template>
+
     <xsl:template match="latex|tex">
        <xsl:value-of select="."/>
     </xsl:template>
                <xsl:when test="$tex">
                        <xsl:apply-templates select="$tex"/>
                </xsl:when>
-               <xsl:when test="alt and $latex.alt.is.preferred='1'">
-                       <xsl:apply-templates select="alt"/>
-               </xsl:when>
-               <xsl:when test="inlinemediaobject">
-                       <xsl:apply-templates select="inlinemediaobject"/>
-               </xsl:when>
-               <xsl:when test="alt">
-                       <xsl:apply-templates select="alt"/>
-               </xsl:when>
                <xsl:otherwise>
-                       <xsl:apply-templates select="graphic"/>
+                       <xsl:apply-templates select="*[not(self::graphic)]"/>
                </xsl:otherwise>
        </xsl:choose>
        </xsl:template>
index e20fb59ce290921e86f9dc5cddfee94e639f86a6..3e7f3a8acf7819c98bab71bd631a09c7866e07c3 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: vars.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $            
 |- #############################################################################
+|      $Author: jelmer $
 |
 |   PURPOSE: User and stylesheets XSL variables 
 + ############################################################################## -->
@@ -13,6 +15,7 @@
     <doc:reference id="vars" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: vars.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
            <authorgroup>
                <author><surname>Casellas</surname><firstname>Ramon</firstname></author>
@@ -40,6 +43,7 @@
     <!--############################################################################# 
     |  COMMON VARIABLES
     |- #############################################################################
+    |  $Author: jelmer $
     |
     + ############################################################################## -->
     <xsl:variable name="default-classsynopsis-language">java</xsl:variable>
     <!--############################################################################# 
     |  LaTeX VARIABLES
     |- #############################################################################
+    |  $Author: jelmer $
     |
     |   PURPOSE: User and stylesheets XSL variables 
     + ############################################################################## -->
        </doc:param>
        <xsl:param name="latex.override"></xsl:param>
 
-       <doc:param name="latex.entities" xmlns="">
-       <refpurpose> Control Unicode character handling. </refpurpose>
-       <refdescription>
-               <para>
-               Normally, XSLT processors will convert SGML character entities into
-               Unicode characters and DB2LaTeX doesn't have much chance to do anything
-               toward converting them to LaTeX equivalents. We do not yet know how we
-               can solve this problem best.
-               </para>
-               <para>
-               Proposed values: 'catcode', 'unicode', 'extension'.
-               Currently only 'catcode' is supported. All other values will
-               cause no special handling except for certain mappings in MathML.
-               In future, perhaps the 'unicode' LaTeX package could be of assistance.
-               'Extension' could be an XSLT extension that handles the characters
-               using a mapping table.
-               </para>
-       </refdescription>
-       </doc:param>
-       <xsl:param name="latex.entities"></xsl:param>
-
-       <doc:param name="latex.alt.is.latex" xmlns="">
-       <refpurpose> Control the escaping of <sgmltag class="element">alt</sgmltag> text </refpurpose>
-       <refdescription>
-               <para>
-               Text within <sgmltag class="element">alt</sgmltag> elements is assumed to
-               be valid LaTeX and is passed through unescaped by default. If this is not
-               appropriate for your document, set this variable to something other than
-               '1'.
-               </para>
-       </refdescription>
-       </doc:param>
-       <xsl:param name="latex.alt.is.latex">1</xsl:param>
-
-       <doc:param name="latex.alt.is.preferred" xmlns="">
-       <refpurpose> Control the use of <sgmltag class="element">alt</sgmltag> text </refpurpose>
-       <refdescription>
-               <para>
-               By default, DB2LaTeX assumes that <sgmltag class="element">alt</sgmltag>
-               text should be typeset in preference to any 
-               <sgmltag class="element">mediaobject</sgmltag>s.
-               </para>
-       </refdescription>
-       </doc:param>
-       <xsl:param name="latex.alt.is.preferred">1</xsl:param>
-
        <!--
        <doc:variable name="latex.figure.position" xmlns="">
        <refpurpose> How to place floats. </refpurpose>
        <refpurpose> LaTeX location for admonition graphics </refpurpose>
        <refdescription>
                <para>The file path that will be passed to LaTeX in order to find admonition graphics.</para>
-               <para>An empty value suppresses the use of admonition graphics.</para>
-               <para>If your figures are in <quote>the current directory</quote> then use a value of
-               <quote>.</quote> (i.e. the full stop or period on its own) to signify this.</para>
        </refdescription>
        </doc:param>
        <xsl:param name="latex.admonition.path">figures</xsl:param>
        <xsl:variable name="latex.dont.hypertarget">0</xsl:variable>
        -->
 
-       <doc:param name="latex.use.ucs" xmlns="">
-               <refpurpose> Choose whether to use the <productname>unicode</productname> LaTeX package</refpurpose>
-               <refdescription><para>See the <productname>unicode</productname> documentation for details.</para></refdescription>
-       </doc:param>
-       <xsl:param name="latex.use.ucs">0</xsl:param>
-
-       <doc:param name="latex.ucs.options" xmlns="">
-               <refpurpose>Select the optional parameter(s) for the <productname>unicode</productname> LaTeX package</refpurpose>
-               <refdescription><para>See the <productname>unicode</productname> documentation for details.</para></refdescription>
-       </doc:param>
-       <xsl:param name="latex.ucs.options"></xsl:param>
-
        <doc:param name="latex.babel.language" xmlns="">
                <refpurpose>Select the optional parameter for the <productname>babel</productname> LaTeX package</refpurpose>
                <refdescription><para>See the <productname>babel</productname> documentation for details.</para></refdescription>
                </para>
        </refdescription>
        </doc:param>
-       <xsl:variable name="latex.hyperref.param.pdftex">pdfstartview=FitH</xsl:variable>
+       <xsl:variable name="latex.hyperref.param.pdftex"></xsl:variable>
 
        <doc:param name="latex.hyperref.param.dvips" xmlns="">
        <refpurpose> DB2LaTeX hyperref options for dvips output</refpurpose>
                that command will precede the title and it will be typeset accordingly.</para>
        </refdescription>
     </doc:param>
-    <xsl:variable name="latex.step.title.style">\bf</xsl:variable>
-
-    <doc:param name="latex.book.article.title.style" xmlns="">
-       <refpurpose> Control the style of article titles within books </refpurpose>
-       <refdescription>
-       </refdescription>
-    </doc:param>
-    <xsl:variable name="latex.book.article.title.style">\Large\textbf</xsl:variable>
-
-    <doc:param name="latex.article.title.style" xmlns="">
-       <refpurpose> Control the style of article titles </refpurpose>
-       <refdescription>
-       </refdescription>
-    </doc:param>
-    <xsl:variable name="latex.article.title.style">\textbf</xsl:variable>
+    <xsl:variable name="latex.step.title.style">\sc</xsl:variable>
 
     <doc:param name="latex.pagestyle" xmlns="">
        <refpurpose> Override DB2LaTeX's choice of LaTeX page numbering style </refpurpose>
     <!--############################################################################# 
     |  XSL VARIABLES FOR ARTICLES      
     |- #############################################################################
+    |  $Author: jelmer $
     |
     + ############################################################################## -->
 
 
 
     <doc:param name="latex.article.varsets" xmlns="">
-       <refpurpose> Controls what is output after the LaTeX preamble. </refpurpose>
+       <refpurpose> Controls what is output after the LaTeX preamble. Basically the <literal>\maketitle</literal>
+       </refpurpose>
        <refdescription>
-           <para>Default values decrease edge margins and allow a large quantity of figures to be set on each page. </para>
+           <para>Default Values</para>
+           <screen><![CDATA[
+               \setlength{\textwidth}{16.5cm}
+               \setlength{\textheight}{22.2cm}
+               \setlength{\hoffset}{-2cm}
+               \setlength{\voffset}{-.9in}
+               \renewcommand\floatpagefraction{.9}
+               \renewcommand\topfraction{.9}
+               \renewcommand\bottomfraction{.9}
+               \renewcommand\textfraction{.1}
+               ]]></screen>
        </refdescription>
     </doc:param>
 
     <xsl:variable name="latex.article.varsets">
        <xsl:text>
-               \usepackage{anysize}
-               \marginsize{2cm}{2cm}{2cm}{2cm}
+           \setlength{\textwidth}{16.5cm}
+           \setlength{\textheight}{22.2cm}
+           \setlength{\hoffset}{-2cm}
+           \setlength{\voffset}{-.9in}
            \renewcommand\floatpagefraction{.9}
            \renewcommand\topfraction{.9}
            \renewcommand\bottomfraction{.9}
 
 
 
-    <doc:param name="latex.maketitle" xmlns="">
-       <refpurpose> The <literal>\maketitle</literal> for books and articles. </refpurpose>
+    <doc:param name="latex.article.maketitle" xmlns="">
+       <refpurpose> Controls what is output after the LaTeX preamble. Basically the <literal>\maketitle</literal>
+       </refpurpose>
        <refdescription>
-               <para>Some users may wish to override or eliminate <literal>\maketitle</literal>.</para>
-               <note><para>Does not apply to <sgmltag class="element">article</sgmltag>s within <sgmltag class="element">book</sgmltag>s.</para></note>
-               <para>By default, uses LaTeX <literal>\maketitle</literal> with the 'empty' pagestyle
-               for the first page. The page style of subsequent pages is determined by
-               <xref linkend="template.generate.latex.pagestyle"/>.</para>
+           <para>Default Values</para>
+           <screen><![CDATA[
+               \maketitle
+               ]]></screen>
        </refdescription>
     </doc:param>
-    <xsl:variable name="latex.maketitle">
-       <xsl:text>{\maketitle</xsl:text>
-       <xsl:call-template name="generate.latex.pagestyle"/>
-       <xsl:text>\thispagestyle{empty}}&#10;</xsl:text>
+    <xsl:variable name="latex.article.maketitle">
+       <xsl:text>&#10;</xsl:text>
+       <xsl:text>\maketitle&#10;</xsl:text>
     </xsl:variable>
 
 
index 549883869b2f82a29909f034c5d98d60bb2f2579..06f48b04ba0c674a43e275e82246b639c149986c 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: verbatim.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE:
 + ############################################################################## -->
@@ -16,6 +18,7 @@
     <doc:reference id="verbatim" xmlns="">
        <referenceinfo>
            <releaseinfo role="meta">
+               $Id: verbatim.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
            </releaseinfo>
        <authorgroup>
            <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
     <!--############################################################################# -->
     <!-- DOCUMENTATION                                                                -->
     <doc:template name="verbatim.apply.templates" xmlns="">
-       <refpurpose> Auxiliary template to output verbatim LaTeX code in verbatim mode </refpurpose>
+       <refpurpose> Auxiliary template to output verbatim LaTeX code (in verbatim mode)
+       that takes into account whether the user is using fancyverb or not. It allows
+       veratim line numbering and other fancy stuff. </refpurpose>
        <refdescription>
-       <para> Takes into account whether the user is using fancyvrb or not. It allows
-       veratim line numbering and other fancy stuff. </para>
-       <para> In order to use a small or large font, you may also wanto to use 
-       the <literal>role</literal> attribute : </para>
-       <screen><![CDATA[
-       <programlisting role="small">
-       </programlisting>
-       <programlisting role="large">
-       </programlisting>
-       ]]></screen>
+       <programlisting><![CDATA[
+       <xsl:template name="verbatim.apply.templates">
+       <xsl:choose>
+               <xsl:when test="$latex.use.fancyvrb='1'">
+                       <xsl:text>&#10;\begin{Verbatim}[</xsl:text>
+                       <xsl:if test="@linenumbering='numbered'">
+                               <xsl:text>,numbers=left</xsl:text>
+                       </xsl:if>
+                       <xsl:if test="local-name(.)='literallayout' and @format!='monospaced'">
+                               <xsl:text>,fontfamily=default</xsl:text>
+                       </xsl:if>
+                       <xsl:text>]&#10;</xsl:text>
+                       <xsl:apply-templates mode="latex.verbatim"/>
+                       <xsl:text>&#10;\end{Verbatim}&#10;</xsl:text>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:text>&#10;\begin{verbatim}&#10;</xsl:text>
+                       <!-- RCAS: Experimental code 
+                       <xsl:apply-templates/>-->
+                       <xsl:apply-templates mode="latex.verbatim"/>
+                       <xsl:text>&#10;\end{verbatim}&#10;</xsl:text>
+               </xsl:otherwise>
+       </xsl:choose>
+       </xsl:template>
+       ]]></programlisting>
        </refdescription>
     </doc:template>
     <!--############################################################################# -->
 
        <xsl:template name="verbatim.apply.templates">
        <xsl:choose>
-               <xsl:when test="ancestor::entry">
-                       <xsl:message>Problem with <xsl:value-of select="local-name(.)"/> inside table entries.</xsl:message>
-                       <xsl:text>\texttt{</xsl:text>
-                       <xsl:apply-templates mode="latex.verbatim"/>
-                       <xsl:text>}</xsl:text>
-               </xsl:when>
                <xsl:when test="$latex.use.fancyvrb='1'">
-                       <xsl:variable name="not_monospaced" select="local-name(.)='literallayout' and @format!='monospaced'"/>
                        <xsl:text>&#10;\begin{Verbatim}[</xsl:text>
                        <xsl:if test="@linenumbering='numbered'">
                                <xsl:text>,numbers=left</xsl:text>
                        </xsl:if>
-                       <xsl:if test="$not_monospaced">
+                       <xsl:if test="local-name(.)='literallayout' and @format!='monospaced'">
                                <xsl:text>,fontfamily=default</xsl:text>
                        </xsl:if>
-                       <xsl:if test="@role">
-                               <xsl:choose>
-                                       <xsl:when test="@role='small'">
-                                               <xsl:text>,fontsize=\small</xsl:text>
-                                       </xsl:when>
-                                       <xsl:when test="@role='large'">
-                                               <xsl:text>,fontsize=\large</xsl:text>
-                                       </xsl:when>
-                               </xsl:choose>
-                       </xsl:if>
                        <xsl:text>]&#10;</xsl:text>
-                       <xsl:choose>
-                               <xsl:when test="$not_monospaced">
-                                       <!-- Needs to be changed to cope with regular characterset! -->
-                                       <xsl:apply-templates mode="latex.verbatim"/>
-                               </xsl:when>
-                               <xsl:otherwise>
-                                       <xsl:apply-templates mode="latex.verbatim"/>
-                               </xsl:otherwise>
-                       </xsl:choose>
+                       <xsl:apply-templates mode="latex.verbatim"/>
                        <xsl:text>&#10;\end{Verbatim}&#10;</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                        <xsl:text>&#10;\begin{verbatim}&#10;</xsl:text>
+                       <!-- RCAS: Experimental code 
+                       <xsl:apply-templates/>-->
                        <xsl:apply-templates mode="latex.verbatim"/>
                        <xsl:text>&#10;\end{verbatim}&#10;</xsl:text>
                </xsl:otherwise>
index 82289b19df753202c23392648113c029b292dd6e..6a7d3204a7f56ceb498c4b9578c9b74e6dfa8719 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
 <!--############################################################################# 
+|      $Id: xref.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 |- #############################################################################
+|      $Author: jelmer $
 |                                                                                                              
 |   PURPOSE: Manage XREFs
 + ############################################################################## -->
@@ -17,6 +19,7 @@
 <doc:reference id="xref" xmlns="">
 <referenceinfo> 
 <releaseinfo role="meta">
+$Id: xref.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
 </releaseinfo>
 <authorgroup>
 <author> <surname>Casellas</surname><firstname>Ramon</firstname> </author>
 
            <!-- This is a link with content ... -->
                <xsl:when test="local-name(.)='link' and .!=''">
-               <xsl:call-template name="generate.hyperlink">
-                       <xsl:with-param name="target" select="$target"/>
-                       <xsl:with-param name="text"><xsl:apply-templates/></xsl:with-param>
-               </xsl:call-template>
+               <xsl:choose>
+               <xsl:when test="$latex.use.hyperref=1">
+                       <xsl:text>\hyperlink{</xsl:text><xsl:value-of select="$target/@id"/><xsl:text>}{</xsl:text>
+                       <xsl:apply-templates/>
+                       <xsl:text>}</xsl:text>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:apply-templates/>
+               </xsl:otherwise>
+               </xsl:choose>
                </xsl:when>
                
+           <!-- If an xreflabel has been specified for the target ... -->
+           <xsl:when test="local-name(.)='xref' and $target/@xreflabel">
+               <xsl:if test="$latex.use.hyperref=1">
+                   <xsl:text>\hyperlink{</xsl:text><xsl:value-of select="$target/@id"/><xsl:text>}</xsl:text>
+               </xsl:if>
+               <xsl:text>{[</xsl:text>
+               <xsl:call-template name="xref.xreflabel">
+                   <xsl:with-param name="target" select="$target"/>
+               </xsl:call-template>
+               <xsl:text>]}</xsl:text>
+           </xsl:when>
+
+           <!-- If an xreflabel has not been specified for the target ... -->
            <xsl:otherwise>
                <xsl:choose>
                    <xsl:when test="@endterm">
                                <xsl:text>[NONEXISTENT ID]</xsl:text>
                            </xsl:when>
                            <xsl:otherwise>
-                               <xsl:call-template name="generate.hyperlink">
-                                       <xsl:with-param name="target" select="$target"/>
-                                       <xsl:with-param name="text"><xsl:apply-templates select="$etarget" mode="xref.text"/></xsl:with-param>
-                               </xsl:call-template>
+                               <xsl:choose>
+                               <xsl:when test="$latex.use.hyperref=1">
+                                   <xsl:text>\hyperlink{</xsl:text><xsl:value-of select="$target/@id"/><xsl:text>}</xsl:text>
+                                   <xsl:text>{</xsl:text> <xsl:apply-templates select="$etarget" mode="xref.text"/><xsl:text>}</xsl:text>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                   <xsl:apply-templates select="$etarget" mode="xref.text"/>
+                               </xsl:otherwise>
+                               </xsl:choose>
                            </xsl:otherwise>
                        </xsl:choose>
                    </xsl:when>
-                       <!-- If an xreflabel has been specified for the target ... -->
-                       <xsl:when test="local-name(.)='xref' and $target/@xreflabel">
-                       <xsl:call-template name="generate.hyperlink">
-                               <xsl:with-param name="target" select="$target"/>
-                               <xsl:with-param name="text">
-                                       <xsl:text>{[</xsl:text>
-                                       <xsl:call-template name="xref.xreflabel">
-                                               <xsl:with-param name="target" select="$target"/>
-                                       </xsl:call-template>
-                                       <xsl:text>]}</xsl:text>
-                               </xsl:with-param>
-                       </xsl:call-template>
-                       </xsl:when>
                    <xsl:otherwise>
-                               <xsl:call-template name="generate.hyperlink">
-                                       <xsl:with-param name="target" select="$target"/>
-                                       <xsl:with-param name="text"><xsl:apply-templates select="$target" mode="xref-to"/></xsl:with-param>
-                               </xsl:call-template>
+                       <xsl:choose>
+                       <xsl:when test="$latex.use.hyperref=1">
+                           <xsl:text>\hyperlink{</xsl:text><xsl:value-of select="$target/@id"/><xsl:text>}{</xsl:text>
+                           <xsl:apply-templates select="$target" mode="xref-to"/>
+                               <xsl:text>}</xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise>
+                           <xsl:apply-templates select="$target" mode="xref-to"/>
+                       </xsl:otherwise>
+                       </xsl:choose>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:otherwise>
        </xsl:if>
     </xsl:template>
 
-       <doc:template name="generate.hyperlink" xmlns="">
-       <refpurpose> Choose hyperlink syntax </refpurpose>
-       <refdescription>
-               <para>Will use hyperref, if it is available. Otherwise, just outputs
-               unlinked text. If the destination is a citation, a backreference is
-               emitted (even though it is technically a hyperlink, not a citation).
-               If the 'text' arises from an @endterm, then the 'optional argument'
-               syntax of <literal>\cite</literal> is used.</para>
-       </refdescription>
-       </doc:template>
-       <xsl:template name="generate.hyperlink">
-               <xsl:param name="target"/>
-               <xsl:param name="text"/>
-               <xsl:variable name="element" select="local-name($target)"/>
-               <xsl:variable name="citation" select="$element='biblioentry' or $element='bibliomixed'"/>
-               <xsl:choose>
-                       <xsl:when test="$citation and @endterm!=''">
-                               <xsl:text>\docbooktolatexcite</xsl:text>
-                               <xsl:text>{</xsl:text>
-                               <xsl:value-of select="$target/@id"/>
-                               <xsl:text>}{</xsl:text>
-                               <xsl:call-template name="scape-optionalarg">
-                                       <xsl:with-param name="string" select="$text"/>
-                               </xsl:call-template>
-                               <xsl:text>}</xsl:text>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:if test="$latex.use.hyperref=1">
-                                       <xsl:text>\hyperlink{</xsl:text>
-                                       <xsl:value-of select="$target/@id"/>
-                                       <xsl:text>}</xsl:text>
-                               </xsl:if>
-                               <xsl:text>{</xsl:text>
-                               <xsl:if test="$citation">
-                                       <xsl:text>\docbooktolatexbackcite{</xsl:text>
-                                       <xsl:value-of select="$target/@id"/>
-                                       <xsl:text>}</xsl:text>
-                               </xsl:if>
-                               <xsl:value-of select="$text"/>
-                               <xsl:text>}</xsl:text>
-                       </xsl:otherwise>
-               </xsl:choose>
-       </xsl:template>
-
        <doc:template name="xref.p.subst" xmlns="">
                <refpurpose>Insert page number into xrefs</refpurpose>
                <refdescription><para></para></refdescription>
                </xsl:when>
                <xsl:otherwise>
                        <xsl:text>\href{</xsl:text>
-                               <xsl:call-template name="scape-href">
-                                       <xsl:with-param name="string" select="$url"/>
-                               </xsl:call-template>
+                               <!-- Unparsed URL. No char is escaped. -->
+                               <xsl:value-of select="$url"/>
                        <xsl:text>}</xsl:text>
                        <xsl:text>{</xsl:text>
                                <xsl:apply-templates/>
                        </xsl:when>
                        <xsl:otherwise>
                                <xsl:text>\href{</xsl:text>
-                               <xsl:call-template name="scape-href">
-                                       <xsl:with-param name="string" select="$url"/>
-                               </xsl:call-template>
+                               <xsl:value-of select="$url"/>
                                <xsl:text>}{\texttt{</xsl:text>
                                <xsl:call-template name="generate.string.url">
                                        <xsl:with-param name="hyphenation" select="$hyphenation"/>
index b4c942ceffc23f36666427964f336e58c4d53c56..5b2c40e6a5fd6fdc330dfa06ebf53c52fe3c2f2d 100644 (file)
@@ -3,7 +3,7 @@
 <xsl:import href="db2latex/docbook.xsl"/>
 
 <xsl:output method="text" encoding="ISO-8859-1" indent="yes"/>
-<xsl:variable name="l10n.gentext.default.language">en</xsl:variable>
+<xsl:param name="l10n.gentext.default.language">en</xsl:param>
 <xsl:variable name="latex.documentclass">sambadoc</xsl:variable>
 <xsl:variable name="latex.documentclass.common">english,final,titlepage,parskip,<xsl:value-of select="$papersize"/>,<xsl:value-of select="$fontsize"/>pt</xsl:variable>
 <xsl:variable name="latex.documentclass.book"></xsl:variable>