I've noticed that Babel's bidi support is gradually improving, and this means that I'm keen to see when I can move over from XeTeX to LuaLaTeX (mostly because of the extra microtype
features it will enable).
Here's an example I'm trying to compile:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Skolar PE}
\newfontfamily\hebrewfont[Script=Hebrew,BoldFont=TaameyDavidCLM-Bold,ItalicFont=TaameyDavidCLM-MediumOblique,BoldItalicFont=TaameyDavidCLM-BoldOblique]{TaameyDavidCLM-Medium}
\usepackage[main=british,bidi=basic]{babel}
\babelprovide[import=he]{hebrew}
\babelfont{rm}{SkolarPE}
\babelfont[hebrew]{rm}{TaameyDavidCLM-Medium}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Fames ac turpis egestas maecenas pharetra convallis. Eleifend donec pretium vulputate sapien nec. Id ornare arcu odio ut sem. Sed adipiscing diam donec adipiscing tristique risus nec. Ut porttitor leo a diam sollicitudin tempor id. Egestas sed tempus urna et pharetra pharetra. Magna eget est lorem ipsum dolor sit amet. Ipsum dolor sit amet consectetur adipiscing elit. Neque volutpat ac tincidunt vitae semper quis lectus nulla. Dui faucibus in ornare quam viverra orci sagittis. Eu sem integer vitae justo eget magna. Tristique senectus et netus et malesuada fames ac. Volutpat blandit aliquam etiam erat velit scelerisque in dictum. At lectus urna duis convallis convallis tellus id interdum velit. Porttitor lacus luctus accumsan tortor posuere. Ut aliquam purus sit amet.
\begin{otherlanguage}{hebrew}
שיר המעלות לשלמה אם יהוה לא יבנה בית שוא עמלו בוניו בו אם יהוה לא ישמר עיר שוא שקד שומר׃
\end{otherlanguage}
\end{document}
What I get is the following, which suggests that I've done something wrong loading Skolar PE as the main font, but also fails to typeset the Hebrew text. The English text is correctly typset, and correctly uses Skolar PE as its font. It's just the Hebrew text that's left out (see attached PDF).
*************************************************
* fontspec warning: "language-not-exist"
*
* Language 'English' not available for font 'SkolarPE' with script 'Latin'.
* 'Default' language used instead.
*************************************************
(./lualatex-hebrew-test.aux
Package babel Warning: The current font is not a standard family:
(babel) SkolarPE:mode=node;script=latn;language=DFLT;+tlig;
(babel) Script and Language are not applied. Consider defining a
(babel) new family with \babelfont. Reported on input line 2.
*************************************************
* fontspec warning: "language-not-exist"
*
* Language 'Hebrew' not available for font 'TaameyDavidCLM-Medium' with script
* 'Hebrew'.
* 'Default' language used instead.
*************************************************
Package babel Warning: The current font is not a standard family:
(babel) SkolarPE:mode=node;script=latn;language=DFLT;+tlig;
(babel) Script and Language are not applied. Consider defining a
(babel) new family with \babelfont. Reported on input line 3.
Package babel Warning: The current font is not a standard family:
(babel) SkolarPE:mode=node;script=latn;language=DFLT;+tlig;
(babel) Script and Language are not applied. Consider defining a
(babel) new family with \babelfont. Reported on input line 4.
)
Package babel Warning: The current font is not a standard family:
(babel) SkolarPE:mode=node;script=latn;language=DFLT;+tlig;
(babel) Script and Language are not applied. Consider defining a
(babel) new family with \babelfont. Reported on input line 26.
[1{/usr/local/texlive/2018/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./lualatex-hebrew-test.aux
Package babel Warning: The current font is not a standard family:
(babel) SkolarPE:mode=node;script=latn;language=DFLT;+tlig;
(babel) Script and Language are not applied. Consider defining a
(babel) new family with \babelfont. Reported on input line 2.
Package babel Warning: The current font is not a standard family:
(babel) SkolarPE:mode=node;script=latn;language=DFLT;+tlig;
(babel) Script and Language are not applied. Consider defining a
(babel) new family with \babelfont. Reported on input line 3.
Package babel Warning: The current font is not a standard family:
(babel) SkolarPE:mode=node;script=latn;language=DFLT;+tlig;
(babel) Script and Language are not applied. Consider defining a
(babel) new family with \babelfont. Reported on input line 4.
))
(see the transcript file for additional information)
426 words of node memory still in use:
4 hlist, 1 vlist, 1 rule, 5 glue, 7 attribute, 49 glue_spec, 5 attribute_lis
t, 1 write nodes
avail lists: 2:37,3:12,4:4,5:66,6:2,7:1085,8:1,9:19,10:3,11:63
</Users/lyndon/Library/Fonts/SkolarPE-Regular.otf>
Output written on lualatex-hebrew-test.pdf (1 page, 7588 bytes).
\babelfont
, and the example then works for me (well, if I substitute SBL Hebrew, since I don’t have TaameyDavidCLM installed). – Thérèse Jun 1 '18 at 21:19\setxxxxfont
and\babelfont
at the same time.” That’s why you need to comment out lines 2–4 of your example. – Thérèse Jun 1 '18 at 21:51