-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgap-civl.sty
237 lines (209 loc) · 7.35 KB
/
gap-civl.sty
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{gap-civl}[CIVL GAP package]
\RequirePackage{fontspec} % set input encoding (not needed with XeLaTeX)
\RequirePackage{tabularx}
\RequirePackage{multicol}
\RequirePackage{multirow}
\RequirePackage{xcolor}
\RequirePackage{import}
\RequirePackage{hyperref}
\RequirePackage{graphicx}
\RequirePackage{booktabs}
\RequirePackage[left=20mm, right=20mm, top=20mm, bottom=20mm]{geometry}
\RequirePackage{amsmath}
% SEE: https://tex.stackexchange.com/questions/100371/checkmark-error-in-amsmath
\RequirePackage{amssymb}
\RequirePackage{array}
\RequirePackage[titles]{tocloft}
\RequirePackage{tikz}
\RequirePackage{tikz-cd}
\RequirePackage{tkz-euclide}
\usetikzlibrary{shapes.geometric, arrows, plotmarks}
\RequirePackage{pgfplots}
\usepgfplotslibrary{units}
\pgfplotsset{compat=1.9, table/search path={csv}}
\usetkzobj{all}
\RequirePackage[printwatermark]{xwatermark}
\RequirePackage{import}
\RequirePackage{tcolorbox}
\RequirePackage{subfiles}
\RequirePackage{appendix}
\RequirePackage{listings}
% SEE: https://texfaq.org/FAQ-repfootnote
\RequirePackage{footmisc}
% SEE: http://stackoverflow.com/questions/3244803/latex-add-clickable-links-to-a-section-subsection-with-a-pdf-document
\hypersetup{
colorlinks = true, % Colours links instead of ugly boxes
urlcolor = blue, % Colour for external hyperlinks
linkcolor = blue, % Colour of internal links
citecolor = red % Colour of citations
}
%%% HEADERS & FOOTERS
\usepackage{fancyhdr} % This should be set AFTER setting up the page geometry
\usepackage{datetime}
\pagestyle{fancy} % options: empty , plain , fancy
\renewcommand{\footrulewidth}{0.4pt}
\lhead{}\chead{}\rhead{}
\lfoot{}\cfoot{}\rfoot{\thesubsection-\thepage}
% SEE: http://texblog.org/2007/11/07/headerfooter-in-latex-with-fancyhdr/
\fancypagestyle{gen}{
\chead{CIVL GAP – Centralised Cross-Country Competition Scoring for Hang-Gliding and Paragliding - 1\textsuperscript{st} May 2018}
\lfoot{2018 Edition}
\cfoot{\date{\texttt{{\ddmmyyyydate\today} \currenttime}}}
}
\providecommand{\HUGE}{\Huge}% if not using memoir
% SEE: https://tex.stackexchange.com/questions/23957/how-to-set-font-to-arial-throughout-the-entire-document
\setmainfont{Arial}
% SEE: https://tex.stackexchange.com/questions/313860/how-to-have-the-arctan2-atan2-function-in-latex
\DeclareMathOperator{\atantwo}{atan2}
% SEE: https://www.sharelatex.com/learn/Paragraph_formatting#!#Paragraph_spacing
\setlength{\parindent}{0em}
\setlength{\parskip}{1em}
\definecolor{pgc}{RGB}{250,191,143}
\definecolor{hgc}{RGB}{146,205,220}
% SEE: https://tex.stackexchange.com/questions/89166/centering-in-tabularx-and-x-columns
% SEE: https://tex.stackexchange.com/questions/12703/how-to-create-fixed-width-table-columns-with-text-raggedright-centered-raggedlef
\newcolumntype{R}{>{\raggedleft\arraybackslash}X}
\newenvironment{pg}
{
\begin{tcolorbox}[colback=pgc]
}
{
\end{tcolorbox}
\marginpar{\includegraphics[scale=0.3]{img/pg.png}\hfill}
}
\newenvironment{hg}
{
\begin{tcolorbox}[colback=hgc]
}
{
\end{tcolorbox}
\marginpar{\includegraphics[scale=0.6]{img/hg.png}\hfill}
}
% SEE: https://tex.stackexchange.com/questions/33401/a-version-of-colorbox-that-works-inside-math-environments
\newcommand{\pgh}[2][pgc]{\mathchoice%
{\colorbox{#1}{$\displaystyle#2$}}%
{\colorbox{#1}{$\textstyle#2$}}%
{\colorbox{#1}{$\scriptstyle#2$}}%
{\colorbox{#1}{$\scriptscriptstyle#2$}}}%
\newcommand{\hgh}[2][hgc]{\mathchoice%
{\colorbox{#1}{$\displaystyle#2$}}%
{\colorbox{#1}{$\textstyle#2$}}%
{\colorbox{#1}{$\scriptstyle#2$}}%
{\colorbox{#1}{$\scriptscriptstyle#2$}}}%
% SEE: https://tex.stackexchange.com/questions/69215/reduce-the-spacing-of-the-table-of-contents
\setlength{\cftbeforesecskip}{-1.4ex}
\setlength{\cftbeforesubsecskip}{-1.4ex}
\setlength{\cftbeforesubsubsecskip}{-1.5ex}
% SEE: https://www.sharelatex.com/project/52205bbce77a8bec1415bf38
\tikzstyle{startstop} =
[ rectangle
, rounded corners
, minimum width=3cm
, minimum height=1cm
, text centered
, draw=black
, fill=red!30
]
\tikzstyle{io} =
[ trapezium
, trapezium left angle=70
, trapezium right angle=110
, minimum width=3cm
, minimum height=1cm
, text centered
, draw=black
, fill=blue!30
]
\tikzstyle{process} =
[ rectangle
, minimum width=3cm
, minimum height=1cm
, text centered
, draw=black
, fill=orange!30
]
\tikzstyle{decision} =
[ rectangle
, minimum width=3cm
, minimum height=1cm
, text centered
, draw=black
, fill=green!30
]
\tikzstyle{rank} =
[ rectangle
, minimum width=3cm
, minimum height=1cm
, text centered
, draw=black
, fill=yellow!30
]
\tikzstyle{arrow} =
[ thick
, ->
, >=stealth
]
\definecolor{csv}{rgb}{0.858, 0.188, 0.478}
% SEE: https://gist.github.com/sebald/3130827
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\definecolor{gray}{rgb}{0.4,0.4,0.4}
\definecolor{darkblue}{rgb}{0.0,0.0,0.6}
\definecolor{lightblue}{rgb}{0.0,0.0,0.9}
\definecolor{cyan}{rgb}{0.0,0.6,0.6}
\definecolor{darkred}{rgb}{0.6,0.0,0.0}
\lstset{
basicstyle=\ttfamily\footnotesize,
columns=fullflexible,
showstringspaces=false,
numbers=left, % where to put the line-numbers
numberstyle=\tiny\color{gray}, % the style that is used for the line-numbers
stepnumber=1,
numbersep=5pt, % how far the line-numbers are from the code
backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}
showspaces=false, % show spaces adding particular underscores
showstringspaces=false, % underline spaces within strings
showtabs=false, % show tabs within strings adding particular underscores
frame=none, % adds a frame around the code
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. commens (green here))
tabsize=2, % sets default tabsize to 2 spaces
captionpos=b, % sets the caption-position to bottom
breaklines=true, % sets automatic line breaking
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
title=\lstname, % show the filename of files included with \lstinputlisting;
% also try caption instead of title
commentstyle=\color{gray}\upshape
}
\lstdefinelanguage{XML}
{
morestring=[s][\color{mauve}]{"}{"},
morestring=[s][\color{black}]{>}{<},
morecomment=[s]{<?}{?>},
morecomment=[s][\color{dkgreen}]{<!--}{-->},
stringstyle=\color{black},
identifierstyle=\color{lightblue},
keywordstyle=\color{red},
morekeywords=
{ xmlns, xsi, noNamespaceSchemaLocation, type, id, x, y, source, target, version
, tool, transRef, roleRef, objective, eventually
, name, lat, lon, radius, location, utc_offset
, min_dist, nom_dist, nom_time, nom_goal
, use_distance_points
, use_time_points
, use_departure_points
, use_leading_points
, use_arrival_position_points
, use_arrival_time_points
, ss, es, goal, groundstart
, tracklog_folder, tracklog_filename
} % list your attributes here
}
% NOTE: Color within a listing using delimiters.
% SEE: https://tex.stackexchange.com/questions/115547/textcolor-within-lstlisting
\lstdefinestyle{base}{
basicstyle=\ttfamily\footnotesize\color{black},
moredelim=**[is][\color{blue}]{<@}{<@},
moredelim=**[is][\color{red}]{@>}{@>},
}