11

I use TeX Live including the Hebrew package. I've tried to produce a simple TeX file:

\documentclass{article}
\usepackage [english,hebrew]{babel}
\begin{document}
שלום
\end{document}

but I keep getting the infamous

Package babel Warning: No hyphenation patterns were loaded for the language `Hebrew'.

I've searched all over but can't find the solution.

einpoklum
  • 12,311
Adam
  • 111
  • 1
    Welcome to TeX.SX! Is Hebrew hyphenated at all? – egreg Dec 04 '12 at 12:00
  • 1
    @egreg: it may be hyphenate-able, but not with anything obvious on ctan. (it's a bit sad, if it isn't hyphenatable, that babel doesn't "know", and throws the warning anyway.) – wasteofspace Dec 04 '12 at 13:47
  • @Adam, please consider accepting the answer. Alternatively, if you're getting this and then an error about missing font metrics, see these two questions. – einpoklum May 14 '13 at 14:02

1 Answers1

10

As far as my research in the net has been able to find, hyphenation in Hebrew is used mainly (or even uniquely) in newspaper typeset in narrow columns. There are no hyphenation pattern files for Hebrew that I know of; surely not on CTAN.

The message you get is a long standing misfeature of babel, which, when it doesn't find hyphenation patterns preloaded for a language, decides arbitrarily to use the patterns for English (\language0, to be precise).

You can cure the problem with a hack:

\documentclass{article}

% Fool babel
\makeatletter\let\l@hebrew\l@nohyphenation\makeatother

\usepackage [english,hebrew]{babel}
\begin{document}
 שלום
\end{document}

\l@hebrew is the internal command that babel looks for. You have two advantages with this: the message will not appear and you risk no wrong application of hyphenation. In my opinion, no hyphenation is better than a wrong one based on the rules for (American) English.

If you still get the message, it means that your TeX distribution doesn't define the nohyphenation pseudolanguage. The remedy then is to say

\makeatletter\chardef\l@hebrew=255 \makeatother

which works unless your TeX distribution defines hyphenation patterns for 256 languages, and this seems unlikely.

egreg
  • 1,121,712