3

I think there is no problem writing $a < b$.

Is there a problem with writing $a≦b$ instead of $a \leqq b$?

  • 1
    Welcome to TeX.SE. Why do you ask, do you think there will be a problem? – Marijn May 22 '20 at 8:25
  • @Marijn It is possible to write ≦、⇒、∀、∈、etc... but I do not usually see that notations. If there is a corresponding LaTeX command, it will be used. – PONPON May 22 '20 at 8:36
  • 2
    If ≤ does not throw an error and looks OK in the output, there probably isn't a problem with doing that. I wouldn't know how to easily produce '≤' with my keyboard, though, but I can easily type \leq, so you'll certainly see me using \leq for the foreseeable future. (Back in the day '≤' probably wasn't part of any encoding that LaTeX could deal with, so in older documents people had to use \leq to get the desired result.) – moewe May 22 '20 at 8:44
  • 2
    Apart from the input convenient reason, note that using in equation is supported only by combination of Unicode-aware engine (xetex or luatex) and unicode-math package. – muzimuzhi Z May 22 '20 at 8:55
  • 1
    muzimuzhiZ is right about not being supported out of the box with pdfLaTeX (a non-Unicode engine), so one would need \DeclareUnicodeCharacter{2264}{\leq} to get it going. \leqq is available in \usepackage{amssymb} and could then be declared as \DeclareUnicodeCharacter{2266}{\leqq}. – moewe May 22 '20 at 9:14
8

Not all TeX engines support the input or out of the box, because those characters are not part of the ASCII character range or one of the 8bit character ranges (e.g. latin1).

The Unicode engines LuaTeX and XeTeX can deal with the input, but may not show anything in the output unless you tell them to use a font that has the required glyphs. This is probably done with the unicode-math package (cf. What is the difference between unicode-math and mathspec?)

\documentclass{article}
\usepackage{fontspec}
\usepackage{amsmath}
\usepackage{unicode-math}

\begin{document}
$a \leq b$ or $a ≤ b$

$a \leqq b$ or $a ≦ b$
\end{document}

Output showing "a ≤ b" and "a ≦ b" twice

Modern versions of pdfLaTeX can also theoretically deal with or in the input, but need additional help, because by default pdfLaTeX is only set up to deal with a subset of Unicode. With pdfLaTeX \leqq is available for example from the amssymb package and the Unicode characters can be set up with \DeclareUnicodeCharacter (cf. \DeclareUnicodeCharacter doesn't work for all characters).

\documentclass{article}
\usepackage{amsmath}

\usepackage{amssymb}
\DeclareUnicodeCharacter{2264}{\leq}
\DeclareUnicodeCharacter{2266}{\leqq}

\begin{document}
$a \leq b$ or $a ≤ b$

$a \leqq b$ or $a ≦ b$
\end{document}

Output showing "a ≤ b" and "a ≦ b" twice


Compared to / the macro versions \leq/\leqq are (probably) easier to type for most people and require only US-ASCII characters (which is most likely the reason why older documents predating the triumph of Unicode only use those forms: / wasn't an option back then).

If you can type / they of course look much nicer in the input.

Bottom line: If and work for you, i.e. they don't throw any errors and produce the desired output, then there is no problem using them. But you may want to keep in mind that not everyone uses an up-to-date LaTeX system and those with older systems may have issues with fancy new Unicode characters (publishers are not generally known to run the most up-to-date LaTeX versions). Plus, old habits die hard, some people are just so used to \leq and \leqq that they wouldn't even dream about using or .

  • @wipet Fixed, thank you. – moewe May 22 '20 at 11:46

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.