%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%%% ISEL/IPL Dissertation document class
%%%
%%% By Matilde Pós-de-Mina Pato (matilde.pato@isel.pt)
%%% Version of October 2012
%%% Version v1.1:  July 2013 
%%% Version v2.0: March 2015
%%% Version v2.3: December 2017
%%% Version v2.4: January 2019
%%% Version v2.5: December 2019
%%% Version v2.5.1.: February 2020
%%% Version v2.5.2.: March 2020
%%% Version v2.5.3.: (June 2020) 
%%% Version v2.6.: (September 2020) 
%%% Version v2.6.1.: (January 2020) 
%%% Version v2.6.2: (October 2022)
%%% Version v3.0: May 2024
%%% Version v4.0: June 2024
%%% 
%%% 
%%% This template is vaguely based on a template from the
%%%     Universidade Nova de Lisboa (NOT OFFICIAL)
%%%
%%% BUGS and SUGGESTIONS: please send email to "matilde.pato@isel.pt"
%%%     or sumit a ticket in the the project web page at
%%%     https://github.com/matpato/iselthesis
%%%
%%% CONTRIBUTERS are welcome. Please contact "matilde.pato@isel.pt"
%%%
%%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
% The default option marked with (*)
\documentclass[
  docdegree=msc,        % msc(*), mscprep, bsc
  doctype=dissertation, % dissertation(*), project
  lang=en,              % en, pt(*)
  coverlang=pt,         % defaults to main language
  fontstyle=kpfonts,    % baskervaldx bookman charter ebgaramond fbb fourier garamond
                        % heuristica kpfonts(*) libertine mathpazo1 mathpazo2 newcent
                        % newpx newtx 
  chapstyle=vz43,    % bianchi bluebox brotherton dash default elegant ell ger 
                        % hansen ist jenor lyhne madsen pedersen veelo vz14 vz34 vz43(*)
  otherlistsat=front,   % front(*), back
  linkscolor=darkblue,  % darkblue, black (Set to 'black' for PRINTING)
  printcommittee=true,  % set to 'false' from submitted versins who should not have 
                        % the list of committee memebers
  biblatex={            % Options for biblatex (see biblatex documentation)
		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		%%% uncomment for 'apa' like citations
		% backend=biber,			% must use biber as the backend (and not bibtex)
		% natbib=true,				% compatiblity with natbib (use \cite{…} or \citep{…})
		% style=apa,					% APA style
		% maxcitenames=2,			% use at most two names in citation
		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		%%% uncomment for 'numeric-by-order-of-citation' like citations
		% backend=bibtex,		  % use bibtex if possible
		% style=numeric-comp, % numeric(*), alphabetic, authoryear, bwl-FU
		% sortcites=true,     % If numeric, sort cites by crescent order
		% sorting=none,       % none, nyt(*), ynt
		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		% %%% uncomment for 'numeric-by-order-of-citation' like citations
		backend=bibtex,		  % use bibtex if possible
		style=numeric-comp, % numeric(*), alphabetic, authoryear, bwl-FU
		sortcites=true,     % If numeric, sort cites by crescent order
		sorting=nyt,        % none, nyt(*), ynt
        backref=true,       % true(*), false if you want to back referencing from bibliographical citations
		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		%%% uncomment for 'numeric-by-order-of-citation' like citations
		% backend=bibtex,		  % use bibtex if possible
		% style=alphabetic,   % numeric(*), alphabetic, authoryear, bwl-FU
		% sorting=nyt,        % none, nyt(*), ynt
		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		%%% other options for biblatex
    maxbibnames=99,			% Never use 'et al' in the bibliography
	firstinits=true,    % render all first and middle names as initials
    hyperref=true       % Hyperlinks in citations: true(*) false
	},
	memoir={	            % See the 'memoir' documentation
    a4paper,            % the paper size/format
    11pt,               % 10pt, 11pt(*), 12pt
    final,              % draft, final  <= Replace 'draft' with 'final' in final version
  },
  media=screen,         % screen(*), paper
          % behavior to be defined in school options based in "\iselthesis@opt@media"
          % definitions for screen: left and right margins are equal, colored links
          % definitions for paper: left and right margins are different, black links
]{iselthesis}
% --------------------------------------------------------
%%
%%  BEGINING OF USER CUSTOMIZATION
%%
% --------------------------------------------------------
\AtEndEnvironment{figure}{\gdef\there@is@a@figure{}} 
\AtEndDocument{\ifdefined\there@is@a@figure\label{fig:was:used:in:doc}\fi} 
\newcommand{\conditionalLoF}{\@ifundefined{r@fig:was:used:in:doc}{}{\listoffigures}}%
%%==== DANGER ==== DANGER ==== DANGER ==== DANGER ==== DANGER ====
%%==== DANGER ==== DANGER ==== DANGER ==== DANGER ==== DANGER ====
%%==== DANGER ==== DANGER ==== DANGER ==== DANGER ==== DANGER ====
%%
%% END OF USER COSTUMIZATION
%% Please do not change below this point!!! :)
%%
%%==== DANGER ==== DANGER ==== DANGER ==== DANGER ==== DANGER ====
%%==== DANGER ==== DANGER ==== DANGER ==== DANGER ==== DANGER ====
%%==== DANGER ==== DANGER ==== DANGER ==== DANGER ==== DANGER ====
\benchmarktic
%% Begining of document
\begin{document}
% --------------------------------------------------------
\ncthesisfrontmatter    % Before the main text (TOC, etc)
% --------------------------------------------------------
\printcoverpage		    % The cover page
\printdedicatory        % Print the dedicatory (will only be printed if adequate for the document type)
\printacknowledgements  % Print the acknowledgments (will only be printed if adequate for the document type)
\printquote             % Print the quote (if file exists and is adequate for the document type)
\printstatement         % Print statement text. This file will only be considered for final documents, i.e., "msc", otherwise, it will be silently ignored
\printabstract          % Print abstracts (in PT and EN). The abstract in the document main language will be printed first, the abstract in the foreign language will be printed second
\tableofcontents*       % Always print the table of contents
\printotherlists        % If option 'otherlistsat=front', print other lists of contents according to instructions given above, otherwise do nothing
% --------------------------------------------------------
\ncthesismainmatter	    % The main text
% --------------------------------------------------------
\ncprintchapters        % Print document chapters		
\printbib		        % Print the bibliography
\printotherlists 	    % If option 'otherlistsat=back', print other lists of contents according to instructions given above, otherwise do nothing
\ncprintappendices      % Print appendixes, if any!
\ncprintannexes         % Print annexes, if any!
% \printbackcoverpage     % Print the cover back page
% --------------------------------------------------------
%% End of document
% --------------------------------------------------------
\end{document}