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 just want to format a simple set theory example. But the following is annoying:

See how close the cap gets to the 'A' because of the tilde sign? I've used sim for the tilde sign. Any suggestions?

share|improve this question
    
Hi, welcome to tex.sx. A minimal document which generates this two lines would be very helpful, so that we can see which packages you are using and to test our answers. –  Martin Scharrer Feb 25 '11 at 14:33
    
$A$$=$$(A \cup B)$ \$A \cap (( A) \cap B)$ $= $ $ A \cap \sim B$ I use all the $$ to get extra space between the items. –  Algific Feb 25 '11 at 14:55
1  
better to edit your answer and place your sample code in there, rather than put it in a comment. Indent it with four spaces to have it formatted like code. –  Matthew Leingang Feb 25 '11 at 15:44
add comment

4 Answers 4

up vote 9 down vote accepted

You could avoid the binary operator spacing by writing {\sim} or \mathord{\sim}, achieving the same. You might have another look at Spacing around a character in math mode.

share|improve this answer
    
I love a quick fix. That did it. –  Algific Feb 25 '11 at 15:00
add comment

You could use one of the following commands:

\, (\thinspace) 
\: (\medspace)
\; (\thickspace)
\quad 
\qquad

(They generate different spaces, but I don't know how to mark them in the code.) See also the short math guide, p. 11.


EDIT: This solution should't be used here (see comments below). However, I'll not delete it as there is no harm to know about these commands.

share|improve this answer
    
You received a downvote because manual adjustments are not desirable in typesetting (although sometimes unavoidable); the whole point of using TeX is to forget about let the typesetting system worry about consistently positioning and spacing stuff around, allowing you to focus on the actual content. Compare this with the attitude of a Word/OO.o user, where manual adjustments and tweaks are the norm, rather the exception -- with unsurprisingly unimpressive results. –  Martin Tapankov Feb 26 '11 at 6:43
    
+1 from me, because these macros are more in the philosophy of math mode than stopping and starting math mode to insert spaces in LR mode. But I agree with Martin that these adjustments are seldom necessary. –  Matthew Leingang Feb 26 '11 at 18:03
    
+1 from me too, specially in math mode. I just needed them. –  Algific Feb 26 '11 at 19:14
    
Martin's quite right, in this case it's not good to use those manual adjustments since there's a clean solution. But of course it's good to know the adjustments. –  Hendrik Vogt Mar 2 '11 at 14:18
add comment

I believe it's doing that because \sim is meant as a binary operator (between two elements), rather than as a unary prefix operator (like set complement or negation).

You can always manually fix it up with extra space \; or negative space \! so for example, this looks approximately right:

A\; \cap \sim\!\!B
share|improve this answer
add comment

Here is a complete code example with output (I just took Stefan's answer and wrote it out).

\documentclass{standalone}
% TEX.SE \url{}
\setlength{\textwidth}{4in}
\begin{document}
\Huge
$A = (A \cup B)$

$A \cap (( A) \cap B) = A \cap \mathord{\sim}B$
\end{document}

sample output

Switching in and out of math mode is not a good way to get extra spaces. If you still want them after classifying the tilde as an ordinal, you can insert them with \,, \;, or \. See Herbert's mathmode document for FMTYEWTK.

share|improve this answer
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.