<?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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: abstract.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
% --------------------------------------------
\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>
<?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.
+ ############################################################################## -->
<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>% ---------------------------------------------- </xsl:text>
-<xsl:text>% Define a new LaTeX environment (adminipage) </xsl:text>
-<xsl:text>% ---------------------------------------------- </xsl:text>
-<xsl:text>\newenvironment{admminipage}% </xsl:text>
-<xsl:text>{ % this code corresponds to the \begin{adminipage} command </xsl:text>
-<xsl:text> \begin{Sbox}% </xsl:text>
-<xsl:text> \begin{minipage}% </xsl:text>
-<xsl:text>} %done </xsl:text>
-<xsl:text>{ % this code corresponds to the \end{adminipage} command </xsl:text>
-<xsl:text> \end{minipage} </xsl:text>
-<xsl:text> \end{Sbox} </xsl:text>
-<xsl:text> \fbox{\TheSbox} </xsl:text>
-<xsl:text>} %done </xsl:text>
-<xsl:text>% ---------------------------------------------- </xsl:text>
-<xsl:text>% Define a new LaTeX length (admlength) </xsl:text>
-<xsl:text>% ---------------------------------------------- </xsl:text>
-<xsl:text>\newlength{\admlength} </xsl:text>
-<xsl:text>% ---------------------------------------------- </xsl:text>
-<xsl:text>% Define a new LaTeX environment (admonition) </xsl:text>
-<xsl:text>% With 2 parameters: </xsl:text>
-<xsl:text>% #1 The file (e.g. note.pdf) </xsl:text>
-<xsl:text>% #2 The caption </xsl:text>
-<xsl:text>% ---------------------------------------------- </xsl:text>
-<xsl:text>\newenvironment{admonition}[2] </xsl:text>
-<xsl:text>{ % this code corresponds to the \begin{admonition} command </xsl:text>
-<xsl:text> \hspace{0mm}\newline\hspace*\fill\newline </xsl:text>
-<xsl:text> \noindent </xsl:text>
-<xsl:text> \setlength{\fboxsep}{5pt} </xsl:text>
-<xsl:text> \setlength{\admlength}{\linewidth} </xsl:text>
-<xsl:text> \addtolength{\admlength}{-10\fboxsep} </xsl:text>
-<xsl:text> \addtolength{\admlength}{-10\fboxrule} </xsl:text>
-<xsl:text> \admminipage{\admlength} </xsl:text>
-<xsl:text> {\bfseries \sc\large{#2}}</xsl:text>
-<xsl:text> \newline </xsl:text>
-<xsl:text> \\[1mm] </xsl:text>
-<xsl:text> \sffamily </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} </xsl:text>
-<xsl:text> \addtolength{\admlength}{-1cm} </xsl:text>
-<xsl:text> \addtolength{\admlength}{-20pt} </xsl:text>
-<xsl:text> \begin{minipage}[lt]{\admlength} </xsl:text>
-<xsl:text> \parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt </xsl:text>
-<xsl:text>} %done </xsl:text>
-<xsl:text>{ % this code corresponds to the \end{admonition} command </xsl:text>
-<xsl:text> \vspace{5mm} </xsl:text>
-<xsl:text> \end{minipage} </xsl:text>
-<xsl:text> \endadmminipage </xsl:text>
-<xsl:text> \vspace{.5em} </xsl:text>
-<xsl:text> \par </xsl:text>
-<xsl:text>} </xsl:text>
-</xsl:variable>
-
-
-
+ <xsl:variable name="latex.admonition.environment">
+ <xsl:text>\newenvironment{admminipage}{\begin{Sbox}\begin{minipage}}{\end{minipage}\end{Sbox}\fbox{\TheSbox}} </xsl:text>
+ <xsl:text>\newlength{\admlength} </xsl:text>
+ <xsl:text>\newenvironment{admonition}[2] { </xsl:text>
+ <xsl:text> \hspace{0mm}\newline\hspace*\fill\newline </xsl:text>
+ <xsl:text> \noindent </xsl:text>
+ <xsl:text> \setlength{\fboxsep}{5pt} </xsl:text>
+ <xsl:text> \setlength{\admlength}{\linewidth} </xsl:text>
+ <xsl:text> \addtolength{\admlength}{-10\fboxsep} </xsl:text>
+ <xsl:text> \addtolength{\admlength}{-10\fboxrule} </xsl:text>
+ <xsl:text> \admminipage{\admlength} </xsl:text>
+ <xsl:text> {\bfseries \sc\large{#2}} \newline </xsl:text>
+ <xsl:text> \\[1mm] </xsl:text>
+ <xsl:text> \sffamily </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} </xsl:text>
+ <xsl:text> \addtolength{\admlength}{-1cm} </xsl:text>
+ <xsl:text> \addtolength{\admlength}{-20pt} </xsl:text>
+ <xsl:text> \begin{minipage}[lt]{\admlength} </xsl:text>
+ <xsl:text> \parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt </xsl:text>
+ <xsl:text>}{ </xsl:text>
+ <xsl:text> \vspace{5mm} </xsl:text>
+ <xsl:text> \end{minipage} </xsl:text>
+ <xsl:text> \endadmminipage </xsl:text>
+ <xsl:text> \vspace{.5em} </xsl:text>
+ <xsl:text> \par </xsl:text>
+ <xsl:text>} </xsl:text>
+ </xsl:variable>
<!--############################################################################# -->
<!-- DOCUMENTATION -->
<?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
+ ############################################################################## -->
<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>
<?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.
+ ############################################################################## -->
<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> </xsl:text>
<xsl:text>% -------------- biblioentry </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>} \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>} </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> </xsl:text>
</xsl:template>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: block.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?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
<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>} </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>} </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 </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 </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 </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 </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} </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>}} </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>} </xsl:text>
- </xsl:if>
+ <xsl:call-template name="normalize-scape">
+ <xsl:with-param name="string" select="$article.title"/>
+ </xsl:call-template>
+ <xsl:text>} </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>} </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} </xsl:text>
<xsl:text>\if@twocolumn </xsl:text>
<xsl:apply-templates select="*[not(self::title)]"/>
<xsl:text>\vspace{0.6em}\par\if@twocolumn\else\endquotation\fi </xsl:text>
<xsl:text>\normalsize\rmfamily </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)>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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: bridgehead.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: callout.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: citation.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<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>
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
<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>
<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örter"/>
-<gentext key="keywordset" text="Stichwörter"/>
<gentext key="important" text="Wichtig"/>
<gentext key="index" text="Stichwortverzeichnis"/>
<gentext key="legalnotice" text="Rechtlicher Hinweis"/>
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.
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: component.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: dingbat.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
|
<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>
<?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.
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: email.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?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:
+ ############################################################################## -->
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: example.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?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.
+ ############################################################################## -->
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: font.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: footnote.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: formal.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<!-- 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> </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>$ </xsl:text>
</xsl:when>
<xsl:otherwise>
- <xsl:apply-templates select="graphic"/>
+ <xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
-<xsl:text> </xsl:text>
</xsl:template>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: glossary.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: graphic.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?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:
|
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: index.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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 </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
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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: info.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: inline.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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">
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: keywords.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?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.
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: latex.mapping.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: lists.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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> \begin{itemize} </xsl:text>
+ <xsl:text>\begin{itemize} </xsl:text>
<xsl:apply-templates select="listitem"/>
- <xsl:text> \end{itemize} </xsl:text>
+ <xsl:text>\end{itemize} </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"/>
<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> \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> </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> \noindent </xsl:text>
- <xsl:text> \begin{description} </xsl:text>
+ \begin{description}
<xsl:apply-templates select="varlistentry"/>
- <xsl:text> \end{description} </xsl:text>
+ \end{description}
</xsl:template>
<xsl:template match="listitem">
- <xsl:text> %--- Item </xsl:text>
- <xsl:text>\item </xsl:text>
- <xsl:apply-templates/>
- <xsl:text> </xsl:text>
+ \item <xsl:apply-templates/><xsl:text> </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 < $cols">
- <xsl:call-template name="generate.latex.cell.separator"/>
+ <xsl:text>& </xsl:text>
</xsl:if>
</xsl:when>
</xsl:choose>
<xsl:apply-templates select="$members[position()=$cell]"/>
<xsl:text> </xsl:text>
<xsl:if test="$curcol < $cols">
- <xsl:call-template name="generate.latex.cell.separator"/>
+ <xsl:text>& </xsl:text>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<?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
<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>
<!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
<!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
<!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
<!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
<!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
<!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='ⅇ'">
<xsl:text>\textrm{e}</xsl:text>
<xsl:when test="$identifier='∞'"><!--/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)>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>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='⁡'">
<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] = ̲">
<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]) = ¯">
<xsl:when test="normalize-space(*[2]) = ⎴">
<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 </xsl:text>
<xsl:apply-templates/>
-<xsl:text>\end{array} </xsl:text>
+\end{array}
</xsl:template>
<xsl:template match="mml:mtr">
<?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.
+ ############################################################################## -->
<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> </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> </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)<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)<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>}}} </xsl:text>
+ <!-- xsl:text>}}}\quad </xsl:text -->
</xsl:template>
<?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:
+ ############################################################################## -->
<?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.
<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">></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">\&</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">\&</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">\%</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">\&</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" 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>
-
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: para.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<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>
<?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
+ ############################################################################## -->
<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>
<!--#############################################################################
+ | $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:
+ ############################################################################## -->
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: pi.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?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.
+ ############################################################################## -->
<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} </xsl:text>
<xsl:text>\usepackage{enumerate} </xsl:text>
<xsl:if test="$latex.use.fancybox=1">
- <!-- must be before \usepackage{fancyvrb} -->
<xsl:text>\usepackage{fancybox} </xsl:text>
</xsl:if>
<xsl:text>\usepackage{float} </xsl:text>
<xsl:text>\usepackage[</xsl:text><xsl:value-of select="$latex.babel.language" /><xsl:text>]{babel} </xsl:text>
</xsl:if>
<xsl:if test="$latex.use.fancyvrb=1">
- <!-- must be after \usepackage{fancybox} -->
<xsl:text>\usepackage{fancyvrb} </xsl:text>
<xsl:text>\makeatletter\@namedef{FV@fontfamily@default}{\def\FV@FontScanPrep{}\def\FV@FontFamily{}}\makeatother </xsl:text>
<xsl:if test="$latex.fancyvrb.tabsize!=''">
<xsl:text> \normalsize\rmfamily} </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]{{}} </xsl:text>
+ <xsl:text>\newcommand{\hyperlink}[1]{{}} </xsl:text>
+ <xsl:text>\newcommand{\hypertarget}[2]{#2} </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>% -------------------------------------------- </xsl:text>
+ <xsl:text>% A way to honour <footnoteref>s </xsl:text>
+ <xsl:text>% Blame j-devenish (at) users.sourceforge.net </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>% -------------------------------------------- </xsl:text>
+ <xsl:text>% Hacks for honouring row/entry/@align </xsl:text>
+ <xsl:text>% (\hspace not effective when in paragraph mode) </xsl:text>
+ <xsl:text>% Naming convention for these macros is: </xsl:text>
+ <xsl:text>% 'docbooktolatex' 'align' {alignment-type} {position-within-entry} </xsl:text>
+ <xsl:text>% where r = right, l = left, c = centre </xsl:text>
+ <xsl:text>\newcommand{\docbooktolatexalignrl}{\protect\ifvmode\raggedleft\else\hfill\fi} </xsl:text>
+ <xsl:text>\newcommand{\docbooktolatexalignrr}{\protect} </xsl:text>
+ <xsl:text>\newcommand{\docbooktolatexalignll}{\protect\ifvmode\raggedright\else\fi} </xsl:text>
+ <xsl:text>\newcommand{\docbooktolatexalignlr}{\protect\ifvmode\else\hspace*\fill\fi} </xsl:text>
+ <xsl:text>\newcommand{\docbooktolatexaligncl}{\protect\ifvmode\centering\else\hfill\fi} </xsl:text>
+ <xsl:text>\newcommand{\docbooktolatexaligncr}{\protect\ifvmode\else\hspace*\fill\fi} </xsl:text>
<xsl:choose>
<xsl:when test='$latex.caption.swapskip=1'>
<xsl:text>% -------------------------------------------- </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>% -------------------------------------------- </xsl:text>
- <xsl:text>\makeatletter </xsl:text>
- <xsl:if test="$latex.use.hyperref!='1'">
- <xsl:text>\newcommand{\href}[1]{{}} </xsl:text>
- <xsl:text>\newcommand{\hyperlink}[1]{{}} </xsl:text>
- <xsl:text>\newcommand{\hypertarget}[2]{#2} </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} </xsl:text>
- </xsl:if>
- <xsl:if test="$latex.entities='catcode'">
- <xsl:text>\catcode`\&=\active\def&{\@ifnextchar##{\@docbooktolatexunicode\@gobble}{\&}} </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}} </xsl:text>
- </xsl:if>
- <xsl:if test="$latex.entities='unicode'">
- <xsl:text>\usepackage[utf8]{inputenc} </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>
-
<!--#############################################################################
</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`\&=4 &\catcode`\&=\active </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text> & </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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: procedure.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<!--############################################################################# -->
-<doc:template match="procedure" xmlns="">
+<doc:template match="step" xmlns="">
<refpurpose>Procedure XSL Template.</refpurpose>
<refdescription>
<para></para>
</xsl:template>
<xsl:template match="procedure/title" mode="procedure.title">
- <xsl:text> {</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> \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>}} </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>} </xsl:text>
</xsl:when>
<xsl:otherwise>
- <xsl:text> \item{</xsl:text>
+ <xsl:text>\item{{</xsl:text>
</xsl:otherwise>
</xsl:choose>
- <xsl:apply-templates select="*[not(self::title)]"/>
- <xsl:text>} </xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>}} </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>
<?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.
<!-- 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>% ----------- </xsl:text>
<xsl:text>% QandADiv </xsl:text>
<xsl:text>% ----------- </xsl:text>
- <xsl:text>\noindent\begin{minipage}{\linewidth} </xsl:text>
- <xsl:text>\vspace{0.25em}\hrule\vspace{0.25em} </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>} </xsl:text>
<xsl:call-template name="label.id"/>
<xsl:text> </xsl:text>
- <xsl:text>\hrule\vspace{0.25em} </xsl:text>
- <xsl:text>\end{minipage} </xsl:text>
<!--
<xsl:variable name="toc.params">
-->
<!-- pseudo table of contents -->
- <!--
+ <xsl:text>\floatstyle{ruled} </xsl:text>
+ <xsl:text>\newfloat{qandadivtoc}{H}{qdtoc} </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>} </xsl:text>
+ <!-- or this one :
+ <xsl:text>\floatname{qandadivtoc}{} </xsl:text>
+ -->
+ <xsl:text>\begin{qandadivtoc} </xsl:text>
<xsl:choose>
<xsl:when test="title">
<xsl:text>\caption{</xsl:text>
<xsl:text>} </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 </xsl:text></xsl:if>
</xsl:for-each>
- <xsl:text>\vspace{0.25em}\hrule </xsl:text>
+ <xsl:text>\end{qandadivtoc} </xsl:text>
+ <xsl:text>\vspace{0.25cm} </xsl:text>
<xsl:for-each select="qandaentry">
- <xsl:text>\vspace{1em} </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 </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} </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>} </xsl:text>
+<xsl:text>} \newline </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 </xsl:text>
+<xsl:text>\vspace{0.25cm} </xsl:text>
<xsl:text> </xsl:text>
</xsl:template>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: refentry.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: revision.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<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 </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 </xsl:text>
<?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:
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: set.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: sgmltag.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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>
<xsl:when test="$class='endtag'">
<xsl:call-template name="inline.monoseq">
<xsl:with-param name="content">
- <xsl:text></</xsl:text>
+ <xsl:text>\textless{}/</xsl:text>
<xsl:apply-templates/>
- <xsl:text>></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><?</xsl:text>
+ <xsl:text>\textless{}?</xsl:text>
<xsl:apply-templates/>
- <xsl:text>?></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><?</xsl:text>
+ <xsl:text>\textless{}?</xsl:text>
<xsl:apply-templates/>
- <xsl:text>?></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><</xsl:text>
+ <xsl:text>\textless{}</xsl:text>
<xsl:apply-templates/>
- <xsl:text>></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><</xsl:text>
+ <xsl:text>\textless{}</xsl:text>
<xsl:apply-templates/>
- <xsl:text>/></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><!--</xsl:text>
+ <xsl:text>$<$!$--$</xsl:text>
<xsl:apply-templates/>
- <xsl:text>--></xsl:text>
+ <xsl:text>$-->$</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<!DOCTYPE xsl:stylesheet [ <!ENTITY RE " "> ]>
<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:
+ ############################################################################## -->
<?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:
+ ############################################################################## -->
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: table.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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)>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<=$cols and colspec[position()=$i and contains(@colwidth,'*')]">
- <!-- a * column -->
+ <xsl:when test="$i<=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<=$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 > 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} </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 </xsl:text></xsl:when>
- <xsl:otherwise><xsl:call-template name="generate.latex.cell.separator"/></xsl:otherwise>
+ <xsl:otherwise><xsl:text> & </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 </xsl:text></xsl:when>
- <xsl:otherwise><xsl:call-template name="generate.latex.cell.separator"/></xsl:otherwise>
+ <xsl:otherwise><xsl:text> & </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 > 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 < 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"/>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: texmath.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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} </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>
<?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
+ ############################################################################## -->
<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>
<!--#############################################################################
| 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}} </xsl:text>
+ <xsl:variable name="latex.article.maketitle">
+ <xsl:text> </xsl:text>
+ <xsl:text>\maketitle </xsl:text>
</xsl:variable>
<?xml version='1.0'?>
<!--#############################################################################
+| $Id: verbatim.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
+| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<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> \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>] </xsl:text>
+ <xsl:apply-templates mode="latex.verbatim"/>
+ <xsl:text> \end{Verbatim} </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> \begin{verbatim} </xsl:text>
+ <!-- RCAS: Experimental code
+ <xsl:apply-templates/>-->
+ <xsl:apply-templates mode="latex.verbatim"/>
+ <xsl:text> \end{verbatim} </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> \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>] </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> \end{Verbatim} </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> \begin{verbatim} </xsl:text>
+ <!-- RCAS: Experimental code
+ <xsl:apply-templates/>-->
<xsl:apply-templates mode="latex.verbatim"/>
<xsl:text> \end{verbatim} </xsl:text>
</xsl:otherwise>
<?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
+ ############################################################################## -->
<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"/>
<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>