-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tex
166 lines (136 loc) · 4.63 KB
/
main.tex
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
% Work Term Report
\documentclass[12pt]{article}
% Packages
\usepackage[dvipsnames,svgnames,x11names]{xcolor} % additional colours
\usepackage[indent=40pt]{parskip} % space between paragraphs
\usepackage{framed} % creates boxes
\usepackage{graphicx} % allows images to be imported
\usepackage{listings} % code blocks
\usepackage{geometry} % page layout parameters
\usepackage{indentfirst} % indent the first paragraph after sections
\usepackage{tabularx} % better tables
\usepackage{booktabs} % better tables
\usepackage{titlesec} % allows for additional section titles
\usepackage[backend=biber,style=ieee]{biblatex} % default to biber and IEEE
\usepackage{pdfpages} % include PDF pages within the report
\usepackage{amsmath,amssymb} % math package
\usepackage{xurl} % better links
% hyperref should appear as the last package
\usepackage{hyperref} % clickable links for toc, references, and external links
% glossaries needs to appear after hyperref for clickable links
\usepackage[xindy]{glossaries} % generated glossary
% Package Settings
\lstdefinestyle{CustomCodeStyling}{
backgroundcolor=\color{Honeydew2},
numberstyle=\tiny\color{gray},
stringstyle=\color{DarkGreen},
basicstyle=\ttfamily\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\lstset{style=CustomCodeStyling} % code block styling
\geometry{a4paper,margin=1in} % a4paper and smaller margins
\hypersetup{
breaklinks=true,
colorlinks=true,
linkcolor=Blue, % internal links
citecolor=Green, % citation links
urlcolor=Red, % external links
pdftitle={Work Term Report},
} % link styles
% Bibliography
\addbibresource{bibliography.bib}
% Glossary
\input{glossary.tex}
\makeglossaries
% Commands
\renewcommand{\contentsname}{Table of Contents} % update toc heading
\renewcommand{\lstlistlistingname}{List of Listings} % update listings heading
\setcounter{secnumdepth}{4} % allows \paragraph{} to be a section
\setcounter{tocdepth}{4} % allows \paragraph{} to be included in toc
% add \paragraph{} section title format
\titleformat{\paragraph}{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\providecommand{\blankline}[1]{\rule{#1}{0.5pt}} % a blank line
% command to number appendices
\providecommand{\StartAppendices}{
\newpage
\newcounter{AppendixCounter}
\renewcommand{\thepage}{\Alph{AppendixCounter} \textendash\ \arabic{page}}
}
% command to add appendices to toc
\providecommand{\Appendix}[1]{
\newpage
\stepcounter{AppendixCounter}
\setcounter{page}{1}
\section*{Appendix \Alph{AppendixCounter} - #1}
\phantomsection
\addcontentsline{toc}{section}{Appendix \Alph{AppendixCounter} - #1}
}
% Document
\begin{document}
% TITLE PAGE
\pagenumbering{gobble} % remove page number
\include{sections/title.tex}
% PROFESSIONAL REFLECTION PAGE
\newpage
\include{sections/professional-reflection.tex}
% TABLE OF CONTENTS
\newpage
\addtocontents{toc}{~\hfill\textbf{Page}\par} % add Page to right side of toc
\tableofcontents % table of contents
% TECHNICAL
\newpage
\pagenumbering{roman} % add roman (i, ii, iii, v) page numbers
\phantomsection
\addcontentsline{toc}{section}{\listfigurename}
\addtocontents{lof}{~\hfill\textbf{Page} \par} % add Page to right side of lof
\listoffigures % list of figures
\newpage
\phantomsection
\addcontentsline{toc}{section}{\lstlistlistingname}
\addtocontents{lol}{~\hfill\textbf{Page} \par} % add Page to right side of lol
\lstlistoflistings % list of listings
\newpage
\phantomsection
\addcontentsline{toc}{section}{\listtablename}
\addtocontents{lot}{~\hfill\textbf{Page} \par} % add Page to right side of lot
\listoftables % list of tables
% ADMIN
\newpage
\phantomsection
\addcontentsline{toc}{section}{Executive Summary}
\include{sections/executive-summary.tex}
\newpage
\phantomsection
\addcontentsline{toc}{section}{Glossary}
\printglossaries
% REPORT
\newpage
\pagenumbering{arabic} % add arabic (1, 2, 3, 4) page numbers
\include{sections/introduction.tex}
\include{sections/discussion.tex}
\include{sections/conclusion.tex}
\include{sections/recommendation.tex}
\phantomsection
\addcontentsline{toc}{section}{Acknowledgements} % add to toc
\include{sections/acknowledgments.tex}
% REFERENCES
\newpage
\phantomsection
\renewcommand*{\UrlFont}{\rmfamily} % font format for URLs
\printbibliography[heading=bibintoc,title={References}]
% APPENDICES
\StartAppendices
\include{sections/appendix.tex}
% LETTER
\includepdf[pages=1]{letter.pdf}
\end{document}