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 am trying to include my website address in the address block of a letter.

My webaddress has a tilde character, and my usual solution, $\sim$, to the tilde formatting problem is not working.

The relevant code is

\address{ Street \\ City, ST 00000 \\ \url{http://my.web.address/~blah} }

This gives a bad-looking top-aligned tilde.

If I replace ~ with $\sim$, then "http://my.web.address/$\sim$blah" appears in the output PDF. Using \texttildelow gives a compilation error.

Edit: This is not a duplicate. Solutions for the referenced questions do not work inside \address{}.

share|improve this question
Welcome to TeX.sx! – hpesoj626 Apr 26 '13 at 15:31
Welcome to TeX.sx! Please complete your code sinppets to a complete minimal working example (MWE) so we can see which font and url packages you are loading. For some possibel approaches see also tex.stackexchange.com/q/312/15925 – Andrew Swann Apr 26 '13 at 15:36
The question seems very similar to the one mentioned by Papiro; if that indeed solves your problem, please let us know so this question can be closed (just to keep information as tight as possible). Otherwise, please mention why by adding to your question. – egreg Apr 26 '13 at 15:51
@egreg the question referenced by @Papiro does not solve my problem. The issue is that the solutions mentioned in that reference do not seem to be working when typeset as an \address{} in the letter documentclass. – user1149913 Apr 26 '13 at 16:03
up vote 7 down vote accepted

If you are using the default Computer Modern Fonts, then the Latin Modern fonts might be an alternative, because they are derived from the Computer Modern Fonts. The tilde is lower. Also there is a proportionally spaced typewriter variant that might look better than the mono-spaced font for URLs.

\address{ Street \\ City, ST 00000 \\ \url{http://my.web.address/~blah} }
\opening{Dear xy,}
\closing{Yours sincerely}


share|improve this answer
This works! Thanks. – user1149913 Apr 26 '13 at 16:05

I wanted to add another working solution here.

The href package seems to allow special characters within \address{} using the two-parameter href command.

For instance, \href{http://my.web.address/~blah}{http://my.web.address/$\sim$blah} works.

However, the single parameter version of the href command, \href{http://my.web.address/~blah}, does not typeset the tilde nicely.

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.