# siunitx and fontspec/unicode-math [closed]

I found an issue with fontspec and siunitx. There is following error message:

! Undefined control sequence.
<argument> \c_sys_engine_xetex_bool


It only happens if fontspec and siunitx are booth loaded, otherwise it does not. It seems like siunitx tests something and \c_sys_engine_xetex_bool is not defined.

MWE:

\documentclass{scrreprt}
\usepackage{siunitx}
\usepackage{fontspec}
\begin{document}
Some Text
\end{document}


I found the corresponding code in siunitx:

\AtBeginDocument
{
{
\int_const:Nn \c__siunitx_degree_int    { 176 }
{ \int_const:Nn \c__siunitx_micro_int { "003BC } }
{ \int_const:Nn \c__siunitx_micro_int { "000B5 } }
\int_const:Nn \c__siunitx_angstrom_int  { "0212B }
\int_const:Nn \c__siunitx_ohm_int       { "003A9 }
\bool_if:NT \c_sys_engine_xetex_bool
{


The rest is too long to present here.

I use up-to-date texlive 2017.

• Fixed by github.com/josephwright/siunitx/issues/311, sent to CTAN today and thus in TL probably tomorrow – Joseph Wright Jul 23 '17 at 20:52
• As a work around you can add temporarly \ExplSyntaxOn \bool_new:N\c_sys_engine_xetex_bool \ExplSyntaxOff. It won't always do the right thing but avoids the error. – Ulrike Fischer Jul 24 '17 at 9:27
• Thanks for this comment. As I don´t even use xetex, it won´t change anything to me right? – Niklas Jul 24 '17 at 13:08
• @JosephWright I noticed that this error is still present on CTAN (in fact, the last update for siunitx was a year ago). – JP-Ellis Nov 22 '17 at 2:36
• I'm voting to close this question as off-topic because it was solved with an CTAN update. – Bobyandbob Aug 19 '18 at 7:43