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.

Typically, we take \leq:

\documentclass{article}

\begin{document}
    \[     \leq \simeq \leq_A \sim  \leq_B     \]

    \[         \leq \simeq {\leq_A} \sim  {\leq_B}     \]

\end{document}

and see the space around the two \sim is not respected as soon as we put a subletter on them Why does tex do that ? How to prevent it without having to put the braces around each new symbol or use a command to define leq taking an input?

share|improve this question
2  
What would be the use of this? I think this will be prejudicial and would destroy one of the main typographical features of TeX; imagine what would happen (a simple example) to math typesetting if the minus sign were treated in the same fashion in both occurrences of $4-5\quad \times-3$. –  Gonzalo Medina Sep 12 '13 at 3:40
    
@GonzaloMedina I completely agree with your point, but the results are the opposite of what I'd naively think. Is LaTeX getting rid of the padding around concatenated relation symbols? In other words, if you mask the relation symbol, \leq, inside curly brackets, then does LaTeX treat the \sim as being between two non-relation symbols and thus restore the padding? –  A.Ellett Sep 12 '13 at 4:42
1  
You have two choices: either adding braces around the symbol when it's used as an ordinary, or define a new command for it, say \newcommand{\oleq}{\mathord{\leq}}. –  egreg Sep 12 '13 at 6:39
add comment

1 Answer 1

Both \[ \leq \simeq \leq \sim \leq \] and \[ \leq \simeq \leq_A \sim \leq_B \] lead to similar results when it comes to spacing as all of the symbols are treated as relations.

Putting curly braces around \leq_A, so it becomes {\leq_A}, results in {\leq_A} switching its type from mathrel to mathord (see What is the difference between \mathbin vs. \mathrel?); so LaTeX treats {\leq_A} \sim {\leq_B} as any ordinary symbol just like a \sim b.

What to do really depends on the meaning of your input. If you want to establish a binary relation between \leq_A and \leq_B with \sim (let's say: equivalence of two binary relations) just like a relation between a and b, you need to wrap \leq_A and \leq_B in curly braces or \mathord, define a new command for that if you need it more often. If you want \leq \simeq \leq_A \sim \leq_B to act like one massive relation, just leave it as it is.

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.