4

Continuing https://tex.stackexchange.com/a/49453/165772 as well as doubtlessly many similar answers: in pure (La)TeX, \le and \leq mean exactly the same. Is there any CTAN package X that intentionally (by default) redefines one or both macros such that the output is different? If so, what is X?

I deal with legacy LaTeX code of a computer-science text in German and encouter both macros. I wonder whether the author might have meant something different in hope of using the (unknown) package X later. (Of course, the author might have been misled, similarly to Is there a difference between \ge and \geq (or equivalentely between \le and leq)? or Why does \leq show up as \le?, or wished to mislead her followers. Any of it can be the case, but we don't suppose it in this question here.)

Clarification: I'm not asking how to typeset >=, <= or similar. (Of course, X might redefine one of the macros this way; then it's again relevant.)

  • 2
    I just greped for '\\le\W': nwejm.cls does some \RenewDocumentCommand \le {} {%, so does nwejmart.cls. pdfx/l8umath.def does \let\le\textle, so does hyperref/psdextra.def. gzt.cls and gztarticle.cls also do \RenewDocumentCommand \le {} {%. flexisym.sty does \renewcommand{\le}{\leq}. pinyin.sty does \let\le=\py@le and later \let\le=\PYle. zed-csp.sty does \let\le=\leqslant. mnras.cls also does \let\le=\leqslant. BHCexam.cls does \renewcommand{\le}{\leq}. jnuexam.cls does \let\le=\leqslant. And texinfo.tex does \def\leq{\ensuremath\le}. – Skillmon Nov 27 '18 at 13:12
  • 1
    unicode-math-xetex.sty does \protected\def\le{\leq}. Maybe there are some more redefinitions I overlooked because they are hidden inside other macros, there were some more hits found by grep which weren't \let\le=\leq or \let\leq=\le. – Skillmon Nov 27 '18 at 13:14
  • 1
    @Skillmon Sure, I guess in the end most definitions will end up doing the same for \le and \leq, after all Plain TeX and LaTeX did the same and breaking that behaviour would have been seen as problematic. – moewe Nov 27 '18 at 13:19
  • 1
    @user49915 The docs don't say anything about \le if I Ctrl+F'ed correctly, but github.com/dbitouze/nwejm/blob/… suggests \le and \leq are indeed the same. – moewe Nov 27 '18 at 13:21
  • 1
    Following on from my earlier comment, gzt.cls and gztarticle.cls do the same for \le and \leq, so too do mnras.cls and BHCexam.cls. On the other hand zed-csp.sty and jnuexam.cls only redefine \le and not \leq (this could be intended or an oversight). – moewe Nov 27 '18 at 13:33

Your Answer

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

Browse other questions tagged or ask your own question.