-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocalcommands.tex
278 lines (191 loc) · 8.57 KB
/
localcommands.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
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
% requires amsmath for \text
\newcommand\mathdash{\text{\normalfont -}}
\newcommand{\todostefan}[1]{\todo[color=green!40]{\footnotesize #1}\xspace}
\newcommand{\todofelix}[1]{\todo[color=blue!40]{\footnotesize #1}\xspace}
\newcommand{\todoandrew}[1]{\todo[color=blue!40]{\footnotesize #1}\xspace}
\newcommand{\inlinetodostefan}[1]{\todo[color=green!40,inline]{\footnotesize #1}\xspace}
%% is done by package option
\ifdraft
\proofmodetrue
\fi
%% % taken from covington.sty (check)
%% %\newcounter{lsptempcnt}
%% \newcommand{\mex}[1]{\setcounter{lsptempcnt}{\value{equation}}%
%% \addtocounter{lsptempcnt}{#1}%
%% \arabic{lsptempcnt}}%
%\displaywidowpenalty=10000\relax
%\predisplaypenalty=-200\relax
%\newcommand{\mod}{\textsc{mod}\xspace} % wegen beamer.cls nicht in abbrev.sty
%\usepackage[figuresright]{rotating}
% http://tex.stackexchange.com/questions/203/how-to-obtain-verbatim-text-in-a-footnote
% somehow does not work
%\usepackage{fancyvrb}
%\newcommand{\tag}{TAG\indextag} % has to be here, conflict with latexbeamer
% mit der Index-Version geht die Silbentrennung nicht
\renewcommand{\word}[1]{\emph{#1}}
%\newcommand{\dom}{\textsc{dom}\xspace}
%\newcommand{\prt}{\textsc{prt}}
%\newcommand{\refl}{\textsc{refl}}
%% \newcommand{\snom}{\textit{snom}}
%% \newcommand{\sgen}{\textit{sgen}}
%% \newcommand{\sacc}{\textit{sacc}}
%\usepackage{my-index-shortcuts}
\newcommand{\tes}{Tesnière\xspace}
\newcommand{\mel}{Mel'čuk\xspace}
%\newcommand{\dom}{\textsc{dom}\xspace}
\newcommand{\page}{}
\let\mc=\multicolumn
% to set the MRSes for scope underspecification
%http://tex.stackexchange.com/questions/218417/replacing-tree-dvips-connect-nodes-in-a-tabular-environment/218458#218458
\usepackage{tcolorbox}
\tcbuselibrary{skins}
% for texlive 2015
\newtcbox{\mybox}[1][]{empty,shrink tight,nobeforeafter,on line,before upper=\vphantom{gM},remember as=#1,top=2pt,bottom=2pt}
% for texlive 2013
%\newtcbox{\mybox}[1][]{enhanced,boxrule=0pt,colframe=white,colback=white,shrink tight,nobeforeafter,on line,before upper=\vphantom{gM},remember as=#1} %,top=3pt,bottom=3pt}
%use shorten <=2pt,shorten >=2pt in the pictures.
\newcommand{\mynode}[2]{\mybox[#1]{#2}}
% http://tex.stackexchange.com/questions/218417/replacing-tree-dvips-connect-nodes-in-a-tabular-environment/218458#218458
% Instead of using the package tikzmark, you can define your own \tikzmark being a regular node. There's no need to use tcolorbox package.
\newcommand{\mysubnode}[2]%
{\tikz[baseline=(#1.base), remember picture]\node[outer sep=0pt, inner sep=0pt] (#1) {#2};}
% http://tex.stackexchange.com/questions/230300/doing-something-like-psframebox-in-tikz#230306
\tikzset{
frbox/.style={
rounded corners,
draw,
thick,
inner sep=5pt
}
}
\newcommand\TZbox[1]{\tikz\node[frbox,baseline] {#1};}
\renewcommand{\rm}{\upshape}
\renewcommand{\mathrm}{\text}
\renewcommand{\it}{\itshape}
\renewcommand{\sc}{\scshape}
\renewcommand{\bf}{\bfseries}
% due to pdf readers facing page does not make sense:
%\def\reftextfaceafter{auf der \reftextvario{gegen\"uberliegenden}{n\"achsten} Seite}%
%\def\reftextfacebefore{auf der \reftextvario{gegen\"uberliegenden}{vorigen} Seite}%
\def\reftextfaceafter{on the following page}%
\def\reftextfacebefore{on the preceeding page}%
% needed for bibtex sorting. Usually provided from the bib file, but this fails for the first run.
\providecommand*{\donothing}[1]{}
% since all the theories are different, we start counting from scratch for every chapter.
% Thanks to Antonio MyP for pointing this out.
\makeatletter
\@addtoreset{principle}{chapter}
\@addtoreset{schema}{chapter}
\makeatother
% http://tex.stackexchange.com/questions/298031/is-it-possible-to-add-a-command-at-the-beginning-of-a-chapter?noredirect=1#
\pretocmd{\chapter}{% <--- IMPORTANT
\exewidth{(34)}% <--- IMPORTANT
}{}{}
% The oridingal definition from cgloss4e.
% This is incompatible with \jambox, but does raggedright
%% \def\gllr% % Introduces 2-line text-and-gloss.
%% {\begin{flushleft}
%% \ifx\@gsingle1% conditionally force single spacing (hpk/MC)
%% \vskip\baselineskip\def\baselinestretch{1}%
%% \@selfnt\vskip-\baselineskip\fi%
%% \bgroup
%% \twosentr
%% }
%% \gdef\twosentr#1\\ #2\\{% #1 = first line, #2 = second line
%% \getwords(\lineone,\eachwordone)#1 \\%
%% \getwords(\linetwo,\eachwordtwo)#2 \\%
%% \loop\lastword{\eachwordone}{\lineone}{\wordone}%
%% \lastword{\eachwordtwo}{\linetwo}{\wordtwo}%
%% \global\setbox\gline=\hbox{\unhbox\gline
%% \hskip\glossglue
%% \vtop{\box\wordone % vtop was vbox
%% \nointerlineskip
%% \box\wordtwo
%% }%
%% }%
%% \testdone
%% \ifnotdone
%% \repeat
%% \egroup % matches \bgroup in \gloss
%% \gl@stop}
% http://tex.stackexchange.com/questions/297068/adding-coordinates-for-connection-between-nodes-in-several-forest-environments
%
% is required because the construction of the curves otherwise results in an enormous bounding box,
% which probably isn't what you want. To see what it does, just delete it from the tree and observe
% the results.
\makeatletter
\newcommand*\ignoreme{\pgf@relevantforpicturesizefalse}
\makeatother
% biblatex stuff
% get rid of initials for Carl J. Pollard and Carl Pollard in the main text:
% Müller is Müller, even if there is a G. Müller
\ExecuteBibliographyOptions{uniquename=false}
\ExecuteBibliographyOptions{mincrossrefs=99}
% Ash Template LFG
% \newcommand{\featname}[1]{\mbox{\textsc{#1}}} % feature name
% \newcommand{\argzero}{\featname{arg$_0$}\xspace}
% \newcommand{\argone}{\featname{arg$_1$}\xspace}
% \newcommand{\argtwo}{\featname{arg$_2$}\xspace}
% \newcommand{\argthree}{\featname{arg$_3$}\xspace}
% \newcommand{\templaten}[1]{\textsc{#1}}
% the distance between (i) and the example
%\gblabelsep{1em}
%https://tex.stackexchange.com/questions/11707/how-to-force-output-to-a-left-or-right-page
%% \newcommand*\cleartoleftpage{%
%% \clearpage
%% \ifodd\value{page}\hbox{}\newpage\fi
%% }
% https://tex.stackexchange.com/questions/95014/aligning-overline-to-italics-font/95079#95079
\newbox\usefulbox
\makeatletter
\def\getslant #1{\strip@pt\fontdimen1 #1}
\def\skoverline #1{\mathchoice
{{\setbox\usefulbox=\hbox{$\m@th\displaystyle #1$}%
\dimen@ \getslant\the\textfont\symletters \ht\usefulbox
\divide\dimen@ \tw@
\kern\dimen@
\overline{\kern-\dimen@ \box\usefulbox\kern\dimen@ }\kern-\dimen@ }}
{{\setbox\usefulbox=\hbox{$\m@th\textstyle #1$}%
\dimen@ \getslant\the\textfont\symletters \ht\usefulbox
\divide\dimen@ \tw@
\kern\dimen@
\overline{\kern-\dimen@ \box\usefulbox\kern\dimen@ }\kern-\dimen@ }}
{{\setbox\usefulbox=\hbox{$\m@th\scriptstyle #1$}%
\dimen@ \getslant\the\scriptfont\symletters \ht\usefulbox
\divide\dimen@ \tw@
\kern\dimen@
\overline{\kern-\dimen@ \box\usefulbox\kern\dimen@ }\kern-\dimen@ }}
{{\setbox\usefulbox=\hbox{$\m@th\scriptscriptstyle #1$}%
\dimen@ \getslant\the\scriptscriptfont\symletters \ht\usefulbox
\divide\dimen@ \tw@
\kern\dimen@
\overline{\kern-\dimen@ \box\usefulbox\kern\dimen@ }\kern-\dimen@ }}%
{}}
\makeatother
\robustify\textsc
\robustify\textit
% get rid of these morewrite messages:
% https://tex.stackexchange.com/questions/419489/suppressing-messages-to-standard-output-from-package-morewrites/419494#419494
\ExplSyntaxOn
\cs_set_protected:Npn \__morewrites_shipout_ii:
{
\__morewrites_before_shipout:
\__morewrites_tex_shipout:w \tex_box:D \g__morewrites_shipout_box
\edef\tmp{\interactionmode\the\interactionmode\space}\batchmode\__morewrites_after_shipout:\tmp
}
\ExplSyntaxOff
% https://tex.stackexchange.com/questions/154594/how-to-diagnose-a-permanent-labels-may-have-changed-warning
%% \makeatletter
%% \def\@testdef #1#2#3{%
%% \def\reserved@a{#3}\expandafter \ifx \csname #1@#2\endcsname
%% \reserved@a \else
%% \typeout{^^Jlabel #2 changed:^^J%
%% \meaning\reserved@a^^J%
%% \expandafter\meaning\csname #1@#2\endcsname^^J}%
%% \@tempswatrue \fi}
%% \makeatother
% Felix Kopechky 16.08.2019
% Für die Lösung des van Trijp-Problems
% \patchcmd{\mkbibindexname}{\ifdefvoid{#3}{}{\MakeCapital{#3} }}{\ifdefvoid{#3}{}{#3 }}{}{\AtEndDocument{\typeout{mkbibindexname could not be patched.}}}
\newcommand{\sigle}[1]{#1}
\newcommand{\lindex}[1]{$_{#1}$}