3

I am working on typesetting a list of names for a project. All of the names are in English besides one, which is in hebrew. How do I typeset the symbols for this name in XeTeX?

\documentclass[twoside, openany]{book}
\usepackage[subpreambles=true]{standalone}
\usepackage[utf8]{inputenc} 
\usepackage{pdfpages}
\usepackage[paperheight=7.5in,paperwidth=7.5in,left=1in,right=1in,top=1in,bottom=1in]{geometry}
\usepackage[hidelinks]{hyperref}
\usepackage{graphicx, amsmath, xcolor, wrapfig, float, subfiles, enumitem, xcoffins, atbegshi, fontspec, etoolbox, cjhebrew}
\usepackage[outline]{contour}
\usepackage[none]{hyphenat}
\usepackage[font=small,labelfont=bf]{caption}
\setmainfont{Futura}

\usepackage{titlesec}

\usepackage{multicol}
%\usepackage[english, hebrew]{babel}
\usepackage{cjhebrew}
%\usepackage[T1]{fontenc}
%\ProvideTextCommand{\DJ}{OT1}{\raisebox{0.25ex}{-}\kern-0.4em D}
%\usepackage[T1]{tipa}

\begin{document}
\section*{Kickstarter Backers}

These are the names of the people who believed in this project before it was real, and whose support is ultimately responsible for its material existence. To our backers, you have our gratitude, now and forever.

\begin{center}
VIP - GREGORY GREGORY
\end{center}

\begin{multicols}{4}
{\tiny
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
%\<y/sy-Kb dwd>\\
דוד בן-ישי\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\}
\end{multicols}

\end{document}

Stuck to the Futura font, but cannot get the Hebrew name to compile. Any ideas? Preamble shows things that I have tried.

3 Answers 3

3

I think Futura doesn't cover Hebrew, so you must select another font. If switching to LuaLaTeX is an option, here is how to do it with no explicit language markup (babel selects the font for you):

\documentclass[twoside, openany]{book}

\usepackage{multicol}

\usepackage[english, bidi=basic]{babel}
\babelprovide[import, onchar=ids fonts]{hebrew}

\babelfont{rm}{Futura}
\babelfont[hebrew]{rm}{DejaVu Sans}

\begin{document}

\section*{Kickstarter Backers}

These are the names of the people who believed in this project before it
was real.

\begin{multicols}{4}
{\tiny\noindent
gregory gregory\\
gregory gregory\\
דוד בן-ישי\\
gregory gregory\\
gregory gregory\\}
\end{multicols}

\end{document}

enter image description here IIR, with XeTeX the font can't be switched automatically with RTL scripts (which, for a single name, is not a real issue).

With XeTeX:

\documentclass[twoside, openany]{book}

\usepackage{multicol}

\usepackage[bidi=bidi-l,english]{babel}
\babelprovide[import]{hebrew}

\babelfont{rm}{Futura.ttc}
\babelfont[hebrew]{rm}{DejaVu Sans}

\begin{document}

\section*{Kickstarter Backers}

These are the names of the people who believed in this project before it
was real.

\begin{multicols}{4}
{\tiny\noindent
gregory gregory\\
gregory gregory\\
\foreignlanguage{hebrew}{דוד בן-ישי}\\
gregory gregory\\
gregory gregory\\}
\end{multicols}

\end{document}
2

You’ve run into a few annoying bits of technical debt that TeX owes to the twentieth century. One of these is that many packages (such as fontenc, inputenc, cbhebrew and tipa) still use 8-bit font encodings. And a lot of tutorials on the Web will still tell you to use them. I’ve removed all of those from this MWE, and used Unicode exclusively.

Another is that the legacy behavior of TeX when it sees a character that’s not in the font is to silently ignore it, leaving a blank space in your PDF and logging a warning in the middle of your .log file. Add the command \tracinglostchars=2 at the top of your document to at least print the warning on your console!

For this demo, I used Futura Renner as a free and open-source version of Futura, and Simple CLM (פָּשׁוּט) as the companion Hebrew font. You might instead try Miriam, the sans-serif Hebrew font you probably already have.

