%----------
% WARNING
%----------
% This Guide contains Library recommendations based mainly on APA and IEEE styles, but you must always follow the guidelines of your TFG Tutor and the TFG regulations for your degree.
% THIS TEMPLATE IS BASED ON THE IEEE STYLE
%----------
% DOCUMENT SETTINGS
%----------
\documentclass[12pt]{report} % font: 12pt
% margins: 2.5 cm top and bottom; 3 cm left and right
\usepackage[
a4paper,
vmargin=2.5cm,
hmargin=3cm
]{geometry}
% Paragraph Spacing and Line Spacing: Narrow (6 pt / 1.15 spacing) or Moderate (6 pt / 1.5 spacing)
\renewcommand{\baselinestretch}{1.15}
\parskip=6pt
% Color settings for cover and code listings
\usepackage[table]{xcolor}
\definecolor{azulUC3M}{RGB}{0,0,102}
\definecolor{gray97}{gray}{.97}
\definecolor{gray75}{gray}{.75}
\definecolor{gray45}{gray}{.45}
% PDF/A -- Important for its inclusion in e-Archive. PDF/A is the optimal format for preservation and for the generation of metadata: http://uc3m.libguides.com/ld.php?content_id=31389625.
% In the template we include the file OUTPUT.XMPDATA. You can download that file and include the metadata that will be incorporated into the PDF file when you compile the memoria.tex file. Then upload it back to your project.
\usepackage[a-1b]{pdfx}
% LINKS
\usepackage{hyperref}
\hypersetup{colorlinks=true,
linkcolor=black, % links to parts of the document (e.g. index) in black
urlcolor=blue} % links to resources outside the document in blue
% MATH EXPRESSIONS
\usepackage{amsmath,amssymb,amsfonts,amsthm}
% Character encoding
\usepackage{txfonts}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
% English settings
\usepackage[english]{babel}
\usepackage[babel, english=american]{csquotes}
\AtBeginEnvironment{quote}{\small}
% Footer settings
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\rfoot{\thepage}
\fancypagestyle{plain}{\pagestyle{fancy}}
% DESIGN OF THE TITLES of the parts of the work (chapters and epigraphs or sub-chapters)
\usepackage{titlesec}
\usepackage{titletoc}
\titleformat{\chapter}[block]
{\large\bfseries\filcenter}
{\thechapter.}
{5pt}
{\MakeUppercase}
{}
\titlespacing{\chapter}{0pt}{0pt}{*3}
\titlecontents{chapter}
[0pt]
{}
{\contentsmargin{0pt}\thecontentslabel.\enspace\uppercase}
{\contentsmargin{0pt}\uppercase}
{\titlerule*[.7pc]{.}\contentspage}
\titleformat{\section}
{\bfseries}
{\thesection.}
{5pt}
{}
\titlecontents{section}
[5pt]
{}
{\contentsmargin{0pt}\thecontentslabel.\enspace}
{\contentsmargin{0pt}}
{\titlerule*[.7pc]{.}\contentspage}
\titleformat{\subsection}
{\normalsize\bfseries}
{\thesubsection.}
{5pt}
{}
\titlecontents{subsection}
[10pt]
{}
{\contentsmargin{0pt}
\thecontentslabel.\enspace}
{\contentsmargin{0pt}}
{\titlerule*[.7pc]{.}\contentspage}
% Tables and figures settings
\usepackage{multirow} % combine cells
\usepackage{caption} % customize the title of tables and figures
\usepackage{floatrow} % we use this package and its \ ttabbox and \ ffigbox macros to align the table and figure names according to the defined style.
\usepackage{array} % with this package we can define in the following line a new type of column for tables: custom width and centered content
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\DeclareCaptionFormat{upper}{#1#2\uppercase{#3}\par}
\usepackage{graphicx}
\graphicspath{{imagenes/}} % Images folder
% Table layout for engineering
\captionsetup*[table]{
format=upper,
name=TABLE,
justification=centering,
labelsep=period,
width=.75\linewidth,
labelfont=small,
font=small
}
% Figures layout for engineering
\captionsetup[figure]{
format=hang,
name=Fig.,
singlelinecheck=off,
labelsep=period,
labelfont=small,
font=small
}
% FOOTNOTES
\usepackage{chngcntr} % continuous numbering of footnotes
\counterwithout{footnote}{chapter}
% CODE LISTINGS
% support and styling for listings. More information in https://es.wikibooks.org/wiki/Manual_de_LaTeX/Listados_de_código/Listados_con_listings
\usepackage{listings}
% Custom listing
\lstdefinestyle{estilo}{ frame=Ltb,
framerule=0pt,
aboveskip=0.5cm,
framextopmargin=3pt,
framexbottommargin=3pt,
framexleftmargin=0.4cm,
framesep=0pt,
rulesep=.4pt,
backgroundcolor=\color{gray97},
rulesepcolor=\color{black},
%
basicstyle=\ttfamily\footnotesize,
keywordstyle=\bfseries,
stringstyle=\ttfamily,
showstringspaces = false,
commentstyle=\color{gray45},
%
numbers=left,
numbersep=15pt,
numberstyle=\tiny,
numberfirstline = false,
breaklines=true,
xleftmargin=\parindent
}
\captionsetup*[lstlisting]{font=small, labelsep=period}
\lstset{style=estilo}
\renewcommand{\lstlistingname}{\uppercase{Código}}
% REFERENCES
% IEEE bibliography setup
\usepackage[backend=biber, style=ieee, isbn=false,sortcites, maxbibnames=6, minbibnames=1]{biblatex} % Setting for IEEE citation style, recommended for engineering. "maxbibnames" indicates that from 6 authors truncate the list in the first one (minbibnames) and add "et al." as used in the IEEE style.
\addbibresource{referencias.bib} % The references.bib file in which the bibliography used should be
%-------------
% DOCUMENT
%-------------
\begin{document}
\pagenumbering{roman} % Roman numerals are used in the numbering of the pages preceding the body of the work.
%----------
% COVER
%----------
\begin{titlepage}
\begin{sffamily}
\color{azulUC3M}
\begin{center}
\begin{figure}[H] % UC3M Logo
\makebox[\textwidth][c]{\includegraphics[width=16cm]{logo_UC3M.png}}
\end{figure}
\vspace{2.5cm}
\begin{Large}
Master Degree in...\\
2020-2021\\ % Academic year
\vspace{2cm}
\textsl{Master Thesis}
\bigskip
\end{Large}
{\Huge ``Thesis title''}\\
\vspace*{0.5cm}
\rule{10.5cm}{0.1mm}\\
\vspace*{0.9cm}
{\LARGE Author's complete name}\\
\vspace*{1cm}
\begin{Large}
1st Tutor complete name\\
2nd Tutor complete name\\
Place and date\\
\end{Large}
\end{center}
\vfill
\color{black}
\fbox{
\begin{minipage}{\linewidth}
\textbf{AVOID PLAGIARISM}\\
\footnotesize{The University uses the \textbf{Turnitin Feedback Studio} for the delivery of student work. This program compares the originality of the work delivered by each student with millions of electronic resources and detects those parts of the text that are copied and pasted. Plagiarizing in a TFM is considered a \textbf{\underline{Serious Misconduct}}, and may result in permanent expulsion from the University.}\end{minipage}}
% IF OUR WORK IS TO BE PUBLISHED UNDER A CREATIVE COMMONS LICENSE, INCLUDE THESE LINES. IS THE RECOMMENDED OPTION.
\noindent\includegraphics[width=4.2cm]{creativecommons.png}\\ % Creative Commons Logo
\footnotesize{This work is licensed under Creative Commons \textbf{Attribution – Non Commercial – Non Derivatives}}
\end{sffamily}
\end{titlepage}
\newpage % blank page
\thispagestyle{empty}
\mbox{}
\newpage % blank page
\thispagestyle{empty}
\mbox{}
%----------
% ABSTRACT AND KEYWORDS
%----------
\renewcommand\abstractname{\large\bfseries\filcenter\uppercase{Summary}}
\begin{abstract}
\thispagestyle{plain}
\setcounter{page}{3}
% Write your abstract
\textbf{Keywords:} % add the keywords
\vfill
\end{abstract}
\newpage % Blank page
\thispagestyle{empty}
\mbox{}
%----------
% Dedication
%----------
\chapter*{Dedication}
\setcounter{page}{5}
% Write here
\vfill
\newpage % blank page
\thispagestyle{empty}
\mbox{}
%----------
% TOC
%----------
%--
% TOC
%-
\tableofcontents
\thispagestyle{fancy}
\newpage % blank page
\thispagestyle{empty}
\mbox{}
%--
% List of figures. If they are not included, comment the following lines
%-
\listoffigures
\thispagestyle{fancy}
\newpage % blank page
\thispagestyle{empty}
\mbox{}
%--
% List of tables. If they are not included, comment the following lines
%-
\listoftables
\thispagestyle{fancy}
\newpage % blankpage
\thispagestyle{empty}
\mbox{}
%----------
% THESIS
%----------
\clearpage
\pagenumbering{arabic} % numbering with Arabic numerals for the rest of the document.
\chapter{Introduction}
% IMPORTANT: Latex special characters are: # $ % & \ ^ _ { } ~. To avoid mistakes when compiling try writing \ before. For: \ use \textbackslash ; for ^ \textasciitilde and ~ \textasciicircum.
% Example of figure:
% \begin{figure}[H]
% \ffigbox[\FBwidth] {
% \caption[Name as seen in index]{Figure name}
% }
% {\includegraphics[scale=0.6]{imagenes/creativecommons.png}}
% \end{figure}
% Example of table:
% \begin{table}[H]
% \ttabbox[\FBwidth]
% {\caption{Lorem ipsum}}
% {\begin{tabular}{|c|P{1.5cm}|c|P{1.5cm}|P{2cm}|c|P{1.5cm}|P{2cm}|}
% \hline
% \multicolumn{2}{|c|}{\textbf{I}} & \multicolumn{2}{c|}{\textbf{II}} & \multicolumn{3}{c|}{\textbf{III}} & \textbf{IV} \\
% \hline
% x & y & x & y & x & y & x & y \\
% \hline
% 10.0 & 8.04 & 10.0 & 9.14 & 10.0 & 7.46 & 8.0 & 6.58 \\
% \hline
% 8.0 & 6.95 & 8.0 & 8.14 & 8.0 & 6.77 & 8.0 & 5.76 \\
% \hline
% 13.0 & 7.58 & 13.0 & 8.74 & 13.0 & 12.74 & 8.0 & 7.71 \\
% \hline
% 9.0 & 8.81 & 9.0 & 8.77 & 9.0 & 7.11 & 8.0 & 8.84 \\
% \hline
% 11.0 & 8.33 & 11.0 & 9.26 & 11.0 & 7.81 & 8.0 & 8.47 \\
% \hline
% 14.0 & 9.96 & 14.0 & 8.10 & 14.0 & 8.84 & 8.0 & 7.04 \\
% \hline
% 6.0 & 7.24 & 6.0 & 6.13 & 6.0 & 6.08 & 8.0 & 5.25 \\
% \hline
% 4.0 & 4.26 & 4.0 & 3.10 & 4.0 & 5.39 & 19.0 & 12.50 \\
% \hline
% 12.0 & 10.84 & 12.0 & 9.13 & 12.0 & 8.15 & 8.0 & 5.56 \\
% \hline
% 7.0 & 4.82 & 7.0 & 7.26 & 7.0 & 6.42 & 8.0 & 7.91 \\
% \hline
% 5.0 & 5.68 & 5.0 & 4.74 & 5.0 & 5.73 & 8.0 & 6.89 \\
% \hline
% \multicolumn{5}{l}{Source: BOE}
% \end{tabular}}
% \end{table}
% Start writing here----------------------------------------------------
%----------
% Bibliography
%----------
\clearpage
\addcontentsline{toc}{chapter}{Bibliography}
\printbibliography
%----------
% Appendix
%----------
% If your work includes Appendix, you can uncomment the following lines
%\chapter* {Appendix x}
%\pagenumbering{gobble} % Appendix pages are not numbered
\end{document}