\animategraphics throws error in combination with the German babel package when using quotation marks around file path
I just came across this error, which almost drove me insane because it took forever to find the source. I have an English beamer project that I copied one-to-one and am translating into German. The English version compiles fine, but when I got to translating a certain slide with an animation the working copy suddenly broke, although previous animations weren't an issue. The compiler then threw
Argument of \language@active@arg" has an extra }.
Along many other errors. I checked many things (folder names, corrupted files, potentially interfering environments and commands) before I found the cause: As it turned out, that particular animation was using quotation marks "
around the target file/folder path, which for some reason causes the copilation to crash if the German babel
package is loaded. I checked a few other languages, and this doesn't happen with the English, French, Italian, or Turkish version, but does with German, Spanish, or Russian.
Here is an MWE to reproduce the error:
\documentclass{beamer}
\usepackage[russian]{babel}
\usepackage{animate}
\usepackage{graphicx}
\begin{document}
\begin{frame}
\animategraphics[loop,autoplay,width=\textwidth]{10}{./animation/animation-}{0}{11}
\end{frame}
\begin{frame}
\includegraphics[width=\textwidth]{"./animation/animation-0"}
\end{frame}
\begin{frame}
\animategraphics[loop,autoplay,width=\textwidth]{10}{"./animation/animation-"}{0}{11}
\end{frame}
\end{document}
I am using overleaf running TeX Live 2024.