latex3 / unicode-math

XeLaTeX/LuaLaTeX package for using unicode/OpenType maths fonts
http://ctan.org/pkg/unicode-math
LaTeX Project Public License v1.3c
246 stars 29 forks source link

unicode-math and amsmath options #497

Open eg9 opened 6 years ago

eg9 commented 6 years ago

Description

unicode-math doesn't honor amsmath options such as intlimits

Check/indicate

Minimal example demonstrating the issue

\documentclass{article}
\usepackage[intlimits]{amsmath}
\usepackage{unicode-math}

\begin{document}
\[
\int_{a}^{b}
\]
\end{document}

Further details

amsmath takes its time in redefining every “big” operator so, for instance, \sum becomes \DOTSB\sum@\slimits@ and \int is \DOTSI\intop\ilimits@.

Already \DOTSB and \DOTSI are quite important, but the main issue is the lack of \slimits@ and \ilimits@ that the options nosumlimits or intlimits redefine from their standard value of \displaylimits and \nolimits respectively.

unicode has the \addnolimits and \removenolimits undocumented feature, but it is awkward to apply.

I'm not sure whether the \DOTSx feature can really be added (the problem I see is that \int is translated into ∫ U+222B made math active), but I believe that honoring amsmath options as regards to the placement of limits should.

wspr commented 6 years ago

Good catch. Yes, I agree this should be supported.

urkud commented 5 years ago

Same as #482. Maybe, one of the issues should be closed. This one has more details.

davidcarlisle commented 5 years ago

Related to this amsmath specifically detects the stix package and adjusts some definitions. If it also detected unicode-math some of the package load order issues might be easier to resolve. We could easily add such a test if that would be useful....

wspr commented 5 years ago

Some extra detail from Reinhard Kotucha:

when I load unicode-math after amsmath, the amsmath option intlimits has no effect any more. The options sumlimits and namelimits still work as expected.

 \documentclass{article}
 \usepackage[intlimits,sumlimits,namelimits]{amsmath}
 \usepackage{unicode-math}

 \begin{document}
   \[ \int_{0}^{1} \]
   \[ \sum_{i=0}^{1} \]
   \[ \lim_{x\to\infty} \]
 \end{document}
hvoss49 commented 4 years ago

Is there any chance that this will be fixed??

AlexaraWu commented 2 years ago

https://github.com/wspr/unicode-math/blob/d28e48e46392516bae43bd9cb15660f7037e47ac/um-code-setchar.dtx#L171

Replace \nolimits by amsmath internal \ilimits@ should work?