Experimenting with OpTeX on LuaHBTeX #158
Replies: 4 comments 2 replies
-
I use LuaHBTeX all the time, as I need to typeset documents in Hebrew. Without it the nikud is usually misplaced. |
Beta Was this translation helpful? Give feedback.
-
Essentially luahbtex is just luatex linked with harfbuzz library. The only behavior difference in the LuaTeX engine itself is the fact that this library can be loaded with In https://github.com/vlasakm/mmtex I chose to not link with harfbuzz by default because many years ago the harfbuzz version required by LuaTeX was not available everywhere, but already for a long time I am compiling and distributing binaries linked against harfbuzz on all major Linux distributions, thus essentially I am using I think making optex always use Btw, change to |
Beta Was this translation helpful? Give feedback.
-
I suppose that there is no additional difference between LuaTeX and LuaHBTeX. I.e., all changes done by maintainers of LuaTeX are automatically copied to LuaHBTeX. If this is true then I am surprised why we have two different binaries, i.e. two versions of format files in TeX distributions etc. A single binary LuaHBTeX with name LuaTeX should be sufficient and life will be much more simpler. LuaHBTeX enables to load harfbuzz (but it does not it by default) and users can initialize it for individual fonts by mode=harf (but it is not default). So, why we have LuaTeX without HB inside it? Historical reasons? If such reasons is out of date, then we can ask to LuaTeX maintainers to merge LuaTeX to LuaHBTeX. If this will be done then we need to do nothing in OpTeX. I have nothing against running OpTeX with LuaHBTeX by default (with name |
Beta Was this translation helpful? Give feedback.
-
Here is an example file comparing the two modes for Hebrew (the font is from here) \initunifonts
\font\node={file:KeterYG-Medium:script=hebr;}
\font\harf={file:KeterYG-Medium:script=hebr;mode=harf;}
\def\text{%
וּֽבְקֻצְרְכֶם֙ אֶת־קְצִ֣יר אַרְצְכֶ֔ם לֹ֧א תְכַלֶּ֛ה פְּאַ֥ת שָׂדְךָ֖ לִקְצֹ֑ר וְלֶ֥קֶט קְצִֽירְךָ֖ לֹ֥א תְלַקֵּֽט׃
וְכַרְמְךָ֙ לֹ֣א תְעוֹלֵ֔ל וּפֶ֥רֶט כַּרְמְךָ֖ לֹ֣א תְלַקֵּ֑ט לֶֽעָנִ֤י וְלַגֵּר֙ תַּעֲזֹ֣ב אֹתָ֔ם אֲנִ֖י יְהֹוָ֥ה אֱלֹהֵיכֶֽם׃
וְלֹֽא־תִשָּׁבְע֥וּ בִשְׁמִ֖י לַשָּׁ֑קֶר וְחִלַּלְתָּ֛ אֶת־שֵׁ֥ם אֱלֹהֶ֖יךָ אֲנִ֥י יְהֹוָֽה׃
לֹֽא־תַעֲשֹׁ֥ק אֶת־רֵֽעֲךָ֖ וְלֹ֣א תִגְזֹ֑ל לֹֽא־תָלִ֞ין פְּעֻלַּ֥ת שָׂכִ֛יר אִתְּךָ֖ עַד־בֹּֽקֶר׃
לֹא־תְקַלֵּ֣ל חֵרֵ֔שׁ וְלִפְנֵ֣י עִוֵּ֔ר לֹ֥א תִתֵּ֖ן מִכְשֹׁ֑ל וְיָרֵ֥אתָ מֵּאֱלֹהֶ֖יךָ אֲנִ֥י יְהֹוָֽה׃
לֹא־תַעֲשׂ֥וּ עָ֙וֶל֙ בַּמִּשְׁפָּ֔ט לֹא־תִשָּׂ֣א פְנֵי־דָ֔ל וְלֹ֥א תֶהְדַּ֖ר פְּנֵ֣י גָד֑וֹל בְּצֶ֖דֶק תִּשְׁפֹּ֥ט עֲמִיתֶֽךָ׃
לֹא־תֵלֵ֤ךְ רָכִיל֙ בְּעַמֶּ֔יךָ לֹ֥א תַעֲמֹ֖ד עַל־דַּ֣ם רֵעֶ֑ךָ אֲנִ֖י יְהֹוָֽה׃
לֹֽא־תִשְׂנָ֥א אֶת־אָחִ֖יךָ בִּלְבָבֶ֑ךָ הוֹכֵ֤חַ תּוֹכִ֙יחַ֙ אֶת־עֲמִיתֶ֔ךָ וְלֹא־תִשָּׂ֥א עָלָ֖יו חֵֽטְא׃
לֹֽא־תִקֹּ֤ם וְלֹֽא־תִטֹּר֙ אֶת־בְּנֵ֣י עַמֶּ֔ךָ וְאָֽהַבְתָּ֥ לְרֵעֲךָ֖ כָּמ֑וֹךָ אֲנִ֖י יְהֹוָֽה׃
}
\textdirection=1\pardirection=1\node\text
\harf\text
\bye
Note though, for Arabic the node mode is probably better than for Hebrew, as LuaTeX was developed with Arabic in mind, but I don't think it can cope with all possible shapers, section 6.1 of luaotfload's manual.
This is probably because of different philosophies. The integration of HarfBuzz into LuaTeX wasn't done by the LuaTeX team, and if I recall correctly, Hans does not want it. This is the reason ConTeXt does not use it (and reading how LuaMetaTeX works this is not really surprising). The LaTeX team did want to use it as their default engine for the LuaLaTeX format, so it is maintained and shipped with TeXLive. |
Beta Was this translation helpful? Give feedback.
-
Yesterday I tried to use OpTeX with HarfBuzz.
Results:
.ini
file I used:Beta Was this translation helpful? Give feedback.
All reactions