josephwright / siunitx

A comprehensive (SI) units package for LaTeX
LaTeX Project Public License v1.3c
356 stars 26 forks source link

\qty inside caption & xr-hyper problem #710

Closed rafaelpap closed 8 months ago

rafaelpap commented 8 months ago

Dear Sir, I have a document which uses siunitx and xr-hyper. If I include a \qty command inside a caption in the "auxiliary" document I obtain the following error:

! Undefined control sequence.

...of a water molecule \qty {1}{\meter } Using \num inside the caption works ok. I attach 4 files. I compile them using latexmk -pdf article1.tex latexmk -pdf suppinfo1.tex latexmk -pdf article1.tex latexmk -pdf article2.tex latexmk -pdf suppinfo2.tex latexmk -pdf article2.tex Using xr instead of xr-hyper seems to work. [bug.zip](https://github.com/josephwright/siunitx/files/13990274/bug.zip) Maybe I am doing something wrong? Thanks for the attention, Rafael RP
josephwright commented 8 months ago

This links to how siunitx defines units. It may be solvable when I sort out 'free text' units, which I am hoping to look at. The other possible fix is at the end of xr-hyper, but I am not sure I can really make that happen.

josephwright commented 8 months ago

Could you raise at https://github.com/latex3/hyperref/issues? I can't directly transfer, but it looks like it might be an issue there.

josephwright commented 8 months ago

Transferred to https://github.com/latex3/hyperref/issues/327