Dans le sommaire, l'espace entre le numéro des chapitres (les seuls à en bénéficier) et leur titre est ridiculement faible dès qu'on arrive à la dizaine (pour les unités, c'est parfait). Comment l'augmenter ? Et sans, évidemment, que l'espace correspond aux chapitres numérotés avec des unités soit démesuré. Ouvrir dans l'éditeur Overleaf
\documentclass{scrreprt} \renewcommand{\thechapter}{\arabic{chapter}.} \begin{document} \tableofcontents \chapter{Chapitre 1} \chapter{Chapitre 2} \chapter{Chapitre 3} \chapter{Chapitre 4} \chapter{Chapitre 5} \chapter{Chapitre 6} \chapter{Chapitre 7} \chapter{Chapitre 8} \chapter{Chapitre 9} \chapter{Chapitre 10} \chapter{Chapitre 11} \end{document} |
Avec les classes Ouvrir dans l'éditeur Overleaf
\documentclass{scrreprt} \renewcommand{\thechapter}{\arabic{chapter}.} \usepackage{tocstyle} \usetocstyle{KOMAlike} \begin{document} \tableofcontents \chapter{Chapitre 1} \chapter{Chapitre 2} \chapter{Chapitre 3} \chapter{Chapitre 4} \chapter{Chapitre 5} \chapter{Chapitre 6} \chapter{Chapitre 7} \chapter{Chapitre 8} \chapter{Chapitre 9} \chapter{Chapitre 10} \chapter{Chapitre 11} \end{document} @denis. Trop facile. Et, euh…, on peut aussi aligner les numéros à droite, non ? Mais je regarde dans la doc. 2
@fred02840 Plutôt que poser une question en commentaire, il est préférable de créer une nouvelle question à part entière (éventuellement en y indiquant le lien avec la question actuelle). |
ECM pour aligner à droite les numéros de sections, dans la toc : Ouvrir dans l'éditeur Overleaf
\documentclass[a4paper,10pt,french,numbers=endperiod]{scrartcl} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{babel} \renewcommand{\thesection}{\arabic{section}} % ou \renewcommand*{\sectionformat}{\thesection\autodot\enskip} \usepackage[colorlinks=true,linkcolor=blue]{hyperref} \renewcommand{\familydefault}{\sfdefault} % sans serif par défaut \author{} \date{Vendr. 14 juin 2019} \title{Liste des fusillés, exécutés, massacrés} \begin{document} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \section{fghj} \end{document} |
Une autre possibilité : modifier Ouvrir dans l'éditeur Overleaf
\documentclass[numbers=endperiod]{scrreprt} \RedeclareSectionCommand[ tocnumwidth=3em % normalement 1.5em ]{chapter} \begin{document} \tableofcontents \chapter{Chapitre 1} \chapter{Chapitre 2} \chapter{Chapitre 3} \chapter{Chapitre 4} \chapter{Chapitre 5} \chapter{Chapitre 6} \chapter{Chapitre 7} \chapter{Chapitre 8} \chapter{Chapitre 9} \chapter{Chapitre 10} \chapter{Chapitre 11} \end{document} Pour aligner les numéros à droite : Ouvrir dans l'éditeur Overleaf
\documentclass[numbers=endperiod]{scrreprt} \RedeclareSectionCommand[ tocdynnumwidth, tocentrynumberformat=\chapterentrynumberformat ]{chapter} \newcommand\chapterentrynumberformat[1]{\hfill#1\enspace} \begin{document} \tableofcontents \chapter{Chapitre 1} \chapter{Chapitre 2} \chapter{Chapitre 3} \chapter{Chapitre 4} \chapter{Chapitre 5} \chapter{Chapitre 6} \chapter{Chapitre 7} \chapter{Chapitre 8} \chapter{Chapitre 9} \chapter{Chapitre 10} \chapter{Chapitre 11} \end{document} @samcarter. Dommage que j'ai déjà attribué le pouce relevé à @denis. Un demi-pouce chacun, ça ira ? 1
@fred02840 La réponse de @denis est très bonne, le pouce pour lui est correct ! @samcarter et @denis. J'ai essayé d'adapter cette solution à un document
2
@fred02840 https://pastebin.com/GfYPth0N marche bien avec la même technique comme mon réponse au dessus. |
Au lieu de
\renewcommand{\thechapter}{\arabic{chapter}.}
on peut aussi utiliser\documentclass[numbers=endperiod]{scrreprt}