TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to define a math operator with \mathop and I would like its arguments to be automatically put in a zero width box with \mathclap. Defining an operator, e.g. \sum, with \newcommand


would do, but it would force me to provide every time two arguments. If I define the new command with an optional argument, that wouldn't solve the matter, since the mandatory argument is still to be provided (and I may need only the optional in some occurrences). Besides \mathop doesn't require a specific order of the arguments, while \newcommand does.

Any ideas?

share|improve this question
up vote 2 down vote accepted

You can look ahead for _ and ^ by hand.I'm not sure it's a good idea but something like

enter image description here












\[\Sum x_i\]

share|improve this answer
Thanks! I don't understand how you did it but that is exactly what I needed! – AndreasT Oct 17 '12 at 12:14

Your Answer


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.