Re: Titlesec e titletoc (prima puntata)

#93484
samiel
Partecipante
    Up
    0
    Down
    ::


    Ho provato con questo codice:
    `\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}

    \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}`
    Le due cose che nell’indice non funzionano sono:
    1) Come far sì che il numero della pagina non erediti il \fontnotesize del titolo, ma sia
    di normali dimensioni, cioè come il testo? A meno di non eliminare il numero di pagina
    del capitolo, come attualmente ho fatto…
    2) Infine: come allineare i numeri (romani) dei capitoli a destra, e non come sono attualmente,
    e cioè a sinistra?

    Go to top