Debian Codegraph @

texmf-dist/doc/latex/pagelayout/example-book.tex

raw
1 %%
2 %% Copyright (c) 2022-2024 by Friedemann Bartels
3 %%
4 %% This file may be distributed and/or modified under the
5 %% conditions of the LaTeX Project Public License, either
6 %% version 1.3c of this license or (at your option) any later
7 %% version. The latest version of this license is in:
8 %%
9 %% http://www.latex-project.org/lppl.txt
10 %%
11 %% and version 1.3c or later is part of all distributions of
12 %% LaTeX version 2008/05/04 or later.
13 %%
14
15 \documentclass[
16 draft,
17 twoside,
18 beginright,
19 % fanfold,
20 import,
21 optimize={quality=50, density=72}
22 ]{pagelayout}
23
24 \usepackage{lipsum}
25 \usepackage{tgheros}
26 \usepackage[T1]{fontenc}
27 \renewcommand*\familydefault{\sfdefault}
28
29 \pagewidth=200mm
30 \pageheight=200mm
31 \margin=20mm
32 \innermargin=40mm
33 \gutter=10mm
34 \bleed=3mm
35 \safetymargin=5mm
36 \spinewidth=7mm
37
38 \safezone
39
40 \newbeforepage{primary}{
41 \setgrid[height=\margin, y=0mm]{{{}}}
42
43 \leftpage{
44 \text[center]{\thepage}
45 }
46
47 \rightpage{
48 \text[center]{\hspace*{\fill}\thepage}
49 }
50 }
51 \setbeforepage{primary}
52
53 \begin{document}
54 \Large
55 \pagenumbering{roman}
56
57 \template[back cover,margin=0mm, inner margin=0mm]{f}{}
58
59 \page[front cover,color=white,page graphic=kopi, inner margin=\margin]{
60 \text[bottom]{
61 \fontsize{42mm}{46mm}\selectfont
62 \centering
63 KØPI
64 }
65
66 \ifspine{
67 \setgrid[width=\spinewidth,x=-\spinewidth]{{{1}}}
68 \place{0 0 1 1}
69 \tikzgraphic{
70 \node[rotate=90] at (0.5\width,0.5\height){
71 \fontsize{4mm}{8mm}\selectfont
72 KØPI
73 };
74 }
75 }
76 }
77
78 \page{
79 \text{
80 \strut
81 \tableofcontents
82 }
83 }
84
85 \pagenumbering{arabic}
86
87 \setcounter{page}{0}
88 \page[before page=]{}
89
90 \page{
91 \text{
92 \strut
93 \section{Introduction}
94 \lipsum[1][1-7]
95 }
96 }
97
98 \newgraphic{kopi wide}{vpos=0.43, file=kopi}
99 \page[double, page graphic=kopi wide, before page=, color=white]{
100 \rightpage{
101 \text[bottom]{
102 \lipsum[1][8-10]
103 }
104 }
105 }
106
107 \end{document}