[texhax] \~

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Sun Nov 30 10:44:17 CET 2003


> I want to print 200~300 by latex (not in math mode). I tried to use
> 200 \~ 300, but the result is not something I want. Does anybody
> know how to do it? 

none of knuth's fonts has what one might think of as the tilde symbol
that the character set committees think of.  \~ gives you the tilde
accent (used, for example, in spanish mañana), so what you wrote gave
you 200<space><tilde-accented-space>300, which (even if you'ld given
the accent command an explicit argument) is unlikely to look good.

\textasciitilde (the official latex command for the character) will
give you the accented space, in an ot1-encoded font.  however the
character is nominally present in t1, and if you don't use knuthian
fonts (i.e., don't use ec fonts for t1) you get a decent tilde accent.

so for example:

\usepackage[T1]{fontenc}
\renewcommand{\rmdefault}{ptm} % or \usepackage{mathptmx}

...

200 \textasciitilde\ 300

will be what you really want.  but why?  it's not normal english-
language typesetting, but perhaps you're not writing english?



More information about the texhax mailing list