Fix fonts to use T1, which is the correct way nowadays
[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 % changes font encoding to T1
99 \usepackage[T1]{fontenc}
100 \usepackage{textcomp}
101
102 % make font Open Sans
103 \usepackage[defaultsans]{opensans}
104
105 % makes default font sans-serif
106  \renewcommand{\familydefault}{\sfdefault}
107
108 \lstset{
109 %language=Bash,                             % Code langugage
110 basicstyle=\ttfamily,                   % Code font, Examples: \footnotesize, \ttfamily
111 keywordstyle=\color{OliveGreen},        % Keywords font ('*' = uppercase)
112 commentstyle=\color{gray},              % Comments font
113 %numbers=left,                           % Line nums position
114 %numberstyle=\tiny,                      % Line-numbers fonts
115 %stepnumber=1,                           % Step between two line-numbers
116 %numbersep=5pt,                          % How far are line-numbers from code
117 backgroundcolor=\color{lightlightgray}, % Choose background color
118 frame=none,                             % A frame around the code
119 tabsize=2,                              % Default tab size
120 captionpos=b,                           % Caption-position = bottom
121 breaklines=true,                        % Automatic line breaking?
122 breakatwhitespace=false,                % Automatic breaks only at whitespace?
123 showspaces=false,                       % Dont make spaces visible
124 showtabs=false,                         % Dont make tabls visible
125 columns=fixed,                          % Column format
126 morekeywords={__global__, __device__},  % 
127 }
128
129
130 %% \todo{} command.
131 % Outputs red TODOs in the document. Requires \usepackage{color}.
132 % Usage: \todo{Document the TODO command.}
133 % Comment out second line to disable.
134 \newcommand{\todo}[1]{}
135 \renewcommand{\todo}[1]{{\color{Red} TODO: {#1}}}
136
137
138 %%% Custom sectioning (sectsty package)
139 \usepackage{sectsty}    
140 \allsectionsfont{\bfseries}
141 \sectionfont{\bfseries}
142
143 % use more of the page
144 \usepackage{fullpage}
145
146 %%% Headers and footers
147 \usepackage{fancyhdr}                                                           % Needed to define custom headers/footers
148         \pagestyle{fancy}                                                               % Enabling the custom headers/footers
149 \usepackage{lastpage}   
150
151 % Header (empty)
152 \lhead{}
153 \chead{}
154 \rhead{}
155 % Footer (you may change this to your own needs)
156 \lfoot{\footnotesize Applied Crypto Hardening \textbullet ~Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName}
157 \cfoot{}
158 \rfoot{\footnotesize page \thepage\ of \pageref{LastPage}}      % "Page 1 of 2"
159 \renewcommand{\headrulewidth}{0.0pt}
160 \renewcommand{\footrulewidth}{0.4pt}
161
162
163 % customized spaces between text and footnotes
164 \setlength{\skip\footins}{3\baselineskip}
165
166
167 %%% Creating an initial of the very first character of the content
168 \usepackage{lettrine}
169 \newcommand{\initial}[1]{%
170      \lettrine[lines=3,lhang=0.3,nindent=0em]{
171                                 \color{darkblue}
172                                 {\textsf{#1}}}{}}
173
174 %%% Title, author and date metadata
175 \usepackage{titling}                                                                                            % For custom titles
176
177 %defines horizontal rule for title
178 \newcommand{\HorRule}{\color{darkblue}\rule{\linewidth}{1pt}}
179
180 % no indent on first line of a paragraph
181 \setlength{\parindent}{0cm}
182
183 %tell TeX where to look for graphics/logos
184 \graphicspath{ {/img/} }
185
186 % hyperref needs to be the last package you load.
187 \usepackage[pdftex,breaklinks,colorlinks,linkcolor=darkblue,citecolor=blue,urlcolor=blue]{hyperref}
188
189
190 %%% Begin document
191 \begin{document}
192
193 %\maketitle
194
195
196 \thispagestyle{fancy}                   % Enabling the custom headers/footers for the first page 
197 % The first character should be within \initial{}
198 %\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.}
199
200 % new title page
201 \input{./title.tex}
202
203
204
205 \input{neboltai}
206 \input{acknowledgements}
207 \input{abstract}
208 \tableofcontents
209 \chapter{Introduction}
210 \label{chapter:Intro}
211 \input{whoshouldread}
212 \input{related_publications}
213 \input{howtoread}
214 \input{disclaimer}
215 \input{motivation}
216 \input{methods}
217 %%
218 \chapter{Practical recommendations}
219 \label{chapter:PracticalSettings}
220 \input{practical_settings}
221 %%
222 \chapter{Theory}
223 %\epigraph{``Number theorists are like lotus-eaters - having tasted this food they can never give it up.''}{-- Leopold Kronecker}
224 \label{chapter:Theory}
225 \input{theory}
226 \chapter{Appendix}
227 \input{tools}
228 \input{links}
229 \input{suggested_reading}
230 \input{cipher_suite_names}
231 \input{further_research}
232 %\input{reviewers}
233 \input{bib}
234
235 \end{document}