mathjax / MathJax

Beautiful and accessible math in all browsers
http://www.mathjax.org/
Apache License 2.0
10.25k stars 1.16k forks source link

Could you give me a Surface Integral Character #2838

Open Juddd opened 2 years ago

Juddd commented 2 years ago

I want to record Maxwell's equations. I write it by \unicode{x222F} now, but it is very ugly image

dpvc commented 2 years ago

It's not clear what "ugly" means, here, but I assume it is related to the size.

The MathJax web fonts don't include U+222F, so the character is taken from system fonts one your (or your viewer's) computer. For operators like integral signs, their size may need to be larger than the usual one in the font. So you might need to use \Large or \LARGE or one of the other sizing commands to adjust that.

You might also want to enclose the character in \mathop{...}\nolimits in order to have it act like an operator in terms of spacing, etc. Here is an example

\mathop{\Huge\strut\unicode{x222F}}}\nolimits_{\partial\Omega}\mathbfit{E}\cdot \mathrm{d}s = \frac{Q}{\varepsilon_0}

ideally, you would also use \vcenter to center the integral sign,

\mathop{\vcenter{\Huge\strut\unicode{x222F}}}}\nolimits_{\partial\Omega}\mathbfit{E}\cdot \mathrm{d}s = \frac{Q}{\varepsilon_0}

but it looks like here is a bug in v3 that causes the limits to be misplaced in this case. I will need to look into why. But you could do

\vcenter{\mathop{\Huge\strut\unicode{x222F}}}\nolimits_{\partial\Omega}}\mathbfit{E}\cdot \mathrm{d}s = \frac{Q}{\varepsilon_0}

instead. Finally, you could define a macro

\newcommand{\oiint}{\mathop{\vcenter{\Huge\strut\unicode{x222F}}}}\nolimits}

to make it easier to use. That could be pre-defined in your page (see the documentation) for details.