]> pere.pagekite.me Git - text-epistlene.git/blob - pdf.xsl
Get partintro adjustment working with current pandoc.
[text-epistlene.git] / pdf.xsl
1 <?xml version='1.0' encoding="UTF-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
3
4 <!-- hack to add [hyphens] option to url package -->
5 <xsl:param name="latex.class.book">book}
6 \usepackage[hyphens]{url</xsl:param>
7 <xsl:param name="latex.class.article">article}
8 \usepackage[hyphens]{url</xsl:param>
9
10 <xsl:param name="latex.class.options">a4paper,openright,twoside</xsl:param>
11 <xsl:param name="page.width">6in</xsl:param>
12 <xsl:param name="page.height">9in</xsl:param>
13 <xsl:param name="page.margin.inner">0.8in</xsl:param>
14 <xsl:param name="page.margin.outer">0.55in</xsl:param>
15 <xsl:param name="page.margin.top">0.55in</xsl:param>
16 <xsl:param name="page.margin.bottom">0.55in</xsl:param>
17 <xsl:param name="ulink.show">1</xsl:param>
18 <xsl:param name="ulink.footnotes">1</xsl:param>
19 <xsl:param name="double.sided">1</xsl:param>
20 <xsl:param name="doc.collab.show">0</xsl:param>
21 <xsl:param name="latex.output.revhistory">0</xsl:param>
22 <xsl:param name="doc.publisher.show">0</xsl:param>
23 <xsl:param name="draft.mode">yes</xsl:param>
24 <xsl:param name="draft.watermark">1</xsl:param>
25 <xsl:param name="doc.section.depth">0</xsl:param>
26
27 <!-- The TOC links in the titles, and in blue. -->
28 <!-- ensure URLs in the text do not end up light gray too -->
29 <xsl:param name="latex.hyperparam">linktocpage,colorlinks,linkcolor=black,urlcolor=black,pdfstartview=FitH</xsl:param>
30
31 <!-- No use showing table of content, it is useless -->
32 <xsl:param name="doc.toc.show">0</xsl:param>
33
34 <!-- insert a few latex tricks at the top of the .tex document -->
35 <xsl:param name="latex.begindocument">
36 <xsl:text>% start of latex.begindocument
37
38 % Trick to avoid many words sticking out of the right margin of the text.
39 \sloppy
40
41 % The microtype package provides the ability to micromanage your
42 % typography. When invoked without any options it does some nice things
43 % like protruding punctuation over the edge of the right margin to make
44 % the margin appear smoother. Basically it makes your book look more
45 % professional with very little effort. It also has a ton of options if
46 % you want to micromanage even more.
47 \usepackage{microtype}
48
49 % Disable headers and footer texts
50 \pagestyle{myheadings}
51
52 \def\DBKpublisher{Petter Reinholdtsen \\ Oslo}
53
54 % Cludge to replace DBKcover \def in
55 % /usr/share/texmf/tex/latex/dblatex/style/dbk_title.sty where author
56 % and publisher is missing
57 \def\DBKcover{
58 \ifthenelse{\equal{\DBKedition}{}}{\def\edhead{}}{\def\edhead{Ed. \DBKedition}}
59 % interligne double
60 \setlength{\oldbaselineskip}{\baselineskip}
61 \setlength{\baselineskip}{2\oldbaselineskip}
62 \textsf{
63 \vfill
64 \vspace{2.5cm}
65 \begin{center}
66 \huge{\textbf{\DBKtitle}}\\ %
67 \ifx\DBKsubtitle\relax\else%
68 \underline{\ \ \ \ \ \ \ \ \ \ \ }\\ %
69 \ \\ %
70 \huge{\textbf{\DBKsubtitle}}\\ %
71 \fi
72 \ \\ %
73 \huge{\DBKauthor} \\%
74 \end{center}
75 \vfill
76 \setlength{\baselineskip}{\oldbaselineskip}
77 \hspace{1cm}
78 \vspace{1cm}
79 \begin{center}
80 \Large{\DBKpublisher} \\
81 \end{center}
82 }
83
84 % Format for the other pages
85 \newpage
86 \setlength{\baselineskip}{\oldbaselineskip}
87 \lfoot[]{}
88 }
89
90 \begin{document}
91 % end of latex.begindocument
92 </xsl:text>
93 </xsl:param>
94 <xsl:param name="local.l10n.xml" select="document('')"/>
95 <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
96 <l:l10n language="nb">
97 <!-- Fix bugs in default nb locale -->
98 <l:dingbat key="startquote" text="«"/>
99 <l:dingbat key="endquote" text="»"/>
100 <l:dingbat key="nestedstartquote" text="‘"/>
101 <l:dingbat key="nestedendquote" text="’"/>
102 <l:gentext key="Copyright" text=""/>
103 <l:gentext key="copyright" text=""/>
104 </l:l10n>
105 </l:i18n>
106
107 </xsl:stylesheet>