remove dependency on epigraph. KOMA-script can do that already
[ach-master.git] / src / applied-crypto-hardening.tex
1 %%%
2 %%% Applied Crypto Hardening
3 %%% bettercrypto.org
4 %%%
5 %%%% Based on:
6 %%% LaTeX Template: Two column article
7 %%%
8 %%% Source: http://www.howtotex.com/
9 %%% Feel free to distribute this template, but please keep to referal to http://www.howtotex.com/ here.
10 %%% Date: February 2011
11 %%%%
12
13 %%% Preamble
14 \documentclass[ DIV=calc,%
15                                 paper=a4,%
16                                 fontsize=9pt,%
17                                 %onecolumn]{scrartcl}                                           % KOMA-article class
18                                 onecolumn]{scrreprt}                                            % KOMA-article class
19                                 %onecolumn]{report}                                             % KOMA-article class
20
21
22 \usepackage[utf8]{inputenc}
23
24 \usepackage[english]{babel}                                                                             % English language/hyphenation
25 \usepackage[final,babel=true]{microtype}[2011/08/18]
26 \usepackage{amsmath,amsfonts,amsthm}                                    % Math packages
27 \usepackage{graphicx}
28 %\usepackage[svgnames]{xcolor}                                                                  % Enabling colors by their 'svgnames'
29 \usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption}        % Custom captions under/above floats
30 \usepackage{epstopdf}                                                                                           % Converts .eps to .pdf
31 \usepackage{subfig}                                                                                                     % Subfigures
32 \usepackage{fix-cm}                                                                                                     % Custom fontsizes
33
34 \usepackage[usenames,dvipsnames]{color}
35 \usepackage{float}
36 \usepackage{subfig}
37 %\usepackage{tikz}
38 \usepackage{acronym}
39 \usepackage{amsthm}
40 \usepackage{fancyvrb}
41 \usepackage{listings}
42 \usepackage{longtable}
43
44 % Epigraph / dictum
45 \renewcommand*{\dictumrule}{}
46 \renewcommand*{\dictumauthorformat}[1]{--- #1}
47 \newcommand*{\epigraph}[3][]{\dictum[#3]{#2}\bigskip}
48 \addtokomafont{dictumtext}{\itshape}
49 \setkomafont{dictumauthor}{\normalfont}
50 \renewcommand{\dictumwidth}{8cm}
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 %
112 % Fonts are loaded, now is the right time for mictorype.
113 \microtypesetup{stretch=9,shrink=15,step=3,tracking=smallcaps,letterspace=75}
114
115
116 \lstset{
117 %language=Bash,                             % Code langugage
118 basicstyle=\ttfamily,                   % Code font, Examples: \footnotesize, \ttfamily
119 keywordstyle=\color{OliveGreen},        % Keywords font ('*' = uppercase)
120 commentstyle=\color{gray},              % Comments font
121 %numbers=left,                           % Line nums position
122 %numberstyle=\tiny,                      % Line-numbers fonts
123 %stepnumber=1,                           % Step between two line-numbers
124 %numbersep=5pt,                          % How far are line-numbers from code
125 backgroundcolor=\color{lightlightgray}, % Choose background color
126 frame=none,                             % A frame around the code
127 tabsize=2,                              % Default tab size
128 captionpos=b,                           % Caption-position = bottom
129 breaklines=true,                        % Automatic line breaking?
130 breakatwhitespace=false,                % Automatic breaks only at whitespace?
131 showspaces=false,                       % Dont make spaces visible
132 showtabs=false,                         % Dont make tabls visible
133 columns=fixed,                          % Column format
134 morekeywords={__global__, __device__},  % 
135 }
136
137
138 %% \todo{} command.
139 % Outputs red TODOs in the document. Requires \usepackage{color}.
140 % Usage: \todo{Document the TODO command.}
141 % Comment out second line to disable.
142 \newcommand{\todo}[1]{}
143 \renewcommand{\todo}[1]{{\color{Red} TODO: {#1}}}
144
145
146 %%% Custom sectioning (sectsty package)
147 \usepackage{sectsty}    
148 \allsectionsfont{\bfseries}
149 \sectionfont{\bfseries}
150
151 % use more of the page
152 \usepackage{fullpage}
153
154 %%% Headers and footers
155 \usepackage{fancyhdr}                                                           % Needed to define custom headers/footers
156         \pagestyle{fancy}                                                               % Enabling the custom headers/footers
157 \usepackage{lastpage}   
158
159 % Header (empty)
160 \lhead{}
161 \chead{}
162 \rhead{}
163 % Footer (you may change this to your own needs)
164 \lfoot{\footnotesize Applied Crypto Hardening \textbullet ~Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName}
165 \cfoot{}
166 \rfoot{\footnotesize page \thepage\ of \pageref{LastPage}}      % "Page 1 of 2"
167 \renewcommand{\headrulewidth}{0.0pt}
168 \renewcommand{\footrulewidth}{0.4pt}
169
170
171 % customized spaces between text and footnotes
172 \setlength{\skip\footins}{3\baselineskip}
173
174
175 %%% Creating an initial of the very first character of the content
176 \usepackage{lettrine}
177 \newcommand{\initial}[1]{%
178      \lettrine[lines=3,lhang=0.3,nindent=0em]{
179                                 \color{darkblue}
180                                 {\textsf{#1}}}{}}
181
182 %%% Title, author and date metadata
183 \usepackage{titling}                                                                                            % For custom titles
184
185 %defines horizontal rule for title
186 \newcommand{\HorRule}{\color{darkblue}\rule{\linewidth}{1pt}}
187
188 % no indent on first line of a paragraph
189 \setlength{\parindent}{0cm}
190
191 %tell TeX where to look for graphics/logos
192 \graphicspath{ {/img/} }
193
194 % hyperref needs to be the last package you load.
195 \usepackage[pdftex,breaklinks,colorlinks,linkcolor=darkblue,citecolor=blue,urlcolor=blue]{hyperref}
196
197 % Package to create dummy text
198 \usepackage{blindtext}
199
200
201 %%% Begin document
202 \begin{document}
203
204 %\maketitle
205
206
207 \thispagestyle{fancy}                   % Enabling the custom headers/footers for the first page 
208 % The first character should be within \initial{}
209 %\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.}
210
211 % new title page
212 \input{./title.tex}
213
214
215
216 \input{neboltai}
217 \input{acknowledgements}
218 \input{abstract}
219 \tableofcontents
220 \chapter{Introduction}
221 \label{chapter:Intro}
222 \input{whoshouldread}
223 \input{related_publications}
224 \input{howtoread}
225 \input{disclaimer}
226 \input{motivation}
227 \input{methods}
228 %%
229 \chapter{Practical recommendations}
230 \label{chapter:PracticalSettings}
231 \input{practical_settings}
232 %%
233 \chapter{Theory}
234 %\epigraph{``Number theorists are like lotus-eaters - having tasted this food they can never give it up.''}{Leopold Kronecker}
235 \label{chapter:Theory}
236 \input{theory}
237 \chapter{Appendix}
238 \input{tools}
239 \input{links}
240 \input{suggested_reading}
241 \input{cipher_suite_names}
242 \input{further_research}
243 %\input{reviewers}
244 \input{bib}
245
246 \end{document}
247 %%% Local Variables: 
248 %%% mode: latex
249 %%% TeX-master: t
250 %%% End: