0

I've been using LyX for a while for math typing. So far I was using the "standard article" class, and everything worked well. But when I'm trying to use an AMS article class, I get this error (even if the document is empty):

! 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) ) 

It also says this, few lines earlier:

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.

This is the code that produces the problem (it happens also with an empty document):

\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}

I'm using pdf(la)tex with LyX 2.1.3 on a Windows machine, Installed withe MiKTeX 2.9. Thanks.

7
  • Please post a minimum working example of code that generates this error. Please also state which TeX engine -- pdf(la)tex, xe(la)tex, or lua(la)tex -- you use.
    – Mico
    Mar 2, 2015 at 8:13
  • The details are now in the question. Thank for the comment.
    – omrikap
    Mar 2, 2015 at 8:25
  • It seems to be a specific problem with amsart.
    – egreg
    Mar 2, 2015 at 9:07
  • Thanks. Is there another check I can do to say for sure? Can I get amsart from somewhere else?
    – omrikap
    Mar 2, 2015 at 9:52
  • amsart is doing some typesetting in the AtBeginDocument-hook when not every babel command has been set up. So it breaks when it encounters the @brackets command in \leftmarginii. Try \makeatletter\def\@rllanguagename{hebrew}\makeatother. Mar 2, 2015 at 10:21

1 Answer 1

5

@Ulrike Fischer points out that

amsart is doing some typesetting in the AtBeginDocument-hook when not every babel command has been set up. So it breaks when it encounters the @brackets command in \leftmarginii. Try

\makeatletter
\def\@rllanguagename{hebrew}
\makeatother
1
  • Since this answer entirely consists of a comment made by someone else, should it not be made Community Wiki? Jun 6, 2015 at 21:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .