LuaLaTeX 与 babel/hebrew 需要 etex-extensions

LuaLaTeX 与 babel/hebrew 需要 etex-extensions

使用 texlive 2017(与 texlive 2019 相同),当我尝试运行以下最小 tex 文件(希伯来字体是https://www.sbl-site.org/educational/biblicalfonts.aspx;默认字体是 Adob​​e 的 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}

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

我得到以下输出:

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.

这里的其他答案建议使用bidi=basic作为选项,\usepackage{babel}但这给了我

! 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*

?

有人知道这里发生了什么吗?据我了解,当我使用 lualatex 时,我永远不应该到达 rlbabel.def 文件,因为在某处有一个开关可以在 lua-xe- 和常规 tex 之间进行选择。

不幸的是,由于独立的原因,切换 texlive 版本和切换渲染引擎(远离 lualatex)都不是一个选择。

答案1

您的示例需要看起来像这样(如果您的字体安装正常):

\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 输出

相关内容