%%% Here is the class with everything we need, if you don't want, you don't have to take a look at it, as it will probably cover your needs by far. These three options are used after the class article, which this template is based in.
% \documentclass[a4paper,12pt,oneside]{mybook} %% ONESIDE
\documentclass[a4paper,12pt,twoside]{mybook} %% TWOSIDE
% Here is the font I usually use, it can be changed of course.
% In that case, these next two lines have to be deleted.
\usepackage{ebgaramond}
% Equations have the same font.
\usepackage[cmintegrals,cmbraces,ebgaramond]{newtxmath}
\doctitle{Subject}
\docsubtitle{Document Title}
\dockeywords{Your keywords}
\copyrightpage%
{Faculty of Mathematics and Computer Science}% Your Faculty
{University of Barcelona}% Your University
{Elsevier}% Your Publisher
{01A75, 00B50}% AMS
{Barcelona}% Your City
% If you do not want to fill one of the fields, please leave it like this: {}
\author{Author 1 \\ \texttt{ID} \and Author 2 \\ \texttt{ID} \and Author 3 \\ \texttt{ID} \and Author 4 \\ \texttt{ID}}
% A text that goes into the footer. You can even include a logo. It can be left blank, too.
%% Option 1: \footext{\includegraphics[width=2em]{titlepage.png}}
%% Option 2: \footext{Some text}
% What I usually use:
\footext{}
% Don't comment the command below if it's not of much inconvenience, please!
\greetings
% Last things
\input{preamble}
% Dummy text
\usepackage{lipsum}
\begin{document}
% Interlineate, it can be changed.
\setlength{\baselineskip}{.70cm}
\frontmatter
\maketitle
\clearpage
% Copyright page
\pagestyle{\auxsettings}
\input{copyright-page}
\tableofcontents
\etocsettocstyle{}{} % from now on only local tocs
\clearpage
\chapter{Greetings}
\lipsum[3]
\chapter{Introduction}
\begin{flushright}
\textit{Who hears the fishes when they cry?}\\
Henry David \textsc{Thoreau}
\end{flushright}
\lipsum[1-5]
\clearpage
\pagestyle{\defaultsettings}
\mainmatter
\part{My first part}{Brief explanation of first part, if needed.}
\chapter{First chapter}
\section{Introduction}
\lipsum[1-3]
\begin{equation}\label{eq:hello}
\frac{\partial f}{\partial x}(x,y)=\text{hello}
\end{equation}
\subsection{Subsection}
\lipsum[4-8] \eqref{eq:hello}
\section{Other}
\lipsum[10-13]
\section{Another}
\begin{enumerate}
\item \lipsum[14]
\item \lipsum[15]
\end{enumerate}
\lipsum[16-22]
\section{Last one}
\lipsum[23-25]
\subsection{Really last one}
\lipsum[25-30]
\part{Second part}{Brief explanation of second part, if needed.}
\chapter{Second chapter}
\section{My Section}
% Theorem environments
\begin{theorem}
\lipsum[16]
\end{theorem}
\begin{proof}
\end{proof}
\begin{corollary}
\lipsum[16]
\end{corollary}
\begin{definition}
\lipsum[16]
\end{definition}
\begin{remark}
\lipsum[16]
\end{remark}
\begin{exercise}
\lipsum[16]
\end{exercise}
\begin{proof}[Solution]
\lipsum[17]
\end{proof}
\begin{corollary}
\lipsum[18]
\end{corollary}
\begin{definition}
\lipsum[19]
\end{definition}
\begin{remark}
\lipsum[20]
\end{remark}
\begin{exercise}
\lipsum[21]
\end{exercise}
\begin{proof}[Solution]
\lipsum[22]
\end{proof}
\clearpage
% Appendixes
\appendix
\chapter{Appendix}
\begin{figure}[!ht]
\centering
\includegraphics[width=\textwidth]{image.png}
\caption{Caption of the photo.}
\label{fig:myimage}
\end{figure}
% Bibliography
\clearpage
\backmatter
\pagestyle{\auxsettings}
\printbibliography[heading=bibintoc]
\end{document}