4

I am trying to follow the instructions below in order to install hebrew to work with Latex on a mac (Lion) running TexLive. The script seems to be outdated in so many ways... Could someone help me to get the font installation process right?

Thank you in advance

#!/bin/bash

mkdir tmp_latex_install
cd tmp_latex_install
# download culmus (fonts) and ivritex (latex support)
wget http://switch.dl.sourceforge.net/sourceforge/culmus/culmus-0.100-iso8859-8.tar.gz
wget http://heanet.dl.sourceforge.net/sourceforge/ivritex/culmus-latex-0.6.tar.gz

# unzip
tar zxvf culmus-0.100-iso8859-8.tar.gz
tar zxvf culmus-latex-0.6.tar.gz

# install culmus fonts
mv ISO-8859-8 ~/Library/culmus-fonts/
#xset +fp $HOME/Library/culmus-fonts
#xset fp rehash

# install ivritex
#mkdir -p $HOME/Library/texmf/
cd culmus-latex-0.6
#make TEXMFDIR=$HOME/Library/texmf/ CULMUSDIR=$HOME/Library/culmus-fonts
#sudo make TEXMFDIR=$HOME/Library/texmf/ CULMUSDIR=$HOME/Library/culmus-fonts install

cd ../..
rm -rf tmp_latex_install
2

You should follow the instructions in: http://www.guyrutenberg.com/culmus-latex/

