[Tex/LaTex] Perfect example document (template) for English, Greek and Hebrew (XeLaTeX)


EDIT 2 (23-2-2017): Changed the title and added that the example file in this post specifically works with XeLaTeX.

EDIT 1 (20-2-2017): Due to cfr's request, I have added a file. This is not the original, but a progress file, so to speak, based on cfr's example file. This one works with XeLaTeX:

\documentclass[12pt, a4paper, titlepage]{article}

\usepackage[top=1.00in, bottom=1.00in, left=1.00in, right=1.00in]{geometry}

%% for centering section titles


\newfontfamily\hebrewfont{SBL Hebrew}
\newfontfamily\greekfont{SBL Greek}



\textgreek{αταραξία}. That was in Greek using SBL Greek.

\texthebrew{קֹהֶלֶת}. That was in Hebrew using SBL Hebrew.



Perhaps I am foolish in this regard, but I could not—after having tried to figure it out for a long time—manage to get a basic working file with English as the main language and Greek and Hebrew as the ones thrown in every now and then.

First I tried to add Hebrew to my existing working PdfLaTex document (that accepts English and Greek), but this is a very annoying and soul-killing process. Then, since many seem to recommend XeLaTex or LuaLatex, I tried these, but to no avail either (and also a soul-killing process; in fact, do I even have a soul left after all this? Is not the point of technology for the user that it serves him and not the other way around?).

I also followed the instructions in version 5.06 of The Not So Short Introduction to LaTeX 2ε. It is the part on XeLaTeX (starting on p. 34) in section 2.5.8 The Unicode option. Well, it didn't help me at all, even though I followed it.

So will someone please provide a basic working file for PdfLaTeX, XeLaTeX or LuaLaTeX (preferrably the best option) where English is the main language and Greek and Hebrew are the others?

I have installed, by the way, the Hebrew font called SBL Hebrew. For English and Greek I would simply use Computer Modern or something similar.

Best Answer

Something like this?

\setmainfont{Noto Serif}
\setsansfont{Noto Sans}
\newfontfamily\hebrewfont{Noto Sans Hebrew}[Script=Hebrew]
\newfontfamily\greekfont{Noto Serif}

This is the main language.




Compile with XeLaTeX.