English and German introductions to typography mention that some words must not contain ligatures at certain points, such as
(illegal ligature in strong emphasis)
In LaTeX, one would either have to manually disable them with \kern0pt or \hspace{0pt}(such as shelf{\kern0pt}ful), or use microtype to disable them globally.
However, there's a LuaLaTeX package that does this automatically for an included selection of words: selnolig. According to selnolig's documentation, it has to be loaded after the babel package. Therefore, just using header-includes is not feasible, as that's located before.
Hence I suggest loading the selnolig package in case the LuaLaTeX engine is used, probably somewhere after line 341 of the LaTeX template:
--- pandoc-templates/default.latex 2020-07-15 00:28:58.124000000 +0200
+++ - 2020-07-15 00:31:00.189391730 +0200
@@ -339,6 +339,9 @@
$endif$
\fi
$endif$
+\ifluatex
+ \usepackage{selnolig}
+\fi
$if(dir)$
\ifxetex
% Load bidi as late as possible as it modifies e.g. graphicx
you can probably use a custom template?
Oh yeah, I'm doing that. But I thought this might improve the default template; in a similar way everybody could load microtype themself, but instead it's been added to the default template.
My only worry here is about depending on packages that aren't widely available. We try to stick with the most common ones so the default template will work with a more minimal install.
Still, I think this is probably a good idea.
I tried this. Maybe I'm doing it wrong, but I can't see any difference in the output (e.g. for Auflage in German). I still see a ligature.
Maybe you haven't set the language?
Running pandoc --standalone --from=markdown --to=latex --pdf-engine=lualatex --output=with-selnolig.pdf --template=default.latex test.md on the patched default.latex and the following test.md works for me:
---
title: Test
lang: de
---
Auflage
Compare this with pandoc --standalone --from=markdown --to=latex --pdf-engine=lualatex --output=without-selnolig.pdf test.md
I did set lang. But I forgot to specify lualatex!
Good thought, I added something.