% -*- mode: latex; mode: auto-fill -*-

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%% Setup Document Style
  %%%
% \documentclass[paper=5.5in:8.5in,pagesize,
\documentclass[paper=4.13in:5.83in,pagesize,
               open=any,% ,chapterprefix=false,
               titlepage=false,
               headsepline=true,footsepline=false,
             fontsize=9pt,headings=small]{scrbook}
\usepackage[activate=true,final,tracking=true,kerning=true,spacing=true,factor=1100,stretch=10,shrink=10,letterspace=-1000,protrusion=true]{microtype}

% \addtokomafont{chapter}{\rmfamily}
% \addtokomafont{chapterentry}{\rmfamily}
% \addtokomafont{sectioning}{\rmfamily}

\areaset[0.4in]{3.20in}{5.2in}

% TOC {{{
\usepackage{tocloft}
\setlength{\cftbeforetoctitleskip}{-4em}
\setlength{\cftaftertoctitleskip}{1em}
% TOC }}}

% locale {{{
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
% locale }}}

\usepackage{amsmath,amssymb,latexsym,xspace}

% graphics {{{
\usepackage[absolute]{textpos}
\usepackage{graphicx}
\usepackage{wrapfig}
% graphics }}}

\usepackage{pdfpages}

% fonts {{{
\pagestyle{headings}
\usepackage{bookman}

% \usepackage{DejaVuSans}
%% Another possibility is
\usepackage{dejavu}
%% which loads the DejaVu Serif and DejaVu Sans Mono fonts as well
\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif
% fonts }}}

% for digital version, use package on next line, which will include hyperlinks
\usepackage{hyperref}
\renewcommand{\href}[2]{#2~\footnote{#1}}                                       


% the following block sets all the hyperref params,
% and might need to be all commented out for the print version
\hypersetup{
    bookmarks=true,         % show bookmarks bar?
    unicode=false,          % non-Latin characters in Acrobat’s bookmarks
    pdftoolbar=true,        % show Acrobat’s toolbar?
    pdfmenubar=true,        % show Acrobat’s menu?
    pdffitwindow=true,     % window fit to page when opened
    pdfstartview={FitH},    % fits the width of the page to the window
    pdfpagelayout={TwoColumnRight},
    pdftitle={Crypt r Die},    % title
    pdfauthor={AvANa},     % author
    pdfsubject={Repressione digitale},   % subject of the document
    pdfcreator={LaTeX},   % creator of the document
    pdfproducer={AvANAa}, % producer of the document
    pdfkeywords={sicurezza, repressione digitale}, % list of keywords
    pdfnewwindow=true,      % links in new window
    colorlinks=false,       % false: boxed links; true: colored links
%     linkcolor=red,          % color of internal links
    linkbordercolor=white,
    linkcolor=white,          % color of internal links
    citecolor=green,        % color of links to bibliography
    filecolor=magenta,      % color of file links
    urlcolor=cyan           % color of external links
}

% for printed version, use package on
% next line, instead, for better printing
%\usepackage{url}

% turn off numbers for chapters
\setcounter{secnumdepth}{-1}
\newcommand{\mychapter}[1]{
  \chapter{#1}
%  \addcontentsline{toc}{chapter}{\protect\numberline{}#1}
}


% uncomment this next line to include a grid for easier
% layout work
%\usepackage[colorgrid,texcoord]{eso-pic}


\usepackage{color}
\definecolor{altbg}{gray}{0}
\definecolor{altfg}{gray}{1}

\recalctypearea

% SILLABARE LE PAROLE CHE ECCEDONO I MARGINI..

\hyphenation{ri-chie-sto}
\hyphenation{ris-chi}
\hyphenation{chat-ti}
\hyphenation{cer-to}
\hyphenation{pre-fe-ri-sce}
\hyphenation{ar-chi-via-zio-ne}
\hyphenation{am-mi-ni-stra-to-re}
\hyphenation{crit-to-gra-fia}
\hyphenation{vo-stro}
\hyphenation{of-fu-sca-men-to}
\hyphenation{me-glio}
\hyphenation{in-ter-cet-ta-zio-ne}
\hyphenation{que-sti}
\hyphenation{pro-vi-der}
\hyphenation{pro-teg-ge-re}
\hyphenation{Freep-to}
\hyphenation{quo-ti-dia-na-men-te}
\hyphenation{se-guo-no}
\hyphenation{ca-pir-ne}
\hyphenation{brow-ser}
\hyphenation{i-den-ti-fi-ca-zio-ne}
\hyphenation{i-Pho-ne}

%% Enable license helpers
% \input{cc_beamer}

%
% AvANa custom conf
%
% Interlinea
\linespread{1.3}
\newcommand*{\ricettafont}{\fontfamily{pag}\selectfont\small}
\newcommand*{\headerfonts}{\fontfamily{pag}\selectfont}
\usepackage{mdframed}
\newmdenv[linecolor=white,hidealllines,shadow=false,%
  innerleftmargin=5pt,innerrightmargin=5pt,%
font=\ricettafont]{ricetta}



\setcounter{tocdepth}{1}

% Header e Footer
\usepackage{fancyhdr}
\pagestyle{fancy}
% Header elements
\renewcommand{\headrulewidth}{-10mm}
\fancyhead{}
% Footer elements
\fancyfoot{}
\fancyfoot[LE,RO]{\thepage}
\fancyfoot[C]{\includegraphics[height=.56cm]{images/scritta.jpg}}
% \renewcommand{\footrulewidth}{0.4pt} % riga sopra il footer
% \setlength{\voffset}{-0.35in}
% \setlength{\textheight}{+0.01in}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% The document
%%%

\begin{document}
\frontmatter


% PRIMA PAGINA : COPERTINA

\includepdf{images/page1.pdf}

% PRESENTAZIONE AVANA
\thispagestyle{empty}

\begin{wrapfigure}{l}{3cm}
\includegraphics[width=2.6cm]{images/avana.jpg}
\end{wrapfigure}

Il collettivo AvANa (Avvisi Ai Naviganti) fin dalle origini ha dato sempre centralit\`{a} al
tema della repressione a mezzo digitale. \\
Quando ci \`{e} passato tra le mani l'opuscolo ``Prima e dopo un corteo'', scritto
dalla Rete Evasioni, abbiamo letto il paragrafetto dedicato ai computer e non abbiamo
saputo resistere. \\
\textbf{Crypt'r Die} \`{e} un vademecum per tutte e tutti coloro che vogliono iniziare
a riprendersi la propria libert\`{a} e che sentono il il bisogno di difendersi da ogni
tipo di controlo e sorveglianza digitale. %

\vfill
\begin{center}%
	\includegraphics[width=.13\textwidth]{images/nocopyright.jpg}\\
	{\scriptsize %
		Finito di stampare nel giugno 2014.\\
		Materiale non sottoposto ad alcun tipo di copyright\\
		Scarica, fotocopia e diffondi!\\
		\url{https://we.riseup.net/avana/opuscolo}%
	}%
\end{center}%
%\pagestyle{empty}
% PAGINA BIANCA DOPO IL NO COPYRIGHT
\cleardoublepage
% \thispagestyle{empty}
% TABELLA DEI CONTENUTI
% \pagestyle{empty}
% \tableofcontents


% 
% INDICE - 
% 
\renewcommand*\contentsname{INDICE}

\tableofcontents{\thispagestyle{empty}}



\clearpage
\pagestyle{fancy}

% \thispagestyle{empty}
\newpage
\setcounter{page}{1}

% % PAGINA BIANCA DOPO L'INTRO DI AVANA
% \newpage
% \thispagestyle{empty}
% \mbox{}

% \newpage
% \thispagestyle{empty}
% \mbox{}


%
% TESTO
%
\mainmatter
\include{cryptrdie}
\backmatter

%
% PARTE FINALE
%

% PAGINA CON LINK AD AVANA
\newpage
\thispagestyle{empty}
\null
\vfill % riempi verticalmente
%
\begin{center}
\url{http://we.riseup.net/avana}
\end{center}

% Ultima di copertina
\newpage
\thispagestyle{empty}
%
\includepdf{images/pageLast.pdf}
%
\end{document}
% vim: set fdm=marker fdl=1:
