-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreamble.tex
More file actions
132 lines (112 loc) · 4.1 KB
/
preamble.tex
File metadata and controls
132 lines (112 loc) · 4.1 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
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
% !TEX root = ./main.tex
\documentclass[11pt,a4paper]{report}
% Language setup, Polish is used for the first template page
\usepackage[utf8]{inputenc} % Use UTF-8 encoding for input files
\usepackage[T1]{fontenc} % Set the font encoding to T1, required with babel to properly compile without errors
% \usepackage{polski} % Support for Polish language, disabled as it causes Chapter to be translated to Rozdział
\usepackage[polish, english]{babel} % Adapts LaTeX to Polish typographical rules, the currency and comma decimal point are changed
% Math symbols and libraries, they are likely to remain unused in this thesis
\usepackage{amssymb} % Math symbols
\usepackage{amsmath} % Typesetting math formulas
\usepackage{systeme} % Typesetting systems of equations
\usepackage{titlesec} % Dot after section Number
% Text formatting
\usepackage{textcomp} % Provides additional text symbols such as currency symbols and European language characters
\usepackage{float} % Improved interface for floating objects
\usepackage[margin=3.5cm]{geometry} % Margins
% Graphics
\usepackage{graphicx} % Allows including images in the document
\usepackage{subfigure} % Allows creating subfigures within the document
% Support for multiple files
\usepackage{subfiles}
% Fixing references
\usepackage{xr}
% Listings
\usepackage{listings} % Code and bash listings
\usepackage{xcolor} % Color definitions
% Tables
\usepackage[table]{xcolor}
% Found in https://tex.stackexchange.com/questions/84400/table-layout-with-tabularx-column-widths-502525
\usepackage{tabularray}
\usepackage{tabularx} % for more flexible tables
% SVG support
\usepackage[inkscapearea=page, inkscapepath=build, inkscapelatex=false]{svg}
% Handling unicode that minted cannot
% \usepackage{verbatim}
% \usepackage{pmboxdraw}
% \usepackage{sverb}
% Colors
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\definecolor{lightgray}{gray}{0.9}
% Code highlighting
% kpswhich used to fix local paths
\usepackage{caption} % Used for code captions
\usepackage{chngcntr} % More caption customization
\usepackage[outputdir=build, newfloat]{minted}
% \newenvironment{code}{\captionsetup{type=listing}}{}
\SetupFloatingEnvironment{listing}{name=Source Code}
\newcommand{\makemintedenvs}[1]{%
\newminted{bash}{#1}%
\newmintedfile{bash}{#1}%
\newminted{jsx}{#1}%
\newmintedfile{jsx}{#1}%
\newminted{text}{#1}%
\newmintedfile{text}{#1}%
\newminted{html}{#1}%
\newmintedfile{html}{#1}%
\newminted{js}{#1}%
\newmintedfile{js}{#1}%
\newminted{ts}{#1}%
\newmintedfile{ts}{#1}%
\newminted{json}{#1}%
\newmintedfile{json}{#1}%
\newminted{toml}{#1}%
\newmintedfile{toml}{#1}%
\newminted{yaml}{#1}%
\newmintedfile{yaml}{#1}%
\newminted{graphql}{#1}%
\newmintedfile{graphql}{#1}%
}
\makemintedenvs{
fontsize=\footnotesize,
frame=lines,
framesep=3mm,
baselinestretch=1.2,
bgcolor=lightgray,
linenos
}
% Create a new table environment with the desired caption format
\DeclareCaptionLabelFormat{requirement}{Requirement #2}
\newenvironment{requirements-table}[2][H]%
{\renewcommand\thetable{\arabic{table}}%
\captionsetup{labelformat=requirement,labelsep=colon,position=bottom}%
\begin{table}[#1]\captionsetup{labelformat=empty}\caption{}\label{#2}}
{\end{table}}
% Custom commands
\newcommand{\reqtitle}[1]{\emph{#1}\par\medskip\noindent} % Requirement title
% \newcommand{\bashscript}[3][]{\inputminted[
% fontsize=\footnotesize,
% frame=lines,
% framesep=3mm,
% baselinestretch=1.2,
% bgcolor=lightgray,
% linenos,
% #1
% ]{#2}{#3}}
% Bibliography
\usepackage[
backend=biber,
style=numeric,
sorting=none
]{biblatex} %Imports biblatex package
\usepackage{csquotes} %Needed for biblatex
% Bibliography files
\addbibresource{introduction/introduction.bib}
\addbibresource{modern-network-booting/modern-network-booting.bib}
\addbibresource{architecture/architecture.bib}
\addbibresource{implementation/implementation.bib}
% Graphics path
\graphicspath{{images/}{../images/}}