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}