\documentclass[12pt,
	paper=letterpaper,%
	twoside=false,% 
	openright,%
	parskip=full,%
	chapterprefix=true,%	
	headings=normal,%	
	bibliography=totoc,%
	listof=totoc,%
	titlepage=on,%
	captions=tableabove,%
	draft=false,%
]{report}%

\usepackage[					
	paper=letterpaper,
	nohead,
	includefoot,
	includemp,
	bindingoffset=0.5cm,
	top=2cm,
	left=2.3cm,
	right=0.1cm,
	bottom=2cm,
]{geometry}

\setlength {\marginparwidth }{2cm} 

% **************************************************
% Información del documento
% **************************************************
\newcommand{\titulo}{{\fontsize{15.5}{14}\selectfont Este Es el título de mi Tesis}}
\newcommand{\estudiante}{Presenta: {\bfseries Fulanito de tal (estudiante)}}
\newcommand{\modalidad}{{Tesis para obtener el grado de Maestro en \\Matemáticas}}
\newcommand{\fecha}{Noviembre de 2025.}

\newcommand{\director}{Dr. Zutanito}
\newcommand{\codirector}{Dra. Perenganita}

% **************************************************
% Información de la institución
% **************************************************
\newcommand{\universidad}{{\fontsize{13}{14}\selectfont Universidad Veracruzana.}}
\newcommand{\entidadAcademica}{{\bfseries Facultad de Matemáticas.}}
\newcommand{\region}{{ \bfseries Región: Xalapa.}}
\newcommand{\programaEducativo}{{Maestría en Matemáticas.}}


% **************************************************
% Paquetes y configuraciones
\usepackage{amsmath}
\usepackage{amssymb}

% **************************************************
\usepackage[utf8]{inputenc}		
\usepackage{setspace,xcolor}

\usepackage{blindtext}
\usepackage{booktabs}
\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}

\usepackage[spanish]{babel} 
\usepackage[spanish,onelanguage,linesnumbered,ruled,vlined]{algorithm2e}
%\usepackage{natbib}

\usepackage{graphicx}

\usepackage[absolute]{textpos}
\usepackage{lscape} 
\usepackage{subfig}

%%%% Estos tres paquetes se incluyen sólo si se desea cargar datos a las tablas desde un archivo (Ver sección de resultados)
\usepackage{csvsimple}
\usepackage{array}
\usepackage{longtable}

%%%%%%%% Tipografías matemáticas
\usepackage{txfonts}
\usepackage{upgreek}



\newcolumntype{L}{>{$}l<{$}} % math-mode version of "l" column type
\newcolumntype{C}{>{$}c<{$}} % math-mode version of "l" column type
\usepackage{hyperref}
\usepackage{qrcode}
\usepackage{pstricks}
\usepackage[dvipsnames]{xcolor}

%\usetikzlibrary{arrows}
\usepackage{tikz}
\usetikzlibrary{positioning,intersections,through,backgrounds}
\usetikzlibrary{calc,quotes,angles,arrows,fit,shapes}
\usetikzlibrary{trees,graphs}
\usetikzlibrary{fadings}
\usetikzlibrary{babel}
\thispagestyle{empty}
\spanishdecimal{.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%           F   O   R   M   A   T   O           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\baselinestretch}{1}

\usepackage{fancyhdr}
\usepackage{titlesec}
\titleformat{\chapter}%0
			%[hang]%1
			%{\fontfamily{GilliusADFNoTwo-LF}%
			%	\selectfont\fontsize{15}{17}\bfseries}%2
            {\vspace{-2cm}\fontsize{16}{17}\bfseries}
			{\thechapter}%3
			{10pt}%4
			{} %5
			[\vspace{-1cm}] %6
			
\titleformat{\section}%0
			[hang]%1
			{\fontsize{14}{21}%
			\bfseries}%2
			{\thesection\hspace*{10pt}}%3
			{0pt}%4
			{\raggedright}%5
			[\phantomsection]%6

			
\titleformat{\subsection}[hang]%
			{\bfseries\fontsize{12}{21}}%
			{\thesubsection\hspace*{10pt}}%
			{0pt}%
			{\raggedright}%
			[\phantomsection]
			
\titleformat{\subsubsection}[hang]%
			{\bfseries\itshape\fontsize{12}{21}}%
			{\hspace{1.25cm}\thesubsubsection\hspace*{10pt}}%
			{0pt}%
			{\raggedright}%
			[\phantomsection]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Código en Python
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{maroon}{cmyk}{0, 0.87, 0.68, 0.32}
\definecolor{halfgray}{gray}{0.55}
\definecolor{ipython_frame}{RGB}{207, 207, 207}
\definecolor{ipython_bg}{RGB}{247, 247, 247}
\definecolor{ipython_red}{RGB}{186, 33, 33}
\definecolor{ipython_green}{RGB}{0, 128, 0}
\definecolor{ipython_cyan}{RGB}{64, 128, 128}
\definecolor{ipython_purple}{RGB}{170, 34, 255}

