# Default spacing around operators in math inline mode

When writing math expression, the spacing around an operator (like + or =) seems to be the same in math inline-mode or math block-mode. However, I like the spacing in an expression to be smaller in inline math. I usually use \! around operators to reduce the spacing. Is there a way to automatically decrease the spacing for math inline mode only?

MWE:

\documentclass[a4paper]{article}

\begin{document}
This is inline mode $c=a+b$ and this is block-mode
$c=a+b$
I can decrease the space like this $c\!=\!a\!+\!b$.
\end{document}


\documentclass{article}
\usepackage{amsmath}

\medmuskip=2mu plus 1mu minus 2mu
\thickmuskip=3mu plus 3mu

\AtBeginDocument{
\everydisplay=\expandafter{%
\the\everydisplay
\medmuskip=4mu plus 2mu minus 4mu
\thickmuskip=5mu plus 5mu
}%
}

\begin{document}

This is inline mode $c=a+b$ and this is block-mode
$c=a+b$

\end{document}


Note that the display environments such as align or gather and the others defined by amsmath will use the “extended” spacing, because they are typeset inside a standard display, so \everydisplay is executed before starting them.

• no of course not. Who maintains amsmath anyway? – David Carlisle Oct 4 '18 at 15:18