Quantcast
Viewing latest article 13
Browse Latest Browse All 35

Overleaf error messages when compiling with \begin{align*} and \end{align*} and using \bm{\varphi}

I'm getting error messages in overleaf such as "Missing } inserted.", "Extra }, or forgotten \endgroup.", "Misplaced alignment tab character &.", "Misplaced alignment tab character &.", "Misplaced \omit.", "Misplaced \cr.", "Misplaced \noalign.", "Missing $ inserted." and "Missing \cr inserted."

It compiling when I use equation instead of align but doesnt otherwise. My code also compiles if I remove \bm{\varphi} and just write \varphi. It doesnt miss a { or } and no alignment is missplaced. I cant understand why it wouldn't compile and I really would like to use align instead of equation since it is much better looking. My code is as follows

\documentclass{article}\usepackage[utf8]{inputenc}\usepackage{bm,mathtools}\usepackage{amsthm}\usepackage{chemist}\newcommand{\rd}[1] {\ensuremath{\mathrm{d}#1}} %creates operator ds that makes it more clear that \frac{d}{dt} is an math operator \newcommand{\ham}{\mathcal{H}} %hamiltonian\begin{document}\begin{align*}    \frac{\rd }{\rd t} \left( \left( \frac{\partial \bm{\varphi}_{t}}{\partial     \bm{y}_{0}} \right)^{T} J \left( \frac{\partial \bm{\varphi}_{t}}{\partial     \bm{y}_{0}} \right) \right) &= \left(\frac{\rd}{\rd t} \frac{\partial \bm{\varphi}_{t} } {\partial \bm{y}_{0}}\right)^T J \left(\frac{\partial \bm{\varphi}_{t} } {\partial \bm{y}_{0}}\right) + \left(\frac{\partial \bm{\varphi}_{t} } {\partial \bm{y}_{0}} \right)^T J \left(\frac{\rd}{\rd t} \frac{\partial \bm{\varphi}_{t} } {\partial \bm{y}_{0}}\right)\\&=\left(\frac{\partial \bm{\varphi}_{t} } {\partial \bm{y}_{0}}\right)^T \nabla^2 \ham(\bm{\varphi}_t(\bm{y}_0)) J^T J \left(\frac{\partial \bm{\varphi}_{t} } {\partial \bm{y}_{0}}\right) + \left(\frac{\partial \bm{\varphi}_{t} } {\partial \bm{y}_{0}} \right)^T \nabla^2 \ham(\bm{\varphi}_t(\bm{y}_0)) \left( \frac{\partial \bm{\varphi}_{t} } {\partial \bm{y}_{0}}\right)\\&=0\end{align*}\end{document}

It seems that the code work if I put it into another blank overleaf document but doesn't work in my original document for some reason. So to be clear if you copy this it will work but my code is approximately 2000 lines of code so might be something else or some smaller error that stack up?


Viewing latest article 13
Browse Latest Browse All 35

Trending Articles