I'm trying to write less than or equal to, I'm using \leq, however, when I compile it shows me a \leqslant.

I'm using overleaf. Is it a bug or do I need to use another command or something? Any help would be appreciated. Here is the code with all of the packages I'm using:

\usepackage[utf8]{inputenc} % til at skrive æÆøØåÅ.
\usepackage{gensymb} %giver temperatursymboler
\usepackage[colorlinks = true,
            linkcolor = blue,
            urlcolor  = blue,
            citecolor = blue,
            anchorcolor = blue]{hyperref}
%\pgfpagesuselayout{4 on 1}[a4paper,border shrink=5mm]


  • 4
    Welcome to TeX.SX! It is very hard to see where the error comes from without any code. Could you a minimal working example showing the error? The example code should begin with \documentclass{...} and end with \end{document}.
    – Vincent
    Mar 22 '20 at 21:35
  • 1
    Hi, it works as normal for me: overleaf.com/read/nmkmbkkrtdwv It may be that a package or font you've used is causing \leq to be displayed like \leqslant. As Vincent has mentioned, if you can share a complete but minimal document that shows the problem it can help us to help you. Mar 22 '20 at 21:37
  • Hi Paul and Vincent, thanks, I've inserted the packages I use and the relevant code. I'm fairly new to LaTex, so all of the packages I got from the person who helped me learn it.
    – Yeet
    Mar 23 '20 at 1:26
  • off-topic: do you really need so many packages? (ii) some package you load twice (inputenc, gemsymb, etc), (iii) hyperref should be loaded last in preamble ... Please clean-up your preamble. As is it, it doesn't work ... \degree is defined twice: in mathbx and in gensymb ...
    – Zarko
    Mar 23 '20 at 2:14

A good place to look when there's a conflict of this sort is the Comprehensive LaTeX symbols list (texdoc comprehensive). Searching in that reference one finds that the slanted form is associated with \leq in the mathabx package (table 126, page 68). A comment accompanying that table points out such a conflict for several other symbols as well.

One of the packages loaded in your preamble is indeed mathabx.

This package changes the shapes of nearly every symbol defined for TeX. That fact should be taken into consideration when deciding to use the package.

Since mathabx is the only source for some symbols, unless there is a compelling reason to adopt the "universally" different shapes, it's possible to access just those symbols wanted specifically, one by one. The method for doing this can be found here: Importing a single symbol from a different font


Here is a minimal working example (MWE) that illustrates your issue.

\usepackage{mathabx} %Delete this line for ordinary \geq shape. However, many other symbols will also change appearance.

You almost certainly do not need the vast majority of the packages you loaded in your preamble. When writing a document in LaTeX, it's probably best to load only the packages you actually use. As Barbara mentioned, the mathabx package changes many symbols, including \geq. Assuming you do not want all the other shapes associated with that package, you can simply eliminate that line. But I would also suggest eliminating the packages you load one by one, retaining only those that you actually need for the document to compile and produce your desired output.

Additionally, you should not use $$..$$ for displaying mathematics. Instead use \[..\]. An explanation is here.

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.