2023-10-18 12:54:50 +00:00
|
|
|
% !TeX TS-program =
|
|
|
|
% !TeX spellcheck = en_DK
|
|
|
|
% !TeX encoding = UTF-8
|
|
|
|
% !TeX root = main.tex
|
|
|
|
|
2017-06-17 23:52:22 +00:00
|
|
|
% Latex Packages
|
2023-10-18 08:58:28 +00:00
|
|
|
\usepackage{amsmath,amssymb} % math things.
|
|
|
|
\usepackage{array}
|
|
|
|
\usepackage[english]{babel}
|
|
|
|
\usepackage{blindtext}
|
|
|
|
\usepackage{caption}
|
|
|
|
\usepackage{chngcntr}
|
|
|
|
\usepackage{color} % makes custom color codes available.
|
|
|
|
\usepackage[showisoZ]{datetime2} % more options for time formatting.
|
|
|
|
\usepackage{dblfnote} % https://tex.stackexchange.com/a/8180
|
|
|
|
\usepackage{enumitem} % makes available changes to lists.
|
|
|
|
\usepackage{epigraph} % used to style quotes
|
|
|
|
\usepackage{expdlist}
|
|
|
|
\usepackage{fancybox} % styling of boxes.
|
|
|
|
\usepackage{fancyhdr}
|
|
|
|
\usepackage{float}
|
2017-05-23 09:01:04 +00:00
|
|
|
\usepackage[T1]{fontenc}
|
2023-10-18 08:58:28 +00:00
|
|
|
\usepackage{fourier}
|
2017-05-23 09:01:04 +00:00
|
|
|
\usepackage{geometry}
|
2023-11-25 20:30:14 +00:00
|
|
|
\usepackage[toc,acronym,nomain]{glossaries} % Load the package with the acronym option
|
2023-10-18 12:56:32 +00:00
|
|
|
\usepackage{glossaries-extra}
|
2017-05-23 09:01:04 +00:00
|
|
|
\usepackage{graphicx}
|
2023-10-18 08:58:28 +00:00
|
|
|
\usepackage[unicode=false,colorlinks=true,linkcolor=darkgray,citecolor=darkgray,filecolor=darkgray,urlcolor=darkgray]{hyperref} % https://en.wikibooks.org/wiki/LaTeX/Hyperlinks
|
|
|
|
\usepackage{inconsolata}
|
|
|
|
\usepackage[utf8]{inputenc}
|
|
|
|
\usepackage{lipsum}
|
|
|
|
\usepackage{listings}
|
|
|
|
\usepackage{lmodern}
|
|
|
|
\usepackage{makecell}
|
|
|
|
\usepackage[toc]{multitoc}
|
2017-09-18 20:39:24 +00:00
|
|
|
\usepackage[numbers,square,sectionbib,comma,nonamebreak,elide]{natbib} % used with layout for bibliography section.
|
2023-10-18 08:58:28 +00:00
|
|
|
\usepackage{parskip}
|
2017-05-26 12:16:09 +00:00
|
|
|
\usepackage{soul}
|
2017-05-30 13:26:58 +00:00
|
|
|
\usepackage{textcomp}
|
2023-10-18 12:56:47 +00:00
|
|
|
\usepackage[usenames,dvipsnames,svgnames]{xcolor} % makes custom color codes available. MUST for some reason be above tikzsymbols.
|
2023-10-18 08:58:28 +00:00
|
|
|
\usepackage{tikzsymbols} % http://ctan.math.utah.edu/ctan/tex-archive/graphics/pgf/contrib/tikzsymbols/tikzsymbols.pdf
|
|
|
|
\usepackage{titlepic}
|
2017-05-31 14:11:03 +00:00
|
|
|
\usepackage{titling} % makes available \thetitle \theauthor \thedate
|
2023-10-18 08:58:28 +00:00
|
|
|
\usepackage[nottoc]{tocbibind}
|
|
|
|
\usepackage{transparent}
|
|
|
|
\usepackage{url} % cmd \url.
|
|
|
|
\usepackage{varwidth}
|
|
|
|
\usepackage{wrapfig}
|
2017-05-25 22:53:37 +00:00
|
|
|
|
2017-05-23 09:01:04 +00:00
|
|
|
|
2017-06-17 23:52:22 +00:00
|
|
|
\renewcommand*{\multicolumntoc}{3} % https://tex.stackexchange.com/a/6455
|
|
|
|
|
|
|
|
|
|
|
|
\newcounter{qcounter}
|
|
|
|
|
|
|
|
|
2017-06-06 08:11:17 +00:00
|
|
|
\catcode`\_=12
|
|
|
|
|
|
|
|
|
2017-06-07 10:32:30 +00:00
|
|
|
% styles list is available at
|
|
|
|
% https://www.sharelatex.com/learn/Natbib_bibliography_styles
|
|
|
|
\bibliographystyle{unsrtnat}
|
2017-05-23 09:01:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
% Path where images are located relative
|
|
|
|
% to the file main.tex
|
|
|
|
\graphicspath{{img/}{figures/}}
|
|
|
|
|
|
|
|
|
|
|
|
% In which order to look after images in
|
|
|
|
% declared graphicspath{}'s
|
|
|
|
% 1. Low-quality JPG
|
|
|
|
% 2. Med-quality PNG
|
|
|
|
% 3. High-quality PDF
|
2017-05-24 22:36:41 +00:00
|
|
|
\DeclareGraphicsExtensions{.jpg,.png,.pdf}
|
2017-05-23 09:01:04 +00:00
|
|
|
|
2017-05-25 22:53:37 +00:00
|
|
|
|
|
|
|
\fancypagestyle{fancybook}{%
|
|
|
|
\fancyhf{}%
|
|
|
|
% Note the ## here. It's required because \fancypagestyle is making a macro (\ps@fancybook).
|
|
|
|
% If we just wrote #1, TeX would think that it's the argument to \ps@fancybook, but
|
|
|
|
% \ps@fancybook doesn't take any arguments, so TeX would complain with an error message.
|
|
|
|
% You are not expected to understand this.
|
|
|
|
\renewcommand*{\sectionmark}[1]{ \markright{\thesection\ ##1} }%
|
|
|
|
\renewcommand*{\chaptermark}[1]{ \markboth{\chaptername\ \thechapter: ##1}{} }%
|
2023-10-18 08:58:10 +00:00
|
|
|
% Increase the length of the header such that the folios
|
2017-05-25 22:53:37 +00:00
|
|
|
% (typography jargon for page numbers) move into the margin
|
|
|
|
\fancyhfoffset[LE]{6mm}% slightly less than 0.25in
|
|
|
|
\fancyhfoffset[RO]{6mm}%
|
|
|
|
% Put some space and a vertical bar between the folio and the rest of the header
|
2017-06-10 13:40:31 +00:00
|
|
|
\fancyhead[LE]{\color{Black}\thepage\color{Gray}\hskip3mm\vrule\hskip3mm\leftmark}%
|
2017-06-10 16:49:06 +00:00
|
|
|
\fancyhead[RE]{\color{Gray}{\tiny Generated \utccurrenttime}}%
|
2017-06-10 13:40:31 +00:00
|
|
|
\fancyhead[RO]{\color{Gray}\rightmark\hskip3mm\vrule\hskip3mm\color{Black}\thepage}%
|
2017-06-10 16:49:06 +00:00
|
|
|
\fancyhead[LO]{\color{Gray}{\tiny \theauthor}}%
|
2017-05-25 22:53:37 +00:00
|
|
|
}
|
|
|
|
\pagestyle{fancybook}
|
2017-05-23 09:01:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
% Use the roman numeric system for pagenumbers
|
2017-06-10 13:39:58 +00:00
|
|
|
\pagenumbering{Roman}
|
2017-05-23 09:01:04 +00:00
|
|
|
|
2017-05-25 22:53:37 +00:00
|
|
|
|
2017-05-30 13:08:37 +00:00
|
|
|
\input{commands} % Import user-defined commands
|
2017-05-23 10:52:35 +00:00
|
|
|
|
2017-05-25 22:53:37 +00:00
|
|
|
|
2017-05-23 10:52:35 +00:00
|
|
|
\input{layout/color} %user-defined colors
|
2017-05-23 09:01:04 +00:00
|
|
|
|
2017-05-25 22:53:37 +00:00
|
|
|
|
2017-06-08 18:02:24 +00:00
|
|
|
% https://tex.stackexchange.com/a/174553
|
2017-05-23 10:52:35 +00:00
|
|
|
\lstdefinestyle{mystyle}{
|
2017-06-08 18:02:24 +00:00
|
|
|
language=cisco,
|
2017-05-30 17:50:42 +00:00
|
|
|
backgroundcolor=\color{backcolour},
|
|
|
|
commentstyle=\color{codegreen}\ttfamily,
|
2017-05-23 10:52:35 +00:00
|
|
|
keywordstyle=\color{magenta},
|
|
|
|
numberstyle=\tiny\color{codegray},
|
|
|
|
stringstyle=\color{codepurple},
|
2017-05-30 17:50:42 +00:00
|
|
|
basicstyle=\scriptsize\ttfamily,
|
|
|
|
breakatwhitespace=false,
|
|
|
|
breaklines=true,
|
|
|
|
captionpos=b,
|
|
|
|
keepspaces=true,
|
|
|
|
numbers=left,
|
|
|
|
showspaces=false,
|
2017-05-23 10:52:35 +00:00
|
|
|
showstringspaces=false,
|
2017-05-30 17:50:42 +00:00
|
|
|
showtabs=false,
|
|
|
|
tabsize=4,
|
2017-06-08 18:02:24 +00:00
|
|
|
abovecaptionskip=1em,
|
2017-05-31 20:31:14 +00:00
|
|
|
aboveskip=1em,
|
2017-06-08 18:02:24 +00:00
|
|
|
belowcaptionskip=1em,
|
2017-05-30 17:50:42 +00:00
|
|
|
belowskip=3em,
|
|
|
|
upquote=true,
|
|
|
|
numbersep=8pt,
|
|
|
|
rulecolor=\color{black},
|
2017-05-23 10:52:35 +00:00
|
|
|
}
|
2017-05-30 20:25:51 +00:00
|
|
|
|
|
|
|
|
2017-05-30 19:51:17 +00:00
|
|
|
\lstdefinestyle{plaintxt}{
|
|
|
|
language=TeX,
|
|
|
|
numbers=none,
|
|
|
|
frame=trBL,
|
|
|
|
frameround=fttt,
|
|
|
|
backgroundcolor=\color{white},
|
2017-05-30 20:25:51 +00:00
|
|
|
boxpos=c,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
\lstdefinelanguage{cisco}{
|
|
|
|
keywords={
|
|
|
|
end,
|
2017-06-04 17:16:36 +00:00
|
|
|
interface,
|
2017-05-30 20:25:51 +00:00
|
|
|
ip,
|
|
|
|
line,
|
|
|
|
no,
|
|
|
|
router,
|
|
|
|
show,
|
|
|
|
shutdown,
|
|
|
|
vlan,
|
2017-06-06 05:13:58 +00:00
|
|
|
vrf
|
2017-05-30 20:25:51 +00:00
|
|
|
},
|
|
|
|
keywordstyle=\color{blue}\bfseries,
|
|
|
|
ndkeywords={
|
|
|
|
addr,
|
|
|
|
address,
|
2017-06-08 20:09:43 +00:00
|
|
|
deny,
|
2017-06-04 17:16:36 +00:00
|
|
|
enable,
|
|
|
|
fa,
|
|
|
|
FastEthernet,
|
|
|
|
gi,
|
2017-05-30 20:25:51 +00:00
|
|
|
GigabitEthernet,
|
2017-06-08 20:09:43 +00:00
|
|
|
permit,
|
|
|
|
remark,
|
2017-06-04 17:16:36 +00:00
|
|
|
run,
|
2017-06-06 05:13:58 +00:00
|
|
|
view,
|
2017-05-30 20:25:51 +00:00
|
|
|
},
|
|
|
|
ndkeywordstyle=\color{darkgray}\bfseries,
|
|
|
|
identifierstyle=\color{black},
|
|
|
|
sensitive=false,
|
|
|
|
comment=[l]{!},
|
|
|
|
commentstyle=\color{purple}\ttfamily,
|
|
|
|
stringstyle=\color{red}\ttfamily,
|
2017-06-08 18:02:24 +00:00
|
|
|
caption=\lstname,
|
|
|
|
tabsize=1,
|
|
|
|
captionpos=t,
|
|
|
|
showstringspaces=false,
|
|
|
|
breaklines=true,
|
2023-10-18 08:58:10 +00:00
|
|
|
breakatwhitespace=true,
|
2017-05-30 19:51:17 +00:00
|
|
|
}
|
2017-05-24 22:36:41 +00:00
|
|
|
|
2017-05-25 22:53:37 +00:00
|
|
|
|
2017-11-26 11:16:24 +00:00
|
|
|
\geometry{a4paper,margin=1.25cm}
|
|
|
|
\setlength{\columnsep}{1.25cm} %space between columns
|
2017-05-24 22:36:41 +00:00
|
|
|
\setlength{\headheight}{15pt}
|
2017-06-24 11:06:46 +00:00
|
|
|
\setlength{\footnotesep}{1mm} %space between footnotes:
|
2017-11-26 11:16:24 +00:00
|
|
|
\setlength{\skip\footins}{1.25cm} %space between the text body and the footnotes
|
2017-05-24 22:36:41 +00:00
|
|
|
\setlist[itemize,1]{leftmargin=\dimexpr 26pt-.2cm}
|
|
|
|
\setlist[itemize,2]{leftmargin=\dimexpr 26pt-.3cm}
|
2017-05-30 13:08:37 +00:00
|
|
|
\lstset{style=mystyle} %apply lst styling
|
|
|
|
|
|
|
|
|
|
|
|
\renewcommand{\familydefault}{\sfdefault}
|
|
|
|
|
|
|
|
|
|
|
|
\DeclareCaptionFormat{myformat}{%
|
|
|
|
% #1: label (e.g. "Table 1")
|
|
|
|
% #2: separator (e.g. ": ")
|
|
|
|
% #3: caption text
|
|
|
|
\begin{varwidth}{\linewidth}%
|
|
|
|
\centering
|
|
|
|
#1#2#3%
|
|
|
|
\end{varwidth}%
|
|
|
|
}
|
|
|
|
\captionsetup{format=myformat}% global activation
|
|
|
|
|
|
|
|
|
|
|
|
\newlist{todolist}{itemize}{2}
|
|
|
|
\setlist[todolist]{label=$\square$}
|
|
|
|
\usepackage{pifont}
|
|
|
|
\newcommand{\cmark}{\ding{51}}%
|
|
|
|
\newcommand{\xmark}{\ding{55}}%
|
|
|
|
\newcommand{\done}{\rlap{$\square$}{\raisebox{2pt}{\large\hspace{1pt}\cmark}}%
|
|
|
|
\hspace{-2.5pt}}
|
|
|
|
\newcommand{\wontfix}{\rlap{$\square$}{\large\hspace{1pt}\xmark}}
|
2017-05-30 14:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
\renewcommand\theadalign{cb}
|
|
|
|
\renewcommand\theadfont{\bfseries}
|
|
|
|
\renewcommand\theadgape{\Gape[4pt]}
|
2017-05-31 14:11:03 +00:00
|
|
|
\renewcommand\cellgape{\Gape[4pt]}
|
|
|
|
|
|
|
|
\def\tsq#1{\textquotesingle{#1}}
|
|
|
|
\def\bsq#1{%both single quotes
|
|
|
|
\lq{#1}\rq}
|
2017-06-01 14:20:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
\makeglossaries % Generate the glossary
|
|
|
|
|
|
|
|
|
2017-06-01 15:25:44 +00:00
|
|
|
\renewcommand*{\acronymname}{Abbreviations}
|
2017-06-04 17:16:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
% Do not reset counter for footnotes at all
|
|
|
|
% through the document from start to finish.
|
2017-06-07 10:32:30 +00:00
|
|
|
% https://tex.stackexchange.com/a/10449
|
2017-06-04 17:16:36 +00:00
|
|
|
\counterwithout{footnote}{chapter}
|
|
|
|
|
|
|
|
|
2017-06-07 10:32:30 +00:00
|
|
|
% Do not reset counter for figures at all
|
|
|
|
% through the document from start to finish.
|
|
|
|
% https://tex.stackexchange.com/a/28334
|
|
|
|
\counterwithout{figure}{chapter}
|
|
|
|
|
|
|
|
|
2017-06-10 13:41:05 +00:00
|
|
|
% Do not reset counter for tables at all
|
|
|
|
% through the document from start to finish.
|
|
|
|
% https://tex.stackexchange.com/a/28020
|
|
|
|
\counterwithout{table}{chapter}
|
|
|
|
|
|
|
|
|
2017-06-04 17:16:36 +00:00
|
|
|
% Set footnote numeration
|
|
|
|
% https://www.sharelatex.com/learn/Footnotes
|
|
|
|
% This command need to be run AFTER
|
|
|
|
% "\counterwithout{footnote}{chapter}" for the
|
|
|
|
% changes to be able to take effect.
|
|
|
|
\renewcommand{\thefootnote}{\arabic{footnote}}
|
2017-06-06 11:10:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
\addtolength{\skip\footins}{2pt} % vertical space between rule and main text
|
|
|
|
|
|
|
|
|
|
|
|
% https://tex.stackexchange.com/a/141975
|
|
|
|
\let\origfootnote\footnote % font size of footnotes; changes \footnotesize command only inside footnotes!
|
|
|
|
\renewcommand{\footnote}[1]{%
|
2023-10-18 08:58:10 +00:00
|
|
|
\renewcommand\footnotesize\scriptsize % here there is scriptsize in footnotes (example)
|
2017-06-06 11:10:33 +00:00
|
|
|
\origfootnote{#1}}
|
2017-06-24 11:03:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
% https://tex.stackexchange.com/a/146312
|
|
|
|
\newlist{mylist}{enumerate*}{1}
|
|
|
|
\setlist[mylist]{label={\alph*)},font={\color{red!25!black}\bfseries}}
|