Set up headers, footers and page numbers.
[matthijs/master-project/report.git] / Report.tex
1 \mainlanguage [en]
2 \setuppapersize[A4][A4]
3 % Setup doublesided layout and hide the page number (we will put in the
4 % footer)
5 \setuppagenumbering[alternative=doublesided,location=]
6 % Enable interaction (clickable links), but don't use special link colors or a
7 % bold style.
8 \setupinteraction[state=start,color=,contrastcolor=,style=normal]
9 % Enable interaction in the table of contents as well
10 \setupcombinedlist[content][interaction=all]
11
12 % Use bibtex
13 \usemodule[bib]
14 \setupbibtex[database=Report]
15 \setuppublications[numbering=yes]
16
17 \input Utils/Fonts
18 \input Utils/Formats
19 \input Utils/Lambda
20 \input Utils/Shortcuts
21 \input Utils/Metapost
22 \input Utils/Fixme
23
24 \usetypescript [Custom]
25
26 % Use our custom typeface in the body text, header, footer and
27 % footnotes. There is probably a more elegant way to change the header
28 % etc. fonts, but this works...
29 \switchtotypeface [Custom] [10pt]
30 \setupheader[style={\switchtotypeface[Custom][12pt]}]
31 \setupfooter[style={\switchtotypeface[Custom][12pt]}]
32
33 % Hide header texts and use the header space for text.
34 \setuphead[chapter][header=high]
35
36 % Insert completely empty pages to put new chapter headers on the right
37 % page (i.e., not headers and footers).
38 \definepagebreak[emptyright][yes,header,footer,right]
39 \setuphead[chapter][page=emptyright]
40
41 % Reducing margins (or actually, the spacing in which the margins end up) for
42 % 2-up printing and increase font size slightly.
43 %\setuplayout[backspace=2cm,width=middle,topspace=1cm,bottomspace=1cm,height=middle]
44 %\switchtotypeface [Custom] [10pt]
45
46 \starttext
47 \startfrontmatter
48 \input Titlepage
49
50 \completecontent
51
52 % Force a page break so the headers will not apply to the last page of
53 % the contents. This page break would otherwise be inserted by the
54 % upcoming \chapter.
55 \page[right]
56 % Set up a simple header and footer for the introduction
57 \setupheadertexts[{\getmarking[chapter]}]
58 \setupfootertexts[pagenumber]
59
60 \input Chapters/Introduction
61 \stopfrontmatter
62 \startbodymatter
63 % Set up a fancy header and footer for the normal chapters. We need to
64 % repeat the footer since we switched matters.
65 \def\Header{\getmarking[sectionnumber]~—~\getmarking[chapter]~—~\getmarking[section]}
66 \setupheadertexts[][\Header]
67 \setupfootertexts[pagenumber]
68
69 \input Chapters/Context
70 \input Chapters/HardwareDescription
71 \input Chapters/Prototype
72 \input Chapters/Normalization
73 \input Chapters/Future
74 \input Chapters/Conclusions
75 \stopbodymatter
76 \startbackmatter
77 \completepublications
78 \stopbackmatter
79 \stoptext
80
81 % vim: set sw=2 sts=2 expandtab: