Bonjour à tous,
J'ai les deux macros suivantes, qui utilisent les packages amsmath et relsize :
1 2
| \newcommand*{\chiffraged}[2]{$\protect\genfrac{}{}{0pt}{}{\protect\mathlarger{#1}}{\protect\mathlarger{#2}}$}
\newcommand*{\sixcinqbarre}{\chiffraged{6}{\cancel{5}}} |
qui me permettent, dans un texte, d'afficher un chiffrage d'accord musical, comme ici (accord C) :
Si j'ai donc le texte LaTeX suivant :
précédée du \textit{si}\sixcinqbarre
J'ai comme résultat :
Donc tout va bien. Si j'utilise ce raccourci dans un titre sans référence à la table des matière, \subsection*{\sixcinqbarre}, tout fonctionne également. Par contre si je l'utilise dans un titre normal, c'est-à-dire \subsection{\sixcinqbarre}, j'ai l'erreur suivante :
1 2 3 4 5 6 7 8 9
| ! Undefined control sequence.
\rs@makelargerchoice ...displaystyle \rs@mathatom
\m@th $}}{\displaystyle \l...
l.197 ...\sixcinqbarre ~avec la basse descendante}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined. |
On m'a déjà suggéré de remplacer mon \newcommand* par un \DeclareRobustCommand*, ou de faire précéder mon \sixcinqbarre par un \protect, mais la même erreur persiste. Quelqu'un aurait-il une idée ?
Merci d'avance.
Partager