I think there is no problem writing $a < b$
.
Is there a problem with writing $a≦b$
instead of $a \leqq b$
?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI think there is no problem writing $a < b$
.
Is there a problem with writing $a≦b$
instead of $a \leqq b$
?
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}
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}
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 ≦
.
\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≦
in equation is supported only by combination of Unicode-aware engine (xetex or luatex) andunicode-math
package. – muzimuzhi Z May 22 '20 at 8:55≤
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