From 440074ec4ed1c1a192505952b05bea27b3372498 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Thu, 1 Feb 2018 22:10:27 +0100 Subject: [PATCH] Change dblatex template to simple and replace title page with one only listing title, author and publisher. Adjust page margins. --- Makefile | 7 +------ extra/pdf.xsl | 31 +++++++++++++++++++++++++++++++ myclass.cls | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 extra/pdf.xsl create mode 100644 myclass.cls diff --git a/Makefile b/Makefile index 70afb11..a6aaf4f 100644 --- a/Makefile +++ b/Makefile @@ -10,10 +10,6 @@ SOURCE=MadewithCreativeCommonsmostup-to-dateversion # increase every time the generated Markdown is modified. VERSION=20170609-2 -TEXLANGCODE=es - -#TEXLANGCODE=nb - # pandoc version 1.17.2~dfsg-3 do not understand # --top-level-diversion, while version 1.19.2.4~dfsg-1+b3 do. PANDOC_OPTS = \ @@ -85,11 +81,10 @@ epub: $(SOURCE).epub # Replace Unicode Hair Space (U+200A) with space, as   is not # handled by LaTeX/dblatex, see . %.tex: %.xml - dblatex -t tex -b xetex $^ + dblatex -T simple -t tex -b xetex -p extra/pdf.xsl $^ perl -p -i -e 's/\[latin1\]\{inputenc\}/[utf8]{inputenc}/; \ s/\\caption\\end/\\caption{} \\end/; \ s/ / /g; \ - s!\\maketitle!\\input{extra/$(TEXLANGCODE)/cover.tex}!; \ s/\\listoffigures//; \ s/\\chapter\{(Colophon|Dedication)\}/\\chapter*{}/; \ s/\\chapter\{(Foreword|Prefacio|Forord|Introduction|Introducción|Introduksjon)\}/\\chapter*{$$1} \\addcontentsline{toc}{chapter}{$$1}/; \ diff --git a/extra/pdf.xsl b/extra/pdf.xsl new file mode 100644 index 0000000..3fe57f3 --- /dev/null +++ b/extra/pdf.xsl @@ -0,0 +1,31 @@ + + + + myclass + + 0.8in + 0.55in + + 0.05in + 0.15in + + 1 + openright,twoside + + + + + \pagebreak +\thispagestyle{empty} +~ +\end{document} + + + + diff --git a/myclass.cls b/myclass.cls new file mode 100644 index 0000000..c77bc96 --- /dev/null +++ b/myclass.cls @@ -0,0 +1,39 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{myclass}[] + +%% Just use the original class and pass the options +\LoadClassWithOptions{report} + +\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}}{} +}% -- 2.47.2