split koma-options off the documentclass
[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 \RequirePackage{fix-cm}
15 \documentclass{scrreprt}
16 \usepackage[utf8]{inputenc}
17
18 \KOMAoptions{paper=a4%
19   ,fontsize=10pt
20   ,DIV=12%
21 }
22
23
24 \usepackage[english]{babel}                                                                             % English language/hyphenation
25 \usepackage[final,babel=true]{microtype}[2011/08/18]
26 \usepackage{graphicx}
27 %\usepackage[svgnames]{xcolor}                                                                  % Enabling colors by their 'svgnames'
28 \usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption}        % Custom captions under/above floats
29 \usepackage{epstopdf}                                                                                           % Converts .eps to .pdf
30 \usepackage{subfig}                                                                                                     % Subfigures
31
32 \usepackage[usenames,dvipsnames]{color}
33 \usepackage{float}
34 \usepackage{subfig}
35 %\usepackage{tikz}
36 \usepackage{acronym}
37 \usepackage{amsthm}
38 \usepackage{fancyvrb}
39 \usepackage{listings}
40 \usepackage{longtable}
41
42 % Epigraph / dictum
43 \renewcommand*{\dictumrule}{}
44 \renewcommand*{\dictumauthorformat}[1]{--- #1}
45 \newcommand*{\epigraph}[3][]{\dictum[#3]{#2}\bigskip}
46 \addtokomafont{dictumtext}{\itshape}
47 \setkomafont{dictumauthor}{\normalfont}
48 \renewcommand{\dictumwidth}{8cm}
49
50
51
52 \usepackage{gitinfo}
53
54 % custom changes:
55 \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
56 \usepackage{placeins}
57 \usepackage{draftwatermark}
58
59 % human tables
60 \usepackage{booktabs}
61 \renewcommand{\arraystretch}{1.25}
62
63 % side box
64 \usepackage{wrapfig}
65 %\usepackage{tcolorbox}
66 \newenvironment{WrapText}[1][r]
67   {\wrapfigure{#1}{0.5\textwidth}\tcolorbox}
68   {\endtcolorbox\endwrapfigure}
69
70 % Add text symbols
71 \usepackage{pifont}
72 \newcommand{\yes}{\textcolor{green}{\ding{51}}}
73 \newcommand{\no}{\textcolor{red}{\ding{55}}}
74
75
76 % Colours
77 \definecolor{green}{RGB}{32,113,10}
78 \definecolor{orange}{RGB}{251,111,16}
79 \definecolor{red}{RGB}{247,56,0}
80 \definecolor{blue}{RGB}{0,28,128}
81 \definecolor{lightgreen}{RGB}{187,218,216}
82 \definecolor{intersectgreen}{RGB}{103,133,155}
83 \definecolor{darkblue}{RGB}{76,87,117}
84
85 \bibliographystyle{alphalink}
86
87 \definecolor{Brown}{cmyk}{0,0.81,1,0.60}
88 \definecolor{OliveGreen}{cmyk}{0.64,0,0.95,0.40}
89 \definecolor{CadetBlue}{cmyk}{0.62,0.57,0.23,0}
90 \definecolor{lightlightgray}{gray}{0.9}
91
92 % changes font encoding to T1
93 \usepackage[T1]{fontenc}
94 \usepackage{textcomp}
95 % For searchable pdfs
96 \input glyphtounicode
97 \pdfgentounicode=1
98
99 % make font Open Sans
100 \usepackage[defaultsans]{opensans}
101
102 % makes default font sans-serif
103  \renewcommand{\familydefault}{\sfdefault}
104
105 %
106 % Fonts are loaded, now is the right time for mictorype.
107 \microtypesetup{stretch=9,shrink=15,step=3,tracking=smallcaps,letterspace=75}
108
109
110 \lstset{
111 %language=Bash,                             % Code langugage
112 basicstyle=\ttfamily,                   % Code font, Examples: \footnotesize, \ttfamily
113 keywordstyle=\color{OliveGreen},        % Keywords font ('*' = uppercase)
114 commentstyle=\color{gray},              % Comments font
115 %numbers=left,                           % Line nums position
116 %numberstyle=\tiny,                      % Line-numbers fonts
117 %stepnumber=1,                           % Step between two line-numbers
118 %numbersep=5pt,                          % How far are line-numbers from code
119 backgroundcolor=\color{lightlightgray}, % Choose background color
120 frame=none,                             % A frame around the code
121 tabsize=2,                              % Default tab size
122 captionpos=b,                           % Caption-position = bottom
123 breaklines=true,                        % Automatic line breaking?
124 breakatwhitespace=false,                % Automatic breaks only at whitespace?
125 showspaces=false,                       % Dont make spaces visible
126 showtabs=false,                         % Dont make tabls visible
127 columns=fixed,                          % Column format
128 morekeywords={__global__, __device__},  % 
129 }
130
131
132 %% \todo{} command.
133 % Outputs red TODOs in the document. Requires \usepackage{color}.
134 % Usage: \todo{Document the TODO command.}
135 % Comment out second line to disable.
136 \newcommand{\todo}[1]{}
137 \renewcommand{\todo}[1]{{\color{Red} TODO: {#1}}}
138
139 \addtokomafont{disposition}{\color{darkblue}\bfseries}
140 % use more of the page
141 %\usepackage{fullpage}
142
143 % Detect if we can use the brand new scrlayer
144 % else use the good old scrpage2
145 \newif\ifscrlayer
146 {\def\tempa#1 v#2 #3!{\ifdim #2pt>3.11pt\relax \global\scrlayertrue\else \scrlayerfalse\fi}
147 \expandafter\tempa\KOMAScriptVersion!}
148 \ifscrlayer
149 \usepackage[footsepline]{scrlayer-scrpage}
150 \else
151 \usepackage[footsepline]{scrpage2}
152 \fi
153
154 \usepackage{lastpage}
155
156 \ifoot%
157 [{\footnotesize Applied Crypto Hardening \textbullet ~Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName}]%
158 {{\footnotesize Applied Crypto Hardening \textbullet ~Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName}}
159 \cfoot[]{}
160 \ofoot%
161 [{\footnotesize page \thepage\ of \pageref{LastPage}}]%
162 {{\footnotesize page \thepage\ of \pageref{LastPage}}}
163
164 % Creating a horizontal rule
165 \newcommand{\HorRule}{\color{darkblue}%
166   \rule{\linewidth}{1pt}%
167 }
168
169 %defines horizontal rule for title
170 \newcommand{\HorRule}{\color{darkblue}\rule{\linewidth}{1pt}}
171
172 \setlength{\parindent}{0cm}
173
174 \date{\today}
175
176 %tell TeX where to look for graphics/logos
177 \graphicspath{ {/img/} }
178
179 % hyperref needs to be the last package you load.
180 \usepackage[pdftex,breaklinks,colorlinks,linkcolor=darkblue,citecolor=blue,urlcolor=blue]{hyperref}
181
182 % Package to create dummy text
183 \usepackage{blindtext}
184 % debug page layout
185 %\usepackage{showframe}
186
187 %%% Begin document
188 \begin{document}
189
190 %\maketitle
191 \pagestyle{scrheadings}
192 % new title page
193 \input{title.tex}
194
195
196
197 \input{neboltai}
198 \input{acknowledgements}
199 \input{abstract}
200 \tableofcontents
201 \chapter{Introduction}
202 \label{chapter:Intro}
203 \input{whoshouldread}
204 \input{related_publications}
205 \input{howtoread}
206 \input{disclaimer}
207 \input{motivation}
208 \input{methods}
209 %%
210 \chapter{Practical recommendations}
211 \label{chapter:PracticalSettings}
212 \input{practical_settings}
213 %%
214 \chapter{Theory}
215 %\epigraph{``Number theorists are like lotus-eaters - having tasted this food they can never give it up.''}{Leopold Kronecker}
216 \label{chapter:Theory}
217 \input{theory}
218 \chapter{Appendix}
219 \input{tools}
220 \input{links}
221 \input{suggested_reading}
222 \input{cipher_suite_names}
223 \input{further_research}
224 %\input{reviewers}
225 \input{bib}
226
227 \end{document}
228 %%% Local Variables: 
229 %%% mode: latex
230 %%% TeX-master: t
231 %%% End: