I am writting a LaTeX document using org-mode, and there is a section where I want to include a proof, which has the following code.
#+LaTeX_HEADER: \newcommand{\dem}[1]{\textcolor{gris}{\small{Demostración. #1}}}
If I write
\dem{(1) Esto es una demostración}
There is nothing wrong when exporting to LaTeX, and the text appears formated correctly. However, if I add an equation with some braces in it, like
\dem{Esto es una demostración con ecuación: \(x = x^{-2}\)}
then, the document is exported as
\dem\{Esto es una demostración con ecuación: \(x = x^{-2}\)\}
and the format is not correct. Is there any way I can "escape" those curly braces in my org-mode text to format the text correctly?
\dem{Esto es una demostración con ecuación: \(x = x^{-2}\)}
? I've realized the error happens when adding other braces within thedem
part.