# How to move the word “page” slightly left in table of content?

I am facing a problem in the table of contents, which occurred when I changed my document from a4paper to b5. The word "page" in the table of contents, list of figures and list of tables appears slightly to the right of the page numbers. How can I bring it above the page numbers?

MWE

\documentclass[singlespace,twoside,tocchapterhead,b5paper]{UPMthesisEnglish}
%(Many other packages)
\usepackage[top=25mm, bottom=32.3mm, left=40mm, right=25mm]{geometry}
\usepackage{caption}
\captionsetup[table]{font=bf}
\captionsetup[figure]{font=bf}

\begin{document}

\include{Title}
\pagenumbering{roman}
\include{Abstract}
\makeatletter
\renewcommand{\@dotsep}{10000}
\makeatother

\tableofcontents
\listoftables
\listoffigures
\mainmatter

\end{document}

• Welcome to TeX.SX! I wonder how you get the word Page there at all. Please show us the code that produced this Table of Content – user31729 Sep 20 '15 at 21:06
• Hi, welcome to TeX.SX. Unfortunately it's impossible to help you without any indication of the code you're using. If I'm honest with you, my first thought on reading this was simply 'what have you done there?' In order to get the kind of answers you need (or any answers, really) you need to answer that question. Try providing a Minimum Working Example (MWE) meta.tex.stackexchange.com/questions/228/…. There are so many different things you can do with (La)TeX and its compatriots that you can't assume we'll know what you're doing – Au101 Sep 20 '15 at 21:08
• Cutting, folding and gluing are not desired actions, I suppose. ;-) – Przemysław Scherwentke Sep 20 '15 at 22:57
• Our university gave a template. I prepared my thesis using a4paper; everything was perfect then the university changed the policy and asked us to change it to b5paper. When I used b5; everything got messed up. I fixed everything but this problem; I am unable to solve. – Arslan Musaddiq Sep 21 '15 at 8:43
• @Au101 this is the code: \documentclass[singlespace,twoside,tocchapterhead,b5paper]{UPMthesisEnglish} %(Many other packages)% \usepackage[top=25mm, bottom=32.3mm, left=40mm, right=25mm]{geometry} \usepackage{caption} \captionsetup[table]{font=bf} \captionsetup[figure]{font=bf}\begin{document} \include{Title} \pagenumbering{roman} \include{Abstract} \addcontentsline{toc}{chapter} \makeatletter \renewcommand{\@dotsep}{10000} \makeatother \tableofcontents \listoftables \listoffigures \mainmatter \end{document} – Arslan Musaddiq Sep 21 '15 at 8:45

The class UPMthesisEnglish.cls has some serious design issues. Save a copy of UPMthesisEnglish.cls as modUPMthesisEnglish.cls in your working directory (the same where your .tex is). Open the copy and search for the line

\addtocontents{lot}{{\hspace{.5cm}}\textbf{Table}{\hspace{12.3cm}}{\textbf{Page}}\par}


replace it with

\addtocontents{lot}{\hspace*{.5cm}\textbf{Table}\hfill\textbf{Page}\par}


Now, search for the line

\addtocontents{lof}{{\hspace{.5cm}}\textbf{Figure}{\hspace{12.1cm}}{\textbf{Page}}\par}


and replace it with

\addtocontents{lof}{\hspace*{.5cm}\textbf{Figure}\hfill\textbf{Page}\par}


Save the changes. In your document, use the modified copy:

\documentclass[singlespace,twoside,tocchapterhead,b5paper]{modUPMthesisEnglish}

\makeatletter
\renewcommand{\@dotsep}{10000}
\makeatother

\begin{document}

\tableofcontents
\listoftables
\listoffigures

\begin{table}
\caption{A test table}
\end{table}

\begin{figure}
\caption{A test figure}
\end{figure}

\end{document}


The result:

and

• I tried your procedure but output was same; I don't know why. Then I got the clue from your suggested procedure and opened UPMthesisEnglish.lof in which I made changes in a same way as you suggested. Logically It should work the way you wrote but it worked when I edited the .lof, .lot and .toc file. Now seems everything is in position. Thanks :) – Arslan Musaddiq Sep 22 '15 at 18:48
• @ArslanMusaddiq Also, remember that with the changes I suggested you need to compile twice to see the changes. – Gonzalo Medina Sep 22 '15 at 21:07