aboutsummaryrefslogtreecommitdiff
path: root/tex/src/preamble-project.tex
blob: d5a30afe47e01d1a866d5b591ee8d252666917e6 (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
%% Necessary macros for this project.
%%
%% These are a set of packages that have been commonly necessary in most
%% LaTeX usages. However, if any are not needed in your work, please feel
%% free to remove them.
%
%% Copyright (C) 2018-2022 Mohammad Akhlaghi <mohammad@akhlaghi.org>
%% Copyright (C) YYYY Your Name <your@email.address>
%
%% This file is free software: you can redistribute it and/or modify it
%% under the terms of the GNU General Public License as published by the
%% Free Software Foundation, either version 3 of the License, or (at your
%% option) any later version.
%
%% This file is distributed in the hope that it will be useful, but WITHOUT
%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
%% FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
%% for more details.
%
%% You should have received a copy of the GNU General Public License along
%% with this file.  If not, see <http://www.gnu.org/licenses/>.





%% Packages you may need in your project
%% -------------------------------------
%
%% Here you can add/remove any custom LaTeX package that you need for this
%% project that aren't provided by the journal's style.

%% For loading images into the output (with '\includegraphics').
\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}

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

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

%% To have multiple bibliographies (one for the main paper, one for the
%% appendix). With 'multibib' we need to specify a name for each
%% bibliography. But this is only necessary when the appendices are to be
%% included in the final paper. When the supplement should be separate, it
%% will be treated as a completely independent build, so '\citeappendix'
%% should just be mapped to '\cite'.
\ifdefined\separatesupplement
\newcommand{\citeappendix}{\cite}
\else
\usepackage{multibib}
\newcites{appendix}{Bibliography}
\fi

%% 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

%% 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}}}

%% Import Maneage template for PGFPlots.
\input{tex/src/preamble-pgfplots.tex}