Mettendo da parte entrambi ii quesiti del precedente post,
il mio obiettivo è mantenere quell’aspetto con una fondamentale variante:
avere i numeri di pagina allineati a destra. Per rendere l’idea,
allego un indice la cui formattazione vorrei riprodurre

Ora, c’è un conflitto tra il codice prodotto da Pignalberi
e cioè il seguente per allineare i numeri a sinistra
`\usepackage{titletoc}
\contentsmargin{0pt}
\titlecontents{chapter}[4pc]
{\contentsmargin{0pt}\makebox[0pt][r]{\thecontentspage\quad\makebox[30pt][l]%
{\textsc{\romannumeral\thecontentslabel\ quad}}}}
{}
{}
{}`
e quello per riformattare l’indice e i titoli dei capitoli che ho prodotto nel post precedente.
Aggiungendo semplicemente i due codici viene fuori un’accozzaglia ingestibile:
`\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}`
Purtroppo, la sezione del manuale dedicata a titletoc non è particolarmente ampia…
Come si può risistemare questo codice?
grazie
m