gpoore / minted

minted is a LaTeX package that provides syntax highlighting using the Pygments library. Highlighted source code can be customized using fancyvrb.
1.74k stars 126 forks source link

importing mathtools after minted gives errors in amsmath.sty #349

Closed julisokay closed 1 year ago

julisokay commented 1 year ago

After updating packages recently i got errors when compiling my latex files. I tracked the error down and got this minimal (not) working example:

\documentclass{article}

\usepackage{minted}
\usepackage{mathtools} 

\begin{document}
Test
\end{document}

These are the errors i can reproduce on two machines:

Command \gather already defined. } Command \gather already defined. } Command \alignat already defined. } Command \alignat already defined. } Command \align already defined. } Command \align already defined. } Command \flalign already defined. } Command \flalign already defined. } Command \multline already defined. } Command \multline already defined. ...tart@multline\st@rredtrue}{\endmultline} Command \equation already defined. }

all stemming from amsmath.sty

As soon as i swap the import of minted with mathtools, the errors disappear.

davidcarlisle commented 1 year ago

See

https://github.com/latex-lineno/lineno/issues/5

an update there is promised, changing the load order is a usable workaround as you say.

julisokay commented 1 year ago

Thank you for your incredibly quick answer!