\documentclass[twoside, openany]{book}
\tracinglostchars=2
\usepackage[subpreambles=true]{standalone}
\usepackage{pdfpages}
\usepackage[paperheight=7.5in,paperwidth=7.5in,left=1in,right=1in,top=1in,bottom=1in]{geometry}
\usepackage[hidelinks]{hyperref}
\usepackage[outline]{contour}
\usepackage[none]{hyphenat}
\usepackage{titlesec}
\usepackage{multicol}
\usepackage[bidi=default, english]{babel}
\usepackage{unicode-math}
\usepackage{ucharclasses}

\defaultfontfeatures{ Scale=MatchLowercase, Ligatures=TeX }
%% Simple CLM and Miriam CLM are available at http://culmus.sourceforge.net/download.html
\defaultfontfeatures[MiriamCLM]{
  UprightFont = {*-Book},
  BoldFont = {*-Bold},
  Extension = {.ttf} }
\defaultfontfeatures[MiriamMonoCLM]{
  UprightFont = {*-Book},
  BoldFont = {*-Bold},
  ItalicFont = {*-BookOblique},
  BoldItalicFont = {*-BoldOblique},
  Extension = {.ttf} }
\defaultfontfeatures[SimpleCLM]{
  UprightFont = {*-Medium},
  BoldFont = {*-Bold},
  ItalicFont = {*-MediumOblique},
  BoldItalicFont = {*-BoldOblique},
  Extension = {.ttf} }

%% Futura Renner is a free and open-source version of Futura, available at
%% https://fontlibrary.org/en/font/futura-renner
\babelfont{rm}
          [Scale=1.0]{FuturaRenner}
\babelfont{sf}
          {FuturaRenner}
\babelfont{tt}
          {Source Sans Pro}
\setmathfont{Fira Math}

\babelprovide[import]{hebrew}
\babelfont[hebrew]{rm}
          {SimpleCLM}
\babelfont[hebrew]{sf}
          {SimpleCLM}
\babelfont[hebrew]{tt}
          {MiriamMonoCLM}

\begin{document}
\section*{Kickstarter Backers}

These are the names of the people who believed in this project before it was real, and whose support is ultimately responsible for its material existence. To our backers, you have our gratitude, now and forever.

\begin{center}
VIP - GREGORY GREGORY
\end{center}

\begin{multicols}{4}
{\tiny\noindent
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
\foreignlanguage{hebrew}{דוד בן-ישי}\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\
gregory gregory\\}
\end{multicols}

\end{document}

Futura Renner/Simple CLM sample

Since the fonts are too small to make out at that resolution, here’s a zoomed-in version:

Futura Renner/Simple CLM sample

If you can use LuaLaTeX instead of XeLaTeX, you can change two lines to

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

and

\babelprovide[import, onchar=ids fonts]{hebrew}

and your document will then switch to Hebrew, with the correct font, whenever you type in Hebrew. Unfortunately, XeTeX does not support this for right-to-left languages (even with ucharclasses).

1

In my openion the best way to write hebrew in 2020 is with polyglossia with XeLaTeX

MWE

\documentclass[twoside, openany]{book}

\usepackage{multicol}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont[Language=Hebrew,Script=Hebrew]{David CLM}

\begin{document}
\section*{Kickstarter Backers}

These are the names of the people who believed in this project before it was real, and whose support is ultimately responsible for its material existence. To our backers, you have our gratitude, now and forever.

\begin{center}
VIP - GREGORY GREGORY
\end{center}

\begin{multicols}{4}
{\tiny
gregory gregory\\
gregory gregory\\
\texthebrew{דוד בן-ישי}\\
gregory gregory\\
gregory gregory\\}
\end{multicols}

\end{document}
2
  • 1
    This seems like a nice solution, but will not build on my end. What font should I be pulling to have this render, as 'David CLM' is not a font.
    – Pyro1368
    Jan 29, 2021 at 14:58
  • 1
    @Pyro1368 David CLM is here, or if you have Futura, you might already have David and Miriam. However, see my answer for my own recommendation.
    – Davislor
    Jan 29, 2021 at 22:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .