19

Using \colon gives correct spacing for a map $F\colon C\to D$ in one direction. But writing $L\colon C\rightleftarrows D\colon R$ for a couple of maps in both directions (e.g. for an adjunction) gives disturbingly asymmetric spaces near first and second colons (like if D were a map from R, not the other way round). Probably, it should be fixed (e.g. some other command should be used) — but how?

7
  • 1
    Don't use \colon then. It is defined to have small spacing on the left and big spacing on the right. Maybe you should dig into the code and find the definition for \colon and define a command like \rcolon that swaps the spacing before and after and use that. Aug 25 '10 at 10:15
  • 10
    Surely not \cocolon! It should be just \lon (and the opposite of the coefficient ring should be ...). Aug 25 '10 at 11:18
  • 3
    Why is \colon preferred over :? I just checked a random sample of books in my office and the overwhelming majority uses the symmetrical spacing of :. The exceptions (among the 15 or so books I checked) are Atiyah-MacDonald, Besse and Kobayashi-Nomizu. I have to admit that I never sat down to think about this before. Aug 25 '10 at 12:01
  • 3
    I think it is also something semantical in addition to spacing. : is interpreted as a relation (I guess the ratio). At least that's what the AMS Short Math Guide ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf suggests to me. Aug 25 '10 at 12:10
  • 1
    @José Figueroa-O'Farrill: you could try defining a three-argument command \fcn{f}{A}{B} that expands to f \colon A \to B. I bet there are people who would say this is easier to parse in the source than f:A\to B, though I don't know that I'm one of them. Aug 25 '10 at 15:50
14

amsmath defines \colon as \nobreak \muskip 2mu\mathpunct{}\nonscript\mkern-\thinmuskip{:}\mskip 6mu plus1mu\relax. So how about the following?

\newcommand*\cocolon{%
        \nobreak
        \mskip6mu plus1mu
        \mathpunct{}%
        \nonscript
        \mkern-\thinmuskip
        {:}%
        \mskip2mu
        \relax
}
1
  • works in simple cases (so I've accepted the answer), but try e.g. \[\sin\colon X\rightleftarrows Y\cocolon\cos\] — the space between \cocolon and mathop is too big
    – Grigory M
    Aug 25 '10 at 18:01

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.