PhD

The LaTeX sources of my Ph.D. thesis
git clone https://esimon.eu/repos/PhD.git
Log | Files | Refs | README | LICENSE

thesis.sty (15409B)


      1 \NeedsTeXFormat{LaTeX2e}
      2 \ProvidesPackage{thesis}[2021/01/01 Local package]
      3 
      4 \RequirePackage[main=english,french,greek]{babel}
      5 \RequirePackage{iflang} % For \IfLanguageName
      6 \RequirePackage{lua-ul} % For \underLine
      7 \RequirePackage{ccicons} % For Creative Commons licence logos
      8 \RequirePackage{setspace} % For \onehalfspacing
      9 \ifthesis@presentation\else
     10 	\RequirePackage[inline]{enumitem} % For fancy itemize etc
     11 \fi
     12 \RequirePackage{array} % For \newcolumntype
     13 \RequirePackage{tabularx} % For X-like column types
     14 \RequirePackage{longtable} % For pagebreak inside a table
     15 \RequirePackage{multirow} % For \multirow and \multicolumn
     16 \RequirePackage{graphicx} % For \includegraphics on steroids
     17 \RequirePackage{graphbox} % For additional \includegraphics options
     18 \RequirePackage{hyperref} % For hypertext functionalities
     19 \RequirePackage{bookmark} % For \pdfbookmark
     20 
     21 
     22 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     23 %%% Hyperref setup %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     25 
     26 %%%%%%%%%%%%%%%%%%%%
     27 % Set PDF metadata %
     28 %%%%%%%%%%%%%%%%%%%%
     29 \begingroup
     30 \def\sep{;}
     31 \edef\thesis@pdf@keywords{\@keywords}
     32 
     33 \hypersetup{
     34 	pdfauthor={\@author},
     35 	pdftitle={\@title},
     36 	pdfsubject={\@title},
     37 	pdfkeywords={\thesis@pdf@keywords},
     38 	pdflang=en,
     39 }
     40 \endgroup
     41 
     42 %%%%%%%%%%%%%%%%%%%%%%%%%%%
     43 % Hyperlink configuration %
     44 %%%%%%%%%%%%%%%%%%%%%%%%%%%
     45 \ifthesis@presentation
     46 	\hypersetup{
     47 		linktoc=all,
     48 		colorlinks=false,
     49 		pdfdisplaydoctitle=true,
     50 	}
     51 \else
     52 	\ifthesis@digital
     53 		\hypersetup{
     54 			linktoc=all,
     55 			colorlinks=true,
     56 			linkcolor=red!60!black,
     57 			citecolor=green!60!black,
     58 			filecolor=cyan!60!black,
     59 			menucolor=red!60!black,
     60 			urlcolor=magenta!60!black,
     61 			pdfdisplaydoctitle=true,
     62 		}
     63 	\else
     64 		\hypersetup{
     65 			linktoc=all,
     66 			colorlinks=true,
     67 			linkcolor=black,
     68 			citecolor=black,
     69 			filecolor=black,
     70 			menucolor=black,
     71 			urlcolor=black,
     72 			pdfdisplaydoctitle=true,
     73 		}
     74 	\fi
     75 \fi
     76 
     77 
     78 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     79 %%% Shorthand commands %%%%%%%%%%%%%%%%%%%%%%%%%%%
     80 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     81 
     82 %%%%%%%%%%%%%%%%%%%%%
     83 % Draft Annotations %
     84 %%%%%%%%%%%%%%%%%%%%%
     85 \NewDocumentCommand\draftnotecmd{m O{} O{} o m m}{
     86 	\ifnum\thesis@debug>0
     87 		\expandafter\NewDocumentCommand\csname\string#1\endcsname{+m}{\hbadness=10000\textcolor{#5}{#2\relax{}##1}}
     88 		\NewDocumentCommand#1{o +m}{\IfNoValueTF{##1}{\IfValueTF{#4}{#4\csname\string#1\endcsname{##2}}{\marginpar{\tiny\csname\string#1\endcsname{##2}}}}{\marginnote{\tiny\csname\string#1\endcsname{##2}}[##1]}\ignorespaces}
     89 	\else
     90 		\NewDocumentCommand#1{o +m}{\directlua{print("\string\27[#6;1mDRAFT MESSAGE: #3\luatexluaescapestring{\unexpanded{##1}}\string\27[0m")}}
     91 	\fi
     92 }
     93 
     94 \draftnotecmd\B{red}{31}
     95 \draftnotecmd\benj[][][]{red}{31}
     96 \draftnotecmd\Ba[\(\hookrightarrow\)][→]{red}{31}
     97 \draftnotecmd\V{green!67!black}{32}
     98 \draftnotecmd\vinc[][][]{green!67!black}{32}
     99 \draftnotecmd\R{orange}{33}
    100 \draftnotecmd\reu[][][]{orange}{33}
    101 \draftnotecmd\E{blue}{34}
    102 \draftnotecmd\e[][][]{blue}{34}
    103 \draftnotecmd\Ea[\(\hookrightarrow\)][→]{blue}{34}
    104 \draftnotecmd\M{purple}{35}
    105 \draftnotecmd\syr[][][]{purple}{35}
    106 
    107 %%%%%%%%%%%%%%%%%%
    108 % Table commands %
    109 %%%%%%%%%%%%%%%%%%
    110 \newcolumntype{P}[1]{>{\footnotesize\raggedright\arraybackslash}p{#1}}
    111 \newcolumntype{Y}{>{\footnotesize\raggedright\arraybackslash}X}
    112 
    113 % won't compile on a PDP-50… O:
    114 \setcounter{LTchunksize}{100}
    115 
    116 %%%%%%%%%%%%%%%%%
    117 % Math commands %
    118 %%%%%%%%%%%%%%%%%
    119 \DeclareMathOperator*\expectation{\symbb{E}}
    120 \DeclareMathOperator\entropy{H}
    121 \DeclareMathOperator*\argmax{argmax}
    122 \DeclareMathOperator\pmi{pmi}
    123 \NewDocumentCommand\laplace{}{\symup{\Delta}}
    124 \DeclareMathOperator\ReLU{ReLU}
    125 \DeclareMathOperator\softmax{softmax}
    126 \DeclareMathOperator\diagonal{diag}
    127 \DeclareMathOperator\kl{D_\textsc{kl}}
    128 \DeclareMathOperator\jsd{D_\textsc{jsd}}
    129 \DeclareMathOperator\uniformDistribution{\symcal{U}}
    130 \DeclareMathOperator\normalDistribution{\mathcal{N}}
    131 \NewDocumentCommand\sigmoid{}{\mathop{\sigma}}
    132 \NewDocumentCommand\diff{}{\mathop{}\!\mathrm{d}}
    133 
    134 % Independent symbol with two vertical bar
    135 \newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}}
    136 \def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}
    137 
    138 \NewDocumentCommand\middlerel{m}{\mathrel{}\middle#1\mathrel{}}
    139 
    140 % For multisets
    141 \NewDocumentCommand\lMultiBrace{}{\left\{\mskip-7mu\left\{}
    142 \NewDocumentCommand\rMultiBrace{}{\right\}\mskip-7mu\right\}}
    143 
    144 \newcommand\notindependent{\protect\mathpalette{\protect\notindependenT}{\perp}}
    145 \def\notindependenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1\not#2}}}
    146 % Comply with ISO 80000-2 (which mandates bold italic or \vec for vectors)
    147 \NewDocumentCommand\vctr{m}{{\symbf{#1}}}
    148 \NewDocumentCommand\mtrx{m}{{\symbf{#1}}}
    149 \NewDocumentCommand\tnsr{m}{{\symbfsf{#1}}}
    150 \NewDocumentCommand\rndm{m}{{\symup{#1}}}
    151 \NewDocumentCommand\rndmvctr{m}{{\symbfup{#1}}}
    152 \NewDocumentCommand\transposesym{}{\symsfup{T}}
    153 \NewDocumentCommand\transpose{}{^{\mkern-1.5mu\transposesym}}
    154 
    155 % Used in subscript of \ReLU to indicates it is only applied to half the units
    156 \NewDocumentCommand\halfCircleScript{}{
    157 	\begin{tikzpicture}
    158 		\draw[fill] (0,0)-- (90:0.8mm) arc (90:270:0.8mm) -- cycle ;
    159 		\draw (0,0) circle (0.8mm);
    160 	\end{tikzpicture}
    161 }
    162 
    163 %%%%%%%%%%%%%%%%%%%%%%%%
    164 % Entities & Relations %
    165 %%%%%%%%%%%%%%%%%%%%%%%%
    166 \NewDocumentCommand\uhead{m}{\relax\underLine{#1}\textsubscript{\(e_1\)}}
    167 \NewDocumentCommand\utail{m}{\relax\underLine{#1}\textsubscript{\(e_2\)}}
    168 \NewDocumentCommand\uent{m}{\relax\underLine{#1}\textsubscript{\(e\)}}
    169 \NewDocumentCommand\wdent{O{} m}{\texttt{\href{https://www.wikidata.org/wiki/Q#2}{#1Q#2}}}
    170 \NewDocumentCommand\wdrel{O{} m}{\texttt{\href{https://www.wikidata.org/wiki/Property:P#2}{#1P#2}}}
    171 
    172 \NewDocumentCommand\tripletHolds{m m m}{\ensuremath{\mathalpha{#1}\mathrel{#2}\mathalpha{#3}}}
    173 \NewDocumentCommand\sfTripletHolds{m m m}{\tripletHolds{#1}{\textsl{#2\/}}{#3}}
    174 
    175 %%%%%%%%%%%%%%%
    176 % Common Sets %
    177 %%%%%%%%%%%%%%%
    178 \NewDocumentCommand\entitySet{}{{\symcal{E}}}
    179 \NewDocumentCommand\relationSet{}{{\symcal{R}}}
    180 \NewDocumentCommand\sentenceSet{}{{\symcal{S}}}
    181 \NewDocumentCommand\dataSet{}{{\symcal{D}}}
    182 \NewDocumentCommand\arcSet{}{{\symcal{A}}}
    183 \NewDocumentCommand\kbSet{}{{\dataSet_{\textup{\textsc{kb}}}}}
    184 \NewDocumentCommand\itemSet{}{{\symcal{I}}}
    185 
    186 %%%%%%%%%%%%%%%%%%%%%%%
    187 % Directed F1 Metrics %
    188 %%%%%%%%%%%%%%%%%%%%%%%
    189 \def\widebreve{\mathpalette\wide@breve}
    190 \def\wide@breve#1#2{\sbox\z@{$#1#2$}%
    191      \mathop{\vbox{%
    192 		 \m@th\ialign{%
    193 			 ##\crcr
    194 			 \kern0.08em\brevefill#1{0.9\wd\z@}\crcr%
    195 			 \noalign{\nointerlineskip\vskip -0.6mm\relax}%
    196 			 $\hss#1#2\hss$\crcr%
    197 		 }}}\limits}
    198 \def\Pwidebreve{\mathpalette\Pwide@breve}
    199 \def\Pwide@breve#1#2{\sbox\z@{$#1#2$}%
    200      \mathop{\vbox{%
    201 		 \m@th\ialign{%
    202 			 ##\crcr
    203 			 \kern0.08em\brevefill#1{0.9\wd\z@}\crcr%
    204 			 \noalign{\nointerlineskip}%
    205 			 $\hss#1#2\hss$\crcr%
    206 		 }}}\limits}
    207 \def\brevefill#1#2{$\m@th\sbox\tw@{$#1($}%
    208 	\hss\resizebox{#2}{\wd\tw@}{\rotatebox[origin=c]{90}{\upshape(}}\hss$}
    209 
    210 %%%%%%%%%
    211 % Graph %
    212 %%%%%%%%%
    213 \NewDocumentCommand\gfsource{}{\varepsilon_1}
    214 \NewDocumentCommand\gftarget{}{\varepsilon_2}
    215 \NewDocumentCommand\gfendpoints{}{\symbf{\varepsilon}}
    216 \DeclareMathOperator\gfincidents{\symcal{I}}
    217 \NewDocumentCommand\gfrelation{}{\mathop{\rho}}
    218 \NewDocumentCommand\gfsentence{}{\mathop{\varsigma}}
    219 \DeclareMathOperator\gfdegree{deg}
    220 \DeclareMathOperator\gffourier{\symscr{F}}
    221 \DeclareMathOperator\gfinvfourier{\symscr{F}^{-1}}
    222 \NewDocumentCommand\laplacian{m}{\ensuremath{\mtrx{L}_{\textsc{#1}}}}
    223 \NewDocumentCommand\inlineArc{s o m m}{%
    224 	\begin{tikzpicture}[baseline=(a.base)]%
    225 		\node[inner sep=0.3mm, outer sep=0mm] (a) {\(#3\)};
    226 		\node[right=4mm of a,inner sep=0.2mm, outer sep=0mm] (b) {\(#4\)};
    227 		\draw[-{Latex[length=1.5mm,width=1.2mm]}]%
    228 			(\IfBooleanTF{#1}{b}{a})%
    229 			--%
    230 			(\IfBooleanTF{#1}{a}{b})%
    231 			\IfValueT{#2}{node[midway,above] {\scriptsize \(#2\)}}%
    232 			;
    233 	\end{tikzpicture}%
    234 }
    235 \NewDocumentCommand\inlineDoubleArc{s o o m m m}{%
    236 	\begin{tikzpicture}[baseline=(a.base)]%
    237 		\node[inner sep=0.3mm, outer sep=0mm] (a) {\(#4\)};
    238 		\node[right=4mm of a,inner sep=0.2mm, outer sep=0mm] (b) {\(#5\)};
    239 		\node[right=4mm of b,inner sep=0.2mm, outer sep=0mm] (c) {\(#6\)};
    240 		\draw[-{Latex[length=1.5mm,width=1.2mm]}] (a) -- (b)%
    241 			\IfValueT{#2}{node[midway,above] {\scriptsize \(#2\)}}%
    242 			;
    243 		\draw[-{Latex[length=1.5mm,width=1.2mm]}]%
    244 			(\IfBooleanTF{#1}{c}{b})%
    245 			--%
    246 			(\IfBooleanTF{#1}{b}{c})%
    247 			\IfValueT{#3}{node[midway,above] {\scriptsize \(#3\)}}%
    248 			;
    249 	\end{tikzpicture}%
    250 }
    251 
    252 %%%%%%%%%%%%%%%%
    253 % Neighborhood %
    254 %%%%%%%%%%%%%%%%
    255 \NewDocumentCommand\gfneighbors{}{N}
    256 \NewDocumentCommand\gfeneighbors{}{\symcal{N}}
    257 \NewDocumentCommand\gfsr{}{{\langle r\rangle}}
    258 \NewDocumentCommand\gforight{}{{\tikz{\draw[-{Latex[length=1mm,width=1mm]}] (0, 0) -- (2.6mm, 0);}}}
    259 \NewDocumentCommand\gfoleft{}{{\tikz{\draw[-{Latex[length=1mm,width=1mm]}] (0, 0) -- (-2.6mm, 0);}}}
    260 \NewDocumentCommand\gfnright{}{{\kern-0.8mm\gforight}}
    261 \NewDocumentCommand\gfnleft{}{{\kern-0.8mm\gfoleft}}
    262 
    263 \NewDocumentCommand\gfneighborsrr{}{%
    264 	\operatorname{\mathnormal{\begin{tikzpicture}[baseline=(b.base)]%
    265 		\node[inner sep=0pt,outer sep=0pt] (n) {\(\gfneighbors_\gfsr\)};%
    266 		\draw[-{Latex[length=1mm,width=1mm]}] ($(n.center)+(0.39mm, 1mm)$) -- +(2.6mm, 0);%
    267 		\node[inner sep=0pt,outer sep=0pt,anchor=north west] (b) at (n.north west) {\(\gfneighbors\)};%
    268 		\clip (n.north west) rectangle (n.south east);%
    269 	\end{tikzpicture}}}%
    270 }
    271 \NewDocumentCommand\gfneighborsrl{}{%
    272 	\operatorname{\mathnormal{\begin{tikzpicture}[baseline=(b.base)]%
    273 		\node[inner sep=0pt,outer sep=0pt] (n) {\(\gfneighbors_\gfsr\)};%
    274 		\draw[-{Latex[length=1mm,width=1mm]}] ($(n.center)+(2.99mm, 1mm)$) -- +(-2.6mm, 0);%
    275 		\node[inner sep=0pt,outer sep=0pt,anchor=north west] (b) at (n.north west) {\(\gfneighbors\)};%
    276 		\clip (n.north west) rectangle (n.south east);%
    277 	\end{tikzpicture}}}%
    278 }
    279 
    280 %%%%%%%%%%%%%%%%%%%%
    281 % Relation Algebra %
    282 %%%%%%%%%%%%%%%%%%%%
    283 \NewDocumentCommand\relationComposition{}{\mathbin{\bullet}}
    284 \NewDocumentCommand\relationIdentity{}{\symbf{I}}
    285 \NewDocumentCommand\relationAnd{}{\cap}
    286 \NewDocumentCommand\relationOr{}{\cup}
    287 \NewDocumentCommand\relationZero{}{\symbf{0}}
    288 \NewDocumentCommand\relationOne{}{\symbf{1}}
    289 
    290 %%%%%%%%%%%%%%%%%%%%%%%
    291 % Loss Directionality %
    292 %%%%%%%%%%%%%%%%%%%%%%%
    293 \def\directedfill{\arrowfill@\relbar\relbar\rightarrow}
    294 \def\halfdirectedfill{\arrowfill@\leftharpoonup\relbar\rightharpoondown}
    295 \def\undirectedfill{\arrowfill@\leftarrow\relbar\rightarrow}
    296 \NewDocumentCommand\overDirected{}{\mathpalette{\overarrow@\directedfill}}
    297 \NewDocumentCommand\overHalfdirected{}{\mathpalette{\overarrow@\halfdirectedfill}}
    298 \NewDocumentCommand\overUndirected{}{\mathpalette{\overarrow@\undirectedfill}}
    299 
    300 %%%%%%%%%%%%%%%%%
    301 % Abbreviations %
    302 %%%%%%%%%%%%%%%%%
    303 \NewDocumentCommand\trexspo{}{\textsc{t-re}x \textsc{spo}}
    304 \NewDocumentCommand\trexds{}{\textsc{t-re}x \textsc{ds}}
    305 \NewDocumentCommand\nytfb{}{\(\textsc{nyt}+\textsc{fb}\)}
    306 
    307 %%%%%%%%%%%%%%%%%
    308 % Miscellaneous %
    309 %%%%%%%%%%%%%%%%%
    310 \NewDocumentCommand\empP{}{\ensuremath{\hat{P}}}
    311 \NewDocumentCommand\loss{O{\textsc} m}{\ensuremath{\symcal{L}_{#1{#2}}}}
    312 \ProvideDocumentCommand\problem{m}{\ensuremath{\symscr{P}\;#1}}
    313 \NewDocumentCommand\bertArch{m}{\textsc{bert-}\discretionary{}{}{}\texttt{#1}}
    314 \ifthesis@presentation
    315 	\NewDocumentCommand\bertcoder{}{\ensuremath{\operatorname{\text{BERTcoder}}}}
    316 \else
    317 	\NewDocumentCommand\bertcoder{}{\ensuremath{\operatorname{\textsc{bert}coder}}}
    318 \fi
    319 \NewDocumentCommand\fone{}{\ensuremath{F_1}}
    320 \NewDocumentCommand\bcubed{}{\ensuremath{\symup{B}^3}}
    321 \NewDocumentCommand\blanktag{}{\texttt{<}\textsc{blank}\texttt{/>}}
    322 \NewDocumentCommand\ctxoneadj{}{\(\operatorname{\textsc{ctx}}(\textsc{1-adjacency})\)}
    323 \NewDocumentCommand\mmsrlencoder{o}{\ensuremath{\operatorname{enc\IfValueT{#1}{_\text{#1}}}}}
    324 \NewDocumentCommand\mmsrldecoder{o}{\ensuremath{\operatorname{dec\IfValueT{#1}{_\text{#1}}}}}
    325 
    326 
    327 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    328 %%% Hypothesis Management %%%%%%%%%%%%%%%%%%%%%%%%
    329 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    330 
    331 \NewDocumentCommand\hypothesis{m}{\ensuremath{\symscr{H}_\textsc{#1}}}
    332 
    333 \NewDocumentCommand\typeassumption{o m}{%
    334 	\begin{trivlist}\item\relax%
    335 		\ifcsname hyp:#2\endcsname%
    336 			\expandafter\csname hyp:#2\endcsname%
    337 		\IfValueT{#1}{%
    338 			\rlap{\kern\marginparsep\marginsize\textsc{#1}}%
    339 		}%
    340 		\else%
    341 			\thesis@warning{Trying to type undefined assumption #2.}%
    342 		\fi%
    343 	\end{trivlist}%
    344 }
    345 
    346 %Global lrbox
    347 \let\glrbox\lrbox
    348 \let\endglrbox\endlrbox
    349 \patchcmd{\glrbox}
    350 	{\setbox}
    351 	{\global\setbox}
    352 	{}
    353 	{\thesis@patch@error{Package}{Patch failed, can't make a global lrbox.}}
    354 
    355 \NewDocumentCommand\thesis@define@assumption{m m +m}{
    356 	\expandafter\gdef\csname hyp:#1\endcsname{%
    357 		\begin{minipage}[t]{\linewidth}%
    358 				\textbf{Assumption} \hypothesis{#2}\textbf{: }%
    359 				\em\ignorespaces%
    360 				#3%
    361 		\end{minipage}%
    362 	}%
    363 }
    364 
    365 \NewDocumentEnvironment{assumption}{O{#2} m +b}
    366 	{%
    367 		\protected@write\@auxout{}{%
    368 			\string\thesis@define@assumption{#1}{#2}{\unexpanded{#3}}%
    369 			\string\expandafter\xdef\string\csname\space sec:assumption:#1\string\endcsname{\thesubsection}%
    370 		}%
    371 		\thesis@define@assumption{#1}{#2}{#3}%
    372 		\phantomsection%
    373 		\label{assumption:#1}%
    374 		\expandafter\xdef\csname sec:assumption:#1\endcsname{\thesubsection}%
    375 		\typeassumption{#1}%
    376 	}
    377 
    378 \NewDocumentEnvironment{refAssumptionSection}{m}{%
    379 	\hyperref[assumption:#1]{%
    380 		\ifcsname sec:assumption:#1\endcsname%
    381 			\csname sec:assumption:#1\endcsname%
    382 		\else%
    383 			\textbf{??}%
    384 			\thesis@warning{Reference to undefined assumption #1.}
    385 		\fi%
    386 	}%
    387 }
    388 
    389 
    390 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    391 %%% Lua libraries interface %%%%%%%%%%%%%%%%%%%%%%
    392 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    393 
    394 \directlua{render = require("lib/render")}
    395 \NewDocumentCommand\renderEmbeddings{m}{\directlua{render.embeddings([[#1]])}}
    396 \NewDocumentCommand\renderConfusionsDimensions{m m m}{
    397 	\def\thesis@confusion@mdelta{#1}
    398 	\def\thesis@confusion@cdelta{#2}
    399 	\def\thesis@confusion@radius{#3}
    400 }
    401 \renderConfusionsDimensions{3}{0.27}{0.15}
    402 \NewDocumentCommand\renderConfusions{s m m m m m m m m}{\directlua{render.confusions(\thesis@confusion@mdelta, \thesis@confusion@cdelta, \thesis@confusion@radius, "\luatexluaescapestring{\unexpanded{#2}}", "\luatexluaescapestring{\unexpanded{#3}}", "\luatexluaescapestring{\unexpanded{#4}}", "\luatexluaescapestring{\unexpanded{#5}}", "\luatexluaescapestring{\unexpanded{#6}}", "\luatexluaescapestring{\unexpanded{#7}}", "\luatexluaescapestring{\unexpanded{#8}}", "\luatexluaescapestring{\unexpanded{#9}}", \IfBooleanTF{#1}{true}{false})}}
    403 \NewDocumentCommand\renderDegrees{m}{\directlua{render.degrees([[#1]])}}
    404 
    405 
    406 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    407 %%% TikZ setup %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    408 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    409 
    410 \input{lib/memory network.def}
    411 \input{lib/plate diagram.def}
    412 \input{lib/distribution output.def}
    413 
    414 
    415 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    416 %%% Font setup %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    417 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    418 
    419 \newfontfamily\greekFont{GFS Didot Classic}[Ligatures=TeX]
    420 \languageattribute{greek}{ancient}
    421 \addto\extrasgreek{\greekFont}
    422 
    423 \newfontfamily\traditionalChineseFont{I.Ming}[Ligatures=TeX,LetterSpace=15,Vertical=Alternates]
    424 \NewDocumentCommand\traditionalChinese{m}{\traditionalChineseFont\fontsize{9pt}{11pt}\selectfont #1}
    425 
    426 \newfontfamily\japaneseFont{IPAMincho}[Ligatures=TeX]