\documentclass[pdflatex,a4paper,12pt,titlepage,twoside,openright]{book}
\usepackage[english,italian]{babel}

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[signatures]{frontespizio}
\usepackage{graphicx}
\usepackage[footnotesize,bf]{subfigure}
\usepackage{rotating}
\usepackage[font=footnotesize,labelfont=bf]{caption}

\usepackage[page,titletoc]{appendix}

\usepackage{listings}
%\lstdefinestyle{number}
%{labelstep=1, labelstyle=\tiny, labelsep=10pt}
%\lstdefinestyle{nonumber}
%{labelstep=0}

\usepackage{varioref}
\vrefwarning					% TO BE REMOVED FOR FINAL VERSION!!!
\usepackage{hyperref}			% TO BE REMOVED FOR FINAL VERSION!!!

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\usepackage{numprint}
% \usepackage{SIunits}

\usepackage{setspace}
\usepackage{float}

% RESTYLES CHAPTER TITLE FORMAT
\usepackage[Lenny]{fncychap}

% DEFINES THE CENTIGRADE DEGREES SYMBOL
\newcommand{\degree}{\ensuremath{^\circ}}

% REDEFINES PAGE HEADER FORMAT
%\usepackage{fancyhdr}
%\pagestyle{fancy}
%\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
%\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
%\fancyhf{}
%\fancyhead[LE,RO]{\bfseries\thepage}
%\fancyhead[RE]{\bfseries\footnotesize\nouppercase{\leftmark}}
%\fancyhead[LO]{\bfseries\footnotesize\nouppercase{\rightmark}}

% SISTEMA L'INTERLINEA DI ELENCHI PUNT. E NUMERATI
\usepackage{enumitem}
\setlist{noitemsep}

% DEFINES THE "ABSTRACT" ENVIRONMENT
\usepackage{fancyhdr}	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\fncyblank}{\fancyhf{}}
\newenvironment{abstract}%
{\cleardoublepage\fncyblank\null\vfill\begin{center}%
\bfseries\abstractname\end{center}}%
{\vfill\null}

