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 know how to place ~ or - on top of a character. I believe I could do this with the \overrightarrow{character} command for right arrows. But how do I do this in general?

share|improve this question
Also consider the accents package. – Werner Nov 10 '11 at 6:02
up vote 12 down vote accepted

Both of these particular symbols can be placed over characters using accents. For a full reference, see this Latex wikibook.

In math mode, you would use $\tilde{x}$ for x with a ~ on top, and $\bar{x}$ for x with a bar on top. If you would like the tilde or bar to span multiple characters, you can instead use $\widetilde{xy}$ or $\overline{xy}.

In text mode, you could use \~{x} and \={x} to get these accents over those characters.

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.