\usepackage{listings}

\lstset{
    breaklines=true,
    extendedchars=true,
    literate=
    {á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1
    {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1
    {à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1
    {À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1
    {ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
    {Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
    {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1
    {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1
    {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1
    {ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1
    {€}{{\EUR}}1 {£}{{\pounds}}1
}

\lstdefinelanguage{python}{
    morekeywords={access,and,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,not,or,pass,print,raise,return,try,while},
    morekeywords=[2]{abs,all,any,basestring,bin,bool,bytearray,callable,chr,classmethod,cmp,compile,complex,delattr,dict,dir,divmod,enumerate,eval,execfile,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,property,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip,apply,buffer,coerce,intern},
    sensitive=true,
    morecomment=[l]\#,
    morestring=[b]',
    morestring=[b]",
    morestring=[s]{'''}{'''},
    morestring=[s]{"""}{"""},
    morestring=[s]{r'}{'},
    morestring=[s]{r"}{"},
    morestring=[s]{r'''}{'''},
    morestring=[s]{r"""}{"""},
    morestring=[s]{u'}{'},
    morestring=[s]{u"}{"},
    morestring=[s]{u'''}{'''},
    morestring=[s]{u"""}{"""},
    % {replace}{replacement}{lenght of replace}
    % *{-}{-}{1} will not replace in comments and so on
    literate=
    {á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1
    {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1
    {à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1
    {À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1
    {ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
    {Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
    {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1
    {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1
    {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1
    {ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1
    {€}{{\EUR}}1 {£}{{\pounds}}1
    %
    {^}{{{\color{ipython_purple}\^{}}}}1
    {=}{{{\color{ipython_purple}=}}}1
    %
    {+}{{{\color{ipython_purple}+}}}1
    {*}{{{\color{ipython_purple}$^\ast$}}}1
    {/}{{{\color{ipython_purple}/}}}1
    %
    {+=}{{{+=}}}1
    {-=}{{{-=}}}1
    {*=}{{{$^\ast$=}}}1
    {/=}{{{/=}}}1,
    literate=
    *{-}{{{\color{ipython_purple}-}}}1
     {?}{{{\color{ipython_purple}?}}}1,
    %
    identifierstyle=\color{black}\ttfamily,
    commentstyle=\color{ipython_cyan}\ttfamily,
    stringstyle=\color{ipython_red}\ttfamily,
    keepspaces=true,
    showspaces=false,
    showstringspaces=false,
    rulecolor=\color{ipython_frame},
    frame=single,
    frameround={t}{t}{t}{t},
    framexleftmargin=6mm,
    numbers=left,
    numberstyle=\tiny\color{halfgray},
    backgroundcolor=\color{ipython_bg},
    % extendedchars=true,
    basicstyle=\scriptsize,
    keywordstyle=\color{ipython_green}\ttfamily,
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Código en java
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definecolor{DarkOrchid}{RGB}{164, 83, 138}
\definecolor{ForestGreen}{RGB}{0, 155, 85}

\lstdefinelanguage{java}{%
  % Basic settings
  basicstyle=\smaller\ttfamily,
  tabsize=4,
  %frame=single,
  showstringspaces=false,
  mathescape=true,
  breaklines=true,
  numbers=left,
  % Keywords, strings, and comments
  keywords={%
    abstract, continue, for, new, switch, assert, default, goto, package,
    synchronized, boolean, do, if, private, this, break, double, implements,
    protected, throw, byte, else, import, public, throws, case, enum,
    instanceof, return, transient, catch, extends, int, short, try, char,
    final, interface, static, void, class, finally, long, strictfp, volatile,
    const, float, native, super, while
  },
  keywords=[2]{%
  },
  morestring=[b]",
  morestring=[b]',
  morecomment=[l]{//},
  morecomment=[s]{/*}{*/},
  % Colors and style
  basicstyle=\scriptsize,
  keywordstyle=\color{blue},
  keywordstyle=[2]\color{DarkOrchid},
  commentstyle=\color{ForestGreen},
  stringstyle=\color{Red},
  numberstyle=\color{halfgray},
  frame=single,
    frameround={t}{t}{t}{t},
    framexleftmargin=6mm,
    backgroundcolor=\color{ipython_bg}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Código en C
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\lstdefinelanguage{cpp}{%
  % Basic settings
  basicstyle=\smaller\ttfamily,
  tabsize=4,
  showstringspaces=false,
  mathescape=true,
  breaklines=true,
  numbers=left,
  % Keywords, strings, and comments
  keywords={%
    alignas, alignof, and, and_eq, asm, auto, bitand, bitor, bool, break, case,
    catch, char, char16_t, char32_t, class, compl, const, constexpr,
    const_cast, continue, decltype, default, delete, do, double, dynamic_cast,
    else, enum, explicit, export, extern, false, float, for, friend, goto, if,
    inline, int, long, mutable, namespace, new, noexcept, not, not_eq, nullptr,
    operator, or, or_eq, private, protected, public, register,
    reinterpret_cast, return, short, signed, sizeof, static, static_assert,
    static_cast, struct, switch, template, this, thread_local, throw, true,
    try, typedef, typeid, typename, union, unsigned, using, virtual, void,
    volatile, wchar_t, while, xor, xor_eq
  },
  keywords=[2]{%
    vector, std
  },
  morestring=[b]",
  morestring=[b]',
  morecomment=[l]{//},
  morecomment=[s]{/*}{*/},
  morecomment=[l][\color{gray}]{\#},
  % Colors and style
  basicstyle=\scriptsize,
  keywordstyle=\color{blue},
  keywordstyle=[2]\color{DarkOrchid},
  commentstyle=\color{ForestGreen},
  stringstyle=\color{Red},
  numberstyle=\color{halfgray},
  frame=single,
    frameround={t}{t}{t}{t},
    framexleftmargin=6mm,
    backgroundcolor=\color{ipython_bg}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% R code
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{royb}{rgb}{0.25, 0.41, 0.88}
\definecolor{fg}{rgb}{0.13, 0.55, 0.13}

\lstdefinelanguage{erre}{%
  basicstyle=\tiny\ttfamily, 
  numbers=left,                   
  numberstyle=\tiny\color{blue},
  stepnumber=1,
  numbersep=5pt,  
  backgroundcolor=\color{white},
  showspaces=false,               
  showstringspaces=false,         
  showtabs=false,     
  frame=single,                
  rulecolor=\color{black},     
  tabsize=2,                     
  captionpos=b,                
  breaklines=true,                
  breakatwhitespace=false, 
  keywordstyle=\color{royb},     
  commentstyle=\color{YellowGreen},  
  stringstyle=\color{fg}    
} 



% **************************************************
% Agregado por Paty para el seguimiento de cambios
% **************************************************
\usepackage[commentmarkup=todo, xcolor={dvipdf,gray}, defaultcolor=magenta]{changes}
\definechangesauthor[name={Paty}, color=orange]{paty}

% *************************************************

\SetKwIF{If}{ElseIf}{Else}{Si}{Entonces}{Sino, Si}{De lo contrario}{Fin-Si}
\SetKwFor{For}{Para}{Hacer}{Fin-Para}
\SetKw{KwTo}{Hasta}

% **************************************************
% Document CONTENT
% **************************************************
\begin{document}

% --------------------------
% Renombre de partes
% --------------------------

\renewcommand{\tablename}{Tabla}

\renewcommand{\listfigurename}{Lista de Figuras}
\renewcommand{\listtablename}{Lista de Tablas}

\renewcommand{\bibname}{Bibliografía}

\addcontentsline{toc}{chapter}{\bibname}

% --------------------------
% Documento
% --------------------------
\pagestyle{empty}				
\input{contenido/01-portada}		
\cleardoublepage

\pagestyle{empty}
\input{contenido/02-agradecimientos}		
\cleardoublepage

\pagestyle{empty}
\input{contenido/03-dedicatoria}		
\cleardoublepage

\setcounter{tocdepth}{4}		
\tableofcontents			
\cleardoublepage

\pagenumbering{arabic}
\setcounter{page}{6}		

\listoffigures
\cleardoublepage

\listoftables
\cleardoublepage
\pagestyle{plain}

\input{contenido/04-Resumen}
\cleardoublepage		
\input{contenido/05-Introduccion}
\cleardoublepage
\input{contenido/06-Metodologia}
\cleardoublepage
\input{contenido/07-Resultados}
\cleardoublepage
\input{contenido/08-Conclusiones}
\cleardoublepage				
\input{contenido/09-Apendice_A}
\cleardoublepage
\input{contenido/10-Apendice_B}
\cleardoublepage
\input{contenido/11-Apendice_C}
\cleardoublepage
\input{contenido/12-Apendice_D}
\cleardoublepage


\bibliography{bibliografia}
\bibliographystyle{ieeetr}
\cleardoublepage

\input{fin}	
\cleardoublepage

\end{document}
