Please, consider the following code:
\documentclass[a4paper]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{cfr-lm}
\usepackage{titlesec}
\renewcommand{\thechapter}{\scshape\roman{chapter}}
\titleformat{\chapter}[display]
{\normalfont\fontsize{11pt}{12pt}\selectfont}{\thechapter}{0pt}{}
%%{\normalfont\fontsize{11pt}{12pt}\selectfont}{\chaptertitlename\space \thechapter}{11pt}{}
\renewcommand\thesection{\arabic{section}}
\titleformat{\section}
{\normalfont\fontsize{11pt}{12pt}\selectfont}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\fontsize{11pt}{12pt}\selectfont\itshape}{}{1em}{}
\titlespacing{\chapter}{0pt}{0pt}{3cm}
\usepackage{titletoc}
\titlecontents{chapter}
[1.5em] % ie, 1.5em (chapter) + 2.3em
{}
{\contentslabel{2.3em}}
{\hspace*{-2.3em}}
{}
%{\titlerule*[1pc]{.}\contentspage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% codice Pignalberi
\contentsmargin{0pt}
\titlecontents{chapter}[4pc]
{\contentsmargin{0pt}\makebox[0pt][r]{\thecontentspage\quad\makebox[30pt][l]%
{\textsc{\romannumeral\thecontentslabel\ quad}}}}
{}
{}
{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\tableofcontents
\chapter{Chapter 1 title}
Some text some text some text some text some text
\section{Section a title}
Some text some text some text some text some text
\section{Section b title}
Some text some text some text some text some text
\chapter{Chapter 2 title}
Some text some text some text some text some text
\section{Section c title}
Some text some text some text some text some text
\section{Section d title}
Some text some text some text some text some text
\chapter{Chapter 3 title}
Some text some text some text some text some text
\section{Section e title}
Some text some text some text some text some text
\section{Section f title}
Some text some text some text some text some text
\end{document}
I tried to change, according to my needs, and the index format is ok. As a second step, I'd like to put page numbers in the ToC on left side. But the code I found (in my MWE "codice Pignalberi") interferes with the previous one. For I'm not able to understand, following the titlesec/titletoc manual, where and how to coordinate the two sides of this code, I hope in your help.
===================================================
UPDATE
All works very fine now, thanks to Gonzalo's code. I improved two aspect (add more space before chapter titles and remove chapter numbers, leaving only sections' ones: now it looks me more useful to the reader). The code is the following one:
<pre>\usepackage{titlesec}
\usepackage[rightlabels,dotinlabels]{titletoc}
\renewcommand{\thechapter}{\roman{chapter}}
\renewcommand\thesection{\arabic{section}}
\titleformat{\chapter}[display]
{\normalfont\fontsize{11}{12}\selectfont}
{\scshape\thechapter}
{0pt}
{}
\titleformat{\section}
{\normalfont\fontsize{11}{12}\selectfont}
{\thesection}
{1em}
{}
\titleformat{\subsection}
{\normalfont\fontsize{11}{12}\selectfont\itshape}
{}
{1em}
{}
\titlespacing{\chapter}
{0pt}{0pt}{3cm}
\titlecontents{chapter}[-3pc]
{\addvspace{0.8pc}}
{\makebox[3pc][r]{\hfill}%
\textsc{\thecontentslabel}\quad%
}
{}
{}
{}
\titlecontents{section}[-3pc]
{\makebox[4pc][r]{\thecontentspage\hfill}%
\textsc{\thecontentslabel}\quad%
}
{}
{}
{}</pre>
Lastly, I'd like to align right and not left all numbers (pages and sections), for actually the titles of the section are not well aligned using a proportional font. Consider that the titletoc
options rightlabels,dotinlabels
seem to me not working. Thanx a lot!
You can see the problem here:
==========================================================
UPDATE 2
I tried to use etoc copying your code into my .tex file, but the result is very strange:
==========================================================
UPDATE 3
The troubles above are due to bidi
package, for in that file I use Hebrew and Phoenician too. In a "normal" file etoc
code works fine. Only a last question: I have to read very well etoc
documentation, which is rather large. But how is it possible to align right page numbers too? thanx!!
titletoc
? Basically, you give 2 definitions of what to do in the TOC for chapters. This obviously creates problems. Assuming you want the second definition, then, dropping the first should work. Obviously if you want the first, you'd drop the second instead. I guess I'm not understanding the question...