aboutsummaryrefslogtreecommitdiff
path: root/tex/src/preamble-project.tex
blob: 3d0c0aedb721efdc94d241681b1dda36311a851c (plain)
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
%% Import graphics
\usepackage{graphicx}

%% IEEEtran V1.6 and later pre-defines the format of the cite.sty package
%% \cite{} output to follow that of the IEEE.
\usepackage{cite}

%% To have multiple bibliographies (one for the main paper, one for the
%% appendix). With 'multibib' we need to specify a name for each
%% bibliography.
\usepackage{multibib}
\newcites{appendix}{Bibliography}

%% For the `\url' command.
\usepackage{url}

%% No need to load xcolor, its included by others below (it conflicts with
%% the listings package.
%\usepackage{xcolor}

%% To have links.
\usepackage[
  colorlinks,
  urlcolor=gray,
  citecolor=gray,
  linkcolor=gray,
  linktocpage]{hyperref}
\renewcommand\UrlFont{\rmfamily}

%% To have typewriter font
\usepackage{courier}

%% To have bold monospace
%\usepackage[scaled=0.85]{beramono}
\usepackage{inconsolata}

%% To display codes.
\usepackage{listings}
\usepackage{etoolbox}
\input{listings-bash.prf}
\lstset{
  frame=lines,
  numbers=none,
  language=bash,
  commentstyle=\color{gray},
  abovecaptionskip=0mm,
  belowcaptionskip=0mm,
  keywordstyle=\mdseries,
  basicstyle=\small\ttfamily\color{blue!35!black},
}
\makeatletter
\preto\lstlisting{\def\@captype{table}}
\lst@AddToHook{OnEmptyLine}{\vspace{-0.5\baselineskip}}
\pretocmd\lst@makecaption{\noindent{\rule{\linewidth}{1pt}}}{}{}
\makeatother




%% Maneage feature for highlighting changes they can be set activated
%% directly on the command-line with the '--highlight-new' or
%% '--highlight-notes' options
\ifdefined\highlightnew
\newcommand{\new}[1]{\textcolor{green!50!black}{#1}}
\else
\newcommand{\new}[1]{\textcolor{black}{#1}}
\fi

\ifdefined\highlightnotes
\newcommand{\tonote}[1]{\textcolor{red!60!black}{[#1]}}
\else
\newcommand{\tonote}[1]{{}}
\fi




%% Custom macros
\newcommand{\inlinecode}[1]{\textcolor{blue!35!black}{\texttt{#1}}}

\newcommand\eprint[1]{\href{https://arXiv.org/abs/#1}{{arXiv:#1}}}

\newcommand\doi[1]{\href{https://oadoi.org/#1}{{DOI:#1}}}