From 6ee5dbd35d48fb5eac27143f6e9334cc30add035 Mon Sep 17 00:00:00 2001 From: Benjamin Mako Hill Date: Sun, 10 May 2026 18:22:42 -0700 Subject: [PATCH] templates: enable TeX input ligatures with fontspec fontspec does not enable the classic TeX input ligatures by default, so under lualatex our existing -- / --- / `` / '' input was being typeset as literal hyphens and straight quotes rather than en-dashes, em-dashes, and curly quotes. Add \defaultfontfeatures{Ligatures=TeX} right after \usepackage{fontspec} in each template that loads fontspec (paper, memo, and letter). The poster template uses beamer's default fonts (Latin Modern under lualatex), where TeX ligatures already work via the font tables, so no change there. Co-Authored-By: Claude Sonnet 4.6 --- letter_template/text.tex | 4 ++++ memo_template/text.tex | 4 ++++ paper_template/text.tex | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/letter_template/text.tex b/letter_template/text.tex index 40b341b..abb1b5f 100644 --- a/letter_template/text.tex +++ b/letter_template/text.tex @@ -6,6 +6,10 @@ \documentclass[12pt]{letter} \usepackage{fontspec} +% fontspec disables the classic TeX input ligatures by default +% (-- => en-dash, --- => em-dash, `` and '' => curly quotes), so +% re-enable them globally for every font loaded below. +\defaultfontfeatures{Ligatures=TeX} \setmainfont{EB Garamond} \setsansfont{TeX Gyre Heros} diff --git a/memo_template/text.tex b/memo_template/text.tex index f5e5f96..6ab2f72 100644 --- a/memo_template/text.tex +++ b/memo_template/text.tex @@ -14,6 +14,10 @@ \tagpdfsetup{activate-all} \usepackage{fontspec} +% fontspec disables the classic TeX input ligatures by default +% (-- => en-dash, --- => em-dash, `` and '' => curly quotes), so +% re-enable them globally for every font loaded below. +\defaultfontfeatures{Ligatures=TeX} \setmainfont{EB Garamond} \setsansfont{TeX Gyre Heros} diff --git a/paper_template/text.tex b/paper_template/text.tex index af41c0d..26571b0 100644 --- a/paper_template/text.tex +++ b/paper_template/text.tex @@ -14,6 +14,10 @@ \tagpdfsetup{activate-all} \usepackage{fontspec} +% fontspec disables the classic TeX input ligatures by default +% (-- => en-dash, --- => em-dash, `` and '' => curly quotes), so +% re-enable them globally for every font loaded below. +\defaultfontfeatures{Ligatures=TeX} \setmainfont{EB Garamond} \setsansfont{TeX Gyre Heros} \usepackage{wrapfig}