GeneralParagraph page number misalignment in table of contents

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
preethamam
Posts: 4
Joined: Tue Jun 26, 2012 2:22 am

Paragraph page number misalignment in table of contents

Post by preethamam »

I am using the Ph.D. dissertation .cls file. When I create a paragraph there is a misalignment in the paragraph page number in TOC.
Ccmpz.png
Ccmpz.png (223.35 KiB) Viewed 1526 times
Below is the minimal code:

Code: Select all

\documentclass[final]{USC-Thesis_Minimal}
\usepackage[lofdepth,lotdepth,caption=false]{subfig}
\begin{document}
\title{Some title}

\author{Some Name}
\major{Some Engineering}
\month{May}
\year{2019}

\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\maketitle

% Table Of Contents
\cleardoublepage\phantomsection
\renewcommand{\contentsname}{Table of Contents}
\tableofcontents

% List of tables
\listoftables

% List of figures
\listoffigures

% Begin Body
\mainmatter

\chapter{Chapter 1} 
\section{A very long section, very long text section}
\subsection{A very long subsection, very long text subsection}
\subsubsection{A very long subsubsection Very long text subsubsection}
\paragraph{A long paragraph}

\end{document}

Below is the relevant part of the cls file.

Code: Select all

%Margins of Table of Contents - so that the page listings for toc do 
%not align with page number 
\cftsetrmarg{0.7in}
\newlength{\numtomarg}
\setlength{\numtomarg}{0.2in}
\renewcommand{\cftchapafterpnum}{\hspace{\numtomarg}\mbox{}}
\renewcommand{\cftsecafterpnum}{\hspace{\numtomarg}\mbox{}}
\renewcommand{\cftsubsecafterpnum}{\hspace{\numtomarg}\mbox{}}
\renewcommand{\cftsubsubsecafterpnum}{\hspace{\numtomarg}\mbox{}}
\renewcommand{\cftfigafterpnum}{\hspace{\numtomarg}\mbox{}}
\renewcommand{\cftsubfigafterpnum}{\hspace{\numtomarg}\mbox{}}
\renewcommand{\cfttabafterpnum}{\hspace{\numtomarg}\mbox{}}
\renewcommand{\cftsubtabafterpnum}{\hspace{\numtomarg}\mbox{}}
I couldn't find an alternative for the paragraph. Similar to:

Code: Select all

\renewcommand{\cftparagraphafterpnum}{\hspace{\numtomarg}\mbox{}}
Here is the link to the class file. Can somebody please help me to fix this issue?
Paghalaya

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
preethamam
Posts: 4
Joined: Tue Jun 26, 2012 2:22 am

Paragraph page number misalignment in table of contents

Post by preethamam »

Using the below LaTeX command did the trick:

Code: Select all

\renewcommand{\cftparaafterpnum}{\hspace{\numtomarg}\mbox{}}
Paghalaya
Post Reply