\documentclass[twoside]{book}

% Packages required by doxygen
\usepackage{fixltx2e}
\usepackage{calc}
\usepackage{doxygen}
\usepackage[export]{adjustbox} % also loads graphicx
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{makeidx}
\usepackage{multicol}
\usepackage{multirow}
\PassOptionsToPackage{warn}{textcomp}
\usepackage{textcomp}
\usepackage[nointegrals]{wasysym}
\usepackage[table]{xcolor}

% Font selection
\usepackage[T1]{fontenc}
\usepackage[scaled=.90]{helvet}
\usepackage{courier}
\usepackage{amssymb}
\usepackage{sectsty}
\renewcommand{\familydefault}{\sfdefault}
\allsectionsfont{%
  \fontseries{bc}\selectfont%
  \color{darkgray}%
}
\renewcommand{\DoxyLabelFont}{%
  \fontseries{bc}\selectfont%
  \color{darkgray}%
}
\newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}}

% Page & text layout
\usepackage{geometry}
\geometry{%
  a4paper,%
  top=2.5cm,%
  bottom=2.5cm,%
  left=2.5cm,%
  right=2.5cm%
}
\tolerance=750
\hfuzz=15pt
\hbadness=750
\setlength{\emergencystretch}{15pt}
\setlength{\parindent}{0cm}
\setlength{\parskip}{3ex plus 2ex minus 2ex}
\makeatletter
\renewcommand{\paragraph}{%
  \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{%
    \normalfont\normalsize\bfseries\SS@parafont%
  }%
}
\renewcommand{\subparagraph}{%
  \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{%
    \normalfont\normalsize\bfseries\SS@subparafont%
  }%
}
\makeatother

