I'm trying to record some changes using the changes package - I've already done a lot of the text, and had to work around display maths but I've got a simple value typeset using siunitx, and changing that value doesn't appear to work:
\documentclass{article}
\usepackage{siunitx}
\usepackage{changes}
\begin{document}
\replaced{\SI{1}{\volt}}{\SI{2}{\volt}}
\end{document}
gives:
! Extra }, or forgotten \endgroup.
\UL@stop ...z@ \else \UL@putbox \fi \else \egroup
\egroup \UL@putbox \fi \if...
l.5 ...\SI{1}{\volt}}{\SI{2}{\volt}}
If I continue to compile (getting the same error again and 2 missing } inserted
s, the output is actually exactly as expected:
adding \protect
before the \SI
gives exactly the same error, and of course trying \SI{\replaced{1}{2}}{\volt}
was never going to work:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! siunitx error: "invalid-token-in-number"
!
! Invalid token '\let ' in numerical input.
!
! See the siunitx documentation for further information.
!
! For immediate help type H <return>.
!...............................................
Is there some workaround that will get this to run without errors? I don't really want to run in nonstopmode in case of "real" errors, and besides, I used a build script that's designed to stop on errors.