Due to the typographic traditions I'm used to, I prefer my \ldots to have no spacing in between, ideally exactly the same amount as in text. In math mode I would like to write things like \(1, 2, \ldots, n\) and have the spacing be adaptive:
- if the next character is a comma, I'd like something very thin like
\kern .08333emafterwards (i.e., half of a\thinspace); afterwards; - if the next characterthere is an opening parenthesis ("(", "[", "{", ...) before or a closing parenthesis (")", "]", "}", ...) after the dots, there should be no or only tiny additional spacing (i.e., less than
\kern .08333em); - and whatever other adaptations of space around
\ldotsor\dotsare normally produced by (La)TeXTeX; - feel free to add other ideas.
What is the best way of redefining \ldots for these purposes?