1 <?xml version='1.0' encoding="UTF-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
4 <xsl:param name="latex.class.book">myclass</xsl:param>
6 <!-- Layout for printing on US Letter paper -->
8 <!-- Should be equivalent to next (commented) line, and should match the -->
9 <!-- default behaviour, but it didn't work... -->
11 <!-- <xsl:param name="paper.type">USletter</xsl:param> -->
12 <xsl:param name="page.width">8.5in</xsl:param>
13 <xsl:param name="page.height">11in</xsl:param>
15 <xsl:param name="page.margin.inner">1.5in</xsl:param>
16 <xsl:param name="page.margin.outer">1.5in</xsl:param>
18 <xsl:param name="page.margin.top">1in</xsl:param>
19 <xsl:param name="page.margin.bottom">1in</xsl:param>
21 <xsl:param name="double.sided">1</xsl:param>
22 <xsl:param name="latex.class.options">openright,twoside</xsl:param>
24 <xsl:param name="latex.encoding">utf8</xsl:param>
26 <xsl:param name="preface.tocdepth">1</xsl:param>
28 <xsl:param name="toc.section.depth">0</xsl:param>
30 <!-- do not list figures -->
31 <xsl:param name="doc.lot.show">example</xsl:param>
33 Make final page blank, which is required for PDFs inteneded for
34 extended distribution with LuLu.
37 <xsl:param name="latex.enddocument">
45 <!-- Attributions should be italicized, right-aligned -->
46 <xsl:template match="attribution">
47 <xsl:param name="content">
48 <xsl:apply-templates/>
50 <xsl:text>\vskip 0.5cm \hfill \textit{ </xsl:text>
51 <xsl:copy-of select="$content"/>
52 <xsl:text>}</xsl:text>
55 <!-- Bibliography and acknowledgements are formatted as numberless
56 chapters — And the easiest way to achieve it was abusing the
57 "Appendix" definition. -->
58 <xsl:template match="appendix">
59 <xsl:param name="content">
60 <xsl:apply-templates/>
62 <xsl:param name="title">
63 <xsl:apply-templates/>
65 <xsl:text>\chapter*{</xsl:text>
66 <xsl:copy-of select="title"/>
67 <xsl:text>}</xsl:text>
68 <xsl:text>\addcontentsline{toc}{chapter}{</xsl:text>
69 <xsl:copy-of select="title"/>
70 <xsl:text>}</xsl:text>
71 <xsl:copy-of select="$content"/>
74 <!-- Place title verso page behind the title page the hard way: put
75 colophon content in a file loaded by \maketitle -->
76 <xsl:template match="colophon">
77 <xsl:variable name="titlepage.verso">
78 <xsl:text>\begin{colophon} </xsl:text>
79 <xsl:apply-templates/>
80 <xsl:text>\end{colophon} </xsl:text>
82 <xsl:call-template name="write.text.chunk">
83 <!-- The filename must end with 'input.rtex' to be parsed by dblatex -->
84 <xsl:with-param name="filename">
85 <xsl:text>titlepg.input.rtex</xsl:text>
87 <xsl:with-param name="method" select="'text'"/>
88 <xsl:with-param name="content">
89 <xsl:value-of select="$titlepage.verso"/>
91 <xsl:with-param name="encoding" select="$chunker.output.encoding"/>