Я пытаюсь добавить оглавление для моего документа LaTex. У меня проблема в том, что эта строка:
\subsubsection{The expectation of \(X^2\)}
Вызывает ошибку в файле, который содержит оглавление
\contentsline {subsubsection}{\numberline {1.2.3}
The expectation of \relax $X^2\relax \GenericError { }{
LaTeX Error: Bad math environment delimiter}{
See the LaTeX manual or LaTeX Companion for explanation.}
{Your command was ignored.\MessageBreak Type I <command> <return>
to replace it with another command,\MessageBreak or <return> to
continue without it.}}{5}
Из-за чего документ не генерируется.
Есть ли у кого-нибудь решение по математике в разделах при сохранении содержания