]> pere.pagekite.me Git - text-free-culture-lessig.git/blob - data/pdf.xsl
6df6e2b05090c24a900ba831c49a798f13993c4e
[text-free-culture-lessig.git] / data / pdf.xsl
1 <?xml version='1.0' encoding="iso-8859-1"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
3
4 <!-- The TOC links in the titles, and in blue. -->
5 <!-- ensure URLs in the text do not end up light gray too -->
6 <xsl:param name="latex.hyperparam">linktocpage,colorlinks,linkcolor=blue,urlcolor=blue,pdfstartview=FitH</xsl:param>
7
8 <xsl:param name="callout.linkends.hot">0</xsl:param>
9
10 <!-- Put the dblatex logo -->
11 <!-- xsl:param name="doc.publisher.show">1</xsl:param -->
12
13 <!-- List the examples and equations too, no tables and figures -->
14 <xsl:param name="doc.lot.show">example</xsl:param>
15
16 <!-- Only want chapter numbers -->
17 <xsl:param name="doc.section.depth">0</xsl:param>
18
19 <xsl:param name="latex.class.book">myclass</xsl:param>
20 <xsl:param name="latex.output.revhistory">0</xsl:param>
21
22 <xsl:param name="imagedata.default.scale">maxwidth=15.5cm,maxheight=12cm</xsl:param>
23 <xsl:param name="draft.mode">yes</xsl:param>
24 <xsl:param name="draft.watermark">0</xsl:param>
25 <xsl:param name="doc.collab.show">0</xsl:param>
26
27 <xsl:param name="insert.xref.page.number">1</xsl:param>
28
29 <xsl:include href="lulu.xsl" />
30 <!-- xsl:include href="createspace.xsl" /-->
31 <!-- xsl:include href="licentia.xsl" /-->
32
33 <!-- xsl:include href="origsize.xsl" /-->
34
35 <!-- fall back to duplex A4 if not creating PDF for a specific size. -->
36 <!-- xsl:param name="paper.type">A4</xsl:param -->
37 <xsl:param name="double.sided">1</xsl:param>
38 <xsl:param name="page.margin.inner">0.8in</xsl:param>
39 <xsl:param name="page.margin.outer">0.55in</xsl:param>
40 <xsl:param name="page.margin.top">0.55in</xsl:param>
41 <xsl:param name="page.margin.bottom">0.55in</xsl:param>
42 <xsl:param name="latex.class.options">a4paper,openright,twoside</xsl:param>
43
44 <!-- font for XSL/FOP, see also fop-params.xconf -->
45 <!-- The original book used Adobe Caslon, and this free font is pretty similar -->
46 <xsl:param name="body.font.family">Crimson Text</xsl:param>
47 <xsl:param name="sans.font.family">Crimson Text</xsl:param>
48 <xsl:param name="title.font.family">Crimson Text</xsl:param>
49 <xsl:param name="slide.font.family">Crimson Text</xsl:param>
50 <xsl:param name="slide.title.font.family">Crimson Text</xsl:param>
51 <xsl:param name="monospace.font.family">Nimbus Mono L</xsl:param>
52
53 <xsl:template match="colophon">
54 <xsl:text>\begin{colophon}&#10;</xsl:text>
55 <xsl:apply-templates/>
56 <xsl:text>\end{colophon}&#10;</xsl:text>
57 </xsl:template>
58
59 <!-- transform footnotes to endnotes -->
60 <xsl:param name="footnote.as.endnote" select="1"/>
61 <xsl:attribute-set name="endnotes.properties"
62 use-attribute-sets="endnotes.properties.default">
63 <!--
64 Increase footnote/endnote size to be more than 6 pts, to avoid
65 complaint from Lulu about the font being too small to be printed
66 clearly. Needed at least for pocket size books. Probably wise to use
67 the same size as the colophon page (see myclass.cls)
68
69 make sure \fontsize{x}{y} use y=1.2*x, x >= 6
70 -->
71
72 <!--xsl:attribute name="font-size">\fontsize{10}{12}</xsl:attribute-->
73 <xsl:attribute name="font-size">\footnotesize</xsl:attribute>
74 <!--xsl:attribute name="font-size">\normalsize</xsl:attribute-->
75 </xsl:attribute-set>
76
77 <xsl:param name="latex.begindocument">
78 <xsl:text>
79 % Trick to avoid many words sticking out of the right margin of the text.
80 % Need to add it here with the end notes, as only one
81 % latex.begindocument can be active.
82 \sloppy
83
84 \begin{document}
85 </xsl:text>
86 </xsl:param>
87
88 </xsl:stylesheet>