Hebrew Package for babel system and LaTeX2e

This new support package for Hebrew language is based on the old LaTeX 2.09 hebrew.sty and is backward compatible with it. A new babel-based language switching interface is also supported.

Bi-directional support uses TeX--XeT or newer e-TeX engine.

The package is available on-line at http://www.dsg.technion.ac.il/heblatex/ or at ftp://tochna.technion.ac.il/pub/staff/lavva/heblatex/. It consists of:

  1. Hebrew package for babel/LaTeX 2e: heblatex.tar.gz or heblatex.zip.
  2. Hebrew fonts (available also on CTAN or ftp.cc.huji.ac.il): hebfonts.tar.gz or hebfonts.zip.
  3. Examples of hebrew documents: hebexmpl.tar.gz or hebexmpl.zip.
  4. This README.html file, available also in plain text format as README.txt.
The babel/LaTeX 2e edition of the hebrew package, as well as documentation (including this README file) was developed and will be supported by Boris Lavva, lavva@tx.technion.ac.il. Please direct your additions, modifications, bug fixes and comments to this address.

Table of contents


The following people have contributed to Hebrew package in one way or another, knowingly or unknowingly. In alphabetical order:
Irina Abramovici, Yaniv Bargury, Yael Dubinsky, Sergio Fogel, Dan Haran, Rama Porrat, Michail Rozman, Alon Ziv.

Johannes Braams is the author of babel - a multilingual support for LaTeX.

Tatiana Samoilov and Vitaly Surazhsky found a number of serious bugs in preliminary version of Hebrew package.

A number of other people have contributed comments and information. Specific contributions are acknowledged within the documentation.

I want to thank my wife, Vita, and son, Mishka, for their infinite love and patience.

If you made a contribution and I haven't mentioned it, don't worry, it was an accident. I'm sorry. Just tell me and I will add you to the next version.


The copyright similar to other LaTeX 2e packages is added to prevent inconsistency in version numbers and wide-spread distribution of unsupported macro files (which was common with the old distributions).

Changes, bug fixes and additions are always welcome, but they should be or distributed under other name, or incorporated in this package (by mailing me).


  1. Full LaTeX 2e distribution should be installed, including TeX--XeT or e-TeX. Known such distributions include:
  2. If e-TeX is installed, check if its format is available in extended mode, by running elatex or latex on some .tex file:

  3. This is e-TeX, Version 3.14159-1.1 (Web2c 7.0)
    entering extended mode 

    The second line should be "entering extended mode".
  4. If TeX--XeT is installed, it will use a LaTeX 2e format file, called laxet.fmt from the formats directory. This directory is commonly located at texmf/web2c or texmf/web2c/ini subdirectories. To produce format file, run initexxet program on the following  laxet.ini file:

  5. % Prevent dumping of LaTeX2e
    % LaTeX2e format
    \input latex.ltx
    % Read latex2e.add
    \ifeof1\closein1\message{latex2e.add not found}
    \else\closein1\input latex2e.add
    % dump

    Put the resulting file laxet.fmt to the formats directory and link (or copy) the virtexxet program as laxet.
  6. Download the babel sources from the CTAN sites, directory macros/latex/packages/babel. This version of Hebrew package is tested with babel version 3.6.
  7. Apply the following changes to the standard babel sources:
  8. Download the hebrew package, fonts and examples from the above mentioned place.
  9. Open heblatex to the babel sources directory.
  10. Run latex babel.ins and then latex hebrew.ins.
  11. Move all *.cls, *.sty, *.def, *.fd, *.ldf to the babel directory searchable by TeX (run MakeTeXls-R or similar program). Usually, babel is located at TEXROOT/share/texmf/tex/latex/packages/babel or  TEXROOT/share/texmf/tex/generic/babel.
  12. Install hebrew fonts from hebfonts as following:
  13. You can check if your installation succeed by LaTeXing examples from hebexmpl file.
