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)?
Asked
Active
Viewed 2,855 times
1 Answers
11
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}}
Stefan Kottwitz
- 231,401
-
Spectacular! I didn't know about mathord; that's exactly what I was looking for. – Henry Jan 27 '11 at 19:09
-
4As is explained in TeXbook,
\mathordis not necessary.{\sim}is enough. – Leo Liu Jan 27 '11 at 19:10 -
2@Leo: That's right, though I use
\mathordbecause it's clear what it's been done. We had this discussion here. – Stefan Kottwitz Jan 27 '11 at 19:35
$\sim\!a$or$\sim\mkern-4.5mu a$. – yannisl Jan 27 '11 at 18:46\simis strechable, so you won't get good results with\!or similar kerning. – Hendrik Vogt Jan 27 '11 at 20:34