1

Opening a default blank document in Overleaf, the \iint symbol resolves, but \oiint (closed double integral) does not. Here is my sample. I've tried adding a few \usepackage{} statements. Any ideas?

\documentclass{article}
\usepackage[utf8]{inputenc}

\title{test}
\author{ }
\date{February 2019}

\begin{document}

\maketitle

\section{Introduction}

$$\iint$$
$$\oint$$
$$\oiint$$

\end{document}

Here's a shot of my rich text output:

enter image description here

Stefan Pinnow
  • 29,535
  • Which packages did you try? – Sigur Feb 14 '19 at 13:27
  • 1
    \usepackage{esint} \usepackage{amsmath} \usepackage{Unicode-math} – user351059 Feb 14 '19 at 13:29
  • 2
    There are many packages supporting it. – Sigur Feb 14 '19 at 13:30
  • is there something I need to do besides just adding new \usepackage statements? Does line ordering matter? Are there any extra steps to make sure the packages are being linked? – user351059 Feb 14 '19 at 13:31
  • 3
    Please, choose one package from this list: http://mirrors.ctan.org/info/symbols/comprehensive/symbols-a4.pdf At the end there is an index. see letter O. – Sigur Feb 14 '19 at 13:32
  • 3
    (I'm on support staff on Overleaf.) The rich-text renderer uses MathJax, which supports many LaTeX math commands, but by no means all of them. For further details, check this question on Math Meta. If you have the appropriate packages included in your document, the symbol should appear in the compiled output on the right, which is different from the MathJax-based rendering on the left pane. – Paul Gessler Feb 14 '19 at 14:29
  • Thanks, Paul, when I add both amsmath & esint I do indeed see the expected output in the PDF. I'll be careful from now on to check the PDF rather than the MathJax visualizer! – user351059 Feb 14 '19 at 15:09
  • @user351059 It is important, also, to use \[...\] instead of $$...$$. You can see this important question here: https://tex.stackexchange.com/questions/503/why-is-preferable-to. I hope to help you, and good LaTeX. – Sebastiano Feb 14 '19 at 16:19
  • 1
    Thanks, Sebastiano, as a latex noob, I very much appreciate your suggestion. I'll take a look. – user351059 Feb 14 '19 at 18:27

2 Answers2

1

Paul Glesser from Overleaf had the answer. I'll summarize:

The Rich Text pane uses MathJax which doesn't have full support for all math symbols. When I add the following package, I get the desired result in my PDF file:

\usepackage{esint}
Sigur
  • 37,330
1

The packages that support it include: unicode-math, newtxmath, newpxmath, stix, stix2, esint, cmupint, wasysym, MnSymbol, fdsymbol, and mathabx.

The unicode-math package requires LuaLaTeX or XeLaTeX, and allows you choose from a large number of fonts. It also allows you to substitute the \oiint symbol from a different math font, should you prefer that, with a command like:

\setmathfont{STIX Two Math}[
  range=\oiint,
  Scale=MatchUppercase]

The other packages are intended for PDFTeX, although they will (mostly) work in the newer engines too. There’s an almost-but-not-quite-comprehensive list of them in the Comprehensive LaTeX Symbols List. Of those, esint best matches the default font. Some only add new symbols, some will change all the math fonts in your document, and some will change both the text and the math fonts.

The symbol will not properly display in the rich text pane of Overleaf, according to their tech support, because that uses MathJax rather than LaTeX. It will, however, show up correctly in the PDF.

Davislor
  • 44,045