1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- $Id: tex-refs-pdf.xsl 146 2005-05-14 15:34:22Z mw $ -->
<!-- we use an XML catalog to resolve this file -->
<xsl:import href="http://db2latex.sourceforge.net/xsl/docbook.xsl"/>
<xsl:output method="text" encoding="ISO-8859-1" indent="yes"/>
<xsl:param name="latex.documentclass">scrbook</xsl:param>
<xsl:param name="latex.documentclass.book">twoside,openright,tocleft,listsleft,smallheadings,10pt,halfparskip</xsl:param>
<xsl:param name="latex.hyperref.param.common">bookmarksnumbered,backref,breaklinks,linktocpage</xsl:param>
<xsl:variable name="latex.math.support">1</xsl:variable>
<!-- we use the Latin Modern fonts -->
<xsl:variable name="latex.document.font">lmodern</xsl:variable>
<xsl:variable name="latex.documentclass.common"></xsl:variable>
<xsl:variable name="latex.babel.language">english</xsl:variable>
<xsl:variable name="latex.hyphenation.tttricks">1</xsl:variable>
<xsl:param name="latex.inline.monoseq.style">\texttt</xsl:param>
<xsl:variable name="latex.admonition.environment">
<xsl:text>% ---------------------------------------------- </xsl:text>
<xsl:text>% Define a new LaTeX environment (adminipage) </xsl:text>
<xsl:text>% Modified for DAHB, M. Wiedmann, 2003.07.25 </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> \begin{center}% Added MW </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\normalsize{#2}}</xsl:text>
<xsl:text> \newline </xsl:text>
<xsl:text> \\[0.3ex] </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}{10pt} </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> \small% Added MW </xsl:text>
<xsl:text>} %done </xsl:text>
<xsl:text>{ % this code corresponds to the \end{admonition} command </xsl:text>
<xsl:text> \vspace{1mm}% Changed MW: from 5 to 1mm </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> \end{center}% Added MW </xsl:text>
<xsl:text>} </xsl:text>
</xsl:variable>
<!-- path to admonition figure graphic files -->
<!-- <xsl:param name="latex.admonition.path">/usr/share/sgml/docbook/stylesheet/xsl/db2latex/latex/figures</xsl:param> -->
<xsl:param name="latex.admonition.path"></xsl:param>
<!-- we use scrbook which provides headers
but they do not work yet!
-->
<xsl:param name="latex.use.fancyhdr">1</xsl:param>
<xsl:param name="latex.use.tabularx">1</xsl:param>
<xsl:variable name="latex.hyperref.param.pdftex">
pdfauthor={Michael Wiedmann},
pdfpagemode=UseNone,
pdfstartview=FitH,
pdftitle={References for TeX and Friends},
pdfcreator={DocBook/XML db2latex-xsl},
pdfsubject={},
pdfkeywords={TeX, LaTeX},
pdfpagelabels
</xsl:variable>
<xsl:param name="latex.use.parskip">1</xsl:param>
<xsl:param name="latex.use.makeidx">1</xsl:param>
<xsl:param name="toc.section.depth">2</xsl:param>
<xsl:param name="latex.entities"></xsl:param>
<xsl:param name="latex.use.subfigure">0</xsl:param>
<xsl:param name="latex.caption.swapskip">0</xsl:param>
<!-- for customizing LaTeX mapping -->
<!-- we need this e.g. for 'revhistory' -->
<xsl:variable name="latex.mapping.xml" select="document('tex-refs-local.mapping.xml')"/>
<xsl:variable name="latex.book.varsets">
<xsl:text>%% headings </xsl:text>
<xsl:text>%\usepackage[automark]{scrpage2} </xsl:text>
<xsl:text>%\pagestyle{scrheadings} </xsl:text>
<xsl:text>%% T1 encoding </xsl:text>
<xsl:text>\usepackage[T1]{fontenc} </xsl:text>
<xsl:text>%% character protruding for pdftex </xsl:text>
<xsl:text>\usepackage[activate]{pdfcprot} </xsl:text>
<xsl:text>%% load geometry package for setting margins </xsl:text>
<xsl:text>\usepackage{geometry} </xsl:text>
<xsl:text>\geometry{lmargin=2.5cm,rmargin=2.0cm,tmargin=2.0cm,bmargin=2.0cm,headsep=1.0cm,footskip=1.5cm} </xsl:text>
<xsl:text>%% title </xsl:text>
<xsl:text>%FIXME </xsl:text>
<xsl:text>\pagestyle{plain} </xsl:text>
<xsl:text>\titlehead{} </xsl:text>
<xsl:text>\uppertitleback{} </xsl:text>
<xsl:text>\lowertitleback{} </xsl:text>
<xsl:text>\dedication{} </xsl:text>
<xsl:text>\subject{} </xsl:text>
<xsl:text>\publishers{} </xsl:text>
<xsl:text>\date{</xsl:text><xsl:value-of select="/book/bookinfo/date"/><xsl:text>} </xsl:text>
<xsl:text>%% support for landscape pages </xsl:text>
<xsl:text>\usepackage{lscape} </xsl:text>
<xsl:text>%% used by multicolumn! </xsl:text>
<xsl:text>\usepackage{calc} </xsl:text>
<!--
<xsl:text>%% end up with even pages </xsl:text>
<xsl:text>\AtEndDocument{% </xsl:text>
<xsl:text> \newcommand\QuadPages{% </xsl:text>
<xsl:text> \setcounter{subparagraph}{\value{page}}% </xsl:text>
<xsl:text> \divide\value{subparagraph} by 2\relax% </xsl:text>
<xsl:text> \multiply\value{subparagraph} by 2\relax% </xsl:text>
<xsl:text> \ifnum\value{subparagraph}=\value{page}\let\QuadPages=\relax </xsl:text>
<xsl:text> \null\thispagestyle{empty}\clearpage </xsl:text>
<xsl:text> \else\null\newpage\fi </xsl:text>
<xsl:text> \QuadPages} </xsl:text>
<xsl:text> \clearpage </xsl:text>
<xsl:text> \markboth{Notes}{Notes}\QuadPages </xsl:text>
<xsl:text>} </xsl:text>
-->
</xsl:variable>
<!-- outputs per default \makeglossary which we don't use -->
<xsl:param name="latex.book.afterauthor"/>
<xsl:variable name="latex.book.preamble.post">
<xsl:text>%% get rid of fancyhdr's rulers </xsl:text>
<xsl:text>\renewcommand{\headrulewidth}{0pt} </xsl:text>
<xsl:text>\renewcommand{\footrulewidth}{0pt} </xsl:text>
<xsl:text>\fancyhead[LE,RO]{\nouppercase{\rightmark}} </xsl:text>
<xsl:text>\fancyhead[LO,RE]{\nouppercase{\leftmark}} </xsl:text>
<xsl:text>\cfoot{} </xsl:text>
<xsl:text>\fancyfoot[LE,RO]{\thepage} </xsl:text>
<xsl:text>%% </xsl:text>
<xsl:text>%% hyphenation settings </xsl:text>
<xsl:text>\setlength\emergencystretch{3em} </xsl:text>
<xsl:text>\hyphenpenalty=1000 </xsl:text>
<xsl:text>\AtBeginDocument{\lefthyphenmin=3\righthyphenmin=3} </xsl:text>
<xsl:text>%% more space for floats </xsl:text>
<xsl:text>\renewcommand{\textfraction}{0.05}% </xsl:text>
<xsl:text>\renewcommand{\topfraction}{0.95}% </xsl:text>
<xsl:text>\renewcommand{\bottomfraction}{0.95}% </xsl:text>
<xsl:text>\renewcommand{\floatpagefraction}{0.35}% </xsl:text>
<xsl:text>%% some special lists </xsl:text>
<xsl:text>\usepackage{mdwlist} </xsl:text>
<xsl:text>% </xsl:text>
<xsl:text>%some special symbols </xsl:text>
<xsl:text>\providecommand\BibTeX{\textsc{Bib}\kern-0.08em\TeX} </xsl:text>
<xsl:text>\providecommand\Makeindex{\textit{Make\-Index}} </xsl:text>
<xsl:text>\providecommand\PiCTeX{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC\kern-.11em\TeX} </xsl:text>
<xsl:text>% Taken from "dtklogos.sty" </xsl:text>
<xsl:text><![CDATA[% tbd. for MP/MF]]> </xsl:text>
<xsl:text>\usepackage{shorttoc} </xsl:text>
<xsl:text>% </xsl:text>
<xsl:text>% Code to handle the revhistory, copyright, </xsl:text>
<xsl:text>% and legalnotice tags like we want </xsl:text>
<xsl:text><![CDATA[\newcommand*\mystartvskip{}
\newcommand*\myendvskip{}
\makeatletter
\begingroup
\def\vspace*#1{#1}
\@tempskipa=\chapterheadstartvskip\relax
\@tempskipa=-\@tempskipa
\xdef\mystartvskip{\the\@tempskipa}
\def\vspace#1{#1}
\@tempskipa=\chapterheadendvskip\relax
%\@tempskipa=-\@tempskipa
\xdef\myendvskip{\the\@tempskipa}
\endgroup
\newcommand\originalsection{}
\let\originalsection=\section
\newcommand*\fakechapter{\@startsection{chapter}{0}{\z@}%
{\mystartvskip}%
{\myendvskip}%
{\raggedsection\normalfont\sectfont\nobreak\size@chapter\nobreak}}
\makeatother
]]> </xsl:text>
<xsl:text>% end of special code </xsl:text>
</xsl:variable>
<!-- template overrides -->
<xsl:template match="toc">
<xsl:text> \def\dbtolatex@@contentsname{</xsl:text>
<xsl:variable name="title">
<xsl:call-template name="extract.object.title">
<xsl:with-param name="object" select="."/>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$title=''">
<xsl:text>\dbtolatex@@contentsname</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$title"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>} </xsl:text>
<xsl:choose>
<xsl:when test="starts-with(@condition,'db2latex:')">
<xsl:text>\shorttoc{\dbtolatex@@contentsname}{</xsl:text>
<xsl:value-of select="substring-after(@condition,'db2latex:')"/>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-imports/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- override 'revision' -->
<!-- use a more pleasant (IMHO) table layout for the 'revhistory' -->
<xsl:template match="revhistory/revision">
<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:if test="$revnumber">
<xsl:call-template name="gentext.element.name"/>
<xsl:text> </xsl:text>
<xsl:apply-templates select="$revnumber"/>
</xsl:if>
<xsl:text> & </xsl:text>
<xsl:apply-templates select="$revdate"/>
<xsl:text> & </xsl:text>
<xsl:choose>
<xsl:when test="count($revauthor)=0">
<xsl:call-template name="dingbat">
<xsl:with-param name="dingbat">nbsp</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="$revauthor"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text> \\ </xsl:text>
<xsl:if test="$revremark">
<xsl:text>\multicolumn{3}{@{}l@{}}{\parbox{\linewidth-4\tabcolsep}{</xsl:text>
<xsl:apply-templates select="$revremark"/>
<xsl:choose>
<xsl:when test="position()!=last()">
<xsl:text>\\[.2em]~}}\\</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>\\~}}\\</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
</xsl:if>
</xsl:template>
<!-- override maketile of db2latex -->
<xsl:variable name="latex.maketitle">
<xsl:text>\maketitle </xsl:text>
</xsl:variable>
<!-- override "verbatim.apply.templates":
we support attribute 'role' with different values
for 'fontsize', 'samepage', and 'lines'
(see 'fancyvrb' for details)
additionally we support 'landscape': places content on
separate pages in landscape mode
-->
<xsl:template name="verbatim.apply.templates">
<xsl:if test="contains(@role,'landscape')">
<xsl:text>\begin{landscape} </xsl:text>
</xsl:if>
<xsl:choose>
<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:text>,fontfamily=default</xsl:text>
</xsl:if>
<!-- extensions by MW -->
<xsl:if test="@role">
<xsl:if test="contains(@role,'small')">
<xsl:text>,fontsize=\small</xsl:text>
</xsl:if>
<xsl:if test="contains(@role,'footnotesize')">
<xsl:text>,fontsize=\footnotesize</xsl:text>
</xsl:if>
<xsl:if test="contains(@role,'scriptsize')">
<xsl:text>,fontsize=\scriptsize</xsl:text>
</xsl:if>
<xsl:if test="contains(@role,'large')">
<xsl:text>,fontsize=\large</xsl:text>
</xsl:if>
<xsl:if test="contains(@role,'Large')">
<xsl:text>,fontsize=\Large</xsl:text>
</xsl:if>
<xsl:if test="contains(@role, 'samepage')">
<xsl:text>,samepage=true</xsl:text>
</xsl:if>
<xsl:if test="contains(@role, 'lines')">
<xsl:text>,frame=lines</xsl:text>
</xsl:if>
</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:text> \end{Verbatim} </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> \begin{verbatim} </xsl:text>
<xsl:apply-templates mode="latex.verbatim"/>
<xsl:text> \end{verbatim} </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="contains(@role,'landscape')">
<xsl:text>\end{landscape} </xsl:text>
</xsl:if>
</xsl:template>
<!-- override: use 'role="nohyphenation"' to avoid hyphenation in title's -->
<xsl:template match="filename">
<xsl:choose>
<xsl:when test="contains(@role,'nohyphenation')">
<xsl:call-template name="inline.monoseq"><xsl:with-param name="hyphenation"></xsl:with-param></xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="inline.monoseq"><xsl:with-param name="hyphenation">\docbookhyphenatefilename</xsl:with-param></xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- override floatstyles for figures and tables -->
<!-- we use 'floatstyle=plain' for figures and tables -->
<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>% Customized for DAHB by mw, 20030506 </xsl:text>
<xsl:text>% -------------------------------------------- </xsl:text>
<xsl:text> \floatstyle{plain} </xsl:text>
<xsl:text> \restylefloat{figure} </xsl:text>
<xsl:text> \floatstyle{plain} </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>
<!-- override informaltable: we want a smaller font -->
<xsl:template match="informaltable">
<xsl:if test="contains(@role,'Large')">
<xsl:text>\Large </xsl:text>
</xsl:if>
<xsl:if test="contains(@role,'large')">
<xsl:text>\large </xsl:text>
</xsl:if>
<xsl:if test="contains(@role,'small')">
<xsl:text>\small </xsl:text>
</xsl:if>
<xsl:if test="contains(@role,'footnotesize')">
<xsl:text>\footnotesize </xsl:text>
</xsl:if>
<xsl:call-template name="map.begin"/>
<xsl:apply-templates/>
<xsl:call-template name="map.end"/>
<xsl:text>\normalsize </xsl:text>
</xsl:template>
<!-- we want "\noindent" in some cases -->
<xsl:template match="para|simpara">
<xsl:choose>
<xsl:when test="contains(@role,'db2latex:noindent')">
<xsl:text>\noindent </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates/>
<xsl:choose>
<xsl:when test="contains(@role,'db2latex:noindent')">
<xsl:text>\vspace{1ex}\par</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
</xsl:template>
<!-- include modified table templates.
Snapshot up to 2003-10-01 is buggy.
-->
<xsl:include href="db2latex-mw-table.xsl"/>
<!-- include modified (enhanced) variablelist template -->
<xsl:include href="db2latex-mw-variablelist.xsl"/>
<!-- include modified (enhanced) itemizedlist template -->
<xsl:include href="db2latex-mw-itemizedlist.xsl"/>
<xsl:template match="bridgehead" name="bridgehead">
<xsl:param name="renderas" select="@renderas"/>
<xsl:param name="content"><xsl:apply-templates/></xsl:param>
<xsl:choose>
<xsl:when test="$renderas='sect1' or $renderas='sect2' or $renderas='sect3'">
<xsl:text> \</xsl:text>
<xsl:if test="$renderas='sect2'"><xsl:text>sub</xsl:text></xsl:if>
<xsl:if test="$renderas='sect3'"><xsl:text>subsub</xsl:text></xsl:if>
<xsl:text>section*{</xsl:text>
<xsl:copy-of select="$content"/>
<xsl:text>}</xsl:text>
<xsl:call-template name="label.id"/>
<xsl:text> </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
<!-- <xsl:text>\vspace{1em}\noindent{\bfseries </xsl:text><xsl:copy-of select="$content"/><xsl:text>}</xsl:text> -->
<xsl:text>\noindent\subparagraph*{</xsl:text><xsl:copy-of select="$content"/><xsl:text>}</xsl:text>
<xsl:call-template name="label.id"/>
<!-- changed, original was: \par\noindent -->
<xsl:text>\par </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="generate.bookinfo.copyright">
<xsl:apply-templates select="copyright" />
</xsl:template>
<xsl:template match="copyright">
<xsl:if test="count(preceding-sibling::copyright)=0">
<xsl:text>% switch to fake section </xsl:text>
<xsl:text>\let\section=\fakechapter </xsl:text>
<xsl:text>\section*{</xsl:text>
<xsl:call-template name="gentext.element.name"/>
<xsl:text>} </xsl:text>
</xsl:if>
<xsl:call-template name="gentext.element.name"/>
<xsl:call-template name='gentext.space'/>
<xsl:call-template name="dingbat">
<xsl:with-param name="dingbat">copyright</xsl:with-param>
</xsl:call-template>
<xsl:call-template name='gentext.space'/>
<xsl:apply-templates select="year"/>
<xsl:call-template name='gentext.space'/>
<xsl:apply-templates select="holder"/>
<xsl:if test="count(following-sibling::copyright)>0">
<xsl:text>\newline</xsl:text>
</xsl:if>
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="legalnotice">
<xsl:text>\section*{</xsl:text>
<xsl:call-template name="legalnotice.title"/>
<xsl:text>} </xsl:text>
<xsl:text>\small </xsl:text>
<xsl:apply-templates select="node()[not(self::title)]"/>
<xsl:text>%\vspace{0.6em}\par </xsl:text>
<xsl:text>\normalsize\rmfamily </xsl:text>
<xsl:text>% switch back to normal section </xsl:text>
<xsl:text>\let\section=\originalsection </xsl:text>
</xsl:template>
<xsl:template match="symbol">
<xsl:param name="entity"><xsl:value-of select="." /></xsl:param>
<xsl:choose>
<xsl:when test="$entity='--'"><xsl:text>--</xsl:text></xsl:when>
<xsl:when test="$entity='BibTeX'"><xsl:text>{\BibTeX{}}</xsl:text></xsl:when>
<xsl:when test="$entity='LaTeX'"><xsl:text>{\LaTeX{}}</xsl:text></xsl:when>
<xsl:when test="$entity='LaTeX2e'"><xsl:text>{\LaTeXe{}}</xsl:text></xsl:when>
<xsl:when test="$entity='Makeindex'"><xsl:text>{\Makeindex{}}</xsl:text></xsl:when>
<xsl:when test="$entity='PiCTeX'"><xsl:text>{\PiCTeX{}}</xsl:text></xsl:when>
<xsl:when test="$entity='TeX'"><xsl:text>{\TeX{}}</xsl:text></xsl:when>
<xsl:otherwise>
<xsl:call-template name="inline.charseq"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- testing -->
<xsl:template name="label.id">
<xsl:text> % MW: label.id </xsl:text>
<xsl:param name="object" select="."/>
<xsl:text>\label{</xsl:text>
<xsl:call-template name="generate.label.id">
<xsl:with-param name="object" select="$object"/>
</xsl:call-template>
<xsl:text>}</xsl:text>
</xsl:template>
<xsl:template name="generate.label.id">
<xsl:param name="object" select="."/>
<xsl:variable name="id">
<xsl:choose>
<xsl:when test="$object/@id">
<xsl:value-of select="$object/@id"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="generate-id($object)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="normalize-space($id)"/>
</xsl:template>
</xsl:stylesheet>
|