projects
/
matthijs
/
master-project
/
report.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3288d67
)
Set up headers, footers and page numbers.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Mon, 7 Dec 2009 19:58:12 +0000
(20:58 +0100)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Mon, 7 Dec 2009 19:58:12 +0000
(20:58 +0100)
Report.tex
patch
|
blob
|
history
diff --git
a/Report.tex
b/Report.tex
index 5c67a8be9ba8831d1d54d3c38c6b037b40a429d1..9f8be56e1bcc75ed6d836ee8925b8ba2c5fb7952 100644
(file)
--- a/
Report.tex
+++ b/
Report.tex
@@
-1,6
+1,8
@@
\mainlanguage [en]
\setuppapersize[A4][A4]
\mainlanguage [en]
\setuppapersize[A4][A4]
-\setuppagenumbering[alternative=doublesided]
+% Setup doublesided layout and hide the page number (we will put in the
+% footer)
+\setuppagenumbering[alternative=doublesided,location=]
% Enable interaction (clickable links), but don't use special link colors or a
% bold style.
\setupinteraction[state=start,color=,contrastcolor=,style=normal]
% Enable interaction (clickable links), but don't use special link colors or a
% bold style.
\setupinteraction[state=start,color=,contrastcolor=,style=normal]
@@
-21,8
+23,20
@@
\usetypescript [Custom]
\usetypescript [Custom]
-% Use our custom typeface
+% Use our custom typeface in the body text, header, footer and
+% footnotes. There is probably a more elegant way to change the header
+% etc. fonts, but this works...
\switchtotypeface [Custom] [10pt]
\switchtotypeface [Custom] [10pt]
+\setupheader[style={\switchtotypeface[Custom][12pt]}]
+\setupfooter[style={\switchtotypeface[Custom][12pt]}]
+
+% Hide header texts and use the header space for text.
+\setuphead[chapter][header=high]
+
+% Insert completely empty pages to put new chapter headers on the right
+% page (i.e., not headers and footers).
+\definepagebreak[emptyright][yes,header,footer,right]
+\setuphead[chapter][page=emptyright]
% Reducing margins (or actually, the spacing in which the margins end up) for
% 2-up printing and increase font size slightly.
% Reducing margins (or actually, the spacing in which the margins end up) for
% 2-up printing and increase font size slightly.
@@
-30,13
+44,28
@@
%\switchtotypeface [Custom] [10pt]
\starttext
%\switchtotypeface [Custom] [10pt]
\starttext
+\startfrontmatter
\input Titlepage
\completecontent
\input Titlepage
\completecontent
-\startfrontmatter
+
+% Force a page break so the headers will not apply to the last page of
+% the contents. This page break would otherwise be inserted by the
+% upcoming \chapter.
+\page[right]
+% Set up a simple header and footer for the introduction
+\setupheadertexts[{\getmarking[chapter]}]
+\setupfootertexts[pagenumber]
+
\input Chapters/Introduction
\stopfrontmatter
\startbodymatter
\input Chapters/Introduction
\stopfrontmatter
\startbodymatter
+% Set up a fancy header and footer for the normal chapters. We need to
+% repeat the footer since we switched matters.
+\def\Header{\getmarking[sectionnumber]~—~\getmarking[chapter]~—~\getmarking[section]}
+\setupheadertexts[][\Header]
+\setupfootertexts[pagenumber]
+
\input Chapters/Context
\input Chapters/HardwareDescription
\input Chapters/Prototype
\input Chapters/Context
\input Chapters/HardwareDescription
\input Chapters/Prototype