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.

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

Is there a way to define a command in a way, that a possible subsequent subscript is hidden? something like


analogously to math operators and \limit if i want the subscript below.

The background is, that I want to be able to define commands for beamer with overlays, that do not show the subscripts at all on specific slides. I try to avoid having to include the subscripts as parameters of the commands.

What I would like to achieve, is for example a redefined command \underbrace with an overlay specification, such that

$\underbrace<3>{x < 0}_{x \text{ negative}}$

will display the underbrace including its subscript only at on specified overlays, and just x < 0 otherwise.

share|improve this question
Do you really need to keep the syntax? Something like \xunderbrace<3>{x<0}{x \text{ negative}} is easier to implement and as good to input. – egreg Jun 21 '12 at 13:45

Just defining


should do the trick.

If you use


you don't need \limits for sums and the above works there too.

Combining my above try and Claudio's idea you should be able to do:

share|improve this answer
Thank you. I'm afraid I didn't state what I need appropriately, my apologies. I edited my Question. – IARI Jun 21 '12 at 8:07

A first trial is:





\[\uncoversubscript<2>{x}{y} \uncoversubscript<2>{z}{1}\]

Frames of the result:

enter image description here

enter image description here

Second attempt (not perfect):



% code by canaaerus

% code by Hendrik Vogt - http://tex.stackexchange.com/a/5465/13304

\[ \uncoversubscript<2->x_y \hspace*{2cm} \underbrace{x}_{y} \]


I mess how to pass here \renewcommand<>*\underbrace[1]{\@ifnextchar_{\ub@with<2>{#1}}{\ub@without{#1}}} the current overlay specification to change <2>.

share|improve this answer
Thank you, but that includes the subscript within the command, so it can't be used as stated in the example with underbrace – IARI Jun 21 '12 at 8:33

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.