18

I am typesetting a 17th century English theological document that uses a smattering of Greek and Hebrew. I am using LuaLaTeX with TeXShop on the Mac.

Is LuaLaTeX up to the task? If so what are the basic steps needed to get accented Greek and pointed Hebrew? Is it possible to have English sentences interspersed with occasional Gk and Heb words, or can they (esp Heb) only be set in their own paragraphs?

My plan was to use SBL Greek and Ezra SIL Hebrew fonts. Are these reasonable choices?

Ideally I would like to be pointed to a tutorial that describes this stuff from the ground up (or rather, as suitable for someone with a Lamport understanding of LaTeX). But short of that I'm throwing myself on the mercy of knowledgable strangers!

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
Paul Dulaney
  • 5,310

2 Answers2

15

LuaLaTeX is your choice! Greek is possible without any adjustments. Hebrew, as it is a language from right to left, needs adjustments. Of course, you need to use \usepackage{fontspec} in the preamble (as is usual when using LuaLatex).

Greek

You need a font that supports all the accents. If your mainfont for latin text does not support them, you need to implement a special greek font:

\newfontfamily\greekfont[Script=Greek, Scale=MatchUppercase, Ligatures=TeX]{GREEK FONT NAME}
\newcommand{\textgreek}[1]{\bgroup\greekfont\emph{#1}\egroup}

If your main font does support them you can just use:

\newcommand{\textgreek}[1]{\emph{#1}}

I use a command like this for my greek passages, because so it stays possible to decide later whether the Greek words should be italicized or bold or whatever or not. This command sets Greek text in italics, because of the \emph{…} - if you don't want this, delete it.)

Now you should be able to set Greek text inside Latin text by entering: \textgreek{γέγονεν}.

Hebrew

You need to set up a font and the settings for right-to-left-text:

\newfontfamily\hebfont[Script=Hebrew, Scale=MatchUppercase, Ligatures=TeX]{HEBREW FONT NAME}
\newcommand{\textheb}[1]{\bgroup\luatextextdir TRT\hebfont #1\egroup}

Now you should be able to set Hebrew text inside Latin text by entering: \textheb{עִבְרִית}.

Typographic Advice

You should use a font that already contains Latin and Greek accented characters. If you're lucky, you'll find (a good) one that also contains Hebrew. Thereby you assure that the three languages have the same font style. It may not be a good idea to use three different fonts - except if they resemble each other in style.

Have a look at the Brill Font. Palatino also has nice Greek. Or, if you want an expensive one, Adobe Garamond. I don't know anything about Hebrew fonts.

Entire Example Code of heb.tex

% !TEX TS-program = lualatexmk
\documentclass[11pt, a4paper]{scrartcl}

\usepackage{fontspec}
\setmainfont{Times New Roman}

\newfontfamily\greekfont[Script=Greek, Scale=MatchUppercase, Ligatures=TeX]{Arial Unicode MS}
\newcommand{\textgreek}[1]{\bgroup\greekfont\emph{#1}\egroup} % Please note, that Arial is not set in italics, notwithstanding the \emph{...}

\newfontfamily\hebfont[Script=Hebrew, Scale=MatchUppercase, Ligatures=TeX]{Ezra SIL}
\newcommand{\textheb}[1]{\bgroup\luatextextdir TRT\hebfont #1\egroup}

\begin{document}

This is \textgreek{γέγονεν} Greek. And this is \textheb{עִבְרִית} Hebrew.

\end{document}
  • Thanks, Clint -- That's a wonderful answer! I think the one remaining piece of the puzzle is getting and installing Greek and Hebrew "keyboards." I'm working through some instructions I found here: http://www.sbl-site.org/educational/BiblicalFonts_FAQ.aspx – Paul Dulaney Jul 30 '12 at 19:20
  • @PaulDulaney : are you working with Mac or Windows? – ClintEastwood Jul 31 '12 at 07:34
  • @PaulDulaney : For Hebrew on a Mac try this site: http://www.dougshivers.com/mikhtav/osx.html . Greek can be installed the same way, but make sure to choose "Greek Polytonic" to get all the accents. – ClintEastwood Jul 31 '12 at 17:06
  • @PaulDulaney : By the way: on tex.SX you are collecting reputation, when you engage properly in the discussions. The more reputation you've got, the more you are allowed to do (this is why you couldn't add a comment, but you will be able once you've got enough reputation (soon!).) You can gain reputation, for example, by accepting and/or up-voting my answer, by up-voting other questions and answers, by asking new questions, etc. If you have a few minutes, read the FAQ, it explains it nicely. Welcome to tex.SX! – ClintEastwood Jul 31 '12 at 17:10
  • I am using LuaLaTeX with TeXShop on the Mac. – Paul Dulaney Jul 31 '12 at 16:20
  • I still must have something fundamentally wrong. With your test file I get question marks instead of Greek characters. – Paul Dulaney Aug 12 '12 at 17:57
  • @PaulDulaney : I am puzzled. On my system it works fine. Two ideas: 1. Try it with a different font for Greek (e.g., Arial Unicode MS, Times New Roman). 2. Generally, when working with lualatex, I'd propose using the engine lualatexmk (see what Allan Munn wrote here -- especially what he said after the three dots of the list). I changed the above code accordingly. – ClintEastwood Aug 14 '12 at 10:51
  • 1
    Before changing TeX engines I decided to go take another look at the "First Steps with General Typesetting.pdf" article available from the TeXShop help menu. At the top of page 3 they say to put the following at the beginning of your source file: %!TEX encoding = UTF-8 Unicode and after doing so things are now working for me. I suppose there must be some more elegant way that you are achieving this same result? (I.e., telling TeXShop to interpret the source as UTF-8.) – Paul Dulaney Aug 20 '12 at 22:32
  • 1
    @PaulDulaney : I am glad to hear that. What you could try -- and what I in fact do -- is to just tell TeXShop in the settings to save all files as unicode (instead of MacEncoding). Have a look at the settings of TeXShop. It's easy and imho should in most cases be done anyway. Likewise could you set in the "Save as..."-menu your encoding format of this file only to unicode. – ClintEastwood Aug 21 '12 at 20:50
7

As of 2021, definitely it’s up to the task. Here is an example with babel, which switches the font based on the script:

\documentclass{article}

\usepackage[bidi=basic, english]{babel}

\babelprovide[onchar=fonts ids]{ancientgreek} \babelprovide[onchar=fonts ids]{hebrew}

\babelfont{rm}{EBGaramond} \babelfont[ancientgreek]{rm}{SBL_grk.ttf} \babelfont[hebrew]{rm}{SILEOT.ttf}

\begin{document}

A Hebrew text is בְּרֵאשִׁית בָּרָא אֱלֹהִים אֵת הַשָּׁמַיִם וְאֵת הָאָרֶץ, and a Greek one is Ἐν ἀρχῇ ἐποίησεν ὁ Θεὸς τὸν οὐρανὸν καὶ τὴν γῆν.

\end{document}

enter image description here

Javier Bezos
  • 10,003
  • 1
    It is a good answer, but unfortunately Hebrew text will be justified to the left side, not to the right. So if you need to write a whole paragraph you need to do \begin{otherlanguage}{hebrew} – Michael Fraiman Jun 26 '22 at 11:55