LaTeX template: \thesubtitle undefined — subtitled PDFs fail to compile #13
Closed
opened 2026-07-09 15:43:46 -04:00 by jared
·
1 comment
No Branch/Tag Specified
Labels
Clear labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
kodor
kodor/feature-proposal
kodor/fix
kodor/needs-review
kodor/triaged
question
wontfix
kodor
kodor/feature-proposal
kodor/fix
kodor/needs-review
kodor/triaged
Something isn't working
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
This doesn't seem right
Kodor should process this issue
Kodor has written a feature proposal
Kodor should implement a fix (assigned to Kodor)
Kodor's work or failure needs Jared's review
Kodor has already triaged this issue (skip)
Further information is requested
This will not be worked on
needs
human
Cannot move without a person -- a decision, a check an agent cannot make, something outside the repo
origin
client
Came from a client ask
origin
obligation
Created by a change elsewhere
origin
review
Came from human review
origin
roborev
Promoted from a roborev finding
type
chore
Maintenance with no behaviour change
type
debt
Owed work -- docs, tests, cleanup a change obligated
type
decision
Needs a decision before work can proceed
type
defect
Something is wrong
type
feature
New capability
ws
helpers
Analysis and workflow helpers
ws
logo
Logo and branded output composition
ws
packaging
Package infrastructure and release
ws
quarto
Quarto themes and publishing templates
ws
theme
Themes, palettes, and fonts
Assign a task to kodor
Kodor thinks this needs a feature.
Kodor should fix this
Kodor thinks the user is ready to review this.
Kodor is done with this issue.
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Civilytics/civilyticsR#13
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
inst/quarto/latex/civilytics-title.texreferences\thesubtitle, but nothing ever defines it, so any PDF document that sets asubtitlefails to compile.Reproduction
A
.qmdwith a subtitle, using the civilytics LaTeX template:Fails with:
Root cause
Quarto/pandoc emits the subtitle like this (verified in the generated
.tex):It defines
\subtitle(which appends to\@title) — it never defines\thesubtitle. Thetitlingpackage provides\thetitle/\theauthor/\thedatebut has no subtitle equivalent.Suggested fix
include-in-header(civilytics.tex) is emitted before pandoc's\subtitleprovider (verified: line 133 vs 280), and pandoc uses\providecommand, so a definition in civilytics.tex wins. Add tocivilytics.tex:Also suppress pandoc's default
\maketitleincivilytics-title.tex(it runs after the custom title page and would otherwise print a second, unstyled title), and add a\providecommand{\thesubtitle}{}guard in the title partial so it degrades gracefully if used without the preamble.Found while rendering a branded PDF (COG finance API spec).
Fixed in PR #15 (merged to master).