Finally, you can prepare the LaTeX documentation of all components of the new Hebrew package by running: The same procedure can be applied on babel.dtx (or babel.drv) to create the babel documentation. Files bbind.ist and bbglo.ist are included with babel installation.

Hebrew package usage

The usage is simple, for example:
LaTeX 2.09 style is also supported (in compatibility mode) to process existing documents, for example:
Languages can be switched by the following macros:
  1. \sethebrew or \unsethebrew
  2. \selectlanguage{hebrew}, \selectlanguage{english}, etc.
  3. \begin{otherlanguage}{hebrew} ... \end{otherlanguage}, or any other language
  4. \R{hebrew text} inside the latin text
  5. \L{latin text} inside the hebrew text
First three commands are equivalent: first one provides switching interface, compatible with LaTeX 2.09 hebrew style, while second and third --- babel-based interface.

Last two commands are used for language and direction switching inside paragraph.

hmbox and embox macros should be used for inserting Hebrew and English text (respectively) inside a mathematical formula.

Input code pages

Hebrew package supports the following input code pages:
  1. 7-bit hebrew encoding, also known as old code, defined by Israeli Standard 960 (si960)
  2. IBM PC code page also known as pc code (cp862)
  3. WINDOWS code page also known as new code (cp1255)
  4. ISO 8859-8 Hebrew/Latin code page commonly used in UNIX, also known as new code (8859-8 also known as new code)
The default input encoding can be set using option defined above in parentheses with inputenc style (but *before* babel), for example :
Input encoding can be changed also inside the document by the \inputencoding command, for example:

Font encodings

Various font encodings can be used, including, of course, Local Hebrew Encoding (LHE), with the aid of fontenc style (but *before* babel), for example:
Many useful font-switching commands are provided in hebfont package which can be included *after* the babel:
These commands are in format \text<font>{Hebrew text}, for example:
\textoj{Text printed with Old Jaffa font}, \textredis{Text printed with redis font}.

In addition, for backward compatibility in LaTeX 2.09 documents, the four old font-switching commands are supported:
{\jm ...}, {\oj ...}, {\ds ...} and {\ta ...} for Jerusalem, Old Jaffa, Dead Sea and Tel-Aviv fonts respectively.

The following TeX fonts are supported:

Bi-directional sectioning commands

These commands inserts both Hebrew title to the RL table of contents or list of figures/tables, and English (or other LR language) title to the LR table of contents or list of figures/tables.
  1. \bpart{hebrew}{english}
  2. \bchapter{hebrew}{english}
  3. \bsection{hebrew}{english}
  4. \bsubsection{hebrew}{english}
  5. \bsubsubsection{hebrew}{english}
  6. \bcaption{hebrew}{english}
  7. \bchapternn{hebrew}{english} - replaces \chapter*
  8. \bsectionnn{hebrew}{english} - replaces \section*
A number of additional bi-directional commands are defined in the hebtech.cls - thesis document class file, described below.

Table of contents, List of figures, List of tables

Both Right-to-Left and Left-to-Right versions of the tables (toc, lof and lot) can be generated simultaneously. The LR files have the default extensions (.toc, .lof and .lot), while the RL files have reversed extensions (.cot, .fol and .tol). For example, to include RL tables at the beginning and LR tables before the end of the document: All 6 files are generated simultaneously in two latex passes !

Hebrew calendar

Original Hebrew calendar style was created by Michail Rozman, and corrected by Rama Porrat, Michail Rozman and Dan Haran.

This style was adjusted to LaTeX 2e by Boris Lavva, and provided in hebcal package. It can be included *after* the babel:

The following 2 user-level commands are provided with the package:
\newcount\hd \newcount\hm \newcount\hy
\hd=10 \hm=3 \hy=1992
which converts the requested Gregorian date to Hebrew calendar date and prints it in Hebrew or English (depends on the current language) and:
\HebrewToday or \hebrewtoday
which prints the current Hebrew date (today) .

Document class for preparing Hebrew/English or English/Hebrew thesis

