aboutsummaryrefslogtreecommitdiff
path: root/tex/src/preamble-project.tex
blob: 438248584faa5968e795059ada6329e69a732782 (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
%% Settings specific to this project (beyond the journal's style).
%
%% Copyright (C) 2020 Mohammad Akhlaghi <mohammad@akhlaghi.org>
%
%% This LaTeX file is part of Maneage. Maneage 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.
%
%% Maneage 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. See <http://www.gnu.org/licenses/>.





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

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

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