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="paper.type">a4</xsl:param -->
5 <xsl:param name="double.sided">1</xsl:param>
6 <xsl:param name="page.width">6in</xsl:param>
7 <xsl:param name="page.height">9in</xsl:param>
8 <xsl:param name="page.margin.inner">0.75in</xsl:param>
9 <xsl:param name="page.margin.outer">0.50in</xsl:param>
10 <xsl:param name="page.margin.top">0.55in</xsl:param>
11 <xsl:param name="page.margin.bottom">0.55in</xsl:param>
12 <xsl:param name="latex.class.book">book</xsl:param>
13 <xsl:param name="latex.class.options">a4paper,openright,twoside</xsl:param>
15 <!-- The TOC links in the titles, and in blue. -->
16 <!-- ensure URLs in the text do not end up light gray too -->
17 <xsl:param name="latex.hyperparam">linktocpage,colorlinks,linkcolor=black,urlcolor=black,pdfstartview=FitH</xsl:param>
19 <!-- No use showing table of content, it is empty -->
20 <xsl:param name="doc.toc.show">0</xsl:param>
22 <!-- no need for a separate author list -->
23 <xsl:param name="doc.collab.show">0</xsl:param>
25 <!-- disable revision history until there is a history to display -->
26 <xsl:param name="latex.output.revhistory">0</xsl:param>
28 <!-- enable draft mode until ready to publish -->
29 <xsl:param name="draft.mode">no</xsl:param>
30 <xsl:param name="draft.watermark">0</xsl:param>
32 <!-- insert a few latex tricks at the top of the .tex document -->
33 <xsl:param name="latex.begindocument">
34 <xsl:text>% start of latex.begindocument
37 % unboxed = wrap glossary term
38 % multicols = get two columns only in mainpart
39 \setlist[description]{%
41 before*=\begin{multicols}{2},
42 after*=\end{multicols}
44 % topsep=30pt, % space before start / after end of list
45 % itemsep=5pt, % space between items
49 % Trick to avoid many words sticking out of the right margin of the text.
52 % The microtype package provides the ability to micromanage your
53 % typography. When invoked without any options it does some nice things
54 % like protruding punctuation over the edge of the right margin to make
55 % the margin appear smoother. Basically it makes your book look more
56 % professional with very little effort. It also has a ton of options if
57 % you want to micromanage even more.
58 \usepackage{microtype}
60 % Disable headers and footer texts
61 \pagestyle{myheadings}
63 \def\DBKpublisher{Petter Reinholdtsen \\ Oslo}
65 % Cludge to replace DBKcover \def in
66 % /usr/share/texmf/tex/latex/dblatex/style/dbk_title.sty where author
67 % and publisher is missing
69 \ifthenelse{\equal{\DBKedition}{}}{\def\edhead{}}{\def\edhead{Ed. \DBKedition}}
71 \setlength{\oldbaselineskip}{\baselineskip}
72 \setlength{\baselineskip}{2\oldbaselineskip}
77 \huge{\textbf{\DBKtitle}}\\ %
78 \ifx\DBKsubtitle\relax\else%
79 \underline{\ \ \ \ \ \ \ \ \ \ \ }\\ %
81 \huge{\textbf{\DBKsubtitle}}\\ %
87 \setlength{\baselineskip}{\oldbaselineskip}
91 \Large{\DBKpublisher} \\
95 \newcommand{\sectionline}{%
96 \nointerlineskip \vspace{\baselineskip}%
97 \hspace{\fill}\rule{0.5\linewidth}{.7pt}\hspace{\fill}%
98 \par\nointerlineskip \vspace{\baselineskip}%
101 % Format for the other pages
103 \setlength{\baselineskip}{\oldbaselineskip}
108 % end of latex.begindocument
112 <!-- disable chapter numbering for glossary -->
113 <xsl:param name="glossary.numbered">0</xsl:param>
115 <!-- disable chapter numbering for index -->
116 <xsl:param name="index.numbered">0</xsl:param>
118 <xsl:param name="local.l10n.xml" select="document('')"/>
119 <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
120 <l:l10n language="nb">
121 <!-- Fix bugs in default nb locale -->
122 <l:dingbat key="startquote" text="«"/>
123 <l:dingbat key="endquote" text="»"/>
124 <l:dingbat key="nestedstartquote" text="‘"/>
125 <l:dingbat key="nestedendquote" text="’"/>
126 <l:gentext key="Copyright" text=""/>
128 <l:l10n language="nn">
129 <!-- Fix bugs in default nn locale -->
130 <l:dingbat key="startquote" text="«"/>
131 <l:dingbat key="endquote" text="»"/>
132 <l:dingbat key="nestedstartquote" text="‘"/>
133 <l:dingbat key="nestedendquote" text="’"/>
136 Workaround for missing 'se' support in dblatex/docbook, use 'nn' as
137 replacement and rewrite the strings we use. Note PDF use some of
138 these, while HTML and ePub uses others.
140 A more future proof approach that would help others would be to submit
142 https://github.com/docbook/xslt10-stylesheets/tree/master/gentext/locale .
144 <l:gentext key="Editedby" text="Redigert av (se)"/>
145 <l:gentext key="Abstract" text="Čoahkkáigeassu"/>
146 <l:gentext key="TableofContents" text="Sisdoallu"/>
147 <l:gentext key="Copyright" text=""/>
148 <l:gentext key="Glossary" text="Sátnelistu"/>
149 <l:gentext key="glossary" text="Sátnelistu"/>
150 <l:gentext key="glosssee" text="Geahča"/>
151 <l:gentext key="GlossSee" text="Geahča"/>
152 <l:context name="glossary">
153 <l:template name="see" text="Geahča «%t»."/>
159 Make final page blank, which is required for PDFs inteneded for
160 extended distribution with LuLu.
163 <xsl:param name="latex.enddocument">
165 \thispagestyle{empty}