Re: Consigli veloci

#21864
DMW
    Up
    0
    Down
    ::


    Assumo che tu non abbia più di 17 capitoli.
    Perché con oltre ci vogliono 5 lettere romane (XVIII). Altrimenti metti XXXX o XXXXX sotto \settowidth (vedi sotto %%%%%).
    `\documentclass{book}

    \usepackage{tocloft}
    \renewcommand{\cftchapleader}{\cftdotfill{\cftchapdotsep}}
    \renewcommand{\cftchapdotsep}{\cftdotsep}

    \newlength\romlength
    \settowidth{\romlength}{XXX} %%%%%
    \advance\romlength by 5pt
    \setlength\cftchapnumwidth{\romlength}
    \advance\romlength by 5pt
    \setlength\cftsecindent{\romlength}

    \usepackage

    {titlesec}

    \renewcommand{\thechapter}{\Roman{chapter}}

    \begin{document}`

    se con titlesec vuoi centrare solo i capitoli e le sezioni no, devi togli center e devi usare il comando \titleformat applicato al solo capitolo.

    Ciao

    Andrea

    Go to top