forked from mahrz24/ConTeXt-Thesis-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv_thesis_layout.tex
172 lines (135 loc) · 3.88 KB
/
env_thesis_layout.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
\startenvironment env_thesis_layout
\product thesis
% Paper Size
\setuppapersize[A4,A4]
\definelayout[titles][
%location=middle,marking=color
topspace=2.625cm,
backspace=2.625cm,
header=0cm,
height=25.95cm,
footer=1.5cm,
width=15.75cm,
leftedge=0cm,
leftmargin=0cm,
leftdistance=0cm,
leftmargindistance=0cm,
rightmargin=3.5cm,
]
\definelayout[epigraphs][
%location=middle,marking=color
topspace=5.625cm,
backspace=5.625cm,
header=0cm,
height=22.95cm,
footer=1.5cm,
width=9.75cm,
leftedge=0cm,
leftmargin=0cm,
leftdistance=0cm,
leftmargindistance=0cm,
rightmargin=3.5cm,
]
\setuplayout[
%location=middle,marking=color
topspace=2.625cm,
backspace=2.625cm,
header=24pt,
height=24.3225cm,
footer=1.5cm,
width=13.125cm,
leftedge=0cm,
leftmargin=0cm,
leftdistance=0cm,
leftmargindistance=0cm,
rightmargin=3.5cm,
]
% Colors
\setupcolor[hex]
\definecolor[ChapterNumberColor][h=BBBBBB]
% Margins
\setupinmargin[outer][style=\tfxx]
% Page Numbering
\setuppagenumbering[alternative=doublesided]
% #1 is number, #2 is text
\unexpanded\def\ThesisChapterCommand#1#2{\headtext{chapter}#2 \inright{\vskip-0.75cm\hskip0.25cm{\color[ChapterNumberColor]{#1}}}}
% Paragraphs
\setupwhitespace[medium]
\setupindenting[no,medium,next]
% Headers
\setupheader[state=high,style=slanted]
\setupheadertexts[][chapter][section][]
% Alternative margin headers
% \newdimen\Margin
% \Margin=3cm
% \newdimen\MarginRaise
% \MarginRaise=72ex
% \setuptexttexts[margin][][\setups{text a}][\setups{text b}][]
% \setuptext[style=\tf,state=high]
% \startsetups[text a]
% \raise\MarginRaise\hbox{\vtop{\hsize=\Margin%
% \startalignment[right]
% \hskip0.25cm
% \em
% \getmarking[chapter]
% \stopalignment
% }}
% \stopsetups
% \startsetups[text b]
% \raise\MarginRaise\hbox{\vtop{\hsize=\Margin%
% \startalignment[left]
% \hskip0.25cm
% \em
% \getmarking[section]
% \stopalignment
% }}
% \stopsetups
% Heads
\definefont[ChapterNumber][Serif at 96pt]
\setuphead[chapter][textstyle=\tfb\cap,
numberstyle=\ChapterNumber,
command=\ThesisChapterCommand,
deeptextcommand=\uppercase,
after={\blank[2*medium]}\hrule\blank,
header=high,
text=high]
\setuphead[section][textstyle=\tfx\cap,
numberstyle=\tfx,
deeptextcommand=\uppercase,
distance=6pt,
before={\blank[line]},
after={\blank[line]},
number=yes]
\setuphead[subsection][textstyle=\tfx\it,
numberstyle=\tfx,
distance=6pt]
\setuphead[subsubsection][textstyle=\tfx\it,
numberstyle=\tfx,
distance=6pt]
% TOCs
\unprotect
\definelistplacement [chapter_placement]#1#2#3{%
{\hbox to \hsize%
{\framed[frame=off, width=0.5cm, align=left]{\color[red]{#1}}%
\framed[frame=off, align=right]{\hskip0.1cm\cap{#2}}\hfill%
\framed[frame=off, align=right]{#3}}}}
\definelistplacement [section_placement]#1#2#3{%
{\hbox to \hsize%
{\framed[frame=off, width=0.5cm, align=left]{}%
\framed[frame=off, align=right]{\hskip0.1cm\it #2}\hfill%
\framed[frame=off, align=right]{#3}}}}
\setuplist[chapter][alternative=chapter_placement]
\setuplist[section][alternative=section_placement]
\protect
\setuplist[figure][textstyle=\tfx]
% General captions
\setupcaptions[headstyle=\cap\ss, style=\ss\tfxx, width=\hsize,way=bychapter, prefixsegments=chapter, prefix=yes]
\definefloat[rmcfigure][figures][figure]
\setupcaption[rmcfigure][width=\rightmarginwidth, command=\inright]
\definefloat[lmcfigure][figures][figure]
\setupcaption[lmcfigure][width=\rightmarginwidth, command=\inleft]
% Bibliography
\setuppublications[alternative=apa]
% Index
\setupregister[index][interaction=pagenumber]
\stopenvironment