4

Following this question the consistent way to write a function is f\colon A\to B, but if I want to write a cospan like the following

\documentclass[border=1mm]{standalone}
\usepackage{mathtools}

\begin{document}
\(0\colon 1\to I\leftarrow 1\colon 1\)
\end{document}

it gives this resultenter image description here in which the second \colon has not the correct spacing. So, is there a way to be consistent with the document and have correct spacing?

6

You can use the \noloc command I defined for a similar purpose

\newcommand\noloc{%
  \nobreak
  \mspace{6mu plus 1mu}
  {:}
  \nonscript\mkern-\thinmuskip
  \mathpunct{}
  \mspace{2mu}
}

enter image description here

Full example:

\documentclass{article}
\usepackage{amsmath}

\newcommand\noloc{%
  \nobreak
  \mspace{6mu plus 1mu}
  {:}
  \nonscript\mkern-\thinmuskip
  \mathpunct{}
  \mspace{2mu}
}

\begin{document}

\(0\colon 1\to I\leftarrow 1\noloc 1\)

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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