I'm enountering an error when using vectors from the package esvect inside a caption.
It's giving me the following errors:
17: Argument of @caption has an extra }. ...t giving errors in a caption: $\vv{E}$ . }
17: Paragraph ended before @caption was complete. ...t giving errors in a caption: $\vv{E}$ . }
Here is a MWE:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{esvect}
\usepackage[demo]{graphicx}
\begin{document}
testing the function of $\vv{E}$
\begin{figure}[htb]
\centering
\includegraphics[width=0.7\linewidth]{wave}
\caption{Working but giving errors in a caption: $\vv{E}$ . }
\label{fig:wave}
\end{figure}
\end{document}
Don't know how to fix this. In theory it's not a real problem as it compiles just fine, but still worrying me a bit.
As both used packages are very common, I don't think this is an unknown incompatibility between these. All my packages are up to date, I'm using TexStudio 4.6.3 (most recent version).
If anyone has an idea what the issue could be, I'd be happy to hear it.
Greetings Barley
\vvis fragile. As you would also find out, if you would search for the error message, add\protectbefore it. – cabohah Nov 21 '23 at 17:55