generated from balacij/McMaster-Thesis-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon_preamble.tex
More file actions
92 lines (75 loc) · 2.55 KB
/
common_preamble.tex
File metadata and controls
92 lines (75 loc) · 2.55 KB
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
% Should probably be removed at some point!
\usepackage{silence}
\WarningsOff*
% From paper template
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
% \usepackage{xcolor}
\usepackage[table,usenames,dvipsnames]{xcolor}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{graphicx}
\usepackage{pgf-pie,pgfplots}
\pgfplotsset{compat=1.9}
\usepackage{subcaption}
\usepackage{textcomp}
% Extra functionality for command parsing
\usepackage{xparse, xstring}
\usepackage{adjustbox}
\usepackage{rotating, makecell, tabularx}
\renewcommand\theadalign{cc}
\renewcommand\theadfont{\bfseries}
\renewcommand\tabularxcolumn[1]{m{#1}}
\renewcommand{\arraystretch}{1.2}
\usepackage{pdflscape}
\usepackage{array,etoolbox}
\usepackage{multirow}
\usepackage{tabularray}
\usepackage{multicol}
% For nice captions and floating environments, such as for my code snippets
\usepackage{caption}
\usepackage{float}
\DefTblrTemplate{note-tag}{standard}{\quad \textit{\textrm{\textsuperscript{\InsertTblrNoteTag}}}}
\SetTblrTemplate{note-tag}{standard}
\DefTblrTemplate{note-sep}{standard}{}
\SetTblrTemplate{note-sep}{standard}
\DefTblrTemplate{note-text}{standard}{\quad \footnotesize \InsertTblrNoteText}
\SetTblrTemplate{note-text}{standard}
\SetTblrTemplate{note-border}{normal}
% \renewcommand\TblrNote[1]{\textit{\textrm{\textsuperscript{#1}}}}
% For `TblrNote`s in the middle of a cell (i.e., with following content)
% From https://topanswers.xyz/tex?q=4758
\ExplSyntaxOn
\RenewDocumentCommand \TblrNote { m }
{{
\cs_if_exist:NT \hypersetup { \ExpTblrTemplate { note-border }{ empty } }
{
\__tblr_hyper_link:nn {#1}
{ \textit { \textrm { \textsuperscript { \UseTblrFont { note-tag } #1 } } } }
}
}}
\ExplSyntaxOff
\usepackage{nameref}
% From https://tex.stackexchange.com/a/161340/192195
\newcommand{\creflastconjunction}{, and\nobreakspace}
\newcommand{\creflastgroupconjunction}{, and\nobreakspace}
% From https://tex.stackexchange.com/a/283202/192195
\usepackage[shortcuts]{extdash}
% Not used in paper (yet), but useful to parse TeX shared with thesis
% Allow labelling enum items: Credits to: https://texblog.org/2012/03/21/cross-referencing-list-items/
\usepackage{enumitem}
\makeatletter
\def\namedlabel#1#2{\begingroup
\textbf{#2}%
\def\@currentlabel{#2}%
\phantomsection\label{#1}\endgroup
}
\makeatother
% Manifest data
\input{manifest}
% McMaster Colours
\input{mcmaster_colours}
% Acronyms
\usepackage{acro}
\input{acronyms}
% General Assets
\input{assets}