\documentclass[a4paper, 11pt, twoside, openright]{book}

% Graphics.
\usepackage[dvips]{graphicx}

% Natural Sciences Citations and References.
\usepackage{natbib}

% The index.
\usepackage{makeidx}

% Good looking tables.
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{tabularx}

% Nth.
\usepackage[super]{nth}

% Obliterate those painful LaTeX margins!
\usepackage{vmargin}

% Better screenshot layout.
\raggedbottom

% Better Table of contents (Toc), List of figures (Lof), and List of tables (Lot).
\usepackage{tocloft}

% Better maths.
\usepackage{amsmath}
\usepackage{amssymb}

% Hyperlinks.
\usepackage[pdftitle={The relax manual}]{hyperref}
\hypersetup{colorlinks,
            citecolor=blue,%
            filecolor=blue,%
            linkcolor=blue,%
            urlcolor=blue}

% New commands.
\newcommand{\example}[1]{\vspace{-1ex} \sloppy{\footnotesize \texttt{#1}}}
\newcommand{\smallexample}[1]{\vspace{-1ex} \sloppy{\scriptsize \texttt{#1}}}
\newcommand{\keyword}[1]{\textsf{#1}}
\newcommand{\quotecmd}[1]{`\texttt{#1}'}
\newcommand{\uf}[1]{\texttt{#1}}
\newcommand{\prompt}[1]{\texttt{#1}}
\newcommand{\promptstring}[1]{``\texttt{#1}''}
\newcommand{\shortcutkey}[1]{``{\small \textsf{[#1]}}''}
\newcommand{\gui}[1]{``{\small \textsf{#1}}''}
\newcommand{\guibutton}[1]{``{\small \textsf{#1}}''}
\newcommand{\guimenuitemone}[1]{``{\small \textsf{#1}}''}
\newcommand{\guimenuitemtwo}[2]{``{\small \textsf{#1$\to$#2}}''}
\newcommand{\guimenuitemthree}[3]{``{\small \textsf{#1$\to$#2$\to$#3}}''}
\newcommand{\guistring}[1]{``{\small \textsf{#1}}''}
\newcommand{\directory}[1]{\texttt{#1}}
\newcommand{\file}[1]{\texttt{#1}}
\newcommand{\module}[1]{\texttt{#1}}
\newcommand{\pycode}[1]{{\small \texttt{#1}}}
\newcommand{\pystring}[1]{`{\small \texttt{#1}}'}
\newcommand{\software}[1]{\texttt{#1}}

% New environment.
\newenvironment{exampleenv}{\footnotesize \begin{ttfamily} \sloppy}{\fussy \end{ttfamily}}
\newenvironment{spacedpara}{\setlength{\parindent}{0pt} \setlength{\parskip}{2ex plus 0.5ex minus 0.2ex}}{}

% Modify the Toc, Lof, and Lot layout.
\setlength{\cftsecnumwidth}{10mm}
\setlength{\cftsubsecnumwidth}{16mm}
\setlength{\cftfignumwidth}{12mm}
\setlength{\cfttabnumwidth}{12mm}

% Maths commands.
\newcommand{\Par}{{\scriptscriptstyle \parallel}}
\newcommand{\Per}{{\scriptscriptstyle \perp}}
\newcommand{\Diff}{\mathfrak{D}}
\newcommand{\Ri}{\mathrm{R}_i}
\newcommand{\Rone}{\mathrm{R}_1}
\newcommand{\Rtwo}{\mathrm{R}_2}
\newcommand{\NOE}{\mathrm{NOE}}
\newcommand{\crossrate}{\sigma_{\scriptscriptstyle \mathrm{NOE}}}
\newcommand{\gH}{\gamma_{\scriptscriptstyle H}}
\newcommand{\gX}{\gamma_{\scriptscriptstyle X}}
\newcommand{\Spaceset}{\mathfrak{K}}
\newcommand{\Univset}{\mathfrak{U}}
\newcommand{\Space}{\mathfrak{S}}
\newcommand{\Diffset}{\mathfrak{D}}
\newcommand{\Diffgeoset}{\mathfrak{G}}
\newcommand{\Difforiset}{\mathfrak{O}}
\newcommand{\Mfset}{\mathfrak{F}}
\newcommand{\Localset}{\mathfrak{T}}
\newcommand{\KL}{\Delta_{\scriptscriptstyle \text{K-L}}}

% Natbib Citation format.
\bibpunct{(}{)}{;}{a}{,}{,}

% Inline citations.
\usepackage{bibentry}
\nobibliography*

% Allow the maths blocks to be broken!!!
\allowdisplaybreaks[1]

% Set the graphics path to the parent relax directory.
\graphicspath{{../../}}

% latex2html stuff.
\usepackage{html}
\htmladdtonavigation{\htmladdnormallink{\htmladdimg{http://www.nmr-relax.com/images/relax_logo_nav.png}}{http://www.nmr-relax.com}}

% Make the index.
\makeindex


% Start the document.
%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\frontmatter


% Title page.
%%%%%%%%%%%%%

\begin{titlepage}
\begin{center}

% Vertical centering.
\vspace*{\stretch{2}}

% Title.
{\Huge \textbf{relax}}
\vspace{\stretch{1}}

% relax version number.
{\LARGE \textbf{\input{relax_version}}}
\vspace{\stretch{1}}

\centerline{\includegraphics[width=\textwidth, bb=14 14 793 342]{images/ulysses}}
\vspace{\stretch{2}}

% Subtitle.
{\huge \textbf{Molecular dynamics by}}
\vspace{\stretch{0.5}}

{\huge \textbf{NMR data analysis}}
\vspace{\stretch{1}}

% Date.
{\large \today}
\vspace*{\stretch{2}}

\end{center}
\end{titlepage}


% Table of Contents.
%%%%%%%%%%%%%%%%%%%%

\tableofcontents


% List of Figures.
%%%%%%%%%%%%%%%%%%

\newpage
\listoffigures


% List of Tables.
%%%%%%%%%%%%%%%%%

\newpage
\listoftables


% Abbreviations.
%%%%%%%%%%%%%%%%

\chapter*{Abbreviations}

\begin{description}

\item[AIC:]  Akaike's Information Criteria (model selection method)
\item[AICc:]  small sample size corrected AIC (model selection method)
\item[API:]  application programming interface
\item[ANOVA:]  analysis of variance (field of statistics)
\item[BIC:]  Bayesian Information Criteria (model selection method)
\item[BFGS:]  Broyden-Fletcher-Goldfarb-Shanno (optimisation method)
\item[$C(\tau)$:]  correlation function
\item[$\chi^2$:]  chi-squared function
\item[CG:]  conjugate gradient (optimisation)
\item[CSA:]  chemical shift anisotropy
\item[CV:]  cross validation
\item[CVS:]  Concurrent Versions System (open source version control system)
\item[$\Diff$:]  the set of diffusion tensor parameters
\item[$\Diff_\Par$:]  the eigenvalue of the spheroid diffusion tensor corresponding to the unique axis of the tensor
\item[$\Diff_\Per$:]  the eigenvalue of the spheroid diffusion tensor corresponding to the two axes perpendicular to the unique axis
\item[$\Diff_a$:]  the anisotropic component of the Brownian rotational diffusion tensor
\item[$\Diff_{iso}$:]  the isotropic component of the Brownian rotational diffusion tensor
\item[$\Diff_r$:]  the rhombic component of the Brownian rotational diffusion tensor
\item[$\Diff_{ratio}$:]  the ratio of $\Diff_\Par$ to $\Diff_\Per$
\item[$\Diff_x$:]  the eigenvalue of the Brownian rotational diffusion tensor in which the corresponding eigenvector defines the x-axis of the tensor
\item[$\Diff_y$:]  the eigenvalue of the Brownian rotational diffusion tensor in which the corresponding eigenvector defines the y-axis of the tensor
\item[$\Diff_z$:]  the eigenvalue of the Brownian rotational diffusion tensor in which the corresponding eigenvector defines the z-axis of the tensor
\item[$\epsilon_i$:]  elimination value
\item[FSF:]  Free Software Foundation
\item[GNU:]  GNU's Not Unix!
\item[GPG:]  GNU Privacy Guard (software)
\item[GPL:]  GNU general public licence
\item[GUI:]  graphical user interface
\item[ID string:]  identification string
\item[$J(\omega)$:]  spectral density function
\item[MC:]  Monte Carlo (simulations)
\item[MD:]  molecular dynamics (simulations)
\item[MPI:]  message passing interface
\item[NMR:]  if you do not know this one, do not read further
\item[NNTP:]  network news transfer protocol
\item[NOE:]  nuclear Overhauser effect
\item[ORD:]  optical rotatory dispersion
\item[OS:]  operating system
\item[PCS:]  pseudocontact shift
\item[PDB:]  Protein Data Bank
\item[pdf:]  probability distribution function
\item[PRE:]  paramagnetic relaxation enhancement
\item[$r$:]  bond length
\item[$\Rone$:]  spin-lattice relaxation rate
\item[$\Rtwo$:]  spin-spin relaxation rate
\item[$R_{ex}$:]  chemical exchange relaxation rate
\item[RDC:]  residual dipolar coupling
\item[RMSD:]  root-mean-square deviation
\item[ROE:]  rotating-frame Overhauser effect
\item[RSDM:]  reduced spectral density mapping
\item[RSS:]  rich site summary (web feed format)
\item[$S^2$, $S^2_f$, and $S^2_s$:]  model-free generalised order parameters
\item[SVN:]  Apache Subversion (open source version control system)
\item[$\tau_e$, $\tau_f$, and $\tau_s$:]  model-free effective internal correlation times
\item[$\tau_m$:]  global rotational correlation time
\item[UI:]  user interface
\item[XML:]  extensible markup language

\end{description}



%%%%%%%%%%%%%%
% Main text. %
%%%%%%%%%%%%%%

\mainmatter
\begin{spacedpara}


% The chapters.
%%%%%%%%%%%%%%%

\include{intro}
\include{citations}
\include{install}
\include{infrastruct}
\include{data_model}
\include{curvefit}
\include{noe}
\include{model-free}
\include{jw_mapping}
\include{consistency_tests}
\include{maths}
\include{develop}
\include{functions}
\include{licence}


% End of the main chapters.
%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{spacedpara}



% Bibliography.
%%%%%%%%%%%%%%%

\bibliographystyle{relax}
\bibliography{bibliography}



% Index.
%%%%%%%%

\printindex


\end{document}
