Installing IvriTex-1.2.1 on teTex-3.0

Few days ago I finally decided to install Ivritex-1.2.1 on my system. I’m running a tetex-3.0. The new version of Ivritex includes some very important improvements and, at least for me, the most important thing is support for the Culmus fonts. tetex-3.0 introduced a major directory change which cause many problem with installing packages which are unaware of the changes. In this post I will try to walk through the installation process.

TEXMF will be the directory of you local TeX tree (usually /usr/share/texmf). Before Begining the installation process make sure you have the Culmus fonts installed. Apparently Culmus is not optional it’s a requirement. I’ll assume that your Culmus fonts are installed in /usr/share/fonts/culmus.

  1. Download the ivritex-1.2.1 source-code from here .
  2. Extract the archive into a temporary directory.
  3. Save the diff file below a file named “Makefile_patch” and save it inside ivritex-1.2.1/fonts/culmus .
  4. Apply the patch by going to the ivritex-1.2.1/fonts/culmus directory (under the directory where you extracted the source archive) and executing “patch Makefile_patch. The patch will alter the places where some file will be installed.
  5. As root execute “updmap –enable Map culmus.map”.
  6. Still as root execute “mktexlsr”.
  7. Ivritex 1.2.1 should be installed now.
--- Makefile    2007-02-14 19:59:52.000000000 +0200
+++ Makefilenew 2007-02-16 10:11:07.000000000 +0200
@@ -20,8 +20,8 @@
 vf_target     = $(TEX_ROOT)/fonts/vf/culmus
 # this is where ivritex will eventually be:
 tex_target    = $(TEX_ROOT)/tex/generic/babel
-encode_dir    = $(TEX_ROOT)/dvips/base
-dvips_cfg_dir = $(TEX_ROOT)/dvips/config
+encode_dir    = $(TEX_ROOT)/fonts/enc/dvips/base
+map_dir       = $(TEX_ROOT)/fonts/map/
 sysconf       = $(DESTDIR)/etc
 updmap_dir    = $(sysconf)/texmf/updmap
 #culmus_target = $(PREFIX)/fonts/culmus
@@ -137,11 +137,11 @@
    mkdir -p $(sysconf)/texmf/updmap.d
    echo "Map culmus.map" >$(sysconf)/texmf/updmap.d/10culmus.cfg
 else
-   mkdir -p $(dvips_cfg_dir)
-   cp culmus.map $(dvips_cfg_dir)/
+   mkdir -p $(map_dir)
+   cp culmus.map $(map_dir)/
   ifeq ($(tetex_ver),2)
    # this should run mktexlsr as well
-   $(updmap) --enable Map $(dvips_cfg_dir)/culmus.map
+   $(updmap) --enable Map $(map_dir)/culmus.map
   else # for tetex-1
     ifeq ($(tetex_ver),1)
    # TODO: fill in sed line here

Prevent Line Breaking Inline Formula in Tex/Latex

If you ever wrote a document in latex (or tex) that used inline formulas you know how frustrating it is when latex insists on breaking you inline formula across two lines. The easiest solution to this problem, in my opinion is to prevent line breaking inline formulas at all except under extreme cases. To prevent line breaking inline formulas just add the following two lines into your preamble:

\relpenalty=9999
\binoppenalty=9999

Now I will explain what we did. \relpenalty=[number parameter] the parameter specifies the penalty for breaking a math formula after a relation when the formula appears in a paragraph. Plain TEX sets \relpenalty to 500. \binoppenalty=[number parameter] the parameter specifies the penalty for breaking a math formula after a binary operator when the formula appears in a paragraph. Plain TEX sets \binoppenalty to 700. Both parameters can be set anywhere from 0 to 10000. If set to 10000 the inline formulas will never break even in extreme cases. Setting it a bit lower would prevent line breaking except where tex would encounter extreme cases which must have a line break because of the situation.

Using Hebrew TrueType fonts with pdfTeX

This guide is base on a guide published by Dekel Tsur that can be found here. Dekel Tsur’s guide was very good but now it is outdated since it doesn’t work with teTex 3.0. In this guide I addressed this issue and updated the instructions and scripts so it will work with teTex 3.0.Since the quality of the Hebrew metafonts that comes with the Hebrew LaTeX is quite poor, alternative fonts are needed. The best quality free Hebrew fonts are TrueType fonts (for example, the times new/arial/courier new fonts). Using TrueType fonts with TeX is somewhat complicated, but it is quite easy with pdfTeX, as pdfTeX has native support for TrueType fonts. This document explains how to use TrueType fonts with pdfTeX. Since Hebrew requires the use of the eTeX engine, you need to have the pdfelatex program. It is available in teTeX 1.0 (which comes with recent Linux distributions). The instruction below allows using nikud, although the result is quite poor as the nikud glyphs are not aligned correctly (but it is better than nothing).

Continue reading Using Hebrew TrueType fonts with pdfTeX