Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have MiKTeX installed on a Windows machine.

I have this simple document, where I'm trying to use Hebrew:

\documentclass[12pt]{article}
\usepackage{ucs}   % package to add unicode support
\usepackage[utf8x]{inputenc}  % adding the UTF-8 encoding
\usepackage[english,hebrew]{babel}
\usepackage{hebfont}
\begin{document}
\sethebrew
Hello world % \textshold{   שלום עולם!}
\end{document}

The compiler says to me:

Package babel Warning: No hyphenation patterns were loaded for
(babel)                the language `Hebrew'
(babel)                I will use the patterns loaded for \language=0 instead.

)) ("D:\MiKTeX 2.9\tex\generic\babel\lheenc.def")
("D:\MiKTeX 2.9\tex\generic\babel\hebfont.sty") (C:\u1.aux)
("D:\MiKTeX 2.9\tex\generic\babel\lhecmr.fd")
("D:\MiKTeX 2.9\tex\latex\ucs\ucsencs.def")Running miktex-makemf.exe...
miktex-makemf: The jerus source file could not be found.
Running hbf2gf.exe...

hbf2gf (CJK ver. 4.8.0)

Couldn't find `jerus.cfg'
miktex-maketfm: No creation rule for font jerus10.

! Font LHE/cmr/m/n/12=jerus10 at 12.0pt not loadable: Metric (TFM) file not found.

What is the problem?

share|improve this question
1  
Welcome to TeX.sx! Package babel does not have hyphenation patterns for hebrew (see babel warns of lack of hyphenation patterns for hebrew), therefore you get the warning. Have you installed hebrew fonts? –  Kurt Dec 22 '12 at 18:48
    
gipc, did none of the answers here resolve the issue? –  einpoklum Oct 13 '13 at 21:10
add comment

2 Answers

One way to typeset Hebrew using TeX is to use the Polyglossia package, which requires the XeLaTeX engine rather than the usual LaTeX or pdfLaTeX.

All modern TeX implementations include the XeLaTeX program. To run XeLaTeX from the command line, simply type xelatex instead of the usual latex or pdflatex. If you normally run LaTeX from a button in your text editor, there should be a setting to change it to XeLaTeX. Depending on the editor, adding the following "TeX directive" to the top of your TeX source file may instruct the editor to use XeLaTeX automatically:

% !TeX TS-program = xelatex

(Make sure there is nothing else on the same line, not even a subsequent comment.)

The basic use of Polyglossia is illustrated below, with a document containing English and Hebrew.

Important: The line \setotherlanguage{hebrew} loads the Bidi package, and therefore this line must be run after most other packages are loaded, otherwise it will generate a "Package bidi Error". So if you need any other \usepackage lines, make sure to put them before this line.

The font name inserted as the mandatory argument in braces after \newfontfamily can be any font on your system containing Hebrew characters. (In my example, SBL Hebrew.) There must be no extra white-space within the braces before or after the font name (so, for example, { SBL Hebrew} or {SBL Hebrew } won't work). The optional argument [Script=Hebrew] is necessary for the vowels (nekudot) to be placed correctly.

% !TeX program = xelatex
\documentclass{article}
\usepackage{polyglossia}
\usepackage{xltxtra}

\defaultfontfeatures{Mapping=tex-text, Scale=MatchLowercase}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont[Script=Hebrew]{SBL Hebrew}

\begin{document}
This is a regular paragraph in English.

\begin{hebrew}
עכשיו אני כותב קטע שלם בעברית.
\end{hebrew}

Now back to English, the default language.

I will insert some \texthebrew{מלים בעברית} into this sentence.

\begin{hebrew}
עכשיו אני כותב קטע בעברית עם \textenglish{English words} באמצע.

אֶפְשָׁר לִכְתּוֹב גַּם עִם נְקוּדוֹת!
\end{hebrew}

\end{document}
share|improve this answer
2  
The ! TeX instruction only works with a few editors, cf. When and why should I use % !TEX TS-program and % !TEX encoding? –  doncherry Dec 23 '12 at 6:55
add comment

The lack of hyphenation patterns is not the problem, as @Kurt mentioned.

You're most probably missing the appropriate Hebrew fonts. Download and install the Culmus package. If you're using MiKTeX on Windows, get it from here. If you're on Linux, your distribution should have package(s) with Hebrew support for LaTeX or a specific Culmus package; or you can download the two ivritex tarballs, one of which includes the Culmus fonts.

Also, it is not necessary to use \hebfont; have a look at the source to see what it offers (it's pretty readable even if you're not a LaTeX expert).

If for some reason installing Culmus does not solve the problem, try following the instructions here; they're for TeXLive but it should probably work for MiKTeX as well.

share|improve this answer
1  
Yes; none of the Hebrew fonts is in TeX Live nor, I'm told, in MiKTeX; probably a licensing problem. So one has to install the fonts separately. –  egreg Dec 23 '12 at 16:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.