Closed u-fischer closed 10 months ago
the unicode-math definition of \operator@font is not expandable but currently fragile. This leads to problems e.g. with hyperref.
\operator@font
[x] Relevant for XeTeX [x] Relevant for LuaTeX [x] Issue tracker has been searched for similar issues? [x] e.g. https://tex.stackexchange.com/q/548178/2388
\documentclass{article} \usepackage{unicode-math} \usepackage{hyperref} %\makeatletter %\ExplSyntaxOn %\cs_set_protected:Npn \operator@font % { % \__um_switch_to:n {literal} % \__um_fontswitch:n { \g__um_operator_mathfont_tl } % } %\ExplSyntaxOff %\makeatother \begin{document} \tableofcontents \section{$\cos $}% test \end{document}
This errors with
! Improper alphabetic constant. <to be read again> \math@bgroup l.29 \section{$\cos $}
Making the command protected solves the problem.
Description
the unicode-math definition of
\operator@font
is not expandable but currently fragile. This leads to problems e.g. with hyperref.Add info or delete as appropriate:
[x] Relevant for XeTeX [x] Relevant for LuaTeX [x] Issue tracker has been searched for similar issues? [x] e.g. https://tex.stackexchange.com/q/548178/2388
Minimal example demonstrating the issue
This errors with
Making the command protected solves the problem.