Skip to content

Improved PDF typography#2906

Open
ViralBShah wants to merge 3 commits intoJuliaDocs:masterfrom
ViralBShah:improve-latex-typography
Open

Improved PDF typography#2906
ViralBShah wants to merge 3 commits intoJuliaDocs:masterfrom
ViralBShah:improve-latex-typography

Conversation

@ViralBShah
Copy link
Copy Markdown
Contributor

@ViralBShah ViralBShah commented Mar 14, 2026

Summary

A collection of LaTeX improvements for better PDF output, all in documenter.sty:

  • microtype — character protrusion (hanging punctuation), font expansion, and tracking for improved paragraph justification and fewer overfull/underfull hbox warnings
  • \microtypesetup{nopatch=item} — avoids a known interaction between microtype and memoir's list formatting
  • selnolig — LuaLaTeX-specific package that suppresses inappropriate ligatures (e.g., "ff" ligature in "shelfful")
  • bookmark — improved PDF bookmarks with better handling of edge cases (loaded after hyperref)
  • Page headers — chapter and section names in page headers for easier navigation in long documents like the Julia manual
  • style = friendly — switches minted code blocks from the default monochrome Pygments theme to friendly, which provides colored syntax highlighting

All packages are zero-configuration — they work with the existing DejaVu Sans font setup and memoir document class. selnolig and bookmark are added to the CI TeX Live package list.

Test plan

  • Documentation: pdf CI job passes
  • PDF/LaTeX backend CI jobs pass on both ubuntu and windows
  • Visual inspection of generated PDF shows improved paragraph layout, colored code blocks, and page headers

🤖 Generated with Claude Code

ViralBShah and others added 3 commits March 14, 2026 00:39
Add \usepackage{microtype} to the LaTeX style file. With LuaLaTeX,
microtype enables character protrusion (hanging punctuation), font
expansion, and tracking adjustments that noticeably improve paragraph
justification and reduce overfull/underfull hbox warnings.

This is a zero-configuration improvement — microtype's defaults work
well out of the box with the existing DejaVu Sans font setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- selnolig: suppress inappropriate ligatures (LuaLaTeX-specific)
- microtype nopatch=item: avoid interaction with memoir list formatting
- bookmark: improved PDF bookmarks (loaded after hyperref)
- Page headers with chapter/section names for easier navigation
- Minted style=friendly for colored syntax highlighting in code blocks
- Add selnolig and bookmark to CI TeX Live package list

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ViralBShah ViralBShah changed the title Enable microtype for improved PDF typography Improve PDF typography and navigation Mar 14, 2026
@ViralBShah ViralBShah changed the title Improve PDF typography and navigation Improved PDF typography Mar 14, 2026
Copy link
Copy Markdown
Collaborator

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be a breaking change in so far as it may break CI tests in repositories using Documenter to build PDFs.

We first need to make sure the Docker container provides all now required packages and can be used to build this.

@fingolfin
Copy link
Copy Markdown
Collaborator

(I do like the general idea behind this PR, though)

@ViralBShah
Copy link
Copy Markdown
Contributor Author

I will look into the docker container update.

@fingolfin
Copy link
Copy Markdown
Collaborator

@ViralBShah that would be awesome, thank you! Some notes are at #2888 which also links to further issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants