代码在使用 lualatex 时会产生错误,但在使用 pdflatex 时不会产生错误。为什么?

代码在使用 lualatex 时会产生错误,但在使用 pdflatex 时不会产生错误。为什么?

我尝试使用 tufte-book,可以使用 pdflatex 编译,但不能使用 lualatex(我更喜欢使用)。错误如下

25: Argument of \MakeUppercase has an extra }. }{AF}
25: Paragraph ended before \MakeUppercase was complete. }{AF}
25: You can't use `\relax' after \the. }{AF}
25: Use of \__text_expand_space:w doesn't match its definition. }{AF}
25: Undefined control sequence. }{AF}
25: Missing number, treated as zero. }{AF}
25: Missing { inserted. }{AF}
25: Package soul Error: Reconstruction failed. }{AF}
25: Missing } inserted. }{AF}
28: Argument of \MakeUppercase has an extra }. \maketitle
28: Paragraph ended before \MakeUppercase was complete. \maketitle
28: You can't use `\relax' after \the. \maketitle
...

\MakeUppercase我尝试检查并给出匹配的左括号和右括号,但在代码中找不到。

为什么此代码无法与 lualatex 配合使用?我已经检查过了lualtex 文档一个可能相关的问题,但没有找到答案。我用

This is LuaHBTeX, Version 1.15.0 (TeX Live 2022/Debian)  
(format=lualatex 2023.6.17)  27 JUN 2023 21:03
 restricted system commands enabled.

并思考这个类似的问题不适用。

MWE 是:

\documentclass{tufte-book}

% Book metadata
\title{Ein Buch mit Titel}

% Prints an epigraph and speaker in sans serif, all-caps type.
\newcommand{\openepigraph}[2]{%
  %\sffamily\fontsize{14}{16}\selectfont
  \begin{fullwidth}
  \sffamily\large
  \begin{doublespace}
  \noindent\allcaps{#1}\\% epigraph
  \noindent\allcaps{#2}% author
  \end{doublespace}
  \end{fullwidth}
}

\begin{document}

\frontmatter

\vfill
\openepigraph{%
Was soll man tun?
}{AF}
\vfill

\maketitle

% Start the main matter (normal chapters)
\mainmatter

Here the main matter

\end{document}

相关内容