graphicx better detects pdftex itself
[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 patching
45 \usepackage{epigraph}
46 % \epigraphsize{\small}% Default
47 \setlength\epigraphwidth{8cm}
48 \setlength\epigraphrule{0pt}
49 \usepackage{etoolbox}
50 \providecommand{\epitextfont}{\itshape}
51 \providecommand{\episourcefont}{}
52 \makeatletter
53 \patchcmd{\@epitext}{#1}{{\epitextfont #1}}{}{}
54 \patchcmd{\@episource}{#1}{{\episourcefont --- #1}}{}{}
55 \makeatother
56
57
58
59 \usepackage{gitinfo}
60
61 % custom changes:
62 \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
63 \usepackage{placeins}
64 \usepackage{draftwatermark}
65
66 % human tables
67 \usepackage{booktabs}
68 \renewcommand{\arraystretch}{1.25}
69
70 % side box
71 \usepackage{wrapfig}
72 %\usepackage{tcolorbox}
73 \newenvironment{WrapText}[1][r]
74   {\wrapfigure{#1}{0.5\textwidth}\tcolorbox}
75   {\endtcolorbox\endwrapfigure}
76
77 % Add text symbols
78 \usepackage{pifont}
79 \newcommand{\yes}{\textcolor{green}{\ding{51}}}
80 \newcommand{\no}{\textcolor{red}{\ding{55}}}
81
82
83 % Colours
84 \definecolor{green}{RGB}{32,113,10}
85 \definecolor{orange}{RGB}{251,111,16}
86 \definecolor{red}{RGB}{247,56,0}
87 \definecolor{blue}{RGB}{0,28,128}
88 \definecolor{lightgreen}{RGB}{187,218,216}
89 \definecolor{intersectgreen}{RGB}{103,133,155}
90 \definecolor{darkblue}{RGB}{76,87,117}
91
92 \bibliographystyle{alphalink}
93
94 \definecolor{Brown}{cmyk}{0,0.81,1,0.60}
95 \definecolor{OliveGreen}{cmyk}{0.64,0,0.95,0.40}
96 \definecolor{CadetBlue}{cmyk}{0.62,0.57,0.23,0}
97 \definecolor{lightlightgray}{gray}{0.9}
98
99 \usepackage{titlesec}
100 %\allsectionsfont{\color{darkblue}\itshape\underline}
101 %\sectionfont{\color{darkblue}\itshape\selectfont}
102 %\subsectionfont{\color{darkblue}\itshape\selectfont}
103 \renewcommand*\sectfont{\sffamily\color{darkblue}\mdseries}
104 %\renewcommand*\sectfont{\rmfamily\mdseries\itshape}
105
106 % changes font encoding to T1
107 \usepackage[T1]{fontenc}
108 \usepackage{textcomp}
109
110 % make font Open Sans
111 \usepackage[defaultsans]{opensans}
112
113 % makes default font sans-serif
114  \renewcommand{\familydefault}{\sfdefault}
115
116 %
117 % Fonts are loaded, now is the right time for mictorype.
118 \microtypesetup{stretch=9,shrink=15,step=3,tracking=smallcaps,letterspace=75}
119
120
121 \lstset{
122 %language=Bash,                             % Code langugage
123 basicstyle=\ttfamily,                   % Code font, Examples: \footnotesize, \ttfamily
124 keywordstyle=\color{OliveGreen},        % Keywords font ('*' = uppercase)
125 commentstyle=\color{gray},              % Comments font
126 %numbers=left,                           % Line nums position
127 %numberstyle=\tiny,                      % Line-numbers fonts
128 %stepnumber=1,                           % Step between two line-numbers
129 %numbersep=5pt,                          % How far are line-numbers from code
130 backgroundcolor=\color{lightlightgray}, % Choose background color
131 frame=none,                             % A frame around the code
132 tabsize=2,                              % Default tab size
133 captionpos=b,                           % Caption-position = bottom
134 breaklines=true,                        % Automatic line breaking?
135 breakatwhitespace=false,                % Automatic breaks only at whitespace?
136 showspaces=false,                       % Dont make spaces visible
137 showtabs=false,                         % Dont make tabls visible
138 columns=fixed,                          % Column format
139 morekeywords={__global__, __device__},  % 
140 }
141
142
143 %% \todo{} command.
144 % Outputs red TODOs in the document. Requires \usepackage{color}.
145 % Usage: \todo{Document the TODO command.}
146 % Comment out second line to disable.
147 \newcommand{\todo}[1]{}
148 \renewcommand{\todo}[1]{{\color{Red} TODO: {#1}}}
149
150
151 %%% Custom sectioning (sectsty package)
152 \usepackage{sectsty}    
153 \allsectionsfont{\bfseries}
154 \sectionfont{\bfseries}
155
156 % use more of the page
157 \usepackage{fullpage}
158
159 %%% Headers and footers
160 \usepackage{fancyhdr}                                                           % Needed to define custom headers/footers
161         \pagestyle{fancy}                                                               % Enabling the custom headers/footers
162 \usepackage{lastpage}   
163
164 % Header (empty)
165 \lhead{}
166 \chead{}
167 \rhead{}
168 % Footer (you may change this to your own needs)
169 \lfoot{\footnotesize Applied Crypto Hardening \textbullet ~Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName}
170 \cfoot{}
171 \rfoot{\footnotesize page \thepage\ of \pageref{LastPage}}      % "Page 1 of 2"
172 \renewcommand{\headrulewidth}{0.0pt}
173 \renewcommand{\footrulewidth}{0.4pt}
174
175
176 % customized spaces between text and footnotes
177 \setlength{\skip\footins}{3\baselineskip}
178
179
180 %%% Creating an initial of the very first character of the content
181 \usepackage{lettrine}
182 \newcommand{\initial}[1]{%
183      \lettrine[lines=3,lhang=0.3,nindent=0em]{
184                                 \color{darkblue}
185                                 {\textsf{#1}}}{}}
186
187 %%% Title, author and date metadata
188 \usepackage{titling}                                                                                            % For custom titles
189
190 %defines horizontal rule for title
191 \newcommand{\HorRule}{\color{darkblue}\rule{\linewidth}{1pt}}
192
193 % no indent on first line of a paragraph
194 \setlength{\parindent}{0cm}
195
196 %tell TeX where to look for graphics/logos
197 \graphicspath{ {/img/} }
198
199 % hyperref needs to be the last package you load.
200 \usepackage[pdftex,breaklinks,colorlinks,linkcolor=darkblue,citecolor=blue,urlcolor=blue]{hyperref}
201
202 % Package to create dummy text
203 \usepackage{blindtext}
204
205
206 %%% Begin document
207 \begin{document}
208
209 %\maketitle
210
211
212 \thispagestyle{fancy}                   % Enabling the custom headers/footers for the first page 
213 % The first character should be within \initial{}
214 %\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.}
215
216 % new title page
217 \input{./title.tex}
218
219
220
221 \input{neboltai}
222 \input{acknowledgements}
223 \input{abstract}
224 \tableofcontents
225 \chapter{Introduction}
226 \label{chapter:Intro}
227 \input{whoshouldread}
228 \input{related_publications}
229 \input{howtoread}
230 \input{disclaimer}
231 \input{motivation}
232 \input{methods}
233 %%
234 \chapter{Practical recommendations}
235 \label{chapter:PracticalSettings}
236 \input{practical_settings}
237 %%
238 \chapter{Theory}
239 %\epigraph{``Number theorists are like lotus-eaters - having tasted this food they can never give it up.''}{Leopold Kronecker}
240 \label{chapter:Theory}
241 \input{theory}
242 \chapter{Appendix}
243 \input{tools}
244 \input{links}
245 \input{suggested_reading}
246 \input{cipher_suite_names}
247 \input{further_research}
248 %\input{reviewers}
249 \input{bib}
250
251 \end{document}
252 %%% Local Variables: 
253 %%% mode: latex
254 %%% TeX-master: t
255 %%% End: