latex3 / unicode-math

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

Warning, caption and hyperref #530

Open NBrouard opened 4 years ago

NBrouard commented 4 years ago

Description

I get LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. when mixing hyperref package with unicode-math package and using literal Greek characters in a LaTex caption. If I change the Greek character into their standard back-slashed the warning is suppressed. I am using TexLive 2019.

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{unicode-math}
\usepackage{hyperref}
  \begin{document}
     We can see on Fig~\ref{f:l1l2} the right-shifted (of $Δ$ years) ...
   \begin{figure}[ht]
     \caption{Population 1 is shifted to the left with a
     distance of %$\Delta=\log RR/\beta$
     $Δ=\log RR/β$
     . }
   \label{f:l1l2}
\end{figure}

Further details

davidcarlisle commented 4 years ago

Yes thanks I can reproduce (this is mostly a hyperref issue rather than unicode-math)

u-fischer commented 4 years ago

@davidcarlisle it is not really hyperref. You can get a similar problem if e.g. \thepage contains the delta:

\documentclass{article}
\usepackage{unicode-math}

\begin{document}
\renewcommand\thepage{Δ}  
blub\label{f:l1l2}
\end{document}

Only with nameref loaded the probability is higher that the label argument contains something problematic.

Beside this: Why does unicode-math change the catcode from 11 to 12?