18
0
Files
cdsc_tex/letter_template/text.tex
Benjamin Mako Hill 6ee5dbd35d 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 <noreply@anthropic.com>
2026-05-10 18:22:42 -07:00

62 lines
1.4 KiB
TeX

\DocumentMetadata{
pdfversion=2.0,
pdfstandard=ua-2,
lang=en-US,
}
\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}
\usepackage[letterpaper,left=1.3in,right=1.3in,top=0.8in,bottom=0.8in]{geometry}
\usepackage{tagpdf}
\tagpdfsetup{activate-all}
\usepackage{hyperref}
\hypersetup{unicode=true,
pdftitle={Letter},
pdfauthor={Benjamin Mako Hill},
pdflang={en-US},
pdfdisplaydoctitle=true}
\begin{document}
\begin{letter}{Person Letter is Addressed To\\
Followed by Address}
\address{Benjamin Mako Hill\\
Massachusetts Institute of Technology\\
Room E15-312\\
20 Ames Street\\
Cambridge, MA 02139-4307}
\signature{Benjamin Mako Hill}
\location{Massachusetts Institute of Technology\\
Room E15-020c\\
20 Ames Street\\
Cambridge, MA 02139-4307}
\telephone{(206) 409-7191}
\opening{To whom it may concern,}
\setlength\parindent{0.25in}
Text of Letter goes here. Text of Letter goes here. Text of Letter
goes here. Text of Letter goes here. Text of Letter goes here. Text of
Letter goes here. Text of Letter goes here. Text of Letter goes
here. Text of Letter goes here.
\closing{Regards,}
\end{letter}
\end{document}