I have the following code. My problem is that the table of contents displays the page number of chapters without \hfill, next to the title, unlike to the section titles which appears with dot filling in space (between numbers and titles) and aligned with the others page numbers of sections.

EDIT: Here is the complete code which i run.



\renewcommand\cftchapaftersnum{.}% adds dot after chapter title in ToC
%\renewcommand{\cftchapleader}{\cftdotfill{\hfill}} % for chapters




 \usepackage{pst-grad} % For gradients
 \usepackage{pst-plot} % For axes
 \usepackage[space]{grffile} % For spaces in paths
 \usepackage{etoolbox} % For spaces in paths
 \makeatletter % For spaces in paths

 \patchcmd\Gread@eps{\@inputcheck#1 }{\@inputcheck"#1"\relax}{}{}

%%%%%%%%%%%%%%%% Use custom style %%%%%%%%%%%%%%%%%%%%%%%%%%%
\author{Author Name}
\title{Title of thesis}
\date{4 january 2016}
\advisor{Advisor Name}
\committeememberone{Prof. 1}
\committeemembertwo{Prof. 2}
%% leave empty if less than 3: \committeemembertwo{}
\committeememberthree{Prof 3}
\separator{,\ }
%% another separator
%% \separator{\ $|$\ }
%% yet another one
%% \separator{\ \ding{'107}\ }
%% a simpler separator 
%% \separator{\ $\cdot$\ }
\city{Name of City}


%%%%%%%%%%%% New theorems %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%% Document starts %%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%% Start Roman numbering %%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%% Table of contents %%%%%%%%%%%%%%%%%%%%%%






%%%%%%%%%%% Return to normal numbering %%%%%%%%%%%%%%%%%%%%%
\chapter{Chapter Title} 


...and a picture

closed as unclear what you're asking by user31729, Mensch, Jesse, John Kormylo, Zarko Aug 27 '16 at 4:53

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Welcome to TeX.SX! Nice minimal example. However, I don't get the output as you: I get leader dots as expected. Are you using the book class or another one? The \makecover command looks suspicious. – egreg Jan 3 '16 at 20:43
  • I get everything as expected, is that what you get with the code provided? – Alenanno Jan 3 '16 at 20:50
  • At me doesn't work (well, after recent MikTeX upgrade I experienced a lot of problems, many packages doesn't work anymore). However, after remove all unnecessary packages the \tableofcontents show contents with dotted leaders (as expected). – Zarko Jan 3 '16 at 20:54
  • @egreg I'm using only book class. \makecover was useful to create the cover for my book. Also, the code which was creating the cover removed from me before post my problem here. Now, if i compile the code after remove some packages (from cover code) i'm getting the right result in my screen. I'll search for the problem more extensively. Thank you all for your replies! – mpouxa Jan 3 '16 at 21:49
  • @mpouxa Then the issue could be your cover. Would you post it? – Alenanno Jan 3 '16 at 22:04

Browse other questions tagged or ask your own question.