aboutsummaryrefslogtreecommitdiff
path: root/tex/src/preamble-project.tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex/src/preamble-project.tex')
-rw-r--r--tex/src/preamble-project.tex113
1 files changed, 68 insertions, 45 deletions
diff --git a/tex/src/preamble-project.tex b/tex/src/preamble-project.tex
index 2a3dd0e..7351d83 100644
--- a/tex/src/preamble-project.tex
+++ b/tex/src/preamble-project.tex
@@ -24,52 +24,75 @@
-%% Packages you 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.
-
-% Better than verbatim for displaying typed text.
-\usepackage{alltt}
-
-% For arithmetic opertions within LaTeX
-\usepackage[nomessages]{fp}
-
-%To add a code font to the text:
-\usepackage{courier}
-
-%To add some enumerating styles
-\usepackage{enumerate}
-
-%Including images if necessary
+%% 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. 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}
-
-
-
-%% BibLaTeX or PGFPlots templates
-%% ------------------------------
-%
-%% These are ready-made customizations of these two commonly used packages
-%% that you can use as a template for your own project: BibLaTeX (advanced
-%% bibliography management) or PGFPlots (for drawing plots within LaTeX
-%% directly from tables of data). If you don't use them, you can just
-%% delete these two lines and also delete their files from your branch (to
-%% keep the 'tex/src' directory on your branch clean).
-\input{tex/src/preamble-biblatex.tex}
+%% 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}
-
-
-
-
-
-%% Style of default paper (DELETE IF USING JOURNAL STYLES)
-%% -------------------------------------------------------
-%
-%% This is primarily defined for the default Maneage paper style. So when
-%% you later import your journal's style, delete this line (and these
-%% comments). Also delete the file (to keep your project source branch
-%% clean from files you don't need/use).
-\input{tex/src/preamble-maneage-default-style.tex}