more space between text and footnotes and other minor layout improvements
[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
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 \makeatletter
46 \patchcmd{\epigraph}{\@epitext{#1}}{\itshape\@epitext{#1}}{}{}
47 \makeatother
48
49
50
51 \usepackage{gitinfo}
52
53 % custom changes:
54 \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
55 \usepackage{placeins}
56 \usepackage{draftwatermark}
57
58 % human tables
59 \usepackage{booktabs}
60 \renewcommand{\arraystretch}{1.25}
61
62 % side box
63 \usepackage{wrapfig}
64 %\usepackage{tcolorbox}
65 \newenvironment{WrapText}[1][r]
66   {\wrapfigure{#1}{0.5\textwidth}\tcolorbox}
67   {\endtcolorbox\endwrapfigure}
68
69 % Add text symbols
70 \usepackage{pifont}
71 \newcommand{\yes}{\textcolor{green}{\ding{51}}}
72 \newcommand{\no}{\textcolor{red}{\ding{55}}}
73
74
75 % Colours
76 \definecolor{green}{RGB}{32,113,10}
77 \definecolor{orange}{RGB}{251,111,16}
78 \definecolor{red}{RGB}{247,56,0}
79 \definecolor{blue}{RGB}{0,28,128}
80 \definecolor{lightgreen}{RGB}{187,218,216}
81 \definecolor{intersectgreen}{RGB}{103,133,155}
82 \definecolor{darkblue}{RGB}{76,87,117}
83
84 \bibliographystyle{alphalink}
85
86 \definecolor{Brown}{cmyk}{0,0.81,1,0.60}
87 \definecolor{OliveGreen}{cmyk}{0.64,0,0.95,0.40}
88 \definecolor{CadetBlue}{cmyk}{0.62,0.57,0.23,0}
89 \definecolor{lightlightgray}{gray}{0.9}
90
91 \usepackage{titlesec}
92 %\allsectionsfont{\color{darkblue}\itshape\underline}
93 %\sectionfont{\color{darkblue}\itshape\selectfont}
94 %\subsectionfont{\color{darkblue}\itshape\selectfont}
95 \renewcommand*\sectfont{\sffamily\color{darkblue}\mdseries}
96 %\renewcommand*\sectfont{\rmfamily\mdseries\itshape}
97
98
99 % makes default font sans-serif
100  \renewcommand{\familydefault}{\sfdefault}
101
102 % make font Open Sans
103 \usepackage[defaultsans]{opensans}
104
105 % changes font encoding to T1 -> to get the right text quotes for code strings
106 %\usepackage[T1]{fontenc}
107 \usepackage[TS1,T1]{fontenc}
108 \usepackage{textcomp}
109 \usepackage{upquote}
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}