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
{
\@ifpackageloaded { fontspec }
{
\int_const:Nn \c__siunitx_degree_int { 176 }
\@ifpackageloaded { unicode-math }
{ \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.
\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:27siunitx
was a year ago). – JP-Ellis Nov 22 '17 at 2:36