Possible Duplicate:
How do I create an invisible character?

How can I insert an invisible character (similar to \strut) which has a width of zero (won't impact word or letter spacing) and has a height equal to the height of an uppercase letter in currently selected font?


You can use \vphantom{<some uppercase letter>} for this:

  • Does TeX have no way of knowing the general height of all of the uppercase letters? E.g. a built-in measurement? – Village Dec 21 '11 at 1:47
  • @Village: No, that size is not directly available. See Determine height and depth of letters relative to the font size for more information on this. – Jake Dec 21 '11 at 2:09
  • You could construct this as a simple macro for easy reuse. You'd have to put all the capital letters into the \vphantom, but only once. Perhaps there's even a way of simplifying that down. – qubyte Dec 21 '11 at 2:57
  • 1
    @Village: You could use \vphantom{ABCDEFGHIJKLMNOPQRSTUVXYZ} to ensure that take the maximum height of any uppercase character. The height is about 1.6ex, so \vrule height 1.6ex depth 0pt width 0pt would also work. See also Definition of \strut explained – Martin Scharrer Dec 21 '11 at 9:52

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