Page LayoutTable of Content Formating

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
vortex3
Posts: 12
Joined: Mon Jan 12, 2009 1:53 am

Table of Content Formating

Post by vortex3 »

Hello,

I need to change two things in the Table of Content (and also in List of Figures and List of Tables):

1) I need to change the upper margin (I need to add 0,5 or 1 cm)

2) I need to put the page number in the upper right corner (by default is in the bottom center). I tried to do this with a new page style (defined by \newpagestyle{titulos}... and using \thispagestyle{titulos} before \tableofcontents) but it didn't work. Although, it worked to place the Chapter pages number.

Could anybody help with this?

Thank you very much

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Table of Content Formating

Post by gmedina »

Hi,

the following example shows a posible solution using some of the commands provided by the tocloft and fancyhdr packages (for further information, please refer to the documentation of the packages):

Code: Select all

\documentclass{book}
\usepackage{fancyhdr}
\usepackage{tocloft}
\pagestyle{fancy}

\fancyhf{}
\renewcommand\headrulewidth{0pt}
\rhead{\thepage}

\tocloftpagestyle{fancy}
\setlength\cftbeforetoctitleskip{1cm}
\setlength\cftbeforeloftitleskip{1cm}
\setlength\cftbeforelottitleskip{1cm}

\begin{document}

\tableofcontents
\clearpage
\listoffigures
\clearpage
\listoftables
\clearpage

\end{document}
Of course, this solution will be useless if you have already defined the page style fancy in a different way. If this is the case, then let us know it to think about an alternate solution (and please tell us which document class you are using).
1,1,2,3,5,8,13,21,34,55,89,144,233,...
vortex3
Posts: 12
Joined: Mon Jan 12, 2009 1:53 am

Re: Table of Content Formating

Post by vortex3 »

Hello,

Thank you very much. It works perfect!
Post Reply