% DEFINES SUBSCRIPTS AND SUPERSCRIPTS OUTSIDE MATH MODE
\newcommand{\superscript}[1]{\ensuremath{^{\textrm{#1}}}}
\newcommand{\subscript}[1]{\ensuremath{_{\textrm{#1}}}}

% This redefines \@xobeysp, to which the space character is \let in verbatim text, to a normal space instead of an unbreakable space.
\makeatletter
\def\@xobeysp{ }
\makeatother

% SETS SPACES VISIBLE IN LSTLISTINGS
\makeatletter
\def\lst@visiblespace{\phantom{\lst@ttfamily{\char32}\textvisiblespace}}
\makeatother

% SETS CLEARDOUBLEPAGE HEADERS EMPTY
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\vspace*{\fill}
\vspace{\fill}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother

\interfootnotelinepenalty=10000		% TO BE REMOVED FOR FINAL VERSION - footnotes to be checked!




\begin{document}

\onehalfspacing

\selectlanguage{italian}

\begin{frontespizio}
	\Universita{Siena}
	\Logo[4,5cm]{Images/unisi}
	\Facolta{Scienze Matematiche, Fisiche e Naturali}
	\Corso[Laurea Triennale]{Fisica e Tecnologie Avanzate}
	\Annoaccademico{2009--2010}
	\Titoletto{\textsc{Tesi di Laurea}\\ 18 Aprile 2011}
	\Titolo{A Large GEM detector prototype}
	\Sottotitolo{Test-beam results and analysis}
	\Candidato{Elena Graverini}
	\Relatore{Prof. Nicola Turini}
	\Rientro{2cm}
	\NCorrelatore{ Tutor aziendale }{ Tutor aziendali }
	\Preambolo{\renewcommand{\frontlogosep}{2pt}}
	\Preambolo{\renewcommand{\frontinstitutionfont}{\fontsize{20}{36}\scshape}}
	\Preambolo{\renewcommand{\frontpretitlefont}{\fontsize{14}{20}\selectfont}}
	\Preambolo{\renewcommand{\fronttitlefont}{\fontsize{24}{28}\bfseries}}
	\Preambolo{\renewcommand{\frontsubtitlefont}{\fontsize{20}{24}\bfseries}}
	\Preambolo{\renewcommand{\frontfixednamesfont}{\fontsize{14}{16}\itshape}}
	\Preambolo{\renewcommand{\frontnamesfont}{\fontsize{14}{16}\selectfont}}
\end{frontespizio}


\input{Parts/abstracts}


\selectlanguage{english}

%\addcontentsline{toc}{chapter}{\numberline{}\contentsname}
\tableofcontents
%\addcontentsline{toc}{chapter}{\numberline{}\listfigurename}
%\listoffigures
%\addcontentsline{toc}{chapter}{\numberline{}\listtablename}
%\listoftables

\selectlanguage{english}

\chapter{The prototype: a large GEM}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\section{GEM detectors}\input{Parts/GEMdetectors}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\section{Choice of the gas}\input{Parts/Gas}
	\section{A large triple GEM detector}\input{Parts/LargeGEM}%%%%%%%%%%%%%%%%%%%%%%%%%%
		\subsection{Gain curve}\label{ch-gainc}\input{Parts/GainCurve}%%%%%%%%%%%%%%%%%%%
\chapter{Readout electronics}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\section{VFAT readout chip}\input{Parts/vfat}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\section{Turbo readout card}\input{Parts/turbo}
	\section{Off-beam threshold scan}\label{ch-off-th}\input{Parts/off-thscan}%%%%%%%%%%%
\chapter{Experimental setup}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\section{The test-beam facility}\input{Parts/test_beam}%%%%%%%%%%%%%%%%%%%%%%%%%%
		\section{The telescope}\input{Parts/tbsetup}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\section{Data analysis system}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\subsection{Hits, clusters and tracks}\label{ch-defs}\input{Parts/HitsTracks}%%%%
		\subsection{Reconstructing the beam profile}\input{Parts/beamprof}%%%%%%%%%%%%%%%
\chapter{On-beam tests}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\input{Parts/HVGainTable}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\section{Efficiency of the tracker}\input{Parts/ON-Tracker_eff}%%%%%%%%%%%%%%%%%%%%%%
	\section{High voltage scan}\label{ch-hvscan}\input{Parts/ON-HVscan}%%%%%%%%%%%%%%%%%%
	\section{Threshold scan}\label{ch-thscan}\input{Parts/ON-THscan}%%%%%%%%%%%%%%%%%%%%%
	\section{Timing scan}\label{subsec-timing}\input{Parts/TimingScans}%%%%%%%%%%%%%%%%%%
	\section{Behaviour with hadron beam}\input{Parts/hadrons}%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Remarks}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\section{(In)homogeneity of the prototype}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\subsection{Critical chamber zones}\input{Parts/pad_position}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\subsection{Effects of the pads different dimensions}\label{ch-pad_d}\input{Parts/pad_dimension}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\section{Efficiency of the analysis system}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\subsection{Efficiency radius}\input{Parts/effrad}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\subsection{Cuts}\input{Parts/cuts}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Conclusions}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\section{Quality of the large GEM prototype}\input{Parts/Quality}%%%%%%%%%%%%%%%%%%%%
	\section{Large GEMs for TOTEM and CMS}\label{totem}\input{Parts/TOTEM_applications}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\selectlanguage{english}

%	APPENDIX
\begin{appendices}
\input{Parts/AppendixListings.tex}
\end{appendices}
\selectlanguage{english}

%	INDICI TABELLE E FIGURE
\cleardoublepage
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures
\cleardoublepage
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables

%	BIBLIOGRAPHY
\input{Parts/biblio}

\end{document}