Hi, I know how to get the word 'Page' over my page numbers in my toc, but I want to center it over the page numbers. Right now the word 'Page' is flush on the right margin.
Also, how can I get the word 'Figure' to appear above my figure numbers in my table of figures?
Thanks!
Text Formatting ⇒ Center 'Page' over page number in TOC.
Center 'Page' over page number in TOC.
Hi rjkern,
Welcome to the LaTeX community!
Would you please add a
minimal working example (please follow the link if you don't know what it is) so we can show the correct solution for your case. Often there is more than one way and which one very often depends on the actual document and its settings.
Regards
Welcome to the LaTeX community!
Would you please add a

Regards
site moderator & package author
Center 'Page' over page number in TOC.
I'll be honest, I don't know a lot of LaTeX. Most of my document is built in a template file that was provided to me by the graduate office of my school. Here is how I'm generating the ToC and ToF.
Here is what it produces.
I want the word 'Page' to be centered over the page numbers and For the table of figures, I want the word 'Figure' to be left aligned above my figure numbers.
Code: Select all
Code, edit and compile here:
\addtocontents{toc}{~\hfill\textbf{Page}\par}\addtotoc{Title Page}{\maketitle} % Generate the title page\doublespacing % Text should be double spaced\setcounter{page}{2} % Abstract begins on page 2\addtotoc{Abstract}{\input{abstract.tex}} % Generate the abstract\singlespacing % Single space the lists\tableofcontents \clearpage % Generate the Table of Contents\addtocontents{lof}{~\hfill\textbf{Page}\par}\addtotoc{List of Figures}{\listoffigures} % Generate the List of Figures
Last edited by localghost on Sat Sep 22, 2012 6:47 pm, edited 1 time in total.
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Center 'Page' over page number in TOC.
Hi rjkern,
welcome to the board!
Did you see this in good books? Centering "Page" over page numbers of variable width? You have arabic numbers with a single digit and I guess probably also larger numbers, and roman numbers of varying width, such as i and iv which we can see. So, do you want a centered position in relation to some single digit (even i is thinner than 2), or regarding two or three digits or numbers such as viii?
Consequently, all numbers should be centered below "Page", but it results in a ragged right margin.
The simple solution is, to keep it flush right. This is consistent with the full justification of LaTeX in general: a straight left text edge, a straight right edge.
Do you agree, or how exactly do you desire the centering then?
Stefan
welcome to the board!
Did you see this in good books? Centering "Page" over page numbers of variable width? You have arabic numbers with a single digit and I guess probably also larger numbers, and roman numbers of varying width, such as i and iv which we can see. So, do you want a centered position in relation to some single digit (even i is thinner than 2), or regarding two or three digits or numbers such as viii?
Consequently, all numbers should be centered below "Page", but it results in a ragged right margin.
The simple solution is, to keep it flush right. This is consistent with the full justification of LaTeX in general: a straight left text edge, a straight right edge.
Do you agree, or how exactly do you desire the centering then?
Stefan
LaTeX.org admin
Re: Center 'Page' over page number in TOC.
The Manuscript Review Office at my University requires the word 'Page' to be centered over the page numbers. Otherwise I'd just leave it as is. I think as long as it is relatively centered over that column it should be fine.
Re: Center 'Page' over page number in TOC.
Please, does anyone have a suggestion I can try? I really need to get this in and I can't seem to find how to do this anywhere.
Center 'Page' over page number in TOC.
Hi,
You can try this, it does the trick :
You can try this, it does the trick :
Code: Select all
Code, edit and compile here:
\documentclass[12pt,a4paper]{article}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage{geometry}\usepackage{blindtext}\def\clap#1{\hbox to 0pt{\hss #1\hss}}% like \rlap or \llap, but centered\newcommand{\mypage}{\clap{Page~~}}% unbreakable spaces are needed to adjust centering of the "Page" word\addtocontents{toc}{\hfill{\bfseries\mypage}\par\nobreak}\begin{document}\tableofcontents\blinddocument\end{document}