I'd like to use a character that looks like $\sim$, but has spacing like $\neg$ (in particular, which doesn't leave a huge gap to its right). I know I could do this by defining a symbol which expands to $\sim\hspace{-1pt}$, with 1pt replaced by some amount that looks about right to me, but is there a better way to do this (for instance, which doesn't rely on my guess about what spacing looks about right)?
1 Answer
To avoid this spacing you could define a symbol using \sym
but as an ordinary math symbol instead of a relation symbol, such as
\newcommand*{\mysim}{\mathord{\sim}}
-
Spectacular! I didn't know about mathord; that's exactly what I was looking for.– HenryJan 27, 2011 at 19:09
-
4As is explained in TeXbook,
\mathord
is not necessary.{\sim}
is enough.– Leo LiuJan 27, 2011 at 19:10 -
2@Leo: That's right, though I use
\mathord
because it's clear what it's been done. We had this discussion here.– Stefan Kottwitz ♦Jan 27, 2011 at 19:35
$\sim\!a$
or$\sim\mkern-4.5mu a$
.\sim
is strechable, so you won't get good results with\!
or similar kerning.