Reduce spacing around colons in math mode

You're using the colon as an operation symbol, which is seldom done in professional mathematics, where the colon usually denotes a relation symbol. However, the colon is commonly found in elementary mathematics.

Here is a visual comparison:

\documentclass{book}

\usepackage{amsmath}

\begin{document}

\begin{align}
& DE:AB = 18:6                     && \text{too wide} \\
& DE{:}AB = 18{:}6                 && \text{too tight} \\
& DE{\,:\,}AB = 18{\,:\,}6         && \text{maybe better} \\
& DE\mathbin{:}AB = 18\mathbin{:}6 && \text{right, IMO} 
\end{align}

\end{document}

enter image description here

When you have decided what's best for you, add one of the following definitions (\rt is for ‘ratio’, choose a different name if you wish):

\newcommand{\rt}{{:}}         % for choice 2
\newcommand{\rt}{{\,:\,}}     % for choice 3
\newcommand{\rt}{\mathbin{:}} % for choice 4

and input your proportions as

DE \rt AB = 18 \rt 6

Just put the colons in groups.

\documentclass{book}

\usepackage{amsmath}

\begin{document}

\[
DE{:}AB = 18{:}6 \quad AB{:}12 = CE{:}15
\]

\end{document}

You can redeclare : to be of class \mathord. If have to restore the original behaviour, use \mathrel{:}.

\documentclass{book}

\usepackage{amsmath}

\DeclareMathSymbol{:}{\mathord}{operators}{"3A}

\begin{document}

\[ DE:AB = 18:6 \quad AB:12 = CE:15 \]

\end{document}

enter image description here

Tags:

Math Mode