|
Comment modifier la couleur des points de suite de la liste des théorèmes ? Optionnellement: comment le faire avec le paquetage tocloft ? \documentclass{article} \usepackage{keytheorems} \newkeytheoremstyle{mystyle}{ tcolorbox={ colback=blue!10, colframe=blue!75 } } \newkeytheorem{theorem}[style=mystyle,] \begin{document} \begin{theorem}Content of the theorem.\end{theorem} \listofkeytheorems[ title=Liste des théorèmes, note-code={#1}, format-code=Th.~\numberline{#2}#3 ] \end{document} |
|
Une solution simple est d'ajouter dans votre préambule \makeatletter
\patchcmd{\@dottedtocline}{\hbox{.}}{\hbox{\textcolor{red}{.}}}{}{}
\ExplSyntaxOn
Pour appliquer cette modification uniquement à liste des théorèmes, vous pouvez appliquer la méthode de l'ECM suivant: \documentclass{article} \usepackage{keytheorems} \newkeytheoremstyle{mystyle}{ tcolorbox={ colback=blue!10, colframe=blue!75 } } \newkeytheorem{theorem}[style=mystyle,] \begin{document} \makeatletter \let\@thmdottedtocline\@dottedtocline \patchcmd{\@thmdottedtocline}{\hbox{.}}{\hbox{\textcolor{red}{.}}}{}{} \ExplSyntaxOn \cs_set_protected:Npn \keythms_listof_tocline: { \@thmdottedtocline{ 1 }{ \l__keythms_listof_indent_dim } { \l__keythms_listof_numwidth_dim } } \ExplSyntaxOff \makeatother \begin{theorem}[foo]Content of the theorem.\end{theorem} \listofkeytheorems[ title=Liste des théorèmes, note-code={#1}, format-code=Th.~\numberline{#2}#3 ] \end{document} |