% Headers & footers
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhead[LE]{\fancyplain{}{\bfseries\thepage}}
\fancyhead[CE]{\fancyplain{}{}}
\fancyhead[RE]{\fancyplain{}{\bfseries\leftmark}}
\fancyhead[LO]{\fancyplain{}{\bfseries\rightmark}}
\fancyhead[CO]{\fancyplain{}{}}
\fancyhead[RO]{\fancyplain{}{\bfseries\thepage}}
\fancyfoot[LE]{\fancyplain{}{}}
\fancyfoot[CE]{\fancyplain{}{}}
\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize Generated by Doxygen }}
\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize Generated by Doxygen }}
\fancyfoot[CO]{\fancyplain{}{}}
\fancyfoot[RO]{\fancyplain{}{}}
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\chaptermark}[1]{%
  \markboth{#1}{}%
}
\renewcommand{\sectionmark}[1]{%
  \markright{\thesection\ #1}%
}

% Indices & bibliography
\usepackage{natbib}
\usepackage[titles]{tocloft}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{5}
\makeindex

% Hyperlinks (required, but should be loaded last)
\usepackage{ifpdf}
\ifpdf
  \usepackage[pdftex,pagebackref=true]{hyperref}
\else
  \usepackage[ps2pdf,pagebackref=true]{hyperref}
\fi
\hypersetup{%
  colorlinks=true,%
  linkcolor=blue,%
  citecolor=blue,%
  unicode%
}

% Custom commands
\newcommand{\clearemptydoublepage}{%
  \newpage{\pagestyle{empty}\cleardoublepage}%
}

\usepackage{caption}
\captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top}

%===== C O N T E N T S =====

\begin{document}

% Titlepage & ToC
\hypersetup{pageanchor=false,
             bookmarksnumbered=true,
             pdfencoding=unicode
            }
\pagenumbering{alph}
\begin{titlepage}
\vspace*{7cm}
\begin{center}%
{\Large libpurple-\/omemo-\/plugin }\\
\vspace*{1cm}
{\large Generated by Doxygen 1.8.13}\\
\end{center}
\end{titlepage}
\clearemptydoublepage
\pagenumbering{roman}
\tableofcontents
\clearemptydoublepage
\pagenumbering{arabic}
\hypersetup{pageanchor=true}

%--- Begin generated contents ---
\chapter{Introduction}
\label{index}\hypertarget{index}{}\input{index}
\chapter{I\+S\+S\+U\+E\+\_\+\+T\+E\+M\+P\+L\+A\+TE}
\label{md__i_s_s_u_e__t_e_m_p_l_a_t_e}
\Hypertarget{md__i_s_s_u_e__t_e_m_p_l_a_t_e}
\input{md__i_s_s_u_e__t_e_m_p_l_a_t_e}
\chapter{Overview}
\label{md__r_e_a_d_m_e}
\Hypertarget{md__r_e_a_d_m_e}
\input{md__r_e_a_d_m_e}
\chapter{Generated Code}
\label{gencode}
\Hypertarget{gencode}
\input{gencode}
\chapter{Packing and unpacking messages}
\label{pack}
\Hypertarget{pack}
\input{pack}
\chapter{Module Index}
\input{modules}
\chapter{Data Structure Index}
\input{annotated}
\chapter{File Index}
\input{files}
\chapter{Module Documentation}
\input{group__api}
\chapter{Data Structure Documentation}
\input{struct___textsecure_____combined_fingerprints}
\input{struct___textsecure_____device_consistency_code_message}
\input{struct___textsecure_____identity_key_pair_structure}
\input{struct___textsecure_____key_exchange_message}
\input{struct___textsecure_____logical_fingerprint}
\input{struct___textsecure_____pre_key_record_structure}
\input{struct___textsecure_____pre_key_signal_message}
\input{struct___textsecure_____record_structure}
\input{struct___textsecure_____sender_key_distribution_message}
\input{struct___textsecure_____sender_key_message}
\input{struct___textsecure_____sender_key_record_structure}
\input{struct___textsecure_____sender_key_state_structure}
\input{struct___textsecure_____sender_key_state_structure_____sender_chain_key}
\input{struct___textsecure_____sender_key_state_structure_____sender_message_key}
\input{struct___textsecure_____sender_key_state_structure_____sender_signing_key}
\input{struct___textsecure_____session_structure}
\input{struct___textsecure_____session_structure_____chain}
\input{struct___textsecure_____session_structure_____chain_____chain_key}
\input{struct___textsecure_____session_structure_____chain_____message_key}
\input{struct___textsecure_____session_structure_____pending_key_exchange}
\input{struct___textsecure_____session_structure_____pending_pre_key}
\input{struct___textsecure_____signal_message}
\input{struct___textsecure_____signed_pre_key_record_structure}
\input{structge__cached}
\input{structge__p1p1}
\input{structge__p2}
\input{structge__p3}
\input{structge__precomp}
\input{struct_protobuf_c_allocator}
\input{struct_protobuf_c_binary_data}
\input{struct_protobuf_c_buffer}
\input{struct_protobuf_c_buffer_simple}
\input{struct_protobuf_c_enum_descriptor}
\input{struct_protobuf_c_enum_value}
\input{struct_protobuf_c_enum_value_index}
\input{struct_protobuf_c_field_descriptor}
\input{struct_protobuf_c_int_range}
\input{struct_protobuf_c_message}
\input{struct_protobuf_c_message_descriptor}
\input{struct_protobuf_c_message_unknown_field}
\input{struct_protobuf_c_method_descriptor}
\input{struct_protobuf_c_service}
\input{struct_protobuf_c_service_descriptor}
\input{structratchet__message__keys}
\input{structsignal__buffer}
\input{structsignal__context}
\input{structsignal__crypto__provider}
\input{structsignal__protocol__address}
\input{structsignal__protocol__identity__key__store}
\input{structsignal__protocol__pre__key__store}
\input{structsignal__protocol__sender__key__name}
\input{structsignal__protocol__sender__key__store}
\input{structsignal__protocol__session__store}
\input{structsignal__protocol__signed__pre__key__store}
\input{structsignal__type__base}
\input{struct_u_t__array}
\input{struct_u_t__hash__bucket}
\input{struct_u_t__hash__handle}
\input{struct_u_t__hash__table}
\input{struct_u_t__icd}
\input{structvpool}
\chapter{File Documentation}
\input{dynsections_8js}
\input{jquery_8js}
\input{menu_8js}
\input{menudata_8js}
\input{all__0_8js}
\input{all__1_8js}
\input{pages__0_8js}
\input{pages__1_8js}
\input{search_8js}
\input{searchdata_8js}
\input{_i_s_s_u_e___t_e_m_p_l_a_t_e_8md}
\input{_r_e_a_d_m_e_8md}
\input{curve_8h}
\input{curve25519-donna_8h}
\input{compare_8h}
\input{crypto__additions_8h}
\input{crypto__hash__sha512_8h}
\input{curve__sigs_8h}
\input{gen__constants_8h}
\input{gen__crypto__additions_8h}
\input{gen__eddsa_8h}
\input{gen__labelset_8h}
\input{gen__veddsa_8h}
\input{gen__x_8h}
\input{keygen_8h}
\input{utility_8h}
\input{xeddsa_8h}
\input{zeroize_8h}
\input{base_8h}
\input{base2_8h}
\input{d_8h}
\input{d2_8h}
\input{fe_8h}
\input{ge_8h}
\input{ge__add_8h}
\input{ge__madd_8h}
\input{ge__msub_8h}
\input{ge__p2__dbl_8h}
\input{ge__sub_8h}
\input{crypto__int32_8h}
\input{crypto__int64_8h}
\input{crypto__sign_8h}
\input{crypto__sign__edwards25519sha512batch_8h}
\input{crypto__uint32_8h}
\input{crypto__uint64_8h}
\input{crypto__verify__32_8h}
\input{pow22523_8h}
\input{pow225521_8h}
\input{sc_8h}
\input{sqrtm1_8h}
\input{internal__fast__tests_8h}
\input{internal__slow__tests_8h}
\input{device__consistency_8h}
\input{fingerprint_8h}
\input{_fingerprint_protocol_8pb-c_8h}
\input{group__cipher_8h}
\input{group__session__builder_8h}
\input{hkdf_8h}
\input{key__helper_8h}
\input{_local_storage_protocol_8pb-c_8h}
\input{protobuf-c_8h}
\input{protocol_8h}
\input{ratchet_8h}
\input{sender__key_8h}
\input{sender__key__record_8h}
\input{sender__key__state_8h}
\input{session__builder_8h}
\input{session__builder__internal_8h}
\input{session__cipher_8h}
\input{session__pre__key_8h}
\input{session__record_8h}
\input{session__state_8h}
\input{signal__protocol_8h}
\input{signal__protocol__internal_8h}
\input{signal__protocol__types_8h}
\input{signal__utarray_8h}
\input{utarray_8h}
\input{uthash_8h}
\input{utlist_8h}
\input{vpool_8h}
\input{_whisper_text_protocol_8pb-c_8h}
\input{test__common_8h}
\input{test__utarray_8h}
%--- End generated contents ---

% Index
\backmatter
\newpage
\phantomsection
\clearemptydoublepage
\addcontentsline{toc}{chapter}{Index}
\printindex

\end{document}
