TransWikia.com

textgreek command unknown with LuaLaTeX since last babel-greek update

TeX - LaTeX Asked by Marc Baudoin on March 7, 2021

Since the last babel-greek package update (around 2020-11-10), the textgreek command is no longer defined while compiling with LuaLaTeX. The following MWE:

documentclass{minimal}
usepackage[greek.ancient,french]{babel}
begin{document}
foreignlanguage{greek}{textgreek{da'imwn}}
end{document}

produces, while compiling with LuaLaTeX:

! Undefined control sequence.
<argument> textgreek 
           {da'imwn}

Though it worked fine before the babel-greek update (and works fine with the package reverted to the previous version) but it still compiles fine with pdfLaTeX and the latest version of babel-greek:

result

How can I get textgreek to work with LuaLaTeX and the latest version of babel-greek?

2 Answers

greek no longer loads LGR if it detects an unicode engine. But you can do it yourself:

documentclass{article}
usepackage[LGR,TU]{fontenc}
usepackage[greek.ancient,french]{babel}
begin{document}
foreignlanguage{greek}{textgreek{da'imwn}}
end{document}

Correct answer by Ulrike Fischer on March 7, 2021

You can still load the LGR encoding with luainputenc and define textgreek to run fontencoding{LGR}selectfont. This will hopelessly confuse the hyphenation patterns, however. It will only work if you declare 8-bit LGR fonts with the same family names as your Unicode fonts, for example by loading substitutefont and declaring substitutefont{LGR}{rmdefault}{Tempora-TLF}, or by loading setmainfont{TeX Gyre Termes}[NFSSFamily=Tempora-TLF].

You asked about LuaLaTeX, but XeTeX gives you the option of defining a font mapping. Your question inspired me to make one up for beta code, a more standardized way to encode Greek in ASCII, which currently is supported only for PDFTeX with betababel.

Answered by Davislor on March 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP