ngerman 和 fontspec 的组合带来了很多错误

ngerman 和 fontspec 的组合带来了很多错误

2014 年 3 月,我在一个文档中使用了 ngerman 和 fontspec 软件包以及 luatex,效果很好。与此同时,我安装了新的 arch linux 和 TeX Live。现在我收到很多错误,例如

(/usr/share/texmf-dist/tex/latex/l3kernel/expl3-code.tex ! LuaTeX
error [\directlua]:1: invalid escape sequence near '\e'. l.269      
\directlua{\tempa}

或者

! Illegal parameter number in definition of \quark_if_no_value:NT. <to
be read again>

或者

! LuaTeX error [\directlua]:1: attempt to index global 'l3kernel' (a
nil value)stack traceback:  [\directlua]:1: in main chunk.
\__str_if_eq_x:nn ...}","\__str_escape_x:n {#2}")}
                                                   l.5840   { \  \" \# \$ \% \& \\ \^ \_ \{ \} \~ }
                                               ! Missing number, treated as zero. <to be read again> 
= l.5840   { \  \" \# \$ \% \& \\ \^ \_ \{ \} \~ }

结尾

(That makes 100 errors; please try again.)  253 words of node memory
still in use:    2 hlist, 1 rule, 1 kern, 1 attribute, 38 glue_spec, 1
attribute_list, 1 write , 1 dir nodes    avail lists:
2:12,3:1,4:1,5:1,6:31,7:1,9:2,10:3 !  ==> Fatal error occurred, no
output PDF file produced! Transcript written on test.log.

LaTeX exited abnormally with code 1 at Tue Oct  7 22:04:40

ngerman此故障仅出现在和的组合中fontspec。我该怎么办?

\documentclass[twboside=false, fontsize=12bp]{scrartcl}
\usepackage{ngerman}

\usepackage{fontspec}
\setmainfont{Times New Roman} 
\newfontfamily\hebfont[Script=Hebrew, Scale=MatchUppercase, Ligatures=TeX]{Ezra SIL}
\newcommand{\textheb}[1]{\bgroup\luatextextdir TRT\hebfont #1\egroup}


\begin{document}

some text

\end{document}

答案1

该软件包ngerman已经过时并且仅用于向后兼容。

你应该说

\usepackage[ngerman]{babel}

代替\usepackage{ngerman}

相关内容