1

As you can see in the picture, using Polyglossia to insert a snippet of Hebrew is giving me an unwanted space before the Hebrew insertion. And as you can see, it's not happening with Arabic, so it's not an RTL problem. It seems Polyglossia and Hebrew specific.

MWEoutput

Here is the code:

\documentclass{report}
\usepackage{fontspec}
    \setmainfont{Linux Libertine O}
    \newfontfamily\hebrewfont[Language=Hebrew]{Linux Libertine O}
    \newfontfamily\arabicfont[Script=Arabic]{Scheherazade}
\usepackage{polyglossia}
    \setdefaultlanguage{english} 
    \setotherlanguage{hebrew}
    \setotherlanguage{arabic}   
\begin{document}

with Polyglossia (\texthebrew{זצ״ל})

no problem with Arabic (\textarabic{سلام‎})

or without Poly ({\addfontfeature{Language=Hebrew} {זצ״ל}})

\end{document}

I have already tried adding Script=Hebrew to the \hebrewfont definition, but the result is the same.

I have a big file full of Hebrew citations, and I have the impression this only started happening a few months or weeks ago — maybe a bug crept in? Any suggested fix will be highly appreciated, or am I missing something?

  • I used your code and did not get any spaces with or without. Are you compiling with XeLaTeX? – Elad Den Apr 26 at 8:51
  • oh dear! Yes, XeLaTeX. I am using TexLive 2019, are you too? Polyglossia v.1.47 – Juan del Acebo Apr 26 at 8:59
  • 1
    I have Texlive 2017 on my machine, and I also tried using Overleaf(which I think is on Texlive 2018), and was unable to reproduce. – Elad Den Apr 26 at 9:28
  • Checked again Overleaf is using Texlive 2019 polyglossia 1.46... – Elad Den Apr 26 at 9:35
  • Thank you. Very strange. I will check my log in detail, and test on other machines too. – Juan del Acebo Apr 26 at 10:06
1

Hoping it's useful, this solved it: after checking my installation and fiddling with fontspec options to no avail, I took a shot in the dark and downloaded from Github the most recent gloss-hebrew.ldf (I'm avoiding upgrading to TL2020 just yet)— and hey presto, problem solved.

I still don't know if there was just some unhappy conjunction of versions in my local folders, but the unwanted extra space has disappeared.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.