Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
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. –  Willie Wong Aug 25 '10 at 10:15
8  
Surely not \cocolon! It should be just \lon (and the opposite of the coefficient ring should be ...). –  Andrew Stacey 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. –  José Figueroa-O'Farrill Aug 25 '10 at 12:01
2  
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. –  Willie Wong 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. –  Mark Meckes Aug 25 '10 at 15:50
show 2 more comments

1 Answer

up vote 10 down vote accepted

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
}
share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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