diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4981d526082..3185b684a48 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -100,9 +100,11 @@ jobs: with: packages: | scheme-medium + bookmark hyperref minted newunicodechar + selnolig transparent upquote tabulary diff --git a/CHANGELOG.md b/CHANGELOG.md index c5aff274cb5..6a2fc0fa616 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added * Support self-hosted GitHub instances. ([#2755]) +* Improved PDF typography: `microtype` for character protrusion and font expansion, `selnolig` for ligature suppression, `bookmark` for improved PDF bookmarks, page headers with chapter/section names, and `friendly` Pygments theme for syntax-highlighted code blocks. ([#2906]) ## Version [v1.17.0] - 2026-02-20 diff --git a/assets/latex/documenter.sty b/assets/latex/documenter.sty index a5376af1087..15e0563d300 100644 --- a/assets/latex/documenter.sty +++ b/assets/latex/documenter.sty @@ -9,6 +9,14 @@ % DejaVu Sans instead. \newfontfamily\unicodeveebarfont{DejaVu Sans}[Scale=MatchLowercase] \newcommand\unicodeveebar{{\unicodeveebarfont ⊻}} + +% typography: enable microtypographic enhancements (character protrusion, +% font expansion, tracking) for improved paragraph layout and justification. +\usepackage{microtype} +\microtypesetup{nopatch=item} % avoid interaction with memoir's list formatting + +% suppress inappropriate ligatures (LuaLaTeX only) +\usepackage{selnolig} % % colours @@ -38,6 +46,7 @@ frame = none, bgcolor = codeblock-background, rulecolor=codeblock-border, + style = friendly, } % @@ -56,6 +65,8 @@ urlcolor = dark-purple, colorlinks = true, } +% improved PDF bookmarks (must be loaded after hyperref) +\usepackage{bookmark} % % table of contents @@ -72,6 +83,14 @@ \setlrmarginsandblock{1.5in}{1in}{*} \setheaderspaces{1in}{*}{*} \checkandfixthelayout + +% page headers: show chapter and section for navigation +\makepagestyle{documenter} +\makeevenhead{documenter}{\thepage}{}{\slshape\leftmark} +\makeoddhead{documenter}{\slshape\rightmark}{}{\thepage} +\makeevenfoot{documenter}{}{}{} +\makeoddfoot{documenter}{}{}{} +\pagestyle{documenter} % % images etc.