# Problem with todonotes and onlyamsmath

I have document that use the todo from the todonotes package. Unfortunaly, I always get the following error message (everything works fine on my machine at work):

Package tikz Error: Sorry, some package has redefined the meaning of the matht cause unrecoverable errors. ...nn nach "explicit comp. schemes" angeben}

There seems to be clash with onlyamsmath.

Minimal working example:

\documentclass{article}

\usepackage{todonotes}
\usepackage[all, warning]{onlyamsmath}

\begin{document}

\todo{Blabla}

\end{document}

• I've got an idea: Please post the document (reduced to the minimum) that generates this error ;-) – user31729 Oct 24 '15 at 11:55
• @ChristianHupfer Yes, good idea ;). – Christopher Oct 24 '15 at 12:13

The onlyamsmath package (which personally I find useless), does
\AtBeginDocument{\catcode$=13 }  which is the cause of your troubles. The purpose of that declaration is to catch $$...$$, but this disrupts TikZ working. If you really want to use the package together with TikZ (which is implicitly loaded by todonotes), then you must give up recognizing usage of $$...$$: \documentclass{article} \usepackage[all, warning]{onlyamsmath} \AtBeginDocument{\catcode$=3 }