-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfarlamp.cls
149 lines (121 loc) · 4.34 KB
/
farlamp.cls
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
% Credits: Pandoc. I extracted most of this from a standalone LaTeX file
% generated by Pandoc.
% tlmgr install xurl marginnote csquotes biblatex lm-math biber
% tlmgr update iftex
\LoadClass[
]{scrartcl}
\RequirePackage{bookmark}
\RequirePackage{xurl}
\RequirePackage{ragged2e}
\RequirePackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\PassOptionsToPackage{}{xcolor}
\RequirePackage{lmodern}
\RequirePackage{amsmath}
\RequirePackage{tabulary}
\RequirePackage{array}
\RequirePackage{graphicx}
\DeclareGraphicsExtensions{.png}
\RequirePackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
\RequirePackage[dvipsnames,svgnames*,x11names*]{xcolor}
% Not sure if I need this.
% Use upquote if available, for straight quotes in verbatim environments
% \IfFileExists{upquote.sty}{\RequirePackage{upquote}}{}
\hypersetup{
pdflang={en-GB},
colorlinks=true,
linkcolor=Maroon,
filecolor=Maroon,
citecolor=Blue,
urlcolor=Blue}
\newcommand*{\addtitledatatopdf}{%
\makeatletter
\hypersetup{%
pdftitle={\@title},
pdfauthor={\@author},
}
\makeatother
}
\urlstyle{same} % disable monospaced font for URLs
%\setlength{\emergencystretch}{3em} % prevent overfull lines
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
% Credits: https://en.wikibooks.org/wiki/LaTeX/Footnotes_and_Margin_Notes#Margin_Notes
\RequirePackage{marginnote}
\newcommand*{\OQsymbol}{\textsc{oq}}
\newcommand*{\OQ}{\marginnote{\OQsymbol}}
\newcommand*{\TODOsymbol}{\textsc{todo}}
\newcommand*{\TODO}{\marginnote{\TODOsymbol}}
% Because ✔ isn't getting printed and it's taking me too long to make it work.
\newcommand*{\done}{\textsc{done}}
% Credits: https://tex.stackexchange.com/a/21229/195421
\RequirePackage{amsthm}
\theoremstyle{definition}
\newtheorem{example}{Example}[section]
\newtheorem{definition}{Definition}[section]
\newenvironment*{LCRow}{%
\vspace{\baselineskip}\noindent
}{}
\newcommand*{\LearningCurve}[1]{\includegraphics[width=0.33\textwidth]{#1}}
% \newcommand*{\LearningCurve}[1]{\noindent\texttt{#1}\newline}
% Credits: https://tex.stackexchange.com/a/44062/195421
\newcommand*{\zkref}[1]{\ignorespaces}
\newcommand*{\task}[1]{#1}
\newcommand*{\Term}[1]{\underline{#1}}
\newcommand*{\Response}{\textit{Response:}}
\newcommand*{\HX}[1]{\ensuremath{\mathit{HX^{#1}}}}
\newcommand*{\X}[1]{\ensuremath{\mathit{X^{#1}}}}
\newcommand*{\Xpa}{\ensuremath{\mathit{X_{\text{\textsc{pa}}}}}}
\newcommand*{\code}[1]{\texttt{#1}}
\DeclareMathOperator{\Amplify}{Amplify}
\newcommand*{\AmpHp}{\ensuremath{\Amplify^{H'}\!\!(\Xpa)}}
\newcommand*{\Overfail}{\href{https://github.com/rmoehn/farlamp/blob/master/build/overfail2.pdf}{Overseer
failures in SupAmp and ReAmp}}
\newcommand*{\SupampReamp}{\href{https://github.com/rmoehn/farlamp/blob/master/build/supamp-reamp.pdf}{How to turn
SupAmp into ReAmp?}}
\newcommand*{\FarlampRepo}{\href{https://github.com/rmoehn/farlamp/}{home page of
the Farlamp repository}}
\newcommand*{\AmplificationRepo}{\href{https://github.com/rmoehn/amplification}{GitHub:
rmoehn/amplification}}
% \DeclareSectionCommand[%
% afterskip=-1em,
% beforeskip=3.25ex plus 1ex minus .2ex, afterskip=-1em,
% level=4,
% indent=0pt,
% font={\scfamily},
% tocindent=7em,
% tocnumwidth=4.1em,
% toclevel=4,
% tocstyle=section,
% counterwithin=subsubsection
% ]{picparagraph}
\newcommand*{\Obs}{\vspace{-\baselineskip}\paragraph{Observation}}
\newcommand*{\Disc}{\vspace{-\baselineskip}\paragraph{Discussion}}
\newcommand*{\blx@nowarnpolyglossia}{\relax}
% Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
\RequirePackage{polyglossia}
\setmainlanguage[variant=british]{english}
\RequirePackage[english=british]{csquotes}
\MakeAutoQuote{‘}{’}
\MakeAutoQuote*{“}{”}
\RequirePackage[
style=authoryear-comp,
maxcitenames=1,
seconds=true,
date=year,
urldate=iso
]{biblatex}
% Credits: https://tex.stackexchange.com/a/126245/195421
\makeatletter
\DeclareCiteCommand{\fullcite}
{\defcounter{maxnames}{\blx@maxbibnames}%
\usebibmacro{prenote}}
{\usedriver
{\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\makeatother
\newcommand*{\annotitem}[1]{\addtocategory{annotated}{#1}\paragraph{\fullcite{#1}}}