Archived
1
Fork 0
This repository has been archived on 2025-04-09. You can view files and clone it, but cannot push or open issues or pull requests.
phd-thesis/environment/headers.tex
2019-04-24 15:52:30 +02:00

64 lines
2.3 KiB
TeX

\startenvironment headers
% TOC related
\setupcombinedlist[content][list={part,chapter,section}, alternative=c]
\setuplist[section][margin=1cm, headnumber=no]
\setuplist[chapter][style=bold]
\setuplist[part][style=bold, height=broad, starter={Part }, stopper={:}]
% How numbers are shown
\setuphead[part][placehead=yes, command=\MyPart, header=empty]
\setuphead[chapter][sectionsegments=chapter, command=\MyChapter, header=empty]
\setuphead[section][sectionsegments=section, style=\tfb\it]
\setuphead[subsection][sectionsegments=section:subsection, style=\tfa\it]
\define[2]\MyChapter
{\framed[frame=off, width=max, align={flushleft,nothyphenated,verytolerant}, offset=0cm, toffset=1cm]{#1\\#2}}
\define[2]\MyPart
{\framed[frame=off, width=max, align={middle}, offset=0cm, toffset=5cm]{Part #1:\\#2}}
\setuplabeltext [en] [chapter=Chapter~]
\setuplabeltext [en] [part=Part~]
% een teller voor alles, prefix is chapter
\definecounter[lemmata][way=bychapter,prefixsegments=chapter]
\defineenumeration[definition][text=Definition]
\defineenumeration[remark][text=Remark]
\defineenumeration[example][text=Example]
\defineenumeration[lemma][text=Lemma]
\defineenumeration[proposition][text=Proposition]
\defineenumeration[theorem][text=Theorem]
\defineenumeration[corollary][text=Corollary]
\setupenumeration[definition,remark,example,lemma,proposition,theorem,corollary]
[alternative=serried, width=fit, right=., counter=lemmata, indenting=yes, indentnext=no]
% Don't reset sections in new part
\definestructureresetset[default][1,0,1][1] % reset part, not chapter, section
\setuphead[sectionresetset=default]
\define\QED{\hfill$\square$}
\definestartstop[proof][before={{\it Proof. }}, after={\QED\blank[big]\noindentation}]
\definestartstop[proofnoqed][before={{\it Proof. }}, after={\blank[big]\noindentation}]
% Front matter met i, ii, etc
\startsectionblockenvironment[frontpart]
\setupuserpagenumber[numberconversion=romannumerals]
\setuppagenumber[number=1]
\stopsectionblockenvironment
% Rest met gewone cijfers
\startsectionblockenvironment[bodypart]
\setuppagenumber[number=1]
\stopsectionblockenvironment
% Ook in de TOC
\definestructureconversionset[frontpart:pagenumber][][romannumerals]
\definestructureconversionset[bodypart:pagenumber] [][numbers]
\setuplist[chapter][pageconversionset=pagenumber]
\stopenvironment