1

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.

\documentclass[oneside,a4paper,leqno]{book}

\usepackage[greek]{babel}
\usepackage[iso-8859-7]{inputenc}

\usepackage{tocloft}
\usepackage[dotinlabels]{titletoc}
\renewcommand\cftchapaftersnum{.}% adds dot after chapter title in ToC
\renewcommand\cftchapdotsep{\cftdotsep}
%\usepackage{hyperref}
%\renewcommand{\cftchapleader}{\cftdotfill{\hfill}} % for chapters
%\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}

\usepackage{pgfplots}
\usepgfplotslibrary{polar}
\pgfplotsset{compat=newest}
\usepackage{amscd}
\usepackage{tikz}
\usepackage{tikz-cd}
\usetikzlibrary{cd}

\usepackage{amsmath}


\usepackage[toc,page]{appendix}

\usepackage[usenames,dvipsnames]{pstricks}
 \usepackage{epsfig}
 \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}{}{}
 \makeatother
\def\quotient#1#2{
    \raise0.5ex\hbox{$#1$}\small/\lower1ex\hbox{$#2$}}





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


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%% New theorems %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtheorem{theorem}{Θεώρημα}[section]         
\newtheorem{lemma}[theorem]{Λήμμα}
\newtheorem{proposition}[theorem]{Πρόταση}
\newtheorem{corollary}[theorem]{Πόρισμα}
\newtheorem{definition}[theorem]{Ορισμός}
\newtheorem{remark}[theorem]{Παρατήρηση}
\newtheorem{example}{Παράδειγμα}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%% Document starts %%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%% Start Roman numbering %%%%%%%%%%%%%%
\pagenumbering{roman}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makecover

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

\tableofcontents

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}

Text.

\cleardoublepage


%%%%%%%%%%% Return to normal numbering %%%%%%%%%%%%%%%%%%%%%
\pagenumbering{arabic}
%\addtocontents{toc}{~\hfill\textbf{Σελίδα}\par}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Chapter Title} 

\end{document}

...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.