-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.tex
130 lines (109 loc) · 3.14 KB
/
setup.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
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{graphics/}}
% language
\usepackage[vietnamese,main=english]{babel}
% color setting
\usepackage[dvipsnames]{xcolor}
\definecolor{halfgray}{gray}{0.55}
\definecolor{GLEgreen}{HTML}{31524C}
%\pagecolor{Gray}
%% dvipsnames color palette: https://www.overleaf.com/learn/latex/Using_colours_in_LaTeX
% cross reference :)
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=MidnightBlue,
citecolor=Periwinkle,
urlcolor=BlueViolet,
}
% footnote colour
\renewcommand\thefootnote{\textcolor{RoyalPurple}{\arabic{footnote}}}
% The following sets margins
\usepackage[a4paper,left=2.5cm, right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry}
% Set line spacing between paragraphs and no indentation
\usepackage[parfill]{parskip}
\setlength{\parskip}{0.3cm}
% line space
\usepackage{setspace}
\linespread{1.3}
% page layout
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[RE,LO]{\rightmark}
\fancyhead[RO,LE]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot{}
\fancyfoot[RE,LO]{\thepage}
\fancyfoot[RO,LE]{\leftmark}
% font
\usepackage{times}
% prevent hyphenating words
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
% title spacing
\usepackage[newparttoc]{titlesec}
% parts
\titleclass{\part}{top}
\titleformat{\part}[display]
{\huge\bfseries\centering}{\vspace{5cm}\color{CadetBlue}\partname~\thepart}{0pt}{}
\titlespacing*{\part}{0pt}{40pt}{40pt}
%chapters
\titleformat{\chapter}[display]{\huge}{\color{CadetBlue}\raggedleft{Chapter \thechapter}}{10pt}{\titlerule}
%para
\titleformat{\paragraph}[runin]{\small\itshape\bfseries}{\theparagraph}{1em}{}
\titlespacing\paragraph{1pt}{0pt}{7pt}
% table of content format
\usepackage{titletoc}
%part
\titlecontents{part}% <section-type>
[0pt]% <left>
{\addvspace{0.5cm}\large\bfseries}% <above-code>
{Part \thecontentslabel\quad}% <numbered-entry-format>
{}% <numberless-entry-format>
{\hfill\contentspage}% <filler-page-format>
%chapter
\titlecontents{chapter}% <section-type>
[0pt]% <left>
{\bfseries}% <above-code>
{\chaptername\ \thecontentslabel:\quad}% <numbered-entry-format>
{}% <numberless-entry-format>
{\hfill\contentspage}% <filler-page-format>
%section
\titlecontents{section}
[5em]
{}
{\contentslabel{3.2em}}
{}
{\titlerule*[1pc]{.}\contentspage}%
% subsection
\titlecontents{subsection}
[7em]
{}
{\contentslabel{3.2em}}
{}
{\titlerule*[0.5pc]{.}\contentspage}%
% glossary
\usepackage[stylemods=longextra,automake]{glossaries-extra}
\setglossarystyle{longragged3colheader}
%TC:ignore
\input{glossary.tex}
% These Commands create the label style for tables, figures and equations.
\usepackage[labelfont={small,bf}, textfont=small]{caption}
\captionsetup{labelformat=simple, labelsep=period, belowskip=-5pt}
\newcommand\num{\addtocounter{equation}{1}\tag{\theequation}}
\renewcommand{\theequation}{\arabic{equation}}
% allows subtables and subfigures
\usepackage{subcaption}
% allows text wrapping in tables
\usepackage{tabulary}
\usepackage{multicol}
% reference
\usepackage{natbib}
% maths symbols
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[cal=pxtx]{mathalfa}