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

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?

share|improve this question

marked as duplicate by Jake, Torbjørn T., Leo Liu, Seamus, Werner Dec 22 '11 at 5:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 9 down vote accepted

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

share|improve this answer
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
@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.