Open jfbu opened 6 years ago
because unicode-math
sets everything up at begin document then any user-override needs to do the same. This works:
\AtBeginDocument{
\let\Im\relax % try to make LaTeX happy
\DeclareMathOperator{\Im}{Im}}
There is a separate issue on making unicode-math not delay so much see Issue #465
Note that while I agree users should be able to change this, the association isn't just in legacy tex fonts, ℑ
and ℑ
both give ℑ in HTML for example.
Description
At begin document, unicode-math reassigns meaning of
\Im
to use ℑ (U+02111). The mapping in itself is somewhat logical following Plain TeX legacy fonts and\mathchardef\Im="023D
(very specific to TeX fonts). The problem though is:usage of ℑ for imaginary part is perhaps not that established typographically,
in mathematics, linear algebra has extremely widespread usage of
Im
for Image, and it is natural to desire using\Im
for this. It is also a widespread choice to useIm
and not ℑ for imaginary part.amsmath is very obstinate in making
\DeclareMathOperator
preamble only (\@onlypreamble\DeclareMathOperator
,\@onlypreamble\@declmathop
).As a result of this, average user will have a problem with
\DeclareMathOperator{\Im}{Im}
in preamble as this is overridden by unicode-math at begin document. And moving the declartion to the document body fails due to item 3 above.Notice that unicode-math does not hesitate overwriting user choice as example below demonstrates.
This context in particular to legacy documents moving over to unicode-math and OpenMath fonts.
Check/indicate
Minimal example demonstrating the issue
Further details
I found no hint in documentation about such potential issue. It may deserve some mention and some workaround.