unicode-math icon indicating copy to clipboard operation
unicode-math copied to clipboard

unicode-math and amsmath options

Open eg9 opened this issue 6 years ago • 6 comments

Description

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

Check/indicate

  • [x] Relevant for XeTeX
  • [x] Relevant for LuaTeX
  • [x] Issue tracker has been searched for similar issues?
  • [x] https://tex.stackexchange.com/questions/457395/

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.

eg9 avatar Oct 29 '18 19:10 eg9

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

wspr avatar Oct 29 '18 22:10 wspr

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

urkud avatar Jan 01 '19 10:01 urkud

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....

davidcarlisle avatar Jan 01 '19 11:01 davidcarlisle

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}

wspr avatar Apr 28 '19 14:04 wspr

Is there any chance that this will be fixed??

hvoss49 avatar May 30 '20 16:05 hvoss49

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

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

AlexaraWu avatar Feb 28 '22 18:02 AlexaraWu