(I'm the author of culmus-latex)

  • Thanks for your work! Unfortunately, that site doesn't solve the issue of installing on Mac. – jvriesem Mar 30 '14 at 21:32
  • I believe that following the instructions for Linux will probably work for Mac as well. – Guy Apr 5 '14 at 8:44
4

First, you might get around this whole issue by using xelatex, which supports system-wide fonts. If you use babel with Hebrew you're probably out of luck, though - you will have to install the Hebrew fonts, including jerus10, deads10, etc.

The ivritex project is dead, and the files from SourceForge do not contain the fonts (or at least, not a readily-used version of them). So let's get them from Debian.

A quick search found the ivritex Debian package. At the bottom, you can download the .deb file, and see the list of files included in the package.

TL;DR

EDIT: The instructions are mostly for most Unix-like systems. But, the cp -r texmf ~/Library/ command is for OS X.

Fire up a terminal and hit

mkdir hebrew-fonts
cd hebrew-fonts
wget http://ftp.us.debian.org/debian/pool/main/i/ivritex/ivritex_1.1.1-6_all.deb
ar -x ivritex_1.1.1-6_all.deb data.tar.gz
tar xfz data.tar.gz
cd usr/share
cp -r texmf ~/Library/
cd ../../..
rm -rf hebrew-fonts

Look at LaTeX, now look back at me. You now can compile Hebrew LaTeX.

  • Note for anyone who reads this post: the ivritex package nominally contains culmus. It does not seem to install it, however. These instructions did not work "out-of-the-box" for me. – jvriesem Mar 30 '14 at 21:41
  • @jvriesem - What did you have to change to get it working? – user1071136 Mar 31 '14 at 2:45
  • I never did get it working. I imagine it's possible, but the instructions given were not enough to make it work. – jvriesem Jun 11 '14 at 22:12
  • Which step failed, if any? – user1071136 Jun 11 '14 at 22:53
  • Shoot -- it was about 2.5 months ago, and I remember entirely giving up after that and some other failures. I wish I could remember, but it was too long ago and I don't remember the details. I do remember that it seemed to be a pretty complex failure -- not something trivial to fix -- which is a large part of why I gave up. Again, I'm sorry that this isn't more helpful! :( – jvriesem Jun 13 '14 at 0:00
0

Based on previous answers (I don't claim this information is totally right, only it is right enough to get you started):

preparation:complete this tut to always shoe Library on your home folder from the OS finder application.

There are two local directories for mac-OS fonts:

  1. ~/Library/texmf/ - this is the same as the last one only for extensions which are meant to be user based
  2. /usr/share/texmf/ - ... seems to be deprecated (in other words it didn’t work)

So you should stick to the first option.

Open Terminal application Download and extract the file like described (you might have to install wget I recommend you to use home-brew so you won't have to compile it):

mkdir hebrew-fonts
cd hebrew-fonts
wget http://ftp.us.debian.org/debian/pool/main/i/ivritex/ivritex_1.1.1-6_all.deb
ar -x ivritex_1.1.1-6_all.deb data.tar.gz
tar xfz data.tar.gz

This version is important, as other files don't include jerusalem font which is the the default for the basic hebrew latex implementation.

So just manually open the hebrew-fonts folder you have just downloaded. open it sub folders usr and share click on texmf and press edit -> copy.

After that go to the home icon select it and look for library. Select the Library which you should see after completing the preparation phase.

Now paste the texmf in the user's library folder edit -> paste

That's it!! you should have a basic hebrew LATEX functioning on your local OS X machine.

====== notes ===============

  • You can add more fonts to the same directory.

  • To check you have the fonts and also another option that makes the local arrangement unnecessary: https://www.overleaf.com/latex/examples/hebrew-document-in-overleaf-writelatex-msmk-bbryt/vpfygfqnfjxs#.VizYbdYrelJ

  • I hope this answer is clear enough. Personally I do not understand why the Latex don't have hebrew support out of the box but that's another issue. Especially because this is a general purpose software and not only for computer science I can imagine that the CS dept in Israel can invest a little more effort in integration of LaTex.
0

Adding my process. I'll start by saying that I'm already using XeLaTeX, so the following example displays Hebrew text characters:

\documentclass[]{article}

\usepackage{polyglossia} % the multilingual support package
\newfontfamily\hadasim{Hadasim CLM Regular}
\DeclareTextFontCommand{\texthebrew}{\hadasim}

\begin{document}


\texthebrew{תירבעב םיטפשמ המכ םע} 


\end{document} 

As long as the font specified in the \newfontfamily line is installed on the system you're running XeLaTex on. In this case it's Hadasim CLM Regular, which is available from the Open Siddur Project, among other places.

You click on the font file and open it in FontBook to install in native OSX system.

I was also able to display Hebrew with the following example, using beamer and bidi, neight of which I know anything about, as from having read that at least one of them conflicts with the polyglasia package.

\documentclass[xetex]{beamer}

\usepackage{fontspec,bidi}
\setmainfont{Times New Roman}
\setsansfont{Times New Roman}

\useoutertheme[right]{}

\newenvironment{hframe}[0]{\begin{frame}\setRL}{\end{frame}}
\newcommand{\hframetitle}[1]{\frametitle{\hfill\RL{#1}}}
\newcommand{\hframesubtitle}[1]{\framesubtitle{\hfill\RL{#1}}}
\newcommand{\hsection}[1]{\section{\RL{#1}}}
\newcommand{\hsubsection}[1]{\subsection{\RL{#1}}}
\newcommand{\hsubsubsection}[1]{\subsubsection{\RL{#1}}}
\newtheorem{hclaim}[theorem]{\RL{טענה}}

\title{\RL{מצגת דוגמא בעברית שנוצרה באמצעות beamer}}
\author{\RL{רונן אברבנאל}}
\date{\today}

\begin{document}
I can write english here.
\begin{frame}
        \titlepage  
\end{frame}

\hsection{הקדמה}
\hsubsection{מבט על beamer}

\begin{hframe}
    \hframetitle{תכונות של המחלקה בימר}
    \begin{itemize}
    \item<1->  מחלקת LaTeX רגילה.
    \item<2-> מעברים קצת בעייתיים.
    \item<3-> לא דרושה תוכנה חיצונית.      
    \end{itemize}
\end{hframe}

\begin{hframe}
\begin{hclaim}[עברית ב-Beamer]
העברית ב-\LaTeX-Beamer סבירה למדי.
\end{hclaim}
ואפשר גם לכתוב טקסט מחוץ לבלוק.
\end{hframe}

\end{document}

Finally I was able to install Culmus-LaTeX by Guy Rutenburg on the Mac.

You can download it from SourceForge. I chose the "latest version" (culmus-latex-0.7-r1.tar.gz (2.1 MB)).

Then made an empty directory to work in and entered it:

mkdir hebrew-fonts
cd hebrew-fonts

Put the new downloaded file into it:

mv ~/Downloads/culmus-latex-0.7-r1/ . # the dot means "put it right here, yo"

Then you need the actual fonts (one of which ends up being the Hadisim CLM referenced above) which you can download from SourceForge as well.

I put them in a subdirectory of my Fonts folder because there's a bnch of stuff in there, including documents, postscript fonts and the ttf files I'm more used to).

mv ~/Downloads/culmus-0.130 ~/Library/Fonts/hebrew

The next parts in the Culmus docs confounded me a bit for sure:

The second command must be done as root. The installation process assumes that the texmf dir resides in /usr/share/texmf and that the culmus fonts reside in /usr/share/fonts/hebrew . To override this settings append to the above command "CULMUSDIR=/path/to/culmus/" and/or "TEXMFDIR=/path/to/texmf" (both without the quotes).

sudo apt-get install texlive-font-utils

The last line first: apt-get is a package manager for Linux. Mac has MacPorts, Fink and the ubiquitious Homebrew, which is what I use. MacPorts has a package for texlive-font-utils, but I didn't want to install a whole new package manager just for this. I'm literally adding a handful of Hebrew characters to a document at this point.

Searched my system for texlive-font-utils. The Tex interface I'm using is the TexShop GUI for OSX. I say I'm using it, but actually it's just the means by which I installed Tex. In actuality I'm doing everything via the command line and TextWrangler text editor.

In my travels I somehow came across http://tug.org/texlive/ and an installer for the basic GUI-less TexLive package: http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz. When you download and run that package by double-clicking the install-tl package, first you may get a Warning from Apple and need to go to your System Preferences > Security to "Allow installation of packages from non-Apple or Apple certified developers", then it runs a combination of Perl and Python scripts to download the 2Gigs of content that make-up TexLive. I went to bed during this process.

At the end of the process you'll see some output in the terminal:

See /usr/local/texlive/2016/index.html for links to documentation. The TeX Live web site contains updates and corrections: http://tug.org/texlive.

TeX Live is a joint project of the TeX user groups around the world; please consider supporting it by joining the group best for you. The list of user groups is on the web at http://tug.org/usergroups.html.

Add /usr/local/texlive/2016/texmf-dist/doc/info to INFOPATH. Add /usr/local/texlive/2016/texmf-dist/doc/man to MANPATH (if not dynamically found).

Most importantly, add /usr/local/texlive/2016/bin/x86_64-darwin to your PATH for current and future sessions.

Welcome to TeX Live! Logfile: /usr/local/texlive/2016/install-tl.log

So right now there are two version of TeX installed on the machine. The one referenced in the log above, located at /usr/local/texlive/2016/bin/x86_64-darwin, and the one from the GUI I had downloaded. Since I haven't added the new one to my PATH yet, I can find out the location of the binary for the GUI:

which tex
/Library/TeX/texbin/tex

As referenced above, the texmf file for that is located at ~/Library/texmf/. But I still don't know what texmf is.

I looked at my PATH:

echo $PATH
# a long string of directory paths one of which is /Library/TeX/texbin/tex

So if I precede that TeX on my PATH with /usr/local/texlive/2016/bin/x86_64-darwin, the system will find the new one first.

Backing up to the output of the new TexLive install script:

Towards the top of the output was this:

directories: TEXDIR (the main TeX directory): /usr/local/texlive/2016

TEXMFLOCAL (directory for site-wide local files): /usr/local/texlive/texmf-local

TEXMFSYSVAR (directory for variable and automatically generated data): /usr/local/texlive/2016/texmf-var

TEXMFSYSCONFIG (directory for local config): /usr/local/texlive/2016/texmf-config

TEXMFVAR (personal directory for variable and automatically generated data): ~/.texlive2016/texmf-var

TEXMFCONFIG (personal directory for local config): ~/.texlive2016/texmf-config

TEXMFHOME (directory for user-specific files): ~/texmf

Hey! That's what texmf is: directory for user-specific files.

So going back to the Culmus-Latex docs, the installation configurations would either be:

make CULMUSDIR=~/Library/Fonts/hebrew/ TEXMFDIR=~/texmf
sudo make install CULMUSDIR=~/Library/Fonts/hebrew/ TEXMFDIR=~/texmf

For the new installation or for the GUI version:

make CULMUSDIR=~/Library/Fonts/hebrew/ TEXMFDIR=~/Library/texmf
sudo make install CULMUSDIR=~/Library/Fonts/hebrew/ TEXMFDIR=~/Library/texmf

Now on the following tex file I can produce a PDF with Hebrew:

pdflatex test-hebrew.tex

\documentclass{article}
\usepackage{culmus}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[english,hebrew]{babel}
\begin{document} 
שלום \L{World}!
\end{document}

picture of pdf output

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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