# Integral limits with amsmath in LuaLaTeX

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

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

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

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}


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.

• Thank you @egreg. When I typeset your code, the limits of the integral are not exactly possitioned like your picture shows but some points moved to the right. Do you know, why this happens? Mar 23, 2013 at 15:41
• @StephanLukasczyk You're right: I used XeLaTeX for typesetting the example. With LuaLaTeX there's a shift, which seems like a bug somewhere. Mar 23, 2013 at 15:44
• @egreg: it is probably the difference in calculating the integral width due to the bug in applying italic corrections to integrals in LuaTeX. Mar 23, 2013 at 16:08
• Is there any update on that bug? I still get the wrong output using LuaLaTeX from TeX Live 2014. Mar 2, 2015 at 17:45
• @Socob The bug seems to be still present. You should ask to the LuaTeX mailing list: tug.org/mailman/listinfo/luatex Mar 2, 2015 at 18:10