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

I want to change the effective height of the \ket{...} command (from the braket package). I don't want to change the visual appearance of the ket, I just want change its effective height.

Ideally this change would be in both directions, i.e. it would be slightly bigger both above and below.

Is this possible?

The current behavior:

If I do \left( \ket{x} \right), then the parentheses are the exact same height as the ket, which is not visually pleasing and can be very confusing when using \rangle instead of parentheses.

The desired outcome:

If I do \left( \ket{x} \right), then the resulting parentheses should be slightly bigger then the ket (as if the ket were slightly bigger then it looks). The output should be roughly the same as \big( \ket{x} \big) (perhaps a little bigger).
The reason I can't just use \big instead of \left\right is that the parenthesis might contain other stuff (for which left\right is more appropriate) and I don't want to have to edit this in a case-by-case basis.

I feel like it must be possible to make latex think that command is a little taller than it actually is, so that the parentheses will look right automatically.

share|improve this question
I'm pretty sure you don't want \Big size, but rather \big. Typing $\bigl(\ket{x}\bigr)$ is not heavier than $\left(\ket{x}\right)$. – egreg Sep 23 '13 at 15:05
Actually, I want neither. The problem is that the ket's size varies depending on what's inside. And I want the parenthesis around it to be a little larger then the ket, even when the ket is bigger then \big or \Big. – Malabarba Sep 23 '13 at 15:10
Personally I wouldn't bother; keep in mind that the enlargement is by discrete steps: normal, big, Big, bigg and Bigg, so you can't, in general, have "slightly larger" parentheses. – egreg Sep 23 '13 at 15:14
up vote 0 down vote accepted

Ok, I've set on using vphantom for this. Here is the code:

\newcommand{\ket}[1]{\left|#1 \right \rangle \vphantom{\left( #1 \right)^A}\!}    %ket

The ^A superscript guarantees that the vphantom command wll be just a little taller than the actual visual appearance of everything else.

share|improve this answer

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.