0

I would like to put in the table of content a page counter independent to the pages of the article. I would like to use a Roman number style.

\documentclass[12pt,spanish]{article}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{graphicx}
\usepackage{lipsum} 
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{emptypage}
\usepackage[left=2cm, right=2cm, binding=1.5cm, top=2.5cm, bottom=3cm]{geometry}
\usepackage{lipsum}
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %

\begin{document}

% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %

\pagestyle{fancy}
\fancyhf{}% clear all header and footer fields
\lhead{\setlength{\unitlength}{1mm}
   \begin{picture}(0,0)
     \put(1,0){\includegraphics[scale=0.15]{example-image-a}}
   \end{picture}}
\rhead{\textsf{\textbf{Page: \thepage \hspace{1pt} of \pageref{LastPage} }}}
\chead{\large{\textsf{\textbf{INSTITUTO UNIVERSITARIO AERONÁUTICO\\Facultad de Ingeniería}}}}
\headsep=18mm 

\renewcommand{\headrulewidth}{0.1pt}%line

% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %

\begin{titlepage}

    \begin{center}
    \begin{figure}
        \centering
        \includegraphics[scale=1.1]{example-image-a}
        \vspace{15mm}
    \end{figure}
    
    {\Huge{Instituto Universitario Aeronáutico }}
\\
    \vspace{5mm}
    {\Large{Facultad de Ingeniería}}\\
    \vspace{10mm}
    {\large{\textbf{Resumen de Estructuras Aeronáuticas I}}}\\
    \vspace{15mm}
    {\Large{Franco, Caleb}}\\
    \end{center}

\end{titlepage}

\newpage


\tableofcontents

\newpage

\section{Introducc\'ion}
\lipsum

\end{document}

Look, this is my idea enter image description here

1
  • Replace \thepage with \Roman{page}.
    – Stephen
    Commented Nov 21, 2022 at 3:35

1 Answer 1

0

You can define a new style (named "toc" in the example) to be used before (and only for) \tableofcontents.

The "toc" style simply changes \thepage to \Roman{page} to display the page number in uppercase Roman letters.

\fancypagestyle{toc}{%  
    \fancyhf{}%
    \fancyhead[LO]{\includegraphics[scale=0.15]{example-image-a}}
    \fancyhead[CO]{\large{\textsf{\textbf{INSTITUTO UNIVERSITARIO AERONÁUTICO\\Facultad de Ingeniería}}}}
    \fancyhead[RO]{\textsf{\textbf{Page: \Roman{page} \hspace{1pt} of \pageref{LastPage} }}}%
}

Only \includegraphics[scale=0.15]{example-image-a} is needed to define the left header.

a

\documentclass[12pt,spanish]{article}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{graphicx}
\usepackage{lipsum} 
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{emptypage}
\usepackage[left=2cm, right=2cm, 
%binding=1.5cm, 
top=2.5cm, bottom=3cm]{geometry}
\usepackage{lipsum}
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
\pagestyle{fancy}
\fancyhf{}% clear all header and footer fields
\lhead{\includegraphics[scale=0.15]{example-image-a}}
\rhead{\textsf{\textbf{Page: \thepage \hspace{1pt} of \pageref{LastPage} }}}
\chead{\large{\textsf{\textbf{INSTITUTO UNIVERSITARIO AERONÁUTICO\\Facultad de Ingeniería}}}}
\headsep=18mm 

\renewcommand{\headrulewidth}{0.1pt}%line   

\fancypagestyle{toc}{%  added <<<<<<<<<<<<
    \fancyhf{}%
    \fancyhead[LO]{\includegraphics[scale=0.15]{example-image-a}}
    \fancyhead[CO]{\large{\textsf{\textbf{INSTITUTO UNIVERSITARIO AERONÁUTICO\\Facultad de Ingeniería}}}}
    \fancyhead[RO]{\textsf{\textbf{Page: \Roman{page} \hspace{1pt} of \pageref{LastPage} }}}%
}

\begin{document}
            
    \begin{titlepage}
        
        \begin{center}
            \begin{figure}
                \centering
                \includegraphics[scale=1.1]{example-image-a}
                \vspace{15mm}
            \end{figure}
            
            {\Huge{Instituto Universitario Aeronáutico }}
            \\
            \vspace{5mm}
            {\Large{Facultad de Ingeniería}}\\
            \vspace{10mm}
            {\large{\textbf{Resumen de Estructuras Aeronáuticas I}}}\\
            \vspace{15mm}
            {\Large{Franco, Caleb}}\\
        \end{center}
        
    \end{titlepage}
    
    \thispagestyle{toc}% added <<<<<<<<<<   
    \tableofcontents        

    \newpage
    \section{Introducc\'ion}
    \lipsum
    
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .