titlesec e table of contents

  • Creatore
    Topic
  • #112192
    davidebond
    Partecipante
      Up
      0
      Down
      ::


      Salve. Io volevo cambiare l’aspetto dei capitoli e ho introdotto il pacchetto “titlesec”. Purtroppo, però, nell’indice non compaiono più le sezioni se non con errori. Non capisco il motivo. Ecco il mio mwe:

      `
      \documentclass[12pt,openany]{amsbook}
      \usepackage[T1]{fontenc}
      \usepackage{titlesec}
      \usepackage{lipsum}

      \titleformat{\chapter}[block]{\large\scshape\filcenter}{\thechapter.}{3pt}{}%normalfont
      \setcounter{secnumdepth}{5}
      \setcounter{tocdepth}{5}

      \titleformat{\section}[block]{\normalfont\bfseries\filcenter}{\thesection.}{3pt}{}

      \begin{document}
      \chapter{Chapter}
      \lipsum[1-20]
      \section{Section}
      \lipsum[21-40]

      \tableofcontents

      \end{document}

      `

      Dove sta il trucco? Grazie.

      Ciao,

      davide

    • Devi essere connesso per rispondere a questo topic.

    Go to top