0

I'm trying to apply a pagestyle to the front page of my thesis (because it's required by my institution), but I can't get a way to make it. I have tried with \pagestyle{style} after and before my \begin{titlepage}, as same as \thispagestyle{style}.

Here's my MWE (tryied to reduce it as much as possible):

\documentclass[12pt]{report}

\usepackage[utf8]{inputenc} \usepackage[spanish, es-tabla]{babel} % pone el idioma en español

\usepackage{lipsum} % dummy text

\usepackage{geometry} % margenes del documento \geometry{letterpaper, top = {2,5cm}, bottom = {2,5cm}, inner = {2,5cm}, outer = {2,5cm}, head = {1,1cm}, foot = {1,1cm}, bindingoffset = {1,0cm}} % Si se va a usar dos paginas por hoja, agregar la opción twoside

\usepackage{etoolbox} \patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{} % necesario para poner encabezado en paginas de capítulos

% paquete para encabezado y pie de pagina \usepackage{fancyhdr} \pagestyle{fancy} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt}

\fancypagestyle{mystyle}

\pagestyle{mystyle} % Aplicar el estilo de numeración de página personalizado

% - - - - - T E R M I N O - C O M A N D O S - - - - -

\fancypagestyle{mystyle}{ \fancyhead{} \fancyfoot{} \fancyhead[L]{\footnotesize{\begin{tabular}{@{}c} Text\ Text\ Text \end{tabular}}} \fancyhead[R]{{\footnotesize{Text}}}

\fancyfoot[R]{\thepage}
\fancyheadoffset[lh]{0.85cm}

}

\fancypagestyle{portada}{ \fancyhead{} \fancyfoot{} \fancyhead[L]{\footnotesize{\begin{tabular}{@{}c} Text\ Text\ Text \end{tabular}}} \fancyhead[R]{{\footnotesize{Text}}}

\fancyheadoffset[lh]{0.85cm}

}

\begin{document}

\thispagestyle{portada} \begin{titlepage} \vspace*{10cm} \begin{center} \fontsize{20pt}{1.5em} \selectfont \textbf{\MakeUppercase{``Title of the thesis''}} \end{center} \end{titlepage}

\clearpage

\pagestyle{mystyle}

\chapter{Text}

\lipsum[1-3]

\end{document}

The output is:

enter image description here

enter image description here

JJP
  • 81

1 Answers1

0

As @cabohah mentioned, the solution to this problem is to move \thispagestyle{portada} inside the \begin{titlepage}, like this:

\begin{titlepage}
    \thispagestyle{portada}
    .
    .
    .
\end{titlepage}

This is because \begin{titlepage} defines it own pages tyle \thispagestyle{empty}

JJP
  • 81