0

Using texlive 2017 (same with texlive 2019), when i try to run the following minimal tex file (Hebrew font is https://www.sbl-site.org/educational/biblicalfonts.aspx; default font is Adobe's Minion Pro):

\documentclass{book}
\usepackage[main=english,hebrew]{babel}
\usepackage{fontspec}
\babelfont{rm}{fonts/Minion/MinionPro-Regular.otf}
\babelfont[hebrew]{rm}{fonts/SBL/SBL_Hbrw.ttf}

\begin{document}
The instrument \textit{tōp} (\foreignlanguage{hebrew}{תֹּף}) is not a timbrel with jingles, unknown in Israel until the Hellenistic period.
\end{document}

with

lualatex --interaction=nonstopmode test.tex > output.log

i get the following output:

This is LuaTeX, Version 1.0.4 (TeX Live 2017) 
 restricted system commands enabled.
(./test.tex
LaTeX2e <2017-04-15>
(using write cache: /home/lupino/.texlive2017/texmf-var/luatex-cache/generic)(u
sing read cache: /usr/local/texlive/2017/texmf-var/luatex-cache/generic /home/l
upino/.texlive2017/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.164 seconds
Babel <3.11> and hyphenation patterns for 1 language(s) loaded.
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/book.cls
Document Class: book 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/bk10.clo(load luc: /home/lup
ino/.texlive2017/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.luc
))) (/usr/local/texlive/2017/texmf-dist/tex/generic/babel/babel.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/babel/switch.def)
(/usr/local/texlive/2017/texmf-dist/tex/generic/babel/luababel.def)
(/usr/local/texlive/2017/texmf-dist/tex/generic/babel-hebrew/rlbabel.def

To avoid this error message,
run TeX--XeT or e-TeX engine instead of regular TeX.

! Right-to-Left Support Error: use TeX--XeT or e-TeX engine.
l.63      engine}
               %
) (/usr/local/texlive/2017/texmf-dist/tex/generic/babel-hebrew/hebrew.ldf
(/usr/local/texlive/2017/texmf-dist/tex/generic/babel/babel.def
(/usr/local/texlive/2017/texmf-dist/tex/generic/babel/switch.def)
(/usr/local/texlive/2017/texmf-dist/tex/generic/babel/luababel.def))

Package babel Warning: No hyphenation patterns were preloaded for
(babel)                the language `Hebrew' into the format.
(babel)                Please, configure your TeX system to add them and
(babel)                rebuild the format. Now I will use the patterns
(babel)                preloaded for \language=0 instead on input line 57.

) (/usr/local/texlive/2017/texmf-dist/tex/generic/babel-english/english.ldf))
(/usr/local/texlive/2017/texmf-dist/tex/generic/babel-hebrew/lheenc.def)
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/inputenc.sty

! Package inputenc Error: inputenc is not designed for xetex or luatex.
(inputenc)                only UTF-8 supported.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.158 \endinput

) (/usr/local/texlive/2017/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/local/texlive/2017/texmf-dist/tex/latex/l3kernel/l3pdfmode.def))
(/usr/local/texlive/2017/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/tuenc.def)

LaTeX Font Warning: Font shape `TU/cmr/m/n' undefined
(Font)              using `TU/lmr/m/n' instead on input line 105.

) (/usr/local/texlive/2017/texmf-dist/tex/latex/fontspec/fontspec.cfg)(load luc
: /home/lupino/.texlive2017/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-
bold.luc)(load luc: /home/lupino/.texlive2017/texmf-var/luatex-cache/generic/fo
nts/otl/lmroman10-italic.luc)))
! Undefined control sequence.
<recently read> \babelfont 

l.4 \babelfont
            {rm}{fonts/Minion/MinionPro-Regular.otf}

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.4 \babelfont{r
              m}{fonts/Minion/MinionPro-Regular.otf}
! Undefined control sequence.
l.5 \babelfont
            [hebrew]{rm}{fonts/SBL/SBL_Hbrw.ttf}
! Missing $ inserted.
<inserted text> 
$
l.5 \babelfont[hebrew]{rm}{fonts/SBL/SBL_
                                       Hbrw.ttf}
! Extra }, or forgotten $.
l.5 \babelfont[hebrew]{rm}{fonts/SBL/SBL_Hbrw.ttf}

! Missing $ inserted.
<inserted text> 
$
l.6 


Overfull \hbox (3.15625pt too wide) in paragraph at lines 4--6
[]\TU/cmr/m/n/10 rm-fonts/Min-ion/MinionPro-Regular.otf [hebrew]rmfonts/SBL/SBL
$[][]\OML/cmm/m/it/10 brw:ttf$ 
(./test.aux)
(/usr/local/texlive/2017/texmf-dist/tex/generic/babel-hebrew/lhecmr.fd)

LaTeX Font Warning: Font shape `LHE/lmr/m/n' undefined
(Font)              using `LHE/cmr/m/n' instead on input line 8.


luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: "Font jerus10 not found.".
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.
! Font \LHE/cmr/m/n/10=jerus10 at 10pt not loadable: metric data not found or b
ad.
<to be read again> 
relax 
l.8 ...tit{tōp} (\foreignlanguage{hebrew}{תֹּף}
                                                  ) is not a timbrel with ji...

! Undefined control sequence.
\extrashebrew ... \ifhmode \ifinner \else \beginR 
                                                  \fi \fi \let \saved@alph =...

l.8 ...tit{tōp} (\foreignlanguage{hebrew}{תֹּף}
                                                  ) is not a timbrel with ji...

(load luc: /home/lupino/.texlive2017/texmf-var/luatex-cache/generic/fonts/otl/l
mromanslant10-regular.luc)
! Undefined control sequence.
\@@number #1->\ifmmode \else \beginL 
                                     \fi #1\ifmmode \else \endL \fi 
l.9 \end{document}

! Undefined control sequence.
\@@number ...e \beginL \fi #1\ifmmode \else \endL 
                                                  \fi 
l.9 \end{document}

[1{/usr/local/texlive/2017/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./test.aux)

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

)
(\end occurred inside a group at level 1)

### simple group (level 1) entered at line 5 ({)
### bottom level
(see the transcript file for additional information)
 442 words of node memory still in use:
   4 hlist, 1 vlist, 2 rule, 2 glue, 5 attribute, 56 glue_spec, 5 attribute_lis
t, 1 write nodes
   avail lists: 2:47,3:9,4:2,5:33,6:170,7:34,8:8,9:11,10:1,11:13
</usr/local/texlive/2017/texmf-dist/fonts/opentype/public/lm/lmroman10-italic.o
tf></usr/local/texlive/2017/texmf-dist/fonts/opentype/public/lm/lmroman10-regul
ar.otf></usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi1
0.pfb></usr/local/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.
pfb>
Output written on test.pdf (1 page, 23585 bytes).
Transcript written on test.log.

Other answers here suggested using bidi=basic as option to \usepackage{babel} but this gives me

! Package babel Error: Bad option `bidi=basic'. Either you have misspelled the
(babel)                key or there is a previous setting of `bidi'.

See the babel package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.272 \ProcessOptions*

?

Has anyone an idea what is happening here? As far as i understand the babel package's interiors i should never reach the rlbabel.def file when i use lualatex since there is a switch somewhere to choose between lua- xe- and regular tex.

Unfortunately, neither switching the texlive-Version nor switching the rendering engine (away from lualatex) is an option for independend reasons.

  • you can make a more portable example without the font loading, gives same error, I would flag it on the babel github perhaps if no answer comes here, github.com/latex3/babel/issues – David Carlisle Jun 5 at 10:47
  • If you can't switch to a newer texlive you are probably out-of-luck. The hebrew option of babel has not been adapted to lualatex, so you need the new bidi options. – Ulrike Fischer Jun 5 at 11:03
  • i tried with texlive2019 and got the same error messages. – Lupino Jun 5 at 11:04
  • if you try \usepackage[hebrew]{babel} yes, the option doesn't work. but bidi and bidiprovide should work, see e.g. tex.stackexchange.com/a/434568/2388 – Ulrike Fischer Jun 5 at 11:10
  • 1
    Dont use the hebrew option in the argument of babel!!! It doesn't work. – Ulrike Fischer Jun 5 at 11:57
1

You example needs to look like this (if your fonts are installed normally):

\documentclass{book}
\usepackage[english,bidi=basic]{babel}
\babelprovide[import=he]{hebrew}
\babelfont{rm}{MinionPro}
\babelfont[hebrew]{rm}[Contextuals=Alternate]{SBL Hebrew}
\begin{document}
The instrument \textit{tōp} (\foreignlanguage{hebrew}{תֹּף}) is not a timbrel with jingles, unknown in Israel until the Hellenistic period.
\end{document}

MWE output

  • This almost works, just one issue, still: fontspec complains that Package fontspec Warning: Language 'English' not available for font (fontspec) 'MinionPro-Regular' with script 'Latin'. Is this an issue with the otf or is it something solvable with \babelfont/fontspec options? – Lupino Jun 6 at 8:50
  • @Lupino, it's just a warning that doesn't matter in this case. You can silence it or search this site for how to explicitly request the language. – David Purton Jun 6 at 8:54
  • @Lupino, see tex.stackexchange.com/a/478539/87678 – David Purton Jun 6 at 9:04

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.