# How to get LaTeX to ignore a specific warning?

I use \over even though it is a bad practice (yes, yes, I know I shouldn't). Whenever I compile a LaTeX file using it, I get the message:

Foreign command \over; \frac or \genfrac should be used instead.

Is there a way to get LaTeX to ignore this warning, so that it doesn't appear in the output? I'm using the amsmath package, if that's relevant.

• P.S. If there's a way to get the same syntax as \over that is considered less "evil," I'd be glad to hear about that as well. Apr 25, 2015 at 2:38
• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Apr 25, 2015 at 2:49
• Two ways: ① unpack \over and repeat its definition without \message-relevant macros. ② pack \over with \def\message#1{}. Apr 25, 2015 at 2:59
• Can you give an example of how to do this properly? I'm relatively new to LaTeX. Apr 25, 2015 at 3:09
• The warning indeed comes from the amsmath package. The \over syntax causes technical difficulties for writers of math packages, so the amsmath folks are venting their frustration by redefining \over to print a message, and then act normal. The simplest way to stop this warning from appearing in the output is restore the original definition of \over. Luckily for us, LaTeX saved the original definition of over in \@@over. So, near the end of your preamble, (in particular, after loading amsmath), just say \makeatletter\let\over\@@over\makeatother
– Mark
Apr 25, 2015 at 4:01

The warning indeed comes from the amsmath package. The \over syntax causes technical difficulties for writers of math packages, so the amsmath folks are venting their frustration by redefining \over to print a message, and then act normal.
The simplest way to stop this warning from appearing in the output is restore the original definition of \over. Luckily for us, LaTeX saved the original definition of over in \@@over. So, near the end of your preamble, (in particular, after loading amsmath), just say
\makeatletter