未定义的控制序列 - \@rllanguagename

未定义的控制序列 - \@rllanguagename

我使用 LyX 进行数学输入已经有一段时间了。到目前为止,我一直在使用“标准冠词”类,一切运行良好。但是当我尝试使用 AMS 冠词类时,我收到此错误(即使文档为空):

! Undefined control sequence.
\moreL ...dL \beginL \csname from\@rllanguagename 
                                              \endcsname 
l.18 \begin{document}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
\moreL ...dL \beginL \csname from\@rllanguagename 
                                              \endcsname 
l.18 \begin{document}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

LaTeX Font Info:    Font shape `HE8/cmr/m/n' will be
(Font)              scaled to size 10.0pt on input line 18.
(newfile1.aux) ) 

前面几行还提到了这一点:

Package babel Warning: No hyphenation patterns were preloaded for
(babel)                the language `Hebrew' into the format.
(babel)                Please, configure your TeX system to add them and
(babel)                rebuild the format. Now I will use the patterns
(babel)                preloaded for english instead on input line 57.

这是产生问题的代码(它也发生在空文档中):

\documentclass[oneside,english,hebrew]{amsart}
\usepackage[T1]{fontenc}
\usepackage[latin9,cp1255]{inputenc}
\usepackage{amsthm}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\numberwithin{equation}{section}
\numberwithin{figure}{section}

\makeatother

\usepackage{babel}
\begin{document}
\selectlanguage{english}%
\inputencoding{latin9}hello\selectlanguage{hebrew}%

\end{document}

我在 Windows 机器上使用 pdf(la)tex 和 LyX 2.1.3,安装了 MiKTeX 2.9。谢谢。

答案1

@Ulrike Fischer 指出

amsart在 中进行一些排版,AtBeginDocument-hook但并非所有 babel 命令都已设置。因此,当它遇到@brackets中的命令时会中断\leftmarginii。尝试

\makeatletter
\def\@rllanguagename{hebrew}
\makeatother

相关内容