1

According to this answer, \colon is of type \mathpunct. But in the MWE below, the outputs of the two lines are not identical. Why not?

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
    & g\colon X\to Y\\
    & g\mathpunct{:} X\to Y
\end{align*}

\end{document}

enter image description here

  • Note that amsmath redefines the \colon macro. – egreg Apr 17 '15 at 20:26
1
  1. The \mathpunct{} (without : inside {}) is the definition of \colon. Link1
  2. Both : and \colon typeset a colon, but \colon is a punctuation symbol, while : is considered as a relation symbol as regards to spacing. Link2
  • Sorry, but the definition of \colon contains \mathpunct{}, but is not equal to it. Moreover, this depends on amsmath being present. – yo' Apr 17 '15 at 20:24
  • 1
    This doesn't address the question as : is a relation symbol but \mathpunct{:} is not. – David Carlisle Apr 17 '15 at 20:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.