# How do I get more ligatures to work in Luatex via Lyx?

I came across the question "Ligatures for fi, fl, ffl do not work for Times New Roman (XeLaTeX)," and it had two solutions; but neither works completely for LuaTex. The first is Xetex/XeLaTex specific, and the second, while being more complicated than necessary, essentially means you can e.g. add Ligatures=Discretionary to a FontSpec statement, and if you have a Win10 Times New Roman, it'll work. Here's the code preview from a very simple example that works in Xetex, but not LuaTex:

% Preview source code

%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage{fontspec}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\setmainfont[Ligatures=Discretionary]{Times New Roman}

\makeatother

\usepackage{polyglossia}
\setdefaultlanguage[variant=american]{english}
\begin{document}
fi fj fl ff ffi ffj ffl Th “the” tt - – —
\end{document}


This has a variety of ligatures useful in modern US English, and some of them work (although I haven't seen a "tt" ligature supported, usually). The first ones starting with "F" don't. The goal is to get them to show up in LuaTex as ligatures, without messing up any of the other ones, and without having to change the underlying font file.

(It should be straightforward to create a Lyx doc from this, or to run this in other Tex environments.)

Edits:

1. This fails with Times New Roman 7.0, and Lyx 2020.
2. This succeeds with the updated Lyx 2021! I guess Marcel Krüger is adverse to the points for having provided the answer. I see lots of answers to questions as only comments. I don't understand it, but I'm not complaining.

Note: Evidently, what Lyx calls "LuaTex" is in fact "LuaLatex", since e.g. it recognizes \DocumentClass{}. That explains why my documents would error out in TeXworks on LuaTex, but not LuaLaTeX. That's rather confusing of Lyx, IMHO.

• I can't reproduce this. For me, LuaLaTeX applies all expected ligatures in this document. (Tested with Times New Roman 7.00) Jun 24, 2021 at 14:12
• This is for Luatex, not LuaLatex; or is there a difference? Lyx has only the LuaTex choice. Jun 24, 2021 at 19:32
• LuaLaTeX is LuaTeX with LaTeX and \documentclass/\begin{document}/\end{document} are LaTeX commands. So if uses the LuaTeX engines, it is LuaLaTeX. tl,dr: No, in this case LuaTeX means LuaLaTeX. Jun 24, 2021 at 19:59
• I can reproduce this with TeX Live 2020 on Overleaf, but not with TeX Live 2021 locally. So I would recommend updating. The underlying issue seems to be fixed with current versions. Jun 24, 2021 at 20:05
• Depending on @CodeLurker's response, I propose that either (1) Marcel posts a simple answer that it works on TeX Live 2021 but not on TeX Live 2020, or that the title be edited to specify "on TeX Live 2020" (or whichever version CodeLurker is using) if the hope is to find a temporary workaround. Jun 24, 2021 at 20:07