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}
Pobably this is not a package conflict, but rather the lack of babel
support for Hebrew. A possible solution (not tested) is to install the package IvriTeX
(Hebrew package for the babel system and LaTeX2e). To install in a Debian system:
apt-get install ivritex
In other case go to http://ivritex.sourceforge.net/
Another solution is to remove hebrew
from the babel
options and use the cjhebrew
package:
\documentclass[10pt]{article}
\usepackage[english,french]{babel}
\usepackage{aeguill}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{xspace}
\usepackage{listingsutf8}
\usepackage{color}
\usepackage{url}
\usepackage{textcomp}
\usepackage{cjhebrew}
\begin{document}
\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: ‘al--p*:ney t:hOm
\end{cjhebrew}
L'e'quation $E=mc^2$ a e'te' exprime'e en 1905 par Albert Einstein.
\end{document}
Best Answer
I suggest you to try XeLaTeX and Polyglossia; in my experience, installing full Hebrew for
babel
has been painful. Not that I know any Hebrew, but I had to typeset some text in that language.Here's an example. You may need to change the font name; what font to use depends on your operating system, but any OpenType or TrueType system font supporting Hebrew should be good. The
\newfontfamily{\hebrewfont}{...}
may be needed or not, depending on how the font advertises its support for Hebrew.The text has been taken from the page on Jerusalem in the Hebrew Wikipedia, http://he.wikipedia.org/wiki/ירושלים
If http://translate.google.com is not mistaken, the title should mean “Hello world”.