[Tex/LaTex] Integral limits with amsmath in LuaLaTeX

amsmathluatexmath-operators

Also reading the thread about Making integral ∫ use \limits by default with unicode-math I'm not quite happy with the solution.
With pdfLaTeX I use the code

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[intlimits]{amsmath}
\begin{document}
\[A=\int_0^{b}f(x)\mathrm{d}x\]
\end{document}

and get

Screenshot of result with pdflatex

Compiling the code

\documentclass{article}
\usepackage[intlimits]{amsmath}
\usepackage{fontspec,unicode-math}
\setmainfont{Latin Modern Roman}
\setmathfont{Latin Modern Math}
\begin{document}
\[A=\int_0^{b}f(x)\mathrm{d}x\]
\end{document}

with LuaLaTeX I get

Screenshot of result with lualatex

Is there any possibility—beside the solution in the linked question—to get the same output with both pdfLaTeX and LuaLaTeX?

Best Answer

unicode-math uses a different model for deciding whether to put limits over or beside integrals and the intlimits option does nothing.

\documentclass{article}
\usepackage{amsmath}
\usepackage{fontspec,unicode-math}
\setmainfont{Latin Modern Roman}
\setmathfont{Latin Modern Math}

\removenolimits{\int}

\begin{document}
\[
A=\int_0^{b}f(x)\,\mathrm{d}x
\]
\end{document}

enter image description here

The list of operators defined with an implied \nolimits is the following:

\int\iint\iiint\iiiint\oint\oiint\oiiint
\intclockwise\varointclockwise\ointctrclockwise\sumint
\intbar\intBar\fint\cirfnint\awint\rppolint
\scpolint\npolint\pointint\sqint\intlarhk\intx
\intcap\intcup\upint\lowint

You can remove items from the list (one at a time) with the \removenolimits command; there's also \addnolimits for adding to the list.