-
Notifications
You must be signed in to change notification settings - Fork 4
/
thesiscommands.sty
313 lines (250 loc) · 8.49 KB
/
thesiscommands.sty
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
%\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage[pdftex]{graphicx}
% for tikz labels with line breaks
\usepackage{makecell}
% to increase line spacing
\usepackage{setspace}
\usepackage{longtable}
\usepackage{multicol}
%to continue floats over several pages
\usepackage{subcaption}
% to change float numbering in appendix to A.1.1, A.1.2, but A.2.1. etc
\usepackage{chngcntr}
\usepackage[hyphens]{url}
%increase space for list of figures and tables (and long appendix numbering)
\usepackage{tocloft}
\setlength{\cftfignumwidth}{2.7em}
\setlength{\cfttabnumwidth}{2.7em}
% to annotate comments with ifdraft and to switch them off at once
\newif\ifdraft
% to make clickable links?
\usepackage[hidelinks]{hyperref}
%\usepackage{transparent}%for being able to extract a tikz drawing with transparent background
% to resize a table by contents, also as key for includegraphics
\usepackage[export]{adjustbox}
% \usepackage{minted}
% to change the labels around the listing env (which wraps minted to be able to float)
%\renewcommand{\listoflistingscaption}{List of Source code}
%\renewcommand{\listingscaption}{Source code}
% to be able to print special symbols in minted (e.g. SDRS/DRS boxes), causes problems with texsc
%\usepackage{fontspec}
%\setmonofont{FreeMono}
% to switch standard computer modern to cm-super
\usepackage[T1]{fontenc}
\newtheoremstyle{thesisdef}{10pt}{10pt}{\normalfont \footnotesize}{}{\bfseries}{}{\newline}{}
%\newtheoremstyle{stylename}{spaceabove}{spacebelow}{bodyfont}{indentamt}{headfont}{headpunct}{headspace}{headspec}
\theoremstyle{thesisdef}
% for the definition envirnoment
\newtheorem{definition}{Definition}
\usepackage{sepfootnotes}
% for appropriate backticks and single quotes in verbatim env (minted here)
\usepackage{upquote}
% For linguistic examples
\usepackage{linguex}
% and suppress first dash in reference
\renewcommand{\firstrefdash}{}
\renewcommand{\SubExRBr}{.}
%\renewcommand{\ExLBr}{}
%\renewcommand{\ExRBr}{.}
% to be able to put footnotes in tables
%\usepackage{tablefootnote}
%\usepackage{sdrt}
%\usepackage{wasysym}
%\usepackage{xytree}
% used to avoid printing of bibliography at the end with \nobibliography{...}
% \usepackage{bibentry}
% Sophisticated citation.
% Check out: http://merkel.zoneo.net/Latex/natbib.php
\usepackage{natbib, doi}
\usepackage{caption}
\usepackage{array}
% A horizontal rule for the title page
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
%punish widows and orphans
\widowpenalty10000
\clubpenalty10000
% PROF PINKAL CONSTRAINTS START
%
%% Paragraph and indent (as required by Prof. Dr. Pinkal)
%\setlength{\parindent}{0pt}
%\setlength{\parskip}{2ex plus 0.5ex minus 0.2ex}
%
%% Zeilenabstand 1.25 %
%\linespread{1.2}
%
%% Adjust margin of paper. -> needed for pinkal?
\usepackage[footskip=1in]{geometry}
%\geometry{a4paper, top=25mm, left=25mm, right=25mm, bottom=25mm}
\geometry{a4paper}
% PROF PINKAL CONSTRAINTS END
%OWN COMMANDS START
\newcommand{\drt}{\textsc{drt}}
\newcommand{\sdrt}{\textsc{sdrt}}
\newcommand{\pdrt}{\textsc{pdrt}}
\newcommand{\drs}{\textsc{drs}}
\newcommand{\sdrs}{\textsc{sdrs}}
\newcommand{\sdrsf}{\textsc{sdrs}-formula}
\newcommand{\pdrs}{\textsc{pdrs}}
\newcommand{\du}{\textsc{du}}
\newcommand{\edu}{\textsc{edu}}
\newcommand{\cdu}{\textsc{cdu}}
\newcommand{\rfc}{\textsc{rfc}}
\newcommand{\nlp}{\textsc{nlp}}
\newcommand{\fol}{\textsc{fol}}
\newcommand{\pdtb}{\textsc{pdtb}}
\newcommand{\rst}{\textsc{rst}}
\newcommand{\dltag}{\textsc{d-ltag}}
\newcommand{\pdrts}{\textsc{pdrt-sandbox}}
\newcommand{\sdrts}{\textsc{sdrt-sandbox}}
\newcommand{\setf}{\ensuremath{\mathcal{F}}}
\newcommand{\seta}{\ensuremath{A}}
% suppress hyphenation for haskell words
\let\temptt\texttt
\renewcommand\texttt[1]{\mbox{\temptt{#1}}}
\newcommand{\has}[1]{\texttt{#1}}
\newcommand{\al}{\smaller{AL03}}
\newcommand{\rar}{\ensuremath{\rightarrow}}
\newcommand{\Rar}{\ensuremath{\Rightarrow}}
\newcommand{\lar}{\ensuremath{\leftarrow}}
\newcommand{\Lar}{\ensuremath{\Leftarrow}}
%%%%%% adapted from sdrt.sty
% to switch between pi notation and simple number notation
% with pi:
\newcommand{\pie}[2][]{\ensuremath{\pi#1_{#2}}}
\newcommand{\pione}{\ensuremath{\pie{1}}}
\newcommand{\pitwo}{\ensuremath{\pie{2}}}
\newcommand{\pithree}{\ensuremath{\pie{3}}}
\newcommand{\pifour}{\ensuremath{\pie{4}}}
\newcommand{\pifive}{\ensuremath{\pie{5}}}
\newcommand{\pisix}{\ensuremath{\pie{6}}}
\newcommand{\piseven}{\ensuremath{\pie{7}}}
\newcommand{\pieight}{\ensuremath{\pie{8}}}
\newcommand{\pinine}{\ensuremath{\pie{9}}}
\newcommand{\pizero}{\ensuremath{\pie{0}}}
\newcommand{\pifirst}{\ensuremath{\pie[']{}}}
\newcommand{\pisecond}{\ensuremath{\pie['']{}}}
\newcommand{\pithird}{\ensuremath{\pie[''']{}}}
\newcommand{\pifourth}{\ensuremath{\pie['''']{}}}
% without pi:
%\newcommand{\pione}{1}
%\newcommand{\pitwo}{2}
%\newcommand{\pithree}{3}
%\newcommand{\pifour}{4}
%\newcommand{\pifive}{5}
%\newcommand{\pisix}{6}
%\newcommand{\piseven}{7}
%\newcommand{\pieight}{8}
%\newcommand{\pinine}{9}
%\newcommand{\pizero}{0}
%%%%%% until here from sdrt.sty
\newcommand{\la}{\ensuremath{\lambda}}
% modular references
\newcommand{\eref}[2][]{Example~\ref{ex:#2}#1} %examples
%\newcommand{\aref}[3][]{(\ref{ex:#2}#1#3)} %examples
\newcommand{\cref}[1]{Chapter~\ref{chapter:#1}} % chapters
\newcommand{\dref}[1]{Definition~\ref{def:#1}} % definitions
\newcommand{\tref}[1]{Table~\ref{table:#1}} % tables
\newcommand{\fref}[1]{Figure~\ref{fig:#1}} % figures
\newcommand{\sref}[1]{Sec.~\ref{sec:#1}} %sections
\newcommand{\commentfn}[2]{\footnote{\textbf{#1}: #2}}
\newcommand{\last}[1]{Last accessed #1, 2018.}
% to scale small caps such that numbers are also small (seems not to work with textsc
\usepackage{scalefnt}
\newcommand{\smaller}[2][0.85]{{\scalefont{#1}#2}}
\newcommand{\bigger}[2][1.15]{{\scalefont{#1}#2}}
% there are issues with fontsize when boxdrs is used for modeling an embedded box. thus, the outermost box (irr. of beign sdrs or drs) should use boxdrsglob (in order to set the fontsize back to normal after the box), and the local boxes should use boxdrs
\newcommand{\boxdrsglob}[2]
{\footnotesize\begin{tabular}{c}
\noalign{\smallskip}
\begin{tabular}{ | l | }
\hline #1\\ \hline #2\\ \hline
\end{tabular}
\smallskip
\end{tabular}
\normalsize}
\newcommand{\boxdrs}[2]
{\footnotesize\begin{tabular}{c}
\noalign{\smallskip}
\begin{tabular}{ | l | }
\hline #1\\ \hline #2\\ \hline
\end{tabular}
\smallskip
\end{tabular}}
%\newcommand{\boxdrsaux}[2]
%{\footnotesize\begin{tabular}{c}
% \noalign{\smallskip}
% \begin{tabular}{ : l : }
% \hdashline #1\\ \hdashline #2\\ \hdashline
% \end{tabular}
% \smallskip
% \end{tabular}
% \normalsize}
\newcommand{\flatdrs}[2]
{
\hspace{-8pt}
\begin{tabular}[t]{l}
[#1~$|$~#2]
\end{tabular}\hspace{-8pt}
}
%line break in tabular cell
\newcommand{\specialcell}[2][c]{%
\begin{tabular}[c]{@{}#1@{}}#2\end{tabular}}
%OWN COMMANDS END
% to be able to place figures at place of creation
\usepackage{here}
%to specify desired hyphenation
\hyphenation{sdrs-formula}
\hyphenation{sdrs-formulae}
% dashed hline in tabular, ADD LAST, CONFLICT WITH OTHER THINGS
%\usepackage{arydshln}
\def\signed #1 (#2){{\unskip\nobreak\hfil\penalty50
\hskip2em\hbox{}\nobreak\hfil\sl#1\/ \rm(#2)
\parfillskip=0pt \finalhyphendemerits=0 \par}}
\usepackage{multibib}
\newcites{languageresource}{Language Resources}
\usepackage{graphicx}
% \usepackage{casyl} for syllabics
% for eps graphics
\newcommand{\thedate}{\today}
\usepackage[sc]{mathpazo}
% Add the Bibliography to the Table of Contents
\usepackage[nottoc,notlof,notlot,section]{tocbibind}
% Rename to References
\renewcommand{\bibname}{References}
% Syllabics
\usepackage{casyltex}
% Possesives in natbib
\usepackage{etoolbox}
\makeatletter
% make numeric styles use name format
\patchcmd{\NAT@test}{\else \NAT@nm}{\else \NAT@nmfmt{\NAT@nm}}{}{}
% define \citepos just like \citet
\DeclareRobustCommand\citepos
{\begingroup
\let\NAT@nmfmt\NAT@posfmt% ...except with a different name format
\NAT@swafalse\let\NAT@ctype\z@\NAT@partrue
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
\let\NAT@orig@nmfmt\NAT@nmfmt
\def\NAT@posfmt#1{\NAT@orig@nmfmt{#1's}}
\makeatother
% End possesives in natbib
% Don't use tt for \nolinkurl commands
\urlstyle{same}
% Stop bugging me with minor errors
% Turn on to check by eye \overfullrule=2cm
\hbadness=99999
\hfuzz=20pt
\vfuzz=20pt
\vbadness=\maxdimen
% Arabic
\usepackage{arabtex}
\usepackage{utf8}
% IPA
\usepackage{tipa}
% IGT
% Important; include last
\usepackage{gb4e}