Is it because I can´t use equations inside the theorem? That would make them quite useless for me. They print okay alright. But my code is full of this kind of errors, both in overleaf and TexStudio ( I´ve updated the packages to their newest version in MikTex).
Also, if I don´t include the command '\leavevmode' the theorem leaves out from the output the first letter of my text, How can I fix that directly from the definition of the theorem?
MWE:
Code: Select all
\documentclass[oneside]{book}
\usepackage[spanish]{babel}
\usepackage{amsmath, amssymb, amsfonts}
\usepackage[most]{tcolorbox} % Cajas
\tcbuselibrary{breakable, skins, listings, theorems}
\newcommand{\runo}{\mathbf{r_1}}
\newcommand{\rdos}{\mathbf{r_2}}
\newcommand{\rv}{\mathbf{r}}
\newcounter{importante}
\newtcbtheorem[use counter=importante]{importante}{¡Importante!}{
colback=magenta!3!white, colframe=magenta!80!black, fonttitle=\bfseries,
colbacktitle=magenta!15!white, coltitle=black,
enhanced, breakable, attach boxed title to top center = {yshift=-2mm},
title after break = {}, boxed title style={colframe=magenta!80!black, arc=3mm},
fontupper=\normalfont, before upper={\parindent10pt}
}{importante}
\begin{document}
\begin{importante}{Desacople}
\leavevmode Al resolver este Lagrangiano las ecuaciones de movimiento y las órbitas que hallamos son para la distancia entre los dos cuerpos, es decir, el cambio de $\rv = \rdos-\runo$. Entonces, ¿cómo hallamos la ecuación de movimiento para cada uno de los cuerpos?
Una vez hallado $\rv$ es sencillo sustituir en los pasos $2$ y $3$ de la reducción para hallar $\runo$ y $\rdos$.
\end{importante}
\end{document}
Please help me, I don´t understand this packageMissing \endcsname inserted
<to be read again>
\unhbox
l.12 ...idb@x }{{1}{1}{Desacople}{importante.1}{}}
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.
Extra \endcsname.
\@newl@bel ... \bbl@tempa \csname #1@#2\endcsname
\def \bbl@tempb {#3}\@safe...
l.12 ...idb@x }{{1}{1}{Desacople}{importante.1}{}}
I'm ignoring this, since I wasn't doing a \csname.
