I am just wondering why the titlesec
package doesn't work well with the amsart
document class. For example, in the code below the first \section
seems to work fine whereas the second doesn't even compile in the first place. In fact, I get the error
! Undefined control sequence.
<argument> ...on\endcsname \protect \@secnumpunct
l.5 \section{more lalala}
?
\documentclass[11pt]{amsart}
\usepackage{titlesec}
\begin{document}
\section*{lalala}
\section{more lalala}
\end{document}
I'm not looking for a solution to the problem (cause I'm not gonna be using titlesec
), but I want to know why this (and possibly numerous other similar errors) happens.
titlesec
doesn't work withamsart
. After allamsart
redefines some of the code for section headings quite heavily, which means that it may also define commands upon whichtitlesec
relies in a way incompatible with thetitlesec
approach. But thetitlesec
documentation says "Titlesec works with the standard classes and with many others, including the AMS ones, and it runs smoothly withhyperref
(However, be aware the AMS classes reimplement the original internal commands. These changes will be lost here.).", so maybe it should work?\@secnumpunct
)