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.8in</xsl:param>
9 <xsl:param name="page.margin.outer">0.55in</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 <!-- No use showing table of content, it is empty -->
16 <xsl:param name="doc.toc.show">0</xsl:param>
18 <!-- no need for a separate author list -->
19 <xsl:param name="doc.collab.show">0</xsl:param>
21 <!-- disable revision history until there is a history to display -->
22 <xsl:param name="latex.output.revhistory">0</xsl:param>
24 <!-- enable draft mode until ready to publish -->
25 <xsl:param name="draft.mode">yes</xsl:param>
26 <xsl:param name="draft.watermark">1</xsl:param>
28 <!-- insert a few latex tricks at the top of the .tex document -->
29 <xsl:param name="latex.begindocument">
30 <xsl:text>% start of latex.begindocument
33 % unboxed = wrap glossary term
34 % multicols = get two columns only in mainpart
35 \setlist[description]{%
37 before*=\begin{multicols}{2},
38 after*=\end{multicols}
40 % topsep=30pt, % space before start / after end of list
41 % itemsep=5pt, % space between items
45 % Trick to avoid many words sticking out of the right margin of the text.
48 % The microtype package provides the ability to micromanage your
49 % typography. When invoked without any options it does some nice things
50 % like protruding punctuation over the edge of the right margin to make
51 % the margin appear smoother. Basically it makes your book look more
52 % professional with very little effort. It also has a ton of options if
53 % you want to micromanage even more.
54 \usepackage{microtype}
56 % Disable headers and footer texts
57 \pagestyle{myheadings}
59 \def\DBKpublisher{Petter Reinholdtsen \\ Oslo}
61 % Cludge to replace DBKcover \def in
62 % /usr/share/texmf/tex/latex/dblatex/style/dbk_title.sty where author
63 % and publisher is missing
65 \ifthenelse{\equal{\DBKedition}{}}{\def\edhead{}}{\def\edhead{Ed. \DBKedition}}
67 \setlength{\oldbaselineskip}{\baselineskip}
68 \setlength{\baselineskip}{2\oldbaselineskip}
73 \huge{\textbf{\DBKtitle}}\\ %
74 \ifx\DBKsubtitle\relax\else%
75 \underline{\ \ \ \ \ \ \ \ \ \ \ }\\ %
77 \huge{\textbf{\DBKsubtitle}}\\ %
80 \huge{Petter Reinholdtsen (red)} \\%
83 \setlength{\baselineskip}{\oldbaselineskip}
87 \Large{\DBKpublisher} \\
91 % Format for the other pages
93 \setlength{\baselineskip}{\oldbaselineskip}
98 % end of latex.begindocument
102 <!-- disable chapter numbering for glossary -->
103 <xsl:param name="glossary.numbered">0</xsl:param>
105 <!-- disable chapter numbering for index -->
106 <xsl:param name="index.numbered">0</xsl:param>
108 <xsl:param name="local.l10n.xml" select="document('')"/>
109 <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
110 <l:l10n language="nb">
111 <!-- Fix bugs in default nb locale -->
112 <l:dingbat key="startquote" text="«"/>
113 <l:dingbat key="endquote" text="»"/>
114 <l:dingbat key="nestedstartquote" text="‘"/>
115 <l:dingbat key="nestedendquote" text="’"/>
117 <l:l10n language="nn">
118 <!-- Fix bugs in default nn locale -->
119 <l:dingbat key="startquote" text="«"/>
120 <l:dingbat key="endquote" text="»"/>
121 <l:dingbat key="nestedstartquote" text="‘"/>
122 <l:dingbat key="nestedendquote" text="’"/>
125 Workaround for missing 'sme' support in dblatex/docbook, use 'nn' as
126 replacement and rewrite the strings we use. Note PDF use some of
127 these, while HTML and ePub uses others.
129 A more future proof approach that would help others would be to submit
131 https://github.com/docbook/xslt10-stylesheets/tree/master/gentext/locale .
133 <l:gentext key="Editedby" text="Redigert av (sme)"/>
134 <l:gentext key="Abstract" text="Čoahkkáigeassi"/>
135 <l:gentext key="TableofContents" text="Sisdoallu"/>
136 <l:gentext key="Copyright" text="Dahkkivuoigatvuohta"/>
137 <l:gentext key="Glossary" text="Sátnelistu"/>
138 <l:gentext key="glossary" text="Sátnelistu"/>
139 <l:gentext key="glosssee" text="se (sme)"/>
140 <l:gentext key="GlossSee" text="Se (sme)"/>
141 <l:context name="glossary">
142 <l:template name="see" text="Se «%t». (sme)"/>