2

I am using babel and LaTeX extensively, but have encountered an error I do not understand and would be grateful to get your assistance on.

I have prepared 2 MWE that demonstrate that merely changing this:

\usepackage[english]{babel}

to that:

\usepackage[hebrew,english]{babel}

produces an error in the exam class, but not in the article class.

Surprisingly:

  1. the error is produced even without using Hebrew.

  2. The error cannot be replicated with other languages (such as French, or even Arabic which is also RTL language).

MWE 1 - article class produces output:

\documentclass[12pt, a4paper]{article}
\usepackage[hebrew,english]{babel}
\begin{document}
\begin{enumerate}
\item abc
\begin{itemize}
\item bcd
\end{itemize}
\end{enumerate}
\end{document}

MWE 1 produces the following output: enter image description here

MWE 2 - exam class won't produce output:

\documentclass[12pt, a4paper]{exam}
\usepackage[hebrew,english]{babel}
\begin{document}
\begin{questions}
\setcounter{question}{0}
\question What is the result of 1+1?
\begin{choices}
\choice 1
\CorrectChoice 2
\choice 3
\choice 4
\end{choices}
\end{questions}
\end{document}

If you remove the word hebrew from babel package options, the exam class will produce the following.

enter image description here

The error in the console is:

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
epR8GaYuh
  • 2,432
Morzen
  • 325
  • 3
    exam uses \ifnum \thepageof@pagepoints > 0 which doesn't work if \thepageof@pagepoints doesn't expand to a number (which it doesn't with hebrew as it changes the meaning of @arabic). – Ulrike Fischer Feb 10 '20 at 13:06
  • Is there a workaround? – Morzen Feb 10 '20 at 16:01
  • 1
    I would use xelatex or lualatex-dev and code like this https://tex.stackexchange.com/questions/472639/language-hebrew-not-available-for-font-dejavu-sans-with-script-hebrew. – Ulrike Fischer Feb 10 '20 at 16:04

0 Answers0