Suppose we have the following code


which produces the following result Result

I want to have an additional equal sign automatically added before symbol s.


The same question about \leq and

$a \leq b \leq c \leq d \leq e \leq f \leq g \leq h \leq i \leq j \leq k \leq l \leq m \leq n \leq o \leq p \leq q \leq r \leq s \leq t \leq u \leq v \leq w \leq x \leq y \leq z$
  • Is this method supposed to work for inline-math situations only? The reason I ask is that most display-math environments (other than those of the breqn package) force you to choose explicit line break points -- giving you a chance to supply the extra = sign. Separately, should you maybe be concerned that consecutive = signs without intervening material might confuse your readers? – Mico Jun 25 '12 at 0:43
  • 1
    I know that this is traditional of Russian typography; but it's unnecessary and, in my opinion, confusing. Perhaps not so much when the equals sign is repeated, but it surely is when a binary operation symbol is repeated. – egreg Jun 25 '12 at 8:10
  • Yes, strictly speaking it's unnecessary, but it's a tradition I would like to follow. – Ivan Bychkov Jun 25 '12 at 16:59
  • @egreg: Did not know that applied to binary relations as well. Repeating a - sign actually changes the meaning as 9 - 5 is different than 9 - -5 (over two line), so am surprised that that is the standard in Russian typography. – Peter Grill Jun 25 '12 at 18:44
  • 1
    I've added the definition for \leq as requested. For + it's just like for =. – egreg Jun 26 '12 at 20:29

I wouldn't recommend such repetition. However, with a modification of this answer you can get what you want:


\AtBeginDocument{\mathcode`=="8000 }


The \AtBeginDocument is necessary because amsmath uses the = symbol for some of its initializations. It doesn't hurt when amsmath is not loaded.

Other math symbols

Let's see how we can redefine \leq to have the same properties as =. I adapted a trick that I believe is due to the late Michael J. Downes (the main developer of amsmath):


The expansion of \meaning\mathleq is \mathchar"3214 and we need to save the 2 (which is needed as argument to \textfont) leaving 14 in the input stream. After the \edef we get


that is similar to what I used before for =.

  • I noticed that current version of solution isn't a friend of \usepackage{amsmath}. – Ivan Bychkov Jun 25 '12 at 21:16
  • Now it is fine. – Ivan Bychkov Jun 25 '12 at 21:45
  • I managed to adapt your solution to some other binary operation symbols. But I couldn't do it for \leq. Could you provide an extended version of solution suitable for this case also ? – Ivan Bychkov Jun 26 '12 at 20:25

From http://dxdy.ru/post82175.html

In preambule:

\def\?#1{#1\nobreak\discretionary{}{\hbox{$\mathsurround=0pt #1$}}{}}

Then you should add \? before operations:

$a \?\leq b \?\leq c \?\leq d \?\leq e \?\leq f \?\leq g \?\leq h \?\leq i \?\leq j \?\leq k \?\leq l \?\leq m \?\leq n \?\leq o \?\leq p \?\leq q \?\leq r \?\leq s \?\leq t \?\leq u \?\leq v \?\leq w \?\leq x \?\leq y \?\leq z$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.