Join 3,496 readers in helping fund MetaFilter (Hide)


Hebrew in LaTeX?
September 20, 2010 3:10 PM   Subscribe

Help me with LaTeX (again)! I need to find a way to write decent Hebrew. I like the cjhebrew package, but I don't know how to change the font. I also tried using XeTeX, but I don't know how to get Right-to-left using it. Also, other problems. Warning: Long explanations involving Terminal and installing new packages that aren't on CTAN will go over my head.

I've looked everywhere. There is enough information on Hebrew in LaTeX out there, but for some reason I can't get any of it to work properly.

First of all, I'm using TeXShop for Mac. I changed it to UTF-8 Unicode because this and this told me to. I've also installed some nice Hebrew fonts, SBL Hebrew and Ezra SIL.

Using XeTeX works for one word at a time, but when I try to write a paragraph, the vowel points go all over the place. I've tried to fix this by re-entering the text, but to no avail:

\documentclass[12pt]{article}
\TeXXeTstate=1
\usepackage{bidi}
\usepackage{fontspec,xltxtra,xunicode}
\begin{document}
\newfontfamily{\H}[Scale=1]{Ezra SIL}
\setRL {\H
בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃
וְהָאָ֗רֶץ הָיְתָ֥ה תֹ֨הוּ֙ וָבֹ֔הוּ וְחֹ֖שֶׁךְ עַל־פְּנֵ֣י תְה֑וֹם וְר֣וּחַ אֱלֹהִ֔ים מְרַחֶ֖פֶת עַל־פְּנֵ֥י הַמָּֽיִם:
וַיֹּ֥אמֶר אֱלֹהִ֖ים יְהִ֣י א֑וֹר וַֽיְהִי־אֽוֹר׃
{
\end{document}


I like using the cjhebrew package, even though the input method takes some getting used to, but I don't know how to change the font within the package itself:

\documentclass[12pt]{article}
\usepackage{cjhebrew}
\usepackage{times}
\title{\huge{\cjRL{b*:`ib:ryit}}}
\begin{document}
\maketitle

\section{Hebrew}
\begin{cjhebrew}
b*:re’+siyt b*ArA' 'E:lohiym
'et ha+s*Amayim w:’et hA’ArE.s; w:hA’ArE.s
hAy:tAh tohU wAbohU w:.ho+sEk:
`alp*:

ney t:hOm w:rU/a.h 'E:lohiym
m:ra.hEpEt `alp*:
ney ham*Ayim;

\end{cjhebrew}

\section{English}
To type this is as follows:
\emph{b*:re’+siyt b*ArA’ ’E:lohiym ’et ha+s*Amayim w:’et hA’ArE.s; w:hA’ArE.s
hAy:tAh tohU wAbohU w:.ho+sEk: ‘alp*:
ney t:hOm w:rU/a.h ’E:lohiym
m:ra.hEpEt ‘alp*:
ney ham*Ayim;}

\end{document}


I tried this:

\begin{cjhebrew}
\newfontfamily{\H}[Scale=1]{Ezra SIL}

{\H b*:re’+siyt b*ArA' 'E:lohiym
'et ha+s*Amayim w:’et hA’ArE.s; w:hA’ArE.s
hAy:tAh tohU wAbohU w:.ho+sEk:
`alp*:

ney t:hOm w:rU/a.h 'E:lohiym
m:ra.hEpEt `alp*:
ney ham*Ayim;}

\end{cjhebrew}


Any ideas? I don't know how to use fontspec or pretty much anything else. I really hate the cjhebrew font (it's So. Small. I think it's really just Times), and I want to change it to Ezra SIL or SBL Hebrew. I'll be writing a paper with occasional Hebrew words and occasional Hebrew clumps that may or may not be set into a two-column format.
posted by lhude sing cuccu to Computers & Internet (5 answers total) 2 users marked this as a favorite
 
Using XeTeX works for one word at a time, but when I try to write a paragraph, the vowel points go all over the place. I've tried to fix this by re-entering the text, but to no avail:

Can you clarify what you mean by "all over the place"?

I don't read Hebrew; when I copied your XeTeX example into a file and typeset it, it came out like this. Is that how it should look, or is it incorrect?

Don't worry — this shit happens to everyone. There's probably a straightforward solution. It'll just take a little troubleshooting to find it.
posted by nebulawindphone at 4:08 PM on September 20, 2010


See the first letter on the first line, all the way to the right? That dot is supposed to be in the very middle of the letter, but see how it's off to the left? A lot of the letters have their vowel points off center. Actually, now that I'm looking at it, it seems like all the vowel points are a little to the left. Weird.
posted by lhude sing cuccu at 4:40 PM on September 20, 2010


Yep, I see what you're talking about. Try this:
     \newfontfamily{\H}[Scale=1,Script=Hebrew]{Ezra SIL}
For me, the "Script=Hebrew" causes the vowel points to move back over to the right.
posted by nebulawindphone at 6:17 PM on September 20, 2010


Hey, it worked! Thanks!
posted by lhude sing cuccu at 7:58 PM on September 20, 2010


(If anyone has any ideas on how to change the font within cjhebrew, I'd still like to know that too!)
posted by lhude sing cuccu at 7:59 PM on September 20, 2010


« Older What's a piece of art that has...   |  Can you help me become a passa... Newer »
This thread is closed to new comments.