Hebrew with XeTeX Example

This is an example of a document in XeTeX (Actually XeLaTeX). I’ve used The fonts from the Culmus Project. Note that you’ll need Culmus 0.121 or newer in order to get the Frank Ruehl font in TrueType. As you can see, Nikud are placed correctly. The cantillation marks (טעמי המקרא) are in a small offset compared to the ideal position.

Overall, XeTeX works much better with Hebrew (and easier to use) than pdfTeX.

heb-test

\documentclass{minimal}
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\usepackage{fontspec}
\setmainfont{Frank Ruehl CLM}
\setmonofont{Miriam Mono CLM}
\setsansfont{Simple CLM}
% Use the following if you only want to change the font for Hebrew
%\newfontfamily\hebrewfont[Script=Hebrew]{David CLM}
%\newfontfamily\hebrewfonttt[Script=Hebrew]{Miriam Mono CLM}
%\newfontfamily\hebrewfontsf[Script=Hebrew]{Simple CLM}



\makeatletter
\makeatother
\usepackage{bidi}
\begin{document}
טקסט רגיל
\textbf{טקסט מודגש}
\textit{טקסט נטוי}
\textit{\textbf{טקסט מודגש ונטוי}}
בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ:

\begin{english}
In the beginning God created the heaven and the earth.
\end{english}

\sffamily
טקסט רגיל
\textbf{טקסט מודגש}
\textit{טקסט נטוי}
\textit{\textbf{טקסט מודגש ונטוי}}
בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ:

\begin{english}
In the beginning God created the heaven and the earth.
\end{english}


\ttfamily
טקסט רגיל
\textbf{טקסט מודגש}
\textit{טקסט נטוי}
\textit{\textbf{טקסט מודגש ונטוי}}
בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ:

\begin{english}
In the beginning God created the heaven and the earth.
\end{english}
\end{document}

4 thoughts on “Hebrew with XeTeX Example”

  1. Good info. Thanks !!

    BTW, is there a way to set vowels in different color, for example, the consonants in black and vowels in red ?

  2. Does not work for me. I got the message:

    Sorry, but miktex-makemf did not succeed for the following reason:

    The Frank Ruehl CLM source file could not be found.

    The log file hopefully contains the information to get MiKTeX going again:

    C:/Users/user/AppData/Local/MiKTeX/2.9/miktex/log/miktex-makemf.log

    You may want to visit the MiKTeX project page, if you need help.
    Running miktex-hbf2gf.exe…

    hbf2gf (CJK ver. 4.8.4)

    Couldn’t open `Frank Ruehl C.cfg’

    Sorry, but miktex-maketfm did not succeed for the following reason:

    No creation rule for font “Frank Ruehl CLM”.

    The log file hopefully contains the information to get MiKTeX going again:

    C:/Users/user/AppData/Local/MiKTeX/2.9/miktex/log/miktex-maketfm.log

    You may want to visit the MiKTeX project page, if you need help.

Leave a Reply

Your email address will not be published. Required fields are marked *