MathJax
MathJax copied to clipboard
Implement TeX commands for Contour Integral
See http://tug.org/pipermail/texhax/2004-September/002706.html
\oiint and \oiiint are discussed here: https://bugzilla.wikimedia.org/show_bug.cgi?id=35477
(but texvc does not support them)
That comes down to the MathJax fonts not having the glyph, correct?
Yes, the TeX parsing is trivial. Here is an example from Wikipedia where a hack is used:
https://en.wikipedia.org/wiki/Gauss%27s_law#Integral_form_2
If you enable MathJax, you see an ugly image of the contour integral inside the beautiful MathJax rendering... :-(
Right, so the question is: where do we find a ComputeModern-like glyph?
I guess in the Latin Modern fonts.
Ah, good idea.
This issue could use some love. Over on Stack Exchange, it comes up with some regularity:
http://meta.math.stackexchange.com/questions/9973/how-do-you-render-a-closed-surface-double-integral/ http://meta.physics.stackexchange.com/questions/6779/oiint-doesnt-seem-to-work http://meta.physics.stackexchange.com/questions/9307/rendering-of-the-double-surface-integral-tex http://meta.math.stackexchange.com/questions/19594/oiint-symbol-how-does-it-work
Thanks. It's not a default macro because the default fonts do not have glyphs. You might want to ask physics.SE to add a custom macro to its MathJax configuration to add it anyway (and ask for a change in fonts if the community thinks that's important enough).
We plan to work on the fonts next year as part of v3.0 and that might enable us to make this a default macro.
Thanks for the quick response. Can you suggest specific macros that would be able to achieve this? Or do you mean hacking something together with circles and spaces?
You could use the equivalent of
\def\oint{\mathop{\vcenter{\mathchoice{\huge\unicode{x222E}\,}{\unicode{x222E}}{\unicode{x222E}}{\unicode{x222E}}}\,}\nolimits}
\def\oiint{\mathop{\vcenter{\mathchoice{\huge\unicode{x222F}\,}{\unicode{x222F}}{\unicode{x222F}}{\unicode{x222F}}}\,}\nolimits}
\def\oiiint{\mathop{\vcenter{\mathchoice{\huge\unicode{x2230}\,}{\unicode{x2230}}{\unicode{x2230}}{\unicode{x2230}}}\,}\nolimits}
to allow \oint
, \oiint
, and \oiiint
to work with their respective unicode characters, with sizing reasonably for displaystyle, and being the proper TeX class to allow limits to be placed appropriately (though the lower limit will be a bit too far to the right, because this won't get the proper italic correction).
Any progress on getting this natively into MathJax 3?
Contour integrals are quite common in physics, and support for this would be really appreciated!
We are planning a release at the end of the summer that includes new fonts. We will consider adding new glyphs at that time, so may be able to give better coverage at that point.
Just ran into this issue, was anything implemented?
@Andy2K11, it has taken longer than expected, and is still in progress, but should be in the next release.