I have a horizontal line drawn in the header of the last page of the list of tables in my document, how can I remove it?

16 views Asked by At

enter image description here

I have this line in the header of the last page of the list of tables in my document. Just before the headers start in the content, which is the only part where I want headers. Therefore, I want to delete that line, but I don't know how.

My code is the following:

\documentclass[12pt,letterpaper,oneside]{book}


%% Packages necesarios
\RequirePackage[utf8]{inputenc} %Encoding
%\RequirePackage[top=2.54cm, left=3cm, bottom=2.54cm, right=2.54cm, paper=letterpaper,voffset=6pt]{geometry} % Margenes
\RequirePackage[
letterpaper,
includehead,
includefoot,
tmargin=20mm,
bmargin=20mm,
lmargin=25.4mm,
rmargin=25.4mm,
nomarginpar,
headheight=14pt, 
]{geometry}

\input{fuentes/paquetes}

\setcounter{secnumdepth}{3} % para que ponga 1.1.1.1 en subsubsecciones.
\setcounter{tocdepth}{2} % para que ponga subsubsecciones en el indice.

\raggedbottom % evita que LaTeX distribuya espacios en blanco a lo largo de la hoja.
\selectlanguage{spanish}

\addto\captionsspanish{\renewcommand\listtablename{Índice de Tablas}}
\addto\captionsspanish{\renewcommand\listfigurename{Índice de Figuras}}
\addto\captionsspanish{\renewcommand\tablename{Tabla}}
\addto\captionsspanish{\renewcommand\contentsname{Tabla de Contenido}}
    
\begin{document}
    \include{fuentes/i.portada}

    % para crear una cara en blanco
    \newpage
    Este trabajo ha sido parcialmente financiado por...
    $\ $
    \thispagestyle{empty} % para que no se numere esta página


    \pagestyle{plain} % plain: sin encabezados de página, los pies de página consisten en un número de página centrado

    \spacing{1.5}
    \include{fuentes/ii.resumen}
    \include{fuentes/iii.dedicatoria}
    \include{fuentes/iv.agradecimientos}

    % Tablas de contenido, figuras y tablas:
    {\hypersetup{linkcolor=black}
    \tableofcontents % para que aparezca la tabla de contenidos.
    \listoffigures % indice de figuras
    \listoftables} % indice de tablas
    

     % Encabezados de paginas
    \pagestyle{fancy}
    \fancyhead{} % clear all header fields
    \fancyhead[C]{\nouppercase{\rightmark\hfill\leftmark}}
    \fancyhead[C]{\nouppercase{\leftmark\hfill\rightmark}}
    \fancyfoot{} % clear all footer fields
    \fancyfoot[C]{\thepage}

    
    \makeatletter
    \newcommand{\mysection}[2][\empty]{\bgroup
      \let\sectionmark=\@gobble
      \edef\temp{#1}%
      \ifx\empty\temp\relax \edef\temp{#2}\fi
      \section[\temp]{#2}%
    \egroup}
    \makeatother


    % Aquí comienzan los capítulos
    \spacing{1.5}
    \include{fuentes/A. Introducción}
        \include{fuentes/a1. Problema_de_investigación}
        \include{fuentes/a2. Revisión_bibliográfica}
        \include{fuentes/a3. Hipotesis_y_Objetivos}
    \include{fuentes/B. Marco_teórico}
    \include{fuentes/C. Metodología}
    \include{fuentes/D. Comparativa_empirica}
        \include{fuentes/d1. Resultados_SPP}
        \include{fuentes/d2. Resultados_KP01}
    \include{fuentes/E. Conclusiones}
    \include{fuentes/F. Recomendaciones}
    
    % Bibliografia
    
    % Si es con biblatex
    \printbibliography[heading=bibintoc,title={Bibliografía}]

    % Si es con natbib
    %\addcontentsline{toc}{chapter}{Bibliografía}
    %\bibliographystyle{acm} % estilo de la bibliografía.
    %\bibliography{yyyy} % yyyy.bib es el fichero donde está salvada la bibliografía.

    % Apendice
    \appendix
    \include{fuentes/G. Apéndice_1}
    \include{fuentes/G. Apéndice_2}

\end{document}

I would be very grateful if someone could help me solve this problem please.

I tried \pagestyle{empty} and it didn't work.

0

There are 0 answers