A useful document class file hebtech for preparing M.Sc. and Ph.D. theses for the Technion (English/Hebrew and Hebrew/English) is included with this package too. I believe that it can be adjusted for the needs of other academic institutions in Israel too. This class automatically includes babel with hebrew and english option, hebfont and hebcal packages.

The original version for LaTeX 2.09 and old code Hebrew was created in 1994 by Irina Abramovici, at Taub Computer Center, Technion.

How to use this document class?

The following parameters should be included in thesis preamble (before \begin{document}):
  1. Thesis title

  2. \title{hebrew}{english}
  3. Thesis author

  4. \author{hebrew}{english}
  5. Department name, e.g. Electrical Engineering Department

  6. \dept{hebrew}{english}
  7. Domain of research, e.g. Food Processing

  8. \dom{hebrew}{english}
  9. Main advisor

  10. \advisori{hebrew}{english}
  11. Second advisor, if exists

  12. \advisorii{hebrew}{english}
  13. Main sponsor

  14. \donori{hebrew}{english}
  15. Additional sponsor, if exists

  16. \donorii{hebrew}{english}
  17. Set thestype counter to:
  18. \setcounter{thestype}{1}
  19. Set grade counter to:
  20. \setcounter{grade}{1}
  21. Date is optional, if not included, today's date will be used. The Gregorian date entered will be printed and get converted the Jewish date.

  22. \date{28}{2}{1998}
  23. Page style is optional too, if not included, plain will be used.

  24. \pagestyle{thesis}
In the main document the following additional commands and environments can be used:
  1. \makecover - creates Hebrew or English cover page, depending on the current language.
  2. \maketitle - creates Hebrew or English title page, depending on the current language.
  3. \begin{acknowledgment} ... \end{acknowledgment} - builds the acknowledgment page and adds inserted customized acknowledgment in Hebrew or English, depending on the current language.
  4. \begin{dedication} ... \end{dedication} - builds the dedication page in Hebrew or English, depending on the current language.
  5. \tableofcontents, \listoffigures, \listoftables - builds tables depending on the current language (all 6 tables can be used simultaneously).
  6. \begin{abstract} ... \end{abstract} - builds the abstract pages in Hebrew or English, depending on the current language, adds contents line to the 2 tables of contents.
  7. \frontmatter, \mainmatter, \backmatter - should be inserted at the beginning, before the main part, and at the ending of the thesis to change numbering and other style parameters.
  8. \bibliography{...} - now adds "References" line to the 2 tables of contents: English and Hebrew.
Some useful bi-directional commands, for figures and tables provided in this file too:
  1. \bcaptionf{hebrew}{english} - similar to \bcaption but answers to thesis formatting requirements at the Technion, used for figures.
  2. \bcaptionff{to RL lof}{to LR lof}{hebrew}{english} - a customized one for figures.
  3. \bcaptiont{hebrew}{english} - similar to \bcaption but answers to thesis formatting requirements at the Technion, used for tables.
  4. \bcaptiontt{to RL lot}{to LR lot}{hebrew}{english} - a customized one for tables.

Compatibility with LaTeX 2.09 style

Generally, the new package is compatible with LaTeX 2.09 style file hebrew.sty, i.e. in most cases one can use the new package on old documents without any errors. Howver, it does not support Plain TeX, please use heb_macros.tex, or other TeX macro file for Hebrew instead.

A few incompatibilities are described below:

Future work

  1. Visual enviroments i.e. tabular, tabbing and array have to be supported for hebrew. Now only left-to-right direction of lines is supported.
  2. Update hebrew package for the future babel-3.7 release.
  3. Hebrew points and dots ("nikud") support should be added, so it can be used in font-independent way.

  4. Currently, nikud can be used only on font-dependent way: only shalom and classic families of fonts provide nikud, and hebrew point glyphs are located in different places.
  5. Machintosh Hebrew/English input code page support should be added.
  6. Type1/TrueType Hebrew fonts should be supported.

Created by Boris Lavva, lavva@tx.technion.ac.il
Last modified March 1, 1998