]> pere.pagekite.me Git - text-epistlene.git/commitdiff
Added build rules for PDF and ePub editions.
authorPetter Reinholdtsen <pere@hungry.com>
Sat, 6 Mar 2021 13:50:03 +0000 (14:50 +0100)
committerPetter Reinholdtsen <pere@hungry.com>
Sat, 6 Mar 2021 13:50:03 +0000 (14:50 +0100)
Makefile [new file with mode: 0644]
book.xml [new file with mode: 0644]
bookinfo.xml [new file with mode: 0644]
epub.xsl [new file with mode: 0644]
images/cc-some-rights-reserved.png [new file with mode: 0644]
images/cc-some-rights-reserved.svg [new file with mode: 0644]
pdf.xsl [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..d2f199c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+SOURCE = gaysir_epistlene
+
+PANDOC_OPTS = \
+  -t docbook4
+
+DBLATEX_OPTS = \
+  -p pdf.xsl
+
+all: $(SOURCE).pdf $(SOURCE).epub
+
+$(SOURCE).xml: $(SOURCE)-body.xml Makefile book.xml bookinfo.xml
+       xmllint --nonet  --xinclude --postvalid book.xml > $@.new && \
+               mv $@.new $@
+
+$(SOURCE).pdf: $(SOURCE).xml Makefile pdf.xsl
+       dblatex $(DBLATEX_OPTS) $(SOURCE).xml -o $@
+
+$(SOURCE)-body.xml: $(SOURCE).rst Makefile
+       pandoc -s -o $@ $(PANDOC_OPTS) $(SOURCE).rst
+       sed -i \
+               -e 's%<title>.*</title>%<title></title>%g' \
+               -e 's%“%<quote>%g' \
+               -e 's%”%</quote>%g' $@
+
+.xml.epub:
+       dbtoepub -s epub.xsl $^ -o $@
+
+.SUFFIXES: .xml .html .pdf .epub
diff --git a/book.xml b/book.xml
new file mode 100644 (file)
index 0000000..fb30976
--- /dev/null
+++ b/book.xml
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<?xml-stylesheet href="docbook-css-0.4/driver.css" type="text/css"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
+
+<article id="index" lang="nb">
+  <xi:include href="bookinfo.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <xi:include href="gaysir_epistlene-body.xml#xpointer(/article/sect1)"
+             xmlns:xi="http://www.w3.org/2001/XInclude" />
+</article>
diff --git a/bookinfo.xml b/bookinfo.xml
new file mode 100644 (file)
index 0000000..6bfcb56
--- /dev/null
@@ -0,0 +1,68 @@
+<articleinfo>
+  <title>Gaysir-epistlene</title>
+  <!-- subtitle></subtitle -->
+  <!-- pubdate>2020-??-??</pubdate -->
+  <authorgroup>
+    <author>
+      <firstname>Sylvia</firstname>
+      <surname>Johnsen</surname>
+    </author>
+  </authorgroup>
+  <publisher>
+    <publishername>Petter Reinholdtsen</publishername>
+    <address><city>Oslo</city></address>
+  </publisher>
+
+  <copyright>
+    <year>2021</year>
+    <holder>Sylvia Johnsen</holder>
+  </copyright>
+
+  <legalnotice>
+    <para>
+      Gaysir-epistlene av Sylvia Johnsen.
+    </para>
+    <para>
+      Utgitt av Petter Reinholdtsen.
+    </para>
+
+    <para>
+      <ulink url="http://www.hungry.com/~pere/publisher/"/>.
+    </para>
+
+    <para>
+      ISBN 978-82-93828-XX-X (paperback)
+    </para>
+    <para>
+      ISBN 978-82-93828-XX-X (ePub)
+    </para>
+
+    <para>
+      Denne boken kan kjøpes fra
+      <ulink url="https://www.lulu.com/"/>.
+    </para>
+
+    <para>
+      <inlinemediaobject>
+       <imageobject>
+         <imagedata fileref="images/cc-some-rights-reserved.png" contentdepth="3em" width="100%" align="center"/>
+       </imageobject>
+       <imageobject>
+         <imagedata fileref="images/cc-some-rights-reserved.svg" contentdepth="3em" width="100%" align="center"/>
+       </imageobject>
+       <textobject>
+         <phrase>Creative Commons, Some rights reserved</phrase>
+       </textobject>
+      </inlinemediaobject>
+    </para>
+
+    <para>
+      This book is licensed under a Creative Commons license. This
+      license permits any use of this work, so long as attribution is
+      given and no derivatived material is distributed.  For more
+      information about the license visit <ulink
+      url="https://creativecommons.org/licenses/by/4.0/"/>.
+    </para>
+  </legalnotice>
+
+</articleinfo>
diff --git a/epub.xsl b/epub.xsl
new file mode 100644 (file)
index 0000000..2e00256
--- /dev/null
+++ b/epub.xsl
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+  <xsl:import href="/usr/share/xml/docbook/stylesheet/docbook-xsl/epub/docbook.xsl" />
+  <xsl:import href="pdf.xsl" />
+</xsl:stylesheet>
diff --git a/images/cc-some-rights-reserved.png b/images/cc-some-rights-reserved.png
new file mode 100644 (file)
index 0000000..58eb423
Binary files /dev/null and b/images/cc-some-rights-reserved.png differ
diff --git a/images/cc-some-rights-reserved.svg b/images/cc-some-rights-reserved.svg
new file mode 100644 (file)
index 0000000..71b3ad8
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   width="88.022011"
+   height="31.022003"
+   id="svg2"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="cc.svg">
+  <metadata
+     id="metadata29">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs27" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="699"
+     inkscape:window-height="480"
+     id="namedview25"
+     showgrid="false"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     inkscape:zoom="3.7045455"
+     inkscape:cx="44.011012"
+     inkscape:cy="15.511004"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg2" />
+  <radialGradient
+     id="SVGID_1_"
+     cx="1156.1123"
+     cy="1087.813"
+     r="181.64529"
+     gradientTransform="matrix(0.2613,0,0,0.2613,-258.11089,-273.3578)"
+     gradientUnits="userSpaceOnUse">
+    <stop
+       offset="0"
+       stop-color="#F5F7F5"
+       id="stop5" />
+    <stop
+       offset="1"
+       stop-color="#A5B2AC"
+       id="stop7" />
+  </radialGradient>
+  <path
+     stroke-miterlimit="3.8637"
+     d="m 87.522012,4.374 c 0,-2.14 -1.771,-3.874 -3.955,-3.874 l -79.1089997,0 c -2.184,0 -3.95599999,1.734 -3.95499999,3.874 l -0.003,25.522 c 0.092,0.21 0.188,0.418 0.283,0.626 L 87.239012,30.521 c 0.095,-0.208 0.19,-0.415 0.282,-0.625 l 0,-25.522 z"
+     id="path9"
+     inkscape:connector-curvature="0"
+     style="fill:url(#SVGID_1_);fill-opacity:0.62999998;stroke:#000000;stroke-miterlimit:3.86369991" />
+  <polygon
+     points="0.479,30.521 0.479,20.957 87.521,20.957 87.521,30.521 "
+     id="polygon11"
+     transform="translate(0.01101231,0.011)" />
+  <path
+     d="m 1.2375155,28.137438 c 0,1.23682 0.8843263,1.672799 2.0345689,1.672799 0.49782,0 1.3388576,-0.07112 1.7470082,-0.726632 0.2380879,-0.383414 0.2380879,-0.788473 0.2380879,-1.443987 0,-0.590582 0,-0.819393 -0.1978912,-1.153335 C 4.9046868,26.217275 4.6233102,25.957543 4.363578,25.768928 L 3.0339965,24.866049 C 2.7433438,24.67125 2.6072936,24.5352 2.6072936,23.922974 c 0,-0.590582 0.2597322,-0.726632 0.6215021,-0.726632 0.5905815,0 0.5905815,0.39269 0.5905815,0.748276 l 0,0.528741 1.3388577,0 0,-0.726632 c 0,-1.255372 -1.0791255,-1.576946 -1.8706903,-1.576946 -0.7080794,0 -1.2058995,0.207168 -1.4749078,0.435979 -0.4792678,0.395783 -0.5287406,0.946168 -0.5287406,1.518197 0,0.748276 0.185523,1.255372 0.8719581,1.722272 l 1.2893849,0.862682 c 0.3524937,0.238088 0.4576234,0.457623 0.4576234,0.977088 0,0.655514 0,1.091493 -0.6647908,1.091493 -0.6555146,0 -0.6555146,-0.426703 -0.6555146,-0.850313 l 0,-0.853406 -1.3512258,0 0,1.063665 z M 9.867427,24.009551 c 0,-0.704987 -0.126774,-1.091494 -0.4885439,-1.391422 -0.3432175,-0.281377 -0.8626819,-0.457624 -1.5274727,-0.457624 -0.8317614,0 -1.3821463,0.259732 -1.6604308,0.562753 -0.3741381,0.395783 -0.3834142,0.943076 -0.3834142,1.255373 l 0,4.10315 c 0,0.933799 0.4050585,1.722272 2.0562132,1.722272 0.4885439,0 1.174979,-0.06184 1.6109581,-0.519465 0.2906527,-0.290652 0.3957824,-0.66479 0.3957824,-1.205899 l 0,-4.069138 -0.00309,0 z m -1.363594,3.877431 c 0,0.352494 0,0.862682 -0.6647908,0.862682 -0.6647907,0 -0.6864351,-0.476176 -0.6864351,-0.893603 l 0,-3.698091 c 0,-0.405059 0,-0.96472 0.6957113,-0.96472 0.6555146,0 0.6555146,0.528741 0.6555146,0.915247 l 0,3.778485 0,0 z m 1.982004,1.76556 1.329582,0 -0.102038,-6.357254 1.202807,6.357254 1.267741,0 1.184255,-6.357254 -0.126774,6.357254 1.34195,0 0,-7.334342 -2.170619,0 -0.862682,5.132803 -0.871959,-5.132803 -2.192263,0 0,7.334342 z m 6.858167,0 3.645527,0 0,-1.13169 -2.294301,0 0,-2.254104 2.065489,0 0,-1.110046 -2.065489,0 0,-1.725364 2.201539,0 0,-1.122414 -3.552765,0 0,7.343618 z m 6.307782,0 1.348134,0 0,-3.231192 0.646238,0 c 0.704988,0 0.704988,0.352494 0.704988,0.853406 l 0,1.567669 c 0,0.219536 0.04329,0.531833 0.197891,0.810117 l 1.484184,0 c -0.281377,-0.228811 -0.312297,-0.612226 -0.312297,-0.986364 l 0,-1.496552 c 0,-0.986364 -0.674067,-1.184255 -0.998732,-1.26774 0.655514,-0.142235 0.946167,-0.309205 0.946167,-1.246096 l 0,-0.788473 c 0,-0.674067 0,-1.558393 -1.320305,-1.558393 l -2.69936,0 0,7.343618 0.0031,0 z m 1.348134,-6.283045 0.708079,0 c 0.299929,0 0.621502,0 0.621502,0.60295 l 0,0.695711 c 0,0.374138 -0.0093,0.704987 -0.621502,0.704987 l -0.708079,0 0,-2.003648 z m 3.688815,-1.051297 1.338858,0 0,7.334342 -1.338858,0 0,-7.334342 z m 5.998577,2.36851 0,-1.069849 c 0,-0.457624 -0.13605,-0.853406 -0.550385,-1.122414 -0.435979,-0.281377 -1.069849,-0.333942 -1.40379,-0.333942 -2.025293,0 -2.090226,1.23682 -2.090226,1.972728 l 0,4.174268 c 0,1.215175 0.936891,1.496552 1.589314,1.496552 0.779196,0 1.100769,-0.374138 1.298661,-0.590582 l 0,0.435979 1.153334,0 0,-3.979468 -2.192263,0 0,1.10077 0.841037,0 0,1.144058 c 0,0.352494 0,0.850314 -0.674066,0.850314 -0.476176,0 -0.643147,-0.250456 -0.643147,-0.735908 l 0,-3.865062 c 0,-0.395783 0,-0.946168 0.686435,-0.946168 0.633871,0 0.633871,0.405059 0.633871,0.769921 l 0,0.695711 1.351225,0 0,0.0031 z m 0.807025,4.965832 1.348134,0 0,-3.354874 1.23682,0 0,3.354874 1.348134,0 0,-7.334342 -1.348134,0 0,2.887974 -1.23682,0 0,-2.887974 -1.348134,0 0,7.334342 z m 4.267029,-6.273769 1.348134,0 0,6.273769 1.360502,0 0,-6.273769 1.351226,0 0,-1.060573 -4.059862,0 0,1.060573 z m 4.279398,4.758665 c 0,1.23682 0.881234,1.672799 2.034569,1.672799 0.49782,0 1.338857,-0.07112 1.743916,-0.726632 0.24118,-0.383414 0.24118,-0.788473 0.24118,-1.443987 0,-0.590582 0,-0.819393 -0.197892,-1.153335 -0.157694,-0.269008 -0.435979,-0.52874 -0.698803,-0.717355 L 45.834153,24.866049 C 45.5435,24.67125 45.40745,24.5352 45.40745,23.922974 c 0,-0.590582 0.259732,-0.726632 0.621502,-0.726632 0.590581,0 0.590581,0.39269 0.590581,0.748276 l 0,0.528741 1.338858,0 0,-0.726632 c 0,-1.255372 -1.079125,-1.576946 -1.867598,-1.576946 -0.70808,0 -1.2059,0.207168 -1.474908,0.435979 -0.479268,0.395783 -0.531833,0.946168 -0.531833,1.518197 0,0.748276 0.188615,1.255372 0.87505,1.722272 l 1.286293,0.862682 c 0.352494,0.238088 0.457624,0.457623 0.457624,0.977088 0,0.655514 0,1.091493 -0.664791,1.091493 -0.655515,0 -0.655515,-0.426703 -0.655515,-0.850314 l 0,-0.853405 -1.351226,0 0.0093,1.063665 0,0 z m 6.851982,1.515104 1.351226,0 0,-3.231192 0.643147,0 c 0.708079,0 0.708079,0.352494 0.708079,0.853406 l 0,1.567669 c 0,0.219536 0.0402,0.531833 0.197891,0.810117 l 1.487276,0 c -0.281376,-0.228811 -0.312297,-0.612226 -0.312297,-0.986364 l 0,-1.496552 c 0,-0.986364 -0.677159,-1.184255 -0.998732,-1.26774 0.655515,-0.142235 0.946167,-0.309205 0.946167,-1.246096 l 0,-0.788473 c 0,-0.674067 0,-1.558393 -1.320305,-1.558393 l -2.702452,0 0,7.343618 z m 1.351226,-6.283045 0.704988,0 c 0.299929,0 0.621502,0 0.621502,0.60295 l 0,0.695711 c 0,0.374138 -0.0093,0.704987 -0.621502,0.704987 l -0.704988,0 0,-2.003648 z m 3.580594,6.283045 3.645527,0 0,-1.13169 -2.297393,0 0,-2.254104 2.068581,0 0,-1.110046 -2.068581,0 0,-1.725364 2.204632,0 0,-1.122414 -3.552766,0 0,7.343618 z m 4.270121,-1.515104 c 0,1.23682 0.884327,1.672799 2.037661,1.672799 0.49782,0 1.338858,-0.07112 1.743916,-0.726632 0.238088,-0.383414 0.238088,-0.788473 0.238088,-1.443987 0,-0.590582 0,-0.819393 -0.197891,-1.153335 -0.154602,-0.269008 -0.435979,-0.52874 -0.695711,-0.717355 L 61.891168,24.866049 C 61.600516,24.67125 61.464465,24.5352 61.464465,23.922974 c 0,-0.590582 0.259733,-0.726632 0.621502,-0.726632 0.590582,0 0.590582,0.39269 0.590582,0.748276 l 0,0.528741 1.34195,0 0,-0.726632 c 0,-1.255372 -1.082218,-1.576946 -1.870691,-1.576946 -0.704987,0 -1.205899,0.207168 -1.474907,0.435979 -0.476176,0.395783 -0.528741,0.946168 -0.528741,1.518197 0,0.748276 0.185523,1.255372 0.871958,1.722272 l 1.289385,0.862682 c 0.352494,0.238088 0.457623,0.457623 0.457623,0.977088 0,0.655514 0,1.091493 -0.66479,1.091493 -0.655515,0 -0.655515,-0.426703 -0.655515,-0.850314 l 0,-0.853405 -1.351226,0 0,1.063665 0.0031,0 z m 4.835966,1.515104 3.645527,0 0,-1.13169 -2.297393,0 0,-2.254104 2.068582,0 0,-1.110046 -2.068582,0 0,-1.725364 2.20154,0 0,-1.122414 -3.552766,0 0,7.343618 z m 4.353607,0 1.351226,0 0,-3.231192 0.643146,0 c 0.70808,0 0.70808,0.352494 0.70808,0.853406 l 0,1.567669 c 0,0.219536 0.0402,0.531833 0.194799,0.810117 l 1.487276,0 C 73.38741,29.423731 73.35649,29.040316 73.35649,28.666178 l 0,-1.496552 c 0,-0.986364 -0.677159,-1.184255 -0.99564,-1.26774 0.655514,-0.142235 0.943075,-0.309205 0.943075,-1.246096 l 0,-0.788473 c 0,-0.674067 0,-1.558393 -1.317213,-1.558393 l -2.702452,0 0,7.343618 0,0 z m 1.351226,-6.283045 0.704987,0 c 0.299929,0 0.621502,0 0.621502,0.60295 l 0,0.695711 c 0,0.374138 -0.01237,0.704987 -0.621502,0.704987 l -0.704987,0 0,-2.003648 z m 4.526761,6.283045 1.360502,0 1.382146,-7.334342 -1.382146,0 -0.664791,4.851426 -0.717355,-4.851426 -1.434712,0 1.456356,7.334342 z m 3.240468,0 3.645527,0 0,-1.13169 -2.297393,0 0,-2.254104 2.068582,0 0,-1.110046 -2.068582,0 0,-1.725364 2.20154,0 0,-1.122414 -3.552766,0 0,7.343618 z m 4.353607,0 2.170619,0 c 1.703719,0 1.858322,-0.955443 1.858322,-1.972728 l 0,-3.429083 c 0,-0.581305 -0.04947,-1.079125 -0.435979,-1.474908 C 85.904029,22.3182 85.372196,22.3182 84.936217,22.3182 l -2.179895,0 0,7.334342 z m 1.348133,-6.264493 0.528741,0 c 0.590582,0 0.810117,0.09276 0.810117,0.748276 l 0,3.654803 c 0,0.269009 0,0.698804 -0.488544,0.769921 -0.114406,0.02164 -0.216443,0.02164 -0.850314,0.02164 l 0,-5.194644 z"
+     id="path13"
+     inkscape:connector-curvature="0"
+     style="fill:#ffffff" />
+  <g
+     transform="matrix(3.13012,0,0,3.13012,-108.74099,-119.879)"
+     id="g15">
+    <circle
+       cx="48.800999"
+       cy="41.818001"
+       id="ellipse17"
+       r="2.3139999"
+       style="fill:#ffffff" />
+    <path
+       d="m 48.797,39.188 c -0.721,0 -1.356,0.267 -1.847,0.764 -0.505,0.511 -0.779,1.174 -0.779,1.866 0,0.699 0.267,1.347 0.772,1.851 0.505,0.504 1.162,0.778 1.854,0.778 0.692,0 1.363,-0.273 1.883,-0.785 0.49,-0.483 0.75,-1.124 0.75,-1.844 0,-0.713 -0.26,-1.361 -0.758,-1.859 -0.504,-0.504 -1.153,-0.771 -1.875,-0.771 z m 0.007,0.476 c 0.592,0 1.118,0.223 1.529,0.634 0.404,0.403 0.621,0.936 0.621,1.52 0,0.591 -0.21,1.109 -0.613,1.506 -0.425,0.418 -0.974,0.641 -1.537,0.641 -0.57,0 -1.104,-0.223 -1.515,-0.634 -0.411,-0.411 -0.642,-0.951 -0.642,-1.513 0,-0.569 0.231,-1.109 0.642,-1.527 0.404,-0.411 0.924,-0.627 1.515,-0.627 z"
+       id="path19"
+       inkscape:connector-curvature="0" />
+    <path
+       d="m 48.771,41.381 c -0.149,-0.271 -0.403,-0.379 -0.697,-0.379 -0.429,0 -0.77,0.303 -0.77,0.815 0,0.522 0.321,0.816 0.784,0.816 0.298,0 0.551,-0.163 0.691,-0.411 l -0.326,-0.166 c -0.073,0.175 -0.184,0.227 -0.324,0.227 -0.242,0 -0.353,-0.201 -0.353,-0.466 0,-0.265 0.093,-0.466 0.353,-0.466 0.07,0 0.21,0.038 0.291,0.213 l 0.351,-0.183 z"
+       id="path21"
+       inkscape:connector-curvature="0" />
+    <path
+       d="m 50.289,41.381 c -0.149,-0.271 -0.402,-0.379 -0.697,-0.379 -0.429,0 -0.77,0.303 -0.77,0.815 0,0.522 0.321,0.816 0.784,0.816 0.298,0 0.551,-0.163 0.691,-0.411 L 49.97,42.056 c -0.073,0.175 -0.184,0.227 -0.324,0.227 -0.242,0 -0.353,-0.201 -0.353,-0.466 0,-0.265 0.094,-0.466 0.353,-0.466 0.071,0 0.21,0.038 0.292,0.213 l 0.351,-0.183 z"
+       id="path23"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
diff --git a/pdf.xsl b/pdf.xsl
new file mode 100644 (file)
index 0000000..c40ae1c
--- /dev/null
+++ b/pdf.xsl
@@ -0,0 +1,104 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+
+  <!-- hack to add [hyphens] option to url package -->
+  <xsl:param name="latex.class.book">book}
+\usepackage[hyphens]{url</xsl:param>
+  <xsl:param name="latex.class.article">article}
+\usepackage[hyphens]{url</xsl:param>
+
+  <xsl:param name="latex.class.options">a4paper,openright,twoside</xsl:param>
+  <xsl:param name="page.width">6in</xsl:param>
+  <xsl:param name="page.height">9in</xsl:param>
+  <xsl:param name="page.margin.inner">0.8in</xsl:param>
+  <xsl:param name="page.margin.outer">0.55in</xsl:param>
+  <xsl:param name="page.margin.top">0.55in</xsl:param>
+  <xsl:param name="page.margin.bottom">0.55in</xsl:param>
+  <xsl:param name="ulink.show">1</xsl:param>
+  <xsl:param name="ulink.footnotes">1</xsl:param>
+  <xsl:param name="double.sided">1</xsl:param>
+  <xsl:param name="doc.collab.show">0</xsl:param>
+  <xsl:param name="latex.output.revhistory">0</xsl:param>
+  <xsl:param name="doc.publisher.show">0</xsl:param>
+  <xsl:param name="draft.mode">yes</xsl:param>
+  <xsl:param name="draft.watermark">1</xsl:param>
+  <xsl:param name="doc.section.depth">0</xsl:param>
+
+  <!-- The TOC links in the titles, and in blue. -->
+  <!-- ensure URLs in the text do not end up light gray too -->
+  <xsl:param name="latex.hyperparam">linktocpage,colorlinks,linkcolor=black,urlcolor=black,pdfstartview=FitH</xsl:param>
+
+  <!-- insert a few latex tricks at the top of the .tex document -->
+  <xsl:param name="latex.begindocument">
+    <xsl:text>% start of latex.begindocument
+
+% Trick to avoid many words sticking out of the right margin of the text.
+\sloppy
+
+% The microtype package provides the ability to micromanage your
+% typography. When invoked without any options it does some nice things
+% like protruding punctuation over the edge of the right margin to make
+% the margin appear smoother. Basically it makes your book look more
+% professional with very little effort. It also has a ton of options if
+% you want to micromanage even more.
+\usepackage{microtype}
+
+% Disable headers and footer texts
+\pagestyle{myheadings}
+
+\def\DBKpublisher{Petter Reinholdtsen \\ Oslo}
+
+% Cludge to replace DBKcover \def in
+% /usr/share/texmf/tex/latex/dblatex/style/dbk_title.sty where author
+% and publisher is missing
+\def\DBKcover{
+\ifthenelse{\equal{\DBKedition}{}}{\def\edhead{}}{\def\edhead{Ed. \DBKedition}}
+% interligne double
+\setlength{\oldbaselineskip}{\baselineskip}
+\setlength{\baselineskip}{2\oldbaselineskip}
+\textsf{
+\vfill
+\vspace{2.5cm}
+\begin{center}
+  \huge{\textbf{\DBKtitle}}\\ %
+  \ifx\DBKsubtitle\relax\else%
+    \underline{\ \ \ \ \ \ \ \ \ \ \ }\\ %
+    \ \\ %
+    \huge{\textbf{\DBKsubtitle}}\\ %
+    \fi
+  \  \\ %
+  \huge{\DBKauthor} \\%
+\end{center}
+\vfill
+\setlength{\baselineskip}{\oldbaselineskip}
+\hspace{1cm}
+\vspace{1cm}
+\begin{center}
+\Large{\DBKpublisher} \\
+\end{center}
+}
+
+% Format for the other pages
+\newpage
+\setlength{\baselineskip}{\oldbaselineskip}
+\lfoot[]{}
+}
+
+\begin{document}
+% end of latex.begindocument
+    </xsl:text>
+  </xsl:param>
+    <xsl:param name="local.l10n.xml" select="document('')"/>
+  <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+    <l:l10n language="nb">
+      <!-- Fix bugs in default nb locale -->
+      <l:dingbat key="startquote" text="«"/>
+      <l:dingbat key="endquote" text="»"/>
+      <l:dingbat key="nestedstartquote" text="‘"/>
+      <l:dingbat key="nestedendquote" text="’"/>
+      <l:gentext key="Copyright" text=""/>
+      <l:gentext key="copyright" text=""/>
+    </l:l10n>
+  </l:i18n>
+
+</xsl:stylesheet>