diff options
Diffstat (limited to 'docs/docbook/xslt/db2latex/preamble.mod.xsl')
-rw-r--r-- | docs/docbook/xslt/db2latex/preamble.mod.xsl | 810 |
1 files changed, 0 insertions, 810 deletions
diff --git a/docs/docbook/xslt/db2latex/preamble.mod.xsl b/docs/docbook/xslt/db2latex/preamble.mod.xsl deleted file mode 100644 index ec9e5a8afc..0000000000 --- a/docs/docbook/xslt/db2latex/preamble.mod.xsl +++ /dev/null @@ -1,810 +0,0 @@ -<?xml version='1.0'?> -<!--############################################################################# -|- ############################################################################# -| -| PURPOSE: Variables and templates to manage LaTeX preamble. -+ ############################################################################## --> - -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" - exclude-result-prefixes="doc" version='1.0'> - - - <doc:reference id="preamble" xmlns=""> - <referenceinfo> - <releaseinfo role="meta"> - </releaseinfo> - <authorgroup> - <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author> - <author> <firstname>James</firstname> <surname>Devenish</surname> </author> - </authorgroup> - <copyright><year>2000</year><year>2001</year><year>2002</year><year>2003</year> - <holder>Ramon Casellas</holder> - </copyright> - </referenceinfo> - - <title>Variables and Templates used in LaTeX Preamble Generation</title> - - <partintro> - <section><title>Introduction</title> - <para> This section described the variables and templates that are used in the generation of - the outtput LaTeX preamble. Basically, the LaTeX preamble depends on the XML document, that is, - on whether it is an article or a book.</para> - </section> - - <section><title>Flow</title> - <section><title>Articles</title> - <para></para> - </section> - <section><title>Books</title> - <para></para> - </section> - </section> - </partintro> - </doc:reference> - - - - <!--############################################################################# - | generate.latex.article.preamble and generate.latex.book.preamble - |- ############################################################################# - | Top-level named templates. - | LaTeX Preamble. - | - + ############################################################################## --> - - <!-- DOCUMENTATION --> - <doc:template name="generate.latex.article.preamble" xmlns=""> - <refpurpose> Top level template, called by article template, - responsible of generating the LaTeX preamble according to user - XSL variables and templates. - </refpurpose> - <refdescription> - <formalpara><title>Overview</title> - If the xsl:variable <literal>latex.override</literal> - is empty, the template outputs <literal>latex.article.preamblestart</literal> - and calls <literal>generate.latex.common.preamble</literal>. Otherwise, - it outputs the value of <literal>latex.override</literal> and - exists. - </formalpara> - </refdescription> - <refauthor>Ramon Casellas <email>casellas@aist.enst.fr</email></refauthor> - </doc:template> - - <!-- TEMPLATE --> - <xsl:template name="generate.latex.article.preamble"> - <xsl:choose> - <xsl:when test="$latex.override = ''"> - <xsl:value-of select="$latex.article.preamblestart"/> - <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> - - <!-- DOCUMENTATION --> - <doc:template name="generate.latex.book.preamble" xmlns=""> - <refpurpose> Top level template, called by book template, - responsible of generating the LaTeX preamble according to user - XSL variables and templates. - </refpurpose> - <refdescription> - <formalpara><title>Overview</title> - If the xsl:variable <literal>latex.override</literal> - is empty, the template outputs <literal>latex.book.preamblestart</literal> - and calls <literal>generate.latex.common.preamble</literal>. Otherwise, - it outputs the value of <literal>latex.override</literal> and - exists. - </formalpara> - </refdescription> - <refauthor>Ramon Casellas <email>casellas@aist.enst.fr</email></refauthor> - </doc:template> - - <!-- TEMPLATE --> - <xsl:template name="generate.latex.book.preamble"> - <xsl:choose> - <xsl:when test="$latex.override = ''"> - <xsl:value-of select="$latex.book.preamblestart"/> - <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> - - - - - - - <!--############################################################################# - | latex.article.preamblestart and latex.book.preamblestart - |- ############################################################################# - | - + ############################################################################## --> - - <doc:variable name="latex.article.preamblestart" xmlns=""> - <refpurpose> Generated Document class for articles. </refpurpose> - <refdescription> - </refdescription> - <refreturn> - <screen> - % -------------------------------------------- - % Autogenerated LaTeX file for articles - % -------------------------------------------- - \ifx\pdfoutput\undefined - \documentclass[spanish,french,english,a4paper,10pt,twoside,twocolumn]{article} - \else - \documentclass[pdftex,spanish,french,english,a4paper,10pt,twoside,twocolumn]{article} - \fi - </screen> - </refreturn> - </doc:variable> - - <xsl:variable name="latex.article.preamblestart"> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>% Autogenerated LaTeX file for articles </xsl:text> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>\ifx\pdfoutput\undefined </xsl:text> - <xsl:text>\documentclass[</xsl:text> - <xsl:value-of select='$latex.documentclass.common' /> - <xsl:text>,</xsl:text> - <xsl:value-of select='$latex.documentclass.article' /> - <xsl:text>,</xsl:text> - <xsl:value-of select='$latex.documentclass.pdftex' /> - <xsl:text>]{</xsl:text> - <xsl:choose> - <xsl:when test="$latex.documentclass!=''"><xsl:value-of select="$latex.documentclass" /></xsl:when> - <xsl:otherwise><xsl:text>article</xsl:text></xsl:otherwise> - </xsl:choose> - <xsl:text>} </xsl:text> - <xsl:text>\else </xsl:text> - <xsl:text>\documentclass[pdftex,</xsl:text> - <xsl:value-of select='$latex.documentclass.common' /> - <xsl:text>,</xsl:text> - <xsl:value-of select='$latex.documentclass.article' /> - <xsl:text>,</xsl:text> - <xsl:value-of select='$latex.documentclass.dvips' /> - <xsl:text>]{</xsl:text> - <xsl:choose> - <xsl:when test="$latex.documentclass!=''"><xsl:value-of select="$latex.documentclass" /></xsl:when> - <xsl:otherwise><xsl:text>article</xsl:text></xsl:otherwise> - </xsl:choose> - <xsl:text>} </xsl:text> - <xsl:text>\fi </xsl:text> - </xsl:variable> - - <doc:variable name="latex.book.preamblestart" xmlns=""> - <refpurpose>Generated Document class for books. </refpurpose> - <refdescription> - </refdescription> - <refreturn> - <screen> - % ------------------------------------------------------------ - % Autogenerated LaTeX file for books - % ------------------------------------------------------------ - \ifx\pdfoutput\undefined - \documentclass[spanish,french,english,a4paper,twoside,openright,10pt,final]{report} - \else - \documentclass[pdftex,spanish,french,english,a4paper,twoside,openright,10pt,final]{report} - \fi - </screen> - </refreturn> - </doc:variable> - - <xsl:variable name="latex.book.preamblestart"> - <xsl:text>% ------------------------------------------------------------ </xsl:text> - <xsl:text>% Autogenerated LaTeX file for books </xsl:text> - <xsl:text>% ------------------------------------------------------------ </xsl:text> - <xsl:text>\ifx\pdfoutput\undefined </xsl:text> - <xsl:text>\documentclass[</xsl:text> - <xsl:value-of select='$latex.documentclass.common' /> - <xsl:text>,</xsl:text> - <xsl:value-of select='$latex.documentclass.book' /> - <xsl:text>,</xsl:text> - <xsl:value-of select='$latex.documentclass.pdftex' /> - <xsl:text>]{</xsl:text> - <xsl:choose> - <xsl:when test="$latex.documentclass!=''"><xsl:value-of select="$latex.documentclass" /></xsl:when> - <xsl:otherwise><xsl:text>report</xsl:text></xsl:otherwise> - </xsl:choose> - <xsl:text>} </xsl:text> - <xsl:text>\else </xsl:text> - <xsl:text>\documentclass[pdftex,</xsl:text> - <xsl:value-of select='$latex.documentclass.common' /> - <xsl:text>,</xsl:text> - <xsl:value-of select='$latex.documentclass.book' /> - <xsl:text>,</xsl:text> - <xsl:value-of select='$latex.documentclass.dvips' /> - <xsl:text>]{</xsl:text> - <xsl:choose> - <xsl:when test="$latex.documentclass!=''"><xsl:value-of select="$latex.documentclass" /></xsl:when> - <xsl:otherwise><xsl:text>report</xsl:text></xsl:otherwise> - </xsl:choose> - <xsl:text>} </xsl:text> - <xsl:text>\fi </xsl:text> - </xsl:variable> - - <!--############################################################################# - | generate.latex.common.preamble - |- ############################################################################# - | - + ############################################################################## --> - - <doc:variable name="generate.latex.common.preamble" xmlns=""> - <refpurpose> Common LaTeX preamble shared by articles and books, and other - document classes. Most of the packages and package options are managed here </refpurpose> - <refdescription> - </refdescription> - <refreturn> - The LaTeX preamble, after the document class and before the <literal>\begin{document}</literal> - command. - </refreturn> - </doc:variable> - - - - <xsl:template name="generate.latex.common.preamble"> - <xsl:choose> - <xsl:when test="$latex.pdf.support=1"><xsl:value-of select="$latex.pdf.preamble"/></xsl:when> - <xsl:otherwise><xsl:text>\usepackage{graphicx} </xsl:text></xsl:otherwise> - </xsl:choose> - <xsl:if test="local-name(.)='article'"> - <xsl:value-of select="$latex.article.varsets"/> - </xsl:if> - <xsl:if test="local-name(.)='book'"> - <xsl:value-of select="$latex.book.varsets"/> - </xsl:if> - <xsl:if test="$latex.use.fancyhdr=1"> - <xsl:text>\usepackage{fancyhdr} </xsl:text> - <xsl:call-template name="generate.latex.pagestyle"/> - <!-- - Add dollar... - <xsl:if test="latex.fancyhdr.lh !=''"><xsl:text>\lhead{</xsl:text><xsl:value-of select="$latex.fancyhdr.lh"/><xsl:text>} </xsl:text></xsl:if> - <xsl:if test="latex.fancyhdr.ch !=''"><xsl:text>\chead{</xsl:text><xsl:value-of select="$latex.fancyhdr.ch"/><xsl:text>} </xsl:text></xsl:if> - <xsl:if test="latex.fancyhdr.rh !=''"><xsl:text>\rhead{</xsl:text><xsl:value-of select="$latex.fancyhdr.rh"/><xsl:text>} </xsl:text></xsl:if> - <xsl:if test="latex.fancyhdr.lf !=''"><xsl:text>\lfoot{</xsl:text><xsl:value-of select="$latex.fancyhdr.lf"/><xsl:text>} </xsl:text></xsl:if> - <xsl:if test="latex.fancyhdr.cf !=''"><xsl:text>\cfoot{</xsl:text><xsl:value-of select="$latex.fancyhdr.cf"/><xsl:text>} </xsl:text></xsl:if> - <xsl:if test="latex.fancyhdr.rf !=''"><xsl:text>\rfoot{</xsl:text><xsl:value-of select="$latex.fancyhdr.rf"/><xsl:text>} </xsl:text></xsl:if> - --> - - <xsl:text>\renewcommand{\headrulewidth}{0.4pt} </xsl:text> - <xsl:text>\renewcommand{\footrulewidth}{0.4pt} </xsl:text> - </xsl:if> - - <xsl:text>% ---------------------- </xsl:text> - <xsl:text>% Most Common Packages </xsl:text> - <xsl:text>% ---------------------- </xsl:text> - <xsl:if test="$latex.use.makeidx=1"><xsl:text>\usepackage{makeidx} </xsl:text></xsl:if> - <xsl:text>\usepackage{varioref} </xsl:text> - <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{ragged2e} </xsl:text> - <xsl:if test="$latex.babel.language!=''"> - <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>\fvset{obeytabs=true,tabsize=</xsl:text> - <xsl:value-of select="$latex.fancyvrb.tabsize"/> - <xsl:text>} </xsl:text> - </xsl:if> - </xsl:if> - <xsl:if test="$latex.use.isolatin1=1"><xsl:text>\usepackage{isolatin1} </xsl:text></xsl:if> - <xsl:if test="$latex.use.parskip=1"><xsl:text>\usepackage{parskip} </xsl:text></xsl:if> - <xsl:if test="$latex.use.rotating=1"><xsl:text>\usepackage{rotating} </xsl:text></xsl:if> - <xsl:if test="$latex.use.subfigure=1"><xsl:text>\usepackage{subfigure} </xsl:text></xsl:if> - <xsl:if test="$latex.use.tabularx=1"><xsl:text>\usepackage{tabularx} </xsl:text></xsl:if> - <xsl:if test="$latex.use.umoline=1"><xsl:text>\usepackage{umoline} </xsl:text></xsl:if> - <xsl:if test="$latex.use.url=1"><xsl:text>\usepackage{url} </xsl:text></xsl:if> - - <!-- Configure document font. --> - <xsl:if test="$latex.document.font != 'default'"> - <xsl:text>% --------------- </xsl:text> - <xsl:text>% Document Font </xsl:text> - <xsl:text>% --------------- </xsl:text> - <xsl:text>\usepackage{</xsl:text><xsl:value-of select="$latex.document.font"/><xsl:text>} </xsl:text> - </xsl:if> - <!-- Support for keywords. --> - <xsl:text> \def\keywords{\vspace{-.3em} </xsl:text> - <xsl:text> \if@twocolumn </xsl:text> - <xsl:text> \small{\itshape </xsl:text> - <xsl:call-template name="gentext"> - <xsl:with-param name="key">keywords</xsl:with-param> - </xsl:call-template> - <xsl:text> }\/\bfseries---$\!$% </xsl:text> - <xsl:text> \else </xsl:text> - <xsl:text> \begin{center}\small\bfseries </xsl:text> - <xsl:call-template name="gentext"> - <xsl:with-param name="key">keywords</xsl:with-param> - </xsl:call-template> - <xsl:text> \end{center}\quotation\small </xsl:text> - <xsl:text> \fi} </xsl:text> - <xsl:text> \def\endkeywords{\vspace{0.6em}\par\if@twocolumn\else\endquotation\fi </xsl:text> - <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:value-of select="$latex.admonition.environment"/> - <xsl:call-template name="latex.float.preamble"/> - <xsl:call-template name="latex.graphicext"/> - <xsl:choose> - <xsl:when test='$latex.caption.swapskip=1'> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>% $latex.caption.swapskip enabled for $formal.title.placement support </xsl:text> - <xsl:text>\newlength{\docbooktolatextempskip} </xsl:text> - <xsl:text>\newcommand{\captionswapskip}{\setlength{\docbooktolatextempskip}{\abovecaptionskip}</xsl:text> - <xsl:text>\setlength{\abovecaptionskip}{\belowcaptionskip}</xsl:text> - <xsl:text>\setlength{\belowcaptionskip}{\docbooktolatextempskip}} </xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:text>\newcommand{\captionswapskip}{} </xsl:text> - </xsl:otherwise> - </xsl:choose> - <xsl:if test='$latex.hyphenation.tttricks=1'> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>% Better linebreaks </xsl:text> - <xsl:text>\newcommand{\docbookhyphenatedot}[1]{{\hyphenchar\font=`\.\relax #1\hyphenchar\font=`\-}} </xsl:text> - <xsl:text>\newcommand{\docbookhyphenatefilename}[1]{{\hyphenchar\font=`\.\relax #1\hyphenchar\font=`\-}} </xsl:text> - <xsl:text>\newcommand{\docbookhyphenateurl}[1]{{\hyphenchar\font=`\/\relax #1\hyphenchar\font=`\-}} </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> - - - - <!--############################################################################# - | Auxiliary templates and variables - |- ############################################################################# - | - + ############################################################################## --> - - <doc:template name="latex.float.preamble" xmlns=""> - <refpurpose> - </refpurpose> - <refdescription> - </refdescription> - </doc:template> - <xsl:template name="latex.float.preamble"> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>% Commands to manage/style/create floats </xsl:text> - <xsl:text>% figures, tables, algorithms, examples, eqn </xsl:text> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text> \floatstyle{ruled} </xsl:text> - <xsl:text> \restylefloat{figure} </xsl:text> - <xsl:text> \floatstyle{ruled} </xsl:text> - <xsl:text> \restylefloat{table} </xsl:text> - <xsl:text> \floatstyle{ruled} </xsl:text> - <xsl:text> \newfloat{program}{ht}{lop}[section] </xsl:text> - <xsl:text> \floatstyle{ruled} </xsl:text> - <xsl:text> \newfloat{example}{ht}{loe}[section] </xsl:text> - <xsl:text> \floatname{example}{</xsl:text> - <xsl:call-template name="gentext.element.name"> - <xsl:with-param name="element.name">example</xsl:with-param> - </xsl:call-template> - <xsl:text>} </xsl:text> - <xsl:text> \floatstyle{ruled} </xsl:text> - <xsl:text> \newfloat{dbequation}{ht}{loe}[section] </xsl:text> - <xsl:text> \floatname{dbequation}{</xsl:text> - <xsl:call-template name="gentext.element.name"> - <xsl:with-param name="element.name">equation</xsl:with-param> - </xsl:call-template> - <xsl:text>} </xsl:text> - <xsl:text> \floatstyle{boxed} </xsl:text> - <xsl:text> \newfloat{algorithm}{ht}{loa}[section] </xsl:text> - <xsl:text> \floatname{algorithm}{Algorithm} </xsl:text> - </xsl:template> - - - - - <!-- DOCUMENTATION --> - <doc:variable name="latex.pdf.preamble" xmlns=""> - <refpurpose> - </refpurpose> - <refdescription> - <formalpara><title>Default Value:</title> - <screen> - \usepackage{ifthen} - % -------------------------------------------- - % Check for PDFLaTeX/LaTeX - % -------------------------------------------- - \newif\ifpdf - \ifx\pdfoutput\undefined - \pdffalse % we are not running PDFLaTeX - \else - \pdfoutput=1 % we are running PDFLaTeX - \pdftrue - \fi - % -------------------------------------------- - % Load graphicx package with pdf if needed - % -------------------------------------------- - \ifpdf - \usepackage[pdftex]{graphicx} - \pdfcompresslevel=9 - \else - \usepackage{graphicx} - \fi - </screen> - </formalpara> - </refdescription> - <refauthor>Ramon Casellas <email>casellas@aist.enst.fr</email></refauthor> - </doc:variable> - - <!-- VARIABLE --> - <xsl:variable name="latex.pdf.preamble"> - <xsl:text>\usepackage{ifthen} </xsl:text> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>% Check for PDFLaTeX/LaTeX </xsl:text> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>\newif\ifpdf </xsl:text> - <xsl:text>\ifx\pdfoutput\undefined </xsl:text> - <xsl:text>\pdffalse % we are not running PDFLaTeX </xsl:text> - <xsl:text>\else </xsl:text> - <xsl:text>\pdfoutput=1 % we are running PDFLaTeX </xsl:text> - <xsl:text>\pdftrue </xsl:text> - <xsl:text>\fi </xsl:text> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>% Load graphicx package with pdf if needed </xsl:text> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>\ifpdf </xsl:text> - <xsl:text>\usepackage[pdftex]{graphicx} </xsl:text> - <xsl:text>\pdfcompresslevel=9 </xsl:text> - <xsl:text>\else </xsl:text> - <xsl:text>\usepackage{graphicx} </xsl:text> - <xsl:text>\fi </xsl:text> - </xsl:variable> - - - - <!-- DOCUMENTATION --> - <doc:template name="latex.hyperref.preamble" xmlns=""> - <refpurpose> Manage the part of the preamble that handles the hyperref package.</refpurpose> - <refdescription> - <para> This template outputs the LaTeX code <literal>\usepackage[...]{hyperref}</literal> - in order to use hyperlinks, backrefs and other goodies. If PDF support is activated, - outputs laTeX code to detect whether the document is being compiled with - <filename>pdflatex</filename> or <filename>latex</filename> to supply the - right parameters (pdftex, dvips, etc). </para> - <formalpara><title>To Do</title> The package options should be optained - from XSL variables.</formalpara> - <formalpara><title>Default Value with PDF support</title> - <screen> - % -------------------------------------------- - % Load hyperref package with pdf if needed - % -------------------------------------------- - \ifpdf - \usepackage[pdftex,bookmarksnumbered,colorlinks,backref, bookmarks, breaklinks, linktocpage]{hyperref} - \else - \usepackage[dvips,bookmarksnumbered,colorlinks,backref, bookmarks, breaklinks, linktocpage]{hyperref} - \fi - % -------------------------------------------- - </screen> - </formalpara> - <formalpara><title>Default Value without PDF support</title> - <screen> - % -------------------------------------------- - % Load hyperref package - % -------------------------------------------- - \usepackage[dvips,bookmarksnumbered,colorlinks,backref, bookmarks, breaklinks, linktocpage]{hyperref} - </screen> - </formalpara> - </refdescription> - </doc:template> - <!-- TEMPLATE --> - <xsl:template name="latex.hyperref.preamble"> - <xsl:choose> - <xsl:when test="$latex.pdf.support=1"> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>% Load hyperref package with pdf if needed </xsl:text> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>\ifpdf </xsl:text> - <xsl:text>\usepackage[pdftex,</xsl:text> - <xsl:value-of select="$latex.hyperref.param.common" /> - <xsl:text>,</xsl:text> - <xsl:value-of select="$latex.hyperref.param.pdftex" /> - <xsl:text>]{hyperref} </xsl:text> - <xsl:text>\else </xsl:text> - <xsl:text>\usepackage[dvips,</xsl:text> - <xsl:value-of select="$latex.hyperref.param.common" /> - <xsl:text>,</xsl:text> - <xsl:value-of select="$latex.hyperref.param.dvips" /> - <xsl:text>]{hyperref} </xsl:text> - <xsl:text>\fi </xsl:text> - <xsl:text>% -------------------------------------------- </xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>% Load hyperref package </xsl:text> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>\usepackage[dvips,</xsl:text> - <xsl:value-of select="$latex.hyperref.param.common" /> - <xsl:text>,</xsl:text> - <xsl:value-of select="$latex.hyperref.param.dvips" /> - <xsl:text>]{hyperref} </xsl:text> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - - - - - - - - - - - - - <!--############################################################################# - | latex.math.preamble - |- ############################################################################# - | This "preamble chunk" declares usage of most common AMS packages. - | Defines new useful commands. - + ############################################################################## --> - - <!-- DOCUMENTATION --> - <doc:variable name="latex.math.preamble" xmlns=""> - <refpurpose> Manage the math related preamble</refpurpose> - <refdescription> - </refdescription> - </doc:variable> - - <!-- VARIABLE --> - <xsl:variable name="latex.math.preamble"> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>% Math support </xsl:text> - <xsl:text>% -------------------------------------------- </xsl:text> - <xsl:text>\usepackage{amsmath,amsthm, amsfonts, amssymb, amsxtra,amsopn} </xsl:text> - <xsl:text>%\newtheorem{thm}{Theorem}[section] </xsl:text> - <xsl:text>%\newtheorem{cor}[section]{Corollary} </xsl:text> - <xsl:text>%\newtheorem{lem}[section]{Lemma} </xsl:text> - <xsl:text>%\newtheorem{defn}[section]{Definition} </xsl:text> - <xsl:text>%\newtheorem{prop}[section]{Proposition} </xsl:text> - <xsl:text>%\newtheorem{ax}{Axiom} </xsl:text> - <xsl:text>%\newtheorem{theorem}[section]{Theorem} </xsl:text> - <xsl:text>%\newtheorem{corollary}{Corollary} </xsl:text> - <xsl:text>%\newtheorem{lemma}{Lemma} </xsl:text> - <xsl:text>%\newtheorem{proposition}{Proposition} </xsl:text> - <xsl:text>%\theoremstyle{definition} </xsl:text> - <xsl:text>%\newtheorem{definition}{Definition} </xsl:text> - <xsl:text>%\theoremstyle{remark} </xsl:text> - <xsl:text>%\newtheorem{rem}{Remark} </xsl:text> - <xsl:text>%\newtheorem*{notation}{Notation} </xsl:text> - <xsl:text>%\newcommand{\ntt}{\normalfont\ttfamily} </xsl:text> - <xsl:text>%\newcommand{\thmref}[1]{Theorem~\ref{#1}} </xsl:text> - <xsl:text>%\newcommand{\secref}[1]{\S\ref{#1}} </xsl:text> - <xsl:text>%\newcommand{\lemref}[1]{Lemma~\ref{#1}} </xsl:text> - <xsl:text> \newcommand{\bysame}{\mbox{\rule{3em}{.4pt}}\,} </xsl:text> - <xsl:text> \newcommand{\A}{\mathcal{A}} </xsl:text> - <xsl:text> \newcommand{\B}{\mathcal{B}} </xsl:text> - <xsl:text> \newcommand{\XcY}{{(X,Y)}} </xsl:text> - <xsl:text> \newcommand{\SX}{{S_X}} </xsl:text> - <xsl:text> \newcommand{\SY}{{S_Y}} </xsl:text> - <xsl:text> \newcommand{\SXY}{{S_{X,Y}}} </xsl:text> - <xsl:text> \newcommand{\SXgYy}{{S_{X|Y}(y)}} </xsl:text> - <xsl:text> \newcommand{\Cw}[1]{{\hat C_#1(X|Y)}} </xsl:text> - <xsl:text> \newcommand{\G}{{G(X|Y)}} </xsl:text> - <xsl:text> \newcommand{\PY}{{P_{\mathcal{Y}}}} </xsl:text> - <xsl:text> \newcommand{\X}{\mathcal{X}} </xsl:text> - <xsl:text> \newcommand{\wt}{\widetilde} </xsl:text> - <xsl:text> \newcommand{\wh}{\widehat} </xsl:text> - <xsl:text> % -------------------------------------------- </xsl:text> - <xsl:text> %\DeclareMathOperator{\per}{per} </xsl:text> - <xsl:text> \DeclareMathOperator{\cov}{cov} </xsl:text> - <xsl:text> \DeclareMathOperator{\non}{non} </xsl:text> - <xsl:text> \DeclareMathOperator{\cf}{cf} </xsl:text> - <xsl:text> \DeclareMathOperator{\add}{add} </xsl:text> - <xsl:text> \DeclareMathOperator{\Cham}{Cham} </xsl:text> - <xsl:text> \DeclareMathOperator{\IM}{Im} </xsl:text> - <xsl:text> \DeclareMathOperator{\esssup}{ess\,sup} </xsl:text> - <xsl:text> \DeclareMathOperator{\meas}{meas} </xsl:text> - <xsl:text> \DeclareMathOperator{\seg}{seg} </xsl:text> - <xsl:text>% -------------------------------------------- </xsl:text> - </xsl:variable> - - - - -<!--############################################################################# -| latex.graphicext -|- ############################################################################# -| -+ ############################################################################## --> - -<doc:template name="latex.graphicext" xmlns=""> -<refpurpose> Declared graphic extensions </refpurpose> -<refdescription> -This template checks whether the user has overriden <command>grafic.default.extension</command> -Otherwise, declares .pdf, .png, .jpg if using pdflatex and .eps if using latex. -<programlisting><![CDATA[ -<xsl:template name="latex.graphicext"> -<xsl:choose> -<xsl:when test="$graphic.default.extension !=''"> - <xsl:text>\DeclareGraphicsExtensions{</xsl:text> - <xsl:if test="not(contains($graphic.default.extension,'.'))"> - <xsl:text>.</xsl:text> - </xsl:if> - <xsl:value-of select="$graphic.default.extension"/> - <xsl:text>} </xsl:text> -</xsl:when> -<xsl:otherwise> - <xsl:choose> - <xsl:when test="$latex.pdf.support=1"> - <xsl:text>\ifpdf </xsl:text> - <xsl:text>\DeclareGraphicsExtensions{.pdf,.png,.jpg} </xsl:text> - <xsl:text>\else </xsl:text> - <xsl:text>\DeclareGraphicsExtensions{.eps} </xsl:text> - <xsl:text>\fi </xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:text>\DeclareGraphicsExtensions{.eps} </xsl:text> - </xsl:otherwise> - </xsl:choose> -</xsl:otherwise> -</xsl:choose> -</xsl:template> - - -]]></programlisting> -</refdescription> -<refreturn> -</refreturn> -</doc:template> - -<xsl:template name="latex.graphicext"> -<xsl:choose> -<xsl:when test="$graphic.default.extension !=''"> - <xsl:text>\DeclareGraphicsExtensions{</xsl:text> - <xsl:if test="not(contains($graphic.default.extension,'.'))"> - <xsl:text>.</xsl:text> - </xsl:if> - <xsl:value-of select="$graphic.default.extension"/> - <xsl:text>} </xsl:text> -</xsl:when> -<xsl:otherwise> - <xsl:choose> - <xsl:when test="$latex.pdf.support=1"> - <xsl:text>\ifpdf </xsl:text> - <xsl:text>\DeclareGraphicsExtensions{.pdf,.png,.jpg} </xsl:text> - <xsl:text>\else </xsl:text> - <xsl:text>\DeclareGraphicsExtensions{.eps} </xsl:text> - <xsl:text>\fi </xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:text>\DeclareGraphicsExtensions{.eps} </xsl:text> - </xsl:otherwise> - </xsl:choose> -</xsl:otherwise> -</xsl:choose> -</xsl:template> - - <xsl:template name="generate.latex.cell.separator"> - <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:choose> - </xsl:template> -</xsl:stylesheet> - |