Simplify epigraph command usage
[ach-master.git] / src / applied-crypto-hardening.tex
1 %%% LaTeX Template: Two column article
2 %%%
3 %%% Source: http://www.howtotex.com/
4 %%% Feel free to distribute this template, but please keep to referal to http://www.howtotex.com/ here.
5 %%% Date: February 2011
6
7 %%% Preamble
8 \documentclass[ DIV=calc,%
9                                 paper=a4,%
10                                 fontsize=9pt,%
11                                 %onecolumn]{scrartcl}                                           % KOMA-article class
12                                 onecolumn]{scrreprt}                                            % KOMA-article class
13                                 %onecolumn]{report}                                             % KOMA-article class
14
15 \usepackage{lipsum}                                                                                                     % Package to create dummy text
16
17 \usepackage[utf8]{inputenc}
18
19 \usepackage[english]{babel}                                                                             % English language/hyphenation
20 \usepackage[protrusion=true,expansion=true]{microtype}                          % Better typography
21 \usepackage{amsmath,amsfonts,amsthm}                                    % Math packages
22 \usepackage[pdftex]{graphicx}                                           % Enable pdflatex 
23 %\usepackage[svgnames]{xcolor}                                                                  % Enabling colors by their 'svgnames'
24 \usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption}        % Custom captions under/above floats
25 \usepackage{epstopdf}                                                                                           % Converts .eps to .pdf
26 \usepackage{subfig}                                                                                                     % Subfigures
27 \usepackage{fix-cm}                                                                                                     % Custom fontsizes
28
29 \usepackage[usenames,dvipsnames]{color}
30 \usepackage{float}
31 \usepackage{subfig}
32 %\usepackage{tikz}
33 \usepackage{acronym}
34 \usepackage{amsthm}
35 \usepackage{fancyvrb}
36 \usepackage{listings}
37 \usepackage{longtable}
38
39 %% Epigraph patching
40 \usepackage{epigraph}
41 % \epigraphsize{\small}% Default
42 \setlength\epigraphwidth{8cm}
43 \setlength\epigraphrule{0pt}
44 \usepackage{etoolbox}
45 \providecommand{\epitextfont}{\itshape}
46 \providecommand{\episourcefont}{}
47 \makeatletter
48 \patchcmd{\@epitext}{#1}{{\epitextfont #1}}{}{}
49 \patchcmd{\@episource}{#1}{{\episourcefont --- #1}}{}{}
50 \makeatother
51
52
53
54 \usepackage{gitinfo}
55
56 % custom changes:
57 \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
58 \usepackage{placeins}
59 \usepackage{draftwatermark}
60
61 % human tables
62 \usepackage{booktabs}
63 \renewcommand{\arraystretch}{1.25}
64
65 % side box
66 \usepackage{wrapfig}
67 %\usepackage{tcolorbox}
68 \newenvironment{WrapText}[1][r]
69   {\wrapfigure{#1}{0.5\textwidth}\tcolorbox}
70   {\endtcolorbox\endwrapfigure}
71
72 % Add text symbols
73 \usepackage{pifont}
74 \newcommand{\yes}{\textcolor{green}{\ding{51}}}
75 \newcommand{\no}{\textcolor{red}{\ding{55}}}
76
77
78 % Colours
79 \definecolor{green}{RGB}{32,113,10}
80 \definecolor{orange}{RGB}{251,111,16}
81 \definecolor{red}{RGB}{247,56,0}
82 \definecolor{blue}{RGB}{0,28,128}
83 \definecolor{lightgreen}{RGB}{187,218,216}
84 \definecolor{intersectgreen}{RGB}{103,133,155}
85 \definecolor{darkblue}{RGB}{76,87,117}
86
87 \bibliographystyle{alphalink}
88
89 \definecolor{Brown}{cmyk}{0,0.81,1,0.60}
90 \definecolor{OliveGreen}{cmyk}{0.64,0,0.95,0.40}
91 \definecolor{CadetBlue}{cmyk}{0.62,0.57,0.23,0}
92 \definecolor{lightlightgray}{gray}{0.9}
93
94 \usepackage{titlesec}
95 %\allsectionsfont{\color{darkblue}\itshape\underline}
96 %\sectionfont{\color{darkblue}\itshape\selectfont}
97 %\subsectionfont{\color{darkblue}\itshape\selectfont}
98 \renewcommand*\sectfont{\sffamily\color{darkblue}\mdseries}
99 %\renewcommand*\sectfont{\rmfamily\mdseries\itshape}
100
101 % changes font encoding to T1
102 \usepackage[T1]{fontenc}
103 \usepackage{textcomp}
104
105 % make font Open Sans
106 \usepackage[defaultsans]{opensans}
107
108 % makes default font sans-serif
109  \renewcommand{\familydefault}{\sfdefault}
110
111 \lstset{
112 %language=Bash,                             % Code langugage
113 basicstyle=\ttfamily,                   % Code font, Examples: \footnotesize, \ttfamily
114 keywordstyle=\color{OliveGreen},        % Keywords font ('*' = uppercase)
115 commentstyle=\color{gray},              % Comments font
116 %numbers=left,                           % Line nums position
117 %numberstyle=\tiny,                      % Line-numbers fonts
118 %stepnumber=1,                           % Step between two line-numbers
119 %numbersep=5pt,                          % How far are line-numbers from code
120 backgroundcolor=\color{lightlightgray}, % Choose background color
121 frame=none,                             % A frame around the code
122 tabsize=2,                              % Default tab size
123 captionpos=b,                           % Caption-position = bottom
124 breaklines=true,                        % Automatic line breaking?
125 breakatwhitespace=false,                % Automatic breaks only at whitespace?
126 showspaces=false,                       % Dont make spaces visible
127 showtabs=false,                         % Dont make tabls visible
128 columns=fixed,                          % Column format
129 morekeywords={__global__, __device__},  % 
130 }
131
132
133 %% \todo{} command.
134 % Outputs red TODOs in the document. Requires \usepackage{color}.
135 % Usage: \todo{Document the TODO command.}
136 % Comment out second line to disable.
137 \newcommand{\todo}[1]{}
138 \renewcommand{\todo}[1]{{\color{Red} TODO: {#1}}}
139
140
141 %%% Custom sectioning (sectsty package)
142 \usepackage{sectsty}    
143 \allsectionsfont{\bfseries}
144 \sectionfont{\bfseries}
145
146 % use more of the page
147 \usepackage{fullpage}
148
149 %%% Headers and footers
150 \usepackage{fancyhdr}                                                           % Needed to define custom headers/footers
151         \pagestyle{fancy}                                                               % Enabling the custom headers/footers
152 \usepackage{lastpage}   
153
154 % Header (empty)
155 \lhead{}
156 \chead{}
157 \rhead{}
158 % Footer (you may change this to your own needs)
159 \lfoot{\footnotesize Applied Crypto Hardening \textbullet ~Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName}
160 \cfoot{}
161 \rfoot{\footnotesize page \thepage\ of \pageref{LastPage}}      % "Page 1 of 2"
162 \renewcommand{\headrulewidth}{0.0pt}
163 \renewcommand{\footrulewidth}{0.4pt}
164
165
166 % customized spaces between text and footnotes
167 \setlength{\skip\footins}{3\baselineskip}
168
169
170 %%% Creating an initial of the very first character of the content
171 \usepackage{lettrine}
172 \newcommand{\initial}[1]{%
173      \lettrine[lines=3,lhang=0.3,nindent=0em]{
174                                 \color{darkblue}
175                                 {\textsf{#1}}}{}}
176
177 %%% Title, author and date metadata
178 \usepackage{titling}                                                                                            % For custom titles
179
180 %defines horizontal rule for title
181 \newcommand{\HorRule}{\color{darkblue}\rule{\linewidth}{1pt}}
182
183 % no indent on first line of a paragraph
184 \setlength{\parindent}{0cm}
185
186 %tell TeX where to look for graphics/logos
187 \graphicspath{ {/img/} }
188
189 % hyperref needs to be the last package you load.
190 \usepackage[pdftex,breaklinks,colorlinks,linkcolor=darkblue,citecolor=blue,urlcolor=blue]{hyperref}
191
192
193 %%% Begin document
194 \begin{document}
195
196 %\maketitle
197
198
199 \thispagestyle{fancy}                   % Enabling the custom headers/footers for the first page 
200 % The first character should be within \initial{}
201 %\initial{H}\textbf{ere is some sample text to show the initial in the introductory paragraph of this template article. The color and lineheight of the initial can be modified in the preamble of this document.}
202
203 % new title page
204 \input{./title.tex}
205
206
207
208 \input{neboltai}
209 \input{acknowledgements}
210 \input{abstract}
211 \tableofcontents
212 \chapter{Introduction}
213 \label{chapter:Intro}
214 \input{whoshouldread}
215 \input{related_publications}
216 \input{howtoread}
217 \input{disclaimer}
218 \input{motivation}
219 \input{methods}
220 %%
221 \chapter{Practical recommendations}
222 \label{chapter:PracticalSettings}
223 \input{practical_settings}
224 %%
225 \chapter{Theory}
226 %\epigraph{``Number theorists are like lotus-eaters - having tasted this food they can never give it up.''}{Leopold Kronecker}
227 \label{chapter:Theory}
228 \input{theory}
229 \chapter{Appendix}
230 \input{tools}
231 \input{links}
232 \input{suggested_reading}
233 \input{cipher_suite_names}
234 \input{further_research}
235 %\input{reviewers}
236 \input{bib}
237
238 \end{document}