diff options
Diffstat (limited to 'docs/docbook/xslt/db2latex/admonition.mod.xsl')
-rw-r--r-- | docs/docbook/xslt/db2latex/admonition.mod.xsl | 107 |
1 files changed, 42 insertions, 65 deletions
diff --git a/docs/docbook/xslt/db2latex/admonition.mod.xsl b/docs/docbook/xslt/db2latex/admonition.mod.xsl index 56042a610e..62f37ccd3a 100644 --- a/docs/docbook/xslt/db2latex/admonition.mod.xsl +++ b/docs/docbook/xslt/db2latex/admonition.mod.xsl @@ -1,6 +1,8 @@ <?xml version='1.0'?> <!--############################################################################# +| $Id: admonition.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $ |- ############################################################################# +| $Author: jelmer $ | | PURPOSE: Admonition templates. + ############################################################################## --> @@ -15,6 +17,7 @@ <doc:reference name="admonition" xmlns=""> <referenceinfo> <releaseinfo role="meta"> + $Id: admonition.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $ </releaseinfo> <authorgroup> <author><firstname>Ramon</firstname> <surname>Casellas</surname></author> @@ -74,72 +77,46 @@ </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 --> |