+DBLATEX = dblatex
+
+DBLATEX_OPTS = \
+ -T simple \
+ -b xetex \
+ -r data/dblatex-postprocess \
+ --xsl-user=data/user_param.xsl \
+ --xsl-user=data/xetex_param.xsl \
+ -V \
+ -p data/pdf.xsl
+
all: rapport.pdf rapport.epub
-rapport.xml: *.adoc
+rapport.xml: *.adoc rapport-docinfo*.xml
asciidoctor -b docbook5 -d book rapport.adoc
rapport.pdf: rapport.xml
- dblatex $^
+ $(DBLATEX) $(DBLATEX_OPTS) $<
rapport.epub: rapport.xml
dbtoepub $^
+rapport-fop.fo: rapport.xml
+ xsltproc \
+ --output $(subst .pdf,.fo,$@).new \
+ data/stylesheet-fo.xsl \
+ $<
+ xmllint --format $@.new > $@
+ $(RM) $@.new
+
+rapport-fop.pdf: rapport-fop.fo
+ fop -c data/fop-params.xconf -fo $(subst .pdf,.fo,$@) -pdf $@ ; \
+
clean:
$(RM) *~
distclean:
--- /dev/null
+#!/bin/sh
+
+set -e
+
+TEXFILE="$1"
+
+# Legg inn orddelingspunkt på problematiske ord for å få jevnere
+# høyrekant på tekstblokkene. LaTeX deler ikke ord med bindestrek
+# automatisk, slik at endel ord blir veldig lange og stikker ut over
+# kanten. Ønsker ikke endre i originalteksten, så vi skriver om
+# aktuelle ord i latex-fila her til å inneholde orddelingsmarkør i
+# stedet.
+sed -i \
+ -e 's/kommersiell/kom\\-mer\\-siell/g' \
+ -e 's/ /\\thinspace/g' \
+ $TEXFILE
+
+exit 0
--- /dev/null
+<?xml version="1.0"?>
+<fop version="1.0">
+ <renderers>
+ <renderer mime="application/pdf">
+ <!-- Full path to truetype fonts to be embedded in PDF file -->
+ <fonts>
+
+ <font embed-url="file:///home/pere/.fonts/CrimsonText-Regular.ttf">
+ <font-triplet name="Crimson Text" style="normal" weight="normal"/>
+ </font>
+ <font embed-url="file:///home/pere/.fonts/CrimsonText-Italic.ttf">
+ <font-triplet name="Crimson Text" style="italic" weight="normal"/>
+ </font>
+ <font embed-url="file:///home/pere/.fonts/CrimsonText-Bold.ttf">
+ <font-triplet name="Crimson Text" style="normal" weight="bold"/>
+ </font>
+
+ <font embed-url="file:///usr/share/fonts/truetype/freefont/FreeSerif.ttf">
+ <font-triplet name="Times" style="normal" weight="normal"/>
+ </font>
+ <font embed-url="file:///usr/share/fonts/truetype/freefont/FreeSerifBold.ttf">
+ <font-triplet name="Times" style="normal" weight="bold"/>
+ </font>
+ <font embed-url="file:///usr/share/fonts/truetype/freefont/FreeSerifItalic.ttf">
+ <font-triplet name="Times" style="italic" weight="normal"/>
+ </font>
+ <font embed-url="file:///usr/share/fonts/truetype/freefont/FreeSerifBoldItalic.ttf">
+ <font-triplet name="Times" style="italic" weight="bold"/>
+ </font>
+ </fonts>
+ </renderer>
+ </renderers>
+</fop>
--- /dev/null
+<?xml version='1.0' encoding="iso-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+
+<!-- settings for LuLu PDF version -->
+<!--
+https://amyrhoda.wordpress.com/2012/05/25/latex-to-lulu-the-making-of-aosa-geometry-and-headers-and-footers/
+http://connect.lulu.com/t5/ISBN-Distribution/Mandatory-Print-Book-Distribution-Requirements/ta-p/33632
+http://www.lulu.com/create/books
+-->
+
+<xsl:param name="doc.collab.show">0</xsl:param>
+
+<!-- See "Global Page Setup" in the dblatex PDF manual for details -->
+<!-- FIXME change when page size changes -->
+<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>
+
+<!-- reduce from 0.55in, to ignore header and footer in margin calculation -->
+<!-- FIXME figure out the proper number to use -->
+<xsl:param name="page.margin.top">0.05in</xsl:param>
+<xsl:param name="page.margin.bottom">0.15in</xsl:param>
+
+<xsl:param name="body.start.indent">0pt</xsl:param>
+<xsl:param name="double.sided">1</xsl:param>
+
+<!-- used by dblatex -->
+<!-- headinclude=on,footinclude=on - ? -->
+<!-- openright,twoside - proper double sided printing -->
+<xsl:param name="latex.class.options">openright,twoside</xsl:param>
+
+<!--
+Make final page blank, which is required for PDFs inteneded for
+extended distribution with LuLu.
+-->
+
+<xsl:param name="latex.enddocument">
+ <xsl:text>\pagebreak
+\thispagestyle{empty}
+~
+\end{document}
+ </xsl:text>
+</xsl:param>
+
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0' encoding="iso-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+
+<!-- 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>
+
+<xsl:param name="callout.linkends.hot">0</xsl:param>
+
+<!-- Put the dblatex logo -->
+<!-- xsl:param name="doc.publisher.show">1</xsl:param -->
+
+<!-- List the examples and equations too, no tables and figures -->
+<!-- xsl:param name="doc.lot.show">example,tables,figures</xsl:param -->
+
+<!-- Only want chapter numbers -->
+<xsl:param name="doc.section.depth">0</xsl:param>
+
+<xsl:param name="latex.class.book">myclass</xsl:param>
+<xsl:param name="latex.output.revhistory">0</xsl:param>
+
+<xsl:param name="imagedata.default.scale">maxwidth=15.5cm,maxheight=12cm</xsl:param>
+<xsl:param name="draft.mode">no</xsl:param>
+<xsl:param name="draft.watermark">0</xsl:param>
+<xsl:param name="doc.collab.show">0</xsl:param>
+
+<xsl:param name="insert.xref.page.number">1</xsl:param>
+
+<xsl:include href="lulu.xsl" />
+<!-- xsl:include href="createspace.xsl" /-->
+<!-- xsl:include href="licentia.xsl" /-->
+
+<!-- xsl:include href="origsize.xsl" /-->
+
+<!-- fall back to duplex A4 if not creating PDF for a specific size. -->
+<!-- xsl:param name="paper.type">A4</xsl:param -->
+<xsl:param name="double.sided">1</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="latex.class.options">a4paper,openright,twoside</xsl:param>
+
+<!-- font for XSL/FOP, see also fop-params.xconf -->
+<!-- The original book used Adobe Caslon, and this free font is pretty similar -->
+<xsl:param name="body.font.family">Crimson Text</xsl:param>
+<xsl:param name="sans.font.family">Crimson Text</xsl:param>
+<xsl:param name="title.font.family">Crimson Text</xsl:param>
+<xsl:param name="slide.font.family">Crimson Text</xsl:param>
+<xsl:param name="slide.title.font.family">Crimson Text</xsl:param>
+<xsl:param name="monospace.font.family">Latin Modern Mono</xsl:param>
+
+<!-- transform footnotes to endnotes -->
+<xsl:param name="footnote.as.endnote" select="1"/>
+
+<!-- configure the endnotes package -->
+<xsl:attribute-set name="endnotes.properties"
+ use-attribute-sets="endnotes.properties.default">
+<!--
+Increase footnote/endnote size to be more than 6 pts, to avoid
+complaint from Lulu about the font being too small to be printed
+clearly. Needed at least for pocket size books. Probably wise to use
+the same size as the colophon page (see myclass.cls)
+
+make sure \fontsize{x}{y} use y=1.2*x, x >= 6
+-->
+
+ <!--xsl:attribute name="font-size">\fontsize{10}{12}</xsl:attribute-->
+ <xsl:attribute name="font-size">\footnotesize</xsl:attribute>
+ <!--xsl:attribute name="font-size">\normalsize</xsl:attribute-->
+</xsl:attribute-set>
+
+<!-- the endnotes are grouped by part, chapter, and preface -->
+<xsl:param name="endnotes.heading.groups" select="'part chapter preface'"/>
+<xsl:param name="endnotes.heading.style" select="'select:title'"/>
+<xsl:param name="endnotes.heading.command" select="'\enoteheader*'"/>
+
+<xsl:template match="preface" mode="endnotes">
+ <xsl:call-template name="endnotes.add.header"/>
+</xsl:template>
+
+<!-- even if grouped, never reset the endnotes counter, so clear the rule -->
+<xsl:param name="endnotes.counter.resetby"/>
+
+
+ <xsl:param name="latex.begindocument">
+ <xsl:text>
+% Trick to avoid many words sticking out of the right margin of the text.
+% Need to add it here with the end notes, as only one
+% latex.begindocument can be active.
+\sloppy
+
+\begin{document}
+ </xsl:text>
+ </xsl:param>
+
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
+
+ <!--
+ <xsl:include href="user_param.xsl" />
+ -->
+ <xsl:include href="pdf.xsl" />
+ <xsl:param name="fop1.extensions">1</xsl:param>
+<!--
+ <xsl:template match="footnote">
+ <fo:inline>
+ <xsl:call-template name="format.footnote.mark">
+ <xsl:with-param name="mark">
+ <xsl:apply-templates select="." mode="footnote.number"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </fo:inline>
+ </xsl:template>
+
+ <xsl:template match="footnote" mode="endnote">
+ <fo:block xsl:use-attribute-sets="footnote.properties">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template>
+
+ <xsl:template name="make.endnotes.list">
+ <xsl:apply-templates mode="endnote"
+ select="ancestor-or-self:://footnote"/>
+ </xsl:template>
+-->
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+
+<!--############################################################################
+ XSLT Stylesheet DocBook -> LaTeX
+ ############################################################################ -->
+
+ <xsl:param name="draft.mode">maybe</xsl:param>
+ <xsl:param name="glossterm.auto.link">1</xsl:param>
+ <xsl:param name="latex.encoding">utf8</xsl:param>
+ <xsl:param name="latex.unicode.use">1</xsl:param>
+ <xsl:param name="monoseq.hyphenation">nohyphen</xsl:param>
+ <xsl:template match="book|article" mode="docinfo">
+ <!-- Apply default settings -->
+ <xsl:apply-imports/>
+ </xsl:template>
+
+ <xsl:param name="hyphenate">false</xsl:param>
+ <xsl:param name="generate.toc">book toc title</xsl:param>
+
+ <!-- Require dblatex 0.3.7 or newer -->
+ <xsl:param name="figure.title.top">0</xsl:param>
+ <xsl:param name="figure.anchor.top">1</xsl:param>
+
+ <xsl:param name="local.l10n.xml" select="document('')"/>
+ <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+ <!-- Drop the number in front of chapters -->
+ <l:context name="title-numbered">
+ <l:template name="chapter" text="%t"/>
+ </l:context>
+
+ <l:l10n language="en">
+ <!-- The default page citation [12] is hard to understand for
+ most readers. use (p. 12) instead. -->
+ <l:context name="xref">
+ <l:template name="page.citation" text=" (p. %p)"/>
+ </l:context>
+ </l:l10n>
+
+ <l:l10n language="fr">
+ <l:context name="xref">
+ <l:template name="page.citation" text=" (p. %p)"/>
+ </l:context>
+ </l:l10n>
+
+ <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:context name="xref">
+ <l:template name="page.citation" text=" (s. %p)"/>
+ </l:context>
+ </l:l10n>
+ </l:i18n>
+
+ <!-- Make preface show up in toc for dblatex -->
+ <xsl:param name="preface.tocdepth">1</xsl:param>
+
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+
+<xsl:param name="book.font" select="'crimson'"/>
+
+<xsl:param name="xetex.font.crimson">
+ <xsl:text>\setmainfont{Crimson Text} </xsl:text>
+ <xsl:text>\setsansfont{Crimson Text} </xsl:text>
+ <xsl:text>\setmonofont{Latin Modern Mono} </xsl:text>
+
+ <!-- Force <emphasis role='strong'> to be bold, not semibold -->
+<!--
+ <xsl:text>\setmainfont[BoldFont={CrimsonText-Bold}]{Crimson Text} </xsl:text>
+-->
+
+ <!-- Use a font that has smallcaps -->
+<!--
+ <xsl:text>\newfontinstance\scshape[Letters=SmallCaps,Scale=1.15]{Crimson} </xsl:text>
+-->
+ <!-- Use a smaller font except for the letter heading which is bold -->
+<!--
+ <xsl:text>\newfontfamily\indexfont[Scale=0.7,
+ BoldFeatures={Scale=1}]{Crimson Text} </xsl:text>
+-->
+</xsl:param>
+
+<xsl:param name="xetex.font.alegreya">
+ <xsl:text>\setmainfont[SmallCapsFont={Alegreya SC}]{Alegreya} </xsl:text>
+ <xsl:text>\setsansfont{Alegreya Sans} </xsl:text>
+ <xsl:text>\setmonofont{DejaVu Sans Mono} </xsl:text>
+
+ <!-- Use a smaller font except for the letter heading which is bold -->
+ <xsl:text>\newfontfamily\indexfont[Scale=0.7,
+ BoldFeatures={Scale=1}]{Alegreya} </xsl:text>
+</xsl:param>
+
+<xsl:param name="xetex.font.gandhi">
+ <xsl:text>\setmainfont[SmallCapsFont={Alegreya SC}]{Gandhi Serif} </xsl:text>
+ <xsl:text>\setsansfont{Gandhi Sans} </xsl:text>
+ <xsl:text>\setmonofont{DejaVu Sans Mono} </xsl:text>
+
+ <!-- Use a smaller font except for the letter heading which is bold -->
+ <xsl:text>\newfontfamily\indexfont[Scale=0.7,
+ BoldFeatures={Scale=1}]{Gandhi Serif} </xsl:text>
+</xsl:param>
+
+<xsl:param name="xetex.font">
+ <xsl:choose>
+ <xsl:when test="$book.font = 'crimson'">
+ <xsl:value-of select="$xetex.font.crimson"/>
+ </xsl:when>
+ <xsl:when test="$book.font = 'gandhi'">
+ <xsl:value-of select="$xetex.font.gandhi"/>
+ </xsl:when>
+ <xsl:when test="$book.font = 'alegreya'">
+ <xsl:value-of select="$xetex.font.alegreya"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Fallback to the default Crimson font -->
+ <xsl:value-of select="$xetex.font.crimson"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:param>
+
+
+<!-- Do it the hard way: put this content in a file loaded by \maketitle -->
+<xsl:template match="colophon">
+ <xsl:variable name="titlepage.verso">
+ <xsl:text>\begin{colophon} </xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>\end{colophon} </xsl:text>
+ </xsl:variable>
+ <xsl:call-template name="write.text.chunk">
+ <!-- The filename must end with 'input.rtex' to be parsed by dblatex -->
+ <xsl:with-param name="filename">
+ <xsl:text>titlepg.input.rtex</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="method" select="'text'"/>
+ <xsl:with-param name="content">
+ <xsl:value-of select="$titlepage.verso"/>
+ </xsl:with-param>
+ <xsl:with-param name="encoding" select="$chunker.output.encoding"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- French typography requises the surname of the cited authors being in
+ Small Capitals -->
+<xsl:template match="footnote//personname">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="footnote//surname">
+ <xsl:variable name="lang">
+ <xsl:call-template name="l10n.language"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$lang='fr'">
+ <xsl:text>\textsc{</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>}</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{myclass}[]
+
+%% Just use the original class and pass the options
+\LoadClassWithOptions{report}
+% report, book, memoir, scrreprt or scrbook ?
+
+% Show frames, make it easier to debug borders
+%\usepackage{showframe}% http://ctan.org/pkg/showframe
+\makeatletter
+
+%
+% Customize the titlepage: remove the date, place the publisher name, and
+% load a specific file for the verso page, containing some legal notices
+%
+\def\maketitle{%
+ \titlerecto%
+ \titleverso}
+
+\def\titlerecto{\begin{titlepage}%
+ \null\vfil
+ \vskip 160\p@
+ \begin{center}%
+ {\LARGE \@title \par}%
+ \vskip 3em%
+ {\Large
+ \lineskip .75em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 20em%
+ {\large \DBKpublishername \par}
+ \vskip .75em%
+ {\large \DBKpublisheraddress \par}%
+ \end{center}\par
+ \vfil\null
+ \end{titlepage}}%
+
+\def\titleverso{%
+ \def\titlepagefile{titlepg.input.tex}
+ \IfFileExists{\titlepagefile}{\input{\titlepagefile}}{}
+}%
+
+
+% Divide by 2 the index item indentation (10pt -> 5pt)
+\renewcommand\@idxitem{\par\hangindent 20\p@}
+\renewcommand\subitem{\@idxitem \hspace*{10\p@}}
+\renewcommand\subsubitem{\@idxitem \hspace*{15\p@}}
+
+% Put the index in the TOC
+\let\stdindex=\theindex
+\let\endstdindex=\endtheindex
+\renewenvironment{theindex}{
+ \begin{stdindex}
+ \@ifundefined{chapter}{}{
+ % To not have the number, replace by:
+ % \addcontentsline{toc}{chapter}{\numberline{}\indexname}
+ \refstepcounter{chapter}
+ \ifnum \c@secnumdepth >\z@
+ \ifnum \value{part} >\z@
+ \addcontentsline{toc}{part}{\numberline{\thechapter}\hspace{-1em}\indexname}
+ \else
+ \addcontentsline{toc}{chapter}{\numberline{\thechapter}\indexname}
+ \fi
+ \else
+ \addcontentsline{toc}{chapter}{\indexname}
+ \fi
+ }
+ % Adapt the vertical sizes to the smaller font
+ \setlength{\baselineskip}{0.7\baselineskip}%
+ \setlength{\parskip}{0.2\baselineskip}%
+ \indexfont
+}{
+ \end{stdindex}
+}
+\makeatother
+
+\newenvironment{colophon}{
+ \pagebreak %
+% FIXME change when page size changes, use {x}{x*1.2}
+
+% Note, these numbers are not correct any more for the sizes mentioned:
+% \fontsize{6.5}{7.8}\selectfont % fits in one 4.25x6.875" pocket size page
+% \fontsize{7.5}{9}\selectfont % fits in one 5.06x7.71" size page
+% \fontsize{9.1}{10.92}\selectfont % fits in one 5.5x8.5" digest size page
+
+ \fontsize{8.2}{9.84}\selectfont % fits in one 6x9'' size page
+ \setlength{\parskip}{0.5em} %
+ \setlength{\parindent}{0pt} %
+}{}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Based on ideas from https://bugs.debian.org/684772
+\usepackage{titlesec}
+\usepackage{titletoc}
+%
+% Useless with unnumbered sections (e.g. use of \setcounter{secnumdepth}{0})
+%
+%
+\newcommand\makeletterof[1]{%
+\ifthenelse{\equal{#1}{1}}{EN}{%
+\ifthenelse{\equal{#1}{2}}{TO}{%
+\ifthenelse{\equal{#1}{3}}{TRE}{%
+\ifthenelse{\equal{#1}{4}}{FIRE}{%
+\ifthenelse{\equal{#1}{5}}{FEM}{%
+\ifthenelse{\equal{#1}{6}}{SEKS}{%
+\ifthenelse{\equal{#1}{7}}{SJU}{%
+\ifthenelse{\equal{#1}{8}}{ÅTTE}{%
+\ifthenelse{\equal{#1}{9}}{NI}{%
+\ifthenelse{\equal{#1}{10}}{TI}{%
+\ifthenelse{\equal{#1}{11}}{ELLEVE}{%
+\ifthenelse{\equal{#1}{12}}{TOLV}{%
+#1}}}}}}}}}}}}}
+
+% Make TOC entries without label
+\titlecontents{chapter} %
+[1.5em] %
+{\addvspace{0.3em plus 0pt}\bfseries} %
+{\hspace{-1.3em}} % no number, remove room reserved for it
+{\hspace{-1.3em}} %
+{\hfill \contentspage} % dots and page number
+[\addvspace {0pt}]
+
+\dottedcontents{section} %
+[0em] % was (3.8)
+{\addvspace{0pt}} %
+{2.3em} % tab
+{0.75em} % space between dots
+[\addvspace{0pt}]
+
+%% Redefines the headings to remove the chapter label
+\titleformat{\chapter}[block]
+{\filcenter\Large}{\filcenter}{20pt}{\Large}
+
+\titleformat{\section}
+{\filcenter\Large\bfseries}{\thesection}{1em}{}
+
+\titleformat{\subsection}
+{\filcenter\large\bfseries}{\thesubsection}{1em}{}
+
+%% New header, behaving like a section but formatted differently
+\titleclass{\enoteheader}{straight}[\chapter]
+\newcounter{enoteheader}
+\renewcommand{\theenoteheader}{\Alph{enoteheader}}
+
+\titleformat{\enoteheader}
+{\normalfont\large}{}{0pt}{}
+\titlespacing*{\enoteheader}{0pt}{2.5ex plus 1ex minus .2ex}{1.3ex plus .2ex}
+
+\dottedcontents{enoteheader} %
+[0em] % was (3.8)
+{\addvspace{0pt}} %
+{2.3em} % tab
+{0.75em} % space between dots
+[\addvspace{0pt}]
+
+%% New header, behaving like a chapter but formatted differently
+\titleclass{\lotheader}{top}[\part]
+\newcounter{lotheader}
+\renewcommand{\thelotheader}{\Alph{lotheader}}
+
+\titleformat{\lotheader}[block]
+{\filcenter\huge}{\filcenter}{20pt}{\Huge}
+\titlespacing*{\lotheader}{0pt}{-30pt}{40pt}
+
+% Use the new header in TOC
+\let\stdtoc=\tableofcontents
+\let\stdchapter=\chapter
+\def\tableofcontents{\let\chapter\lotheader \stdtoc{} \let\chapter\stdchapter}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% From
+% https://amyrhoda.wordpress.com/2012/06/04/latex-to-lulu-the-making-of-aosa-other-useful-packages-and-settings/
+
+% 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}
+
+% By dafault, LaTeX will try and make all your pages the length that
+% you set using the geometry setting. If a page has images, tables,
+% headings or paragraph breaks which make it shorter than that page
+% length, LaTeX will pad the page by adding whitespace between
+% elements. We thought that looked sillier than having pages be
+% different lengths, so we used the raggedbottom command.
+\raggedbottom
+
+% Hint for figure with empty title: remove the colon label separator
+\usepackage{caption}
+\captionsetup[figure]{labelsep=none}
+
+% Fix the page number reset done by abstract by redefining it
+% Patch from
+% https://github.com/petterreinholdtsen/free-culture-lessig/pull/7
+
+\def\nocount#1#2{}
+\let\stdsetcounter\setcounter
+\let\stdabstract=\abstract
+\let\endstdabstract=\endabstract
+\renewenvironment{abstract}{%
+ \let\setcounter\nocount%
+ \begin{stdabstract}%
+ \noindent%
+ \setlength\parskip{\medskipamount}%
+ \setlength\parindent{0pt}%
+}{
+ \end{stdabstract}
+ \let\setcounter\stdsetcounter
+}
--- /dev/null
+<colophon>
+<title></title>
+<?latex {\centering
+?>
+<para>
+Virkninger av angrefristloven: Sluttrapport til oppdragsgiverne /
+Ole-Erik Yrvin.
+</para>
+
+<para>
+Første gang publisert i 1979.
+</para>
+
+<para>
+ Denne utgaven ble publisert av Petter Reinholdtsen 2023.
+</para>
+
+<para>
+Typesatt med
+<ulink url="http://dblatex.sourceforge.net">dblatex</ulink> og
+skrifttypen Crimson Text.
+</para>
+
+<para>
+ Omslaget er laget av Petter Reinholdtsen. Figurer i boken er
+ gjentegnet av Petter Reinholdtsen basert på originalfigurene fra
+ 1979.
+</para>
+
+<para>
+ Kildefilene er tilgjengelig fra
+ <ulink url="https://codeberg.org/pere/text-angrefrist"/>. Rapporter
+ eventuelle kommentarer og innspill om boken der.
+</para>
+
+<para>
+ <informalfigure id="cc-logo">
+ <graphic fileref="images/CC0_button.svg" align="center" width="11%"></graphic>
+ </informalfigure>
+</para>
+
+<para>
+ Denne dokumentet faller inn under unntakene i åndsverkslovens § 14,
+ og er ikke opphavsrettslig vernet. For å gjøre det enklere for folk
+ utenfor Norge, er den også publisert med bruksvilkårene til Creative
+ Commons 0. For mer informasjon om disse bruksvilkårene, besøk
+ <ulink url="https://creativecommons.org/publicdomain/zero/1.0/deed.en"/>.
+</para>
+
+<para>
+ Videredistribusjon og bruk i kildeformat (Asciidoc) og
+ kompilert form (XML, HTML, PDF, PostScript, RTF og så videre) er
+ tillatt både med og uten endringer.
+</para>
+
+<?latex } %\centering
+?>
+
+<para>
+<informaltable id="isbn">
+<tgroup cols="2" align="left">
+<thead>
+ <row>
+ <entry>Format / MIME-type</entry>
+ <entry>ISBN</entry>
+ </row>
+</thead>
+
+<tbody>
+ <row>
+ <entry>US Trade utgave fra lulu.com</entry>
+ <entry>978-82-93828-18-1</entry>
+ </row>
+ <row>
+ <entry>application/pdf</entry>
+ <entry>*978-82-93828-19-8</entry>
+ </row>
+ <row>
+ <entry>application/epub+zip</entry>
+ <entry>978-82-93828-20-4</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</colophon>
<pubdate>2023-10-15</pubdate>
<edition>1</edition>
<legalnotice>
- <para>Denne spesifikasjonen faller inn under unntakene i
+ <para>Denne dokumentet faller inn under unntakene i
åndsverkslovens § 14<footnote><para>«Lover, forskrifter,
rettsavgjørelser og andre vedtak av offentlig myndighet er uten
vern etter denne loven. Det samme gjelder forslag, utredninger,
= Virkninger av angrefristloven: Sluttrapport til oppdragsgiverne
:lang: nb
-:docinfo: private-head
+:docinfo: private-head,private-footer
include::rapport-forord.adoc[]