Take the 2-minute tour ×
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.

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)?

share|improve this question
    
I am not too sure about your question but you can try one of these: $\sim\!a$ or $\sim\mkern-4.5mu a$. –  Yiannis Lazarides Jan 27 '11 at 18:46
2  
But why -4.5mu rather than, say -4mu? Or -4.2mu? (Indeed, -4.5mu seems to be running slightly into other characters.) –  Henry Jan 27 '11 at 18:54
    
That was my guess to get it as close as possible to what you wanted. There are no rules as far as I know. –  Yiannis Lazarides Jan 27 '11 at 18:55
1  
@Yiannis: It's a bad idea to use a negative space here. The space after \sim is strechable, so you won't get good results with \! or similar kerning. –  Hendrik Vogt Jan 27 '11 at 20:34
add comment

1 Answer

up vote 10 down vote accepted

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}}
share|improve this answer
    
Spectacular! I didn't know about mathord; that's exactly what I was looking for. –  Henry Jan 27 '11 at 19:09
4  
As is explained in TeXbook, \mathord is not necessary. {\sim} is enough. –  Leo Liu Jan 27 '11 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 '11 at 19:35
add comment

Your Answer

 
discard

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.