2

How to include a single hebrew word in an english paragraph using babel and pdflatex? I don't want a new paragraph or start from the right when switching to hebrew. If possible, I would like to continue using pdflatex and babel.

\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage[hebrew,english]{babel}


\begin{document}

hello world גופן ברירת מחדל hello again

\end{document}

Is there any hack/solution? Thank you very much.

2

1 Answer 1

0

In theory, it’s possible to get something like your set-up to work. In practice, even the last maintainer of that package says to switch to XeTeX and polyglossia.

In that package, the command is \texthebrew. Example:

\documentclass[varwidth=10cm, preview]{standalone}
\usepackage{fontspec}
\usepackage{polyglossia}

\setdefaultlanguage{english}
\setotherlanguage{hebrew}

%\defaultfontfeatures{ Scale=MatchUppercase, Ligatures = TeX }

\newfontfamily\hebrewfont{Frank Ruehl CLM}
\newfontfamily\hebrewfontsf{Simple CLM}
\newfontfamily\hebrewfonttt{Miriam Mono CLM}

\begin{document}
hello world \texthebrew{גופן ברירת מחדל} hello again
\end{document}

Hello, world?

It is also possible to get Hebrew to work with babel by loading \babelprovide[import]{hebrew} and then a command such as \babelfont[hebrew]{rm}{Frank Ruehl CLM}. If some package you need is incompatible with polyglossia, that might work better for you.

5
  • alright, apparently switching seems to be the only practical thing. The only drawback is there are still some incompatibilities of packages with xelatex/polyglossia that worked with pdflatex.
    – kromuchi
    Jan 17, 2019 at 9:27
  • @kromuchi Admittedly, I haven’t been able to get Hebrew to work the way I want in PDFTeX, but in theory there should be packages floating around to do it.
    – Davislor
    Jan 17, 2019 at 9:30
  • @kromuchi Which packages are you having problems with? There might be a fix or a replacement for them.
    – Davislor
    Jan 17, 2019 at 9:32
  • In general, a few packages need different options or the order is important. Currently, the most challenging thing is to find a compatible version of polyglossia/bidi and koma script (with the current versions, some commands don't work (I created a ticket on sourceforge which is now also linked here: github.com/bidi-tex/bidi/issues/1)
    – kromuchi
    Feb 18, 2019 at 15:11
  • You can also get Babel to work with Hebrew by loading \babelprovide[import]{hebrew} and then selecting a \babelfont. If the problem is Pollyglossia, that might work for you.
    – Davislor
    Feb 18, 2019 at 15:15

You must log in to answer this question.

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