Use case
A common need in academic documents — CVs, grant proposals, tenure packets, lab group pages — is to visually highlight a specific author's name in bibliography entries. CSL and Pandoc's citeproc don't support this natively.
Since citetools already owns the post-citeproc bibliography processing pipeline (multiple bibliographies, cite-field extraction, backlinks), author highlighting seems like a natural addition.
Proposed behavior
A new metadata key, e.g.:
highlight-author:
name: "Aye"
style: bold # bold | italic | underline | <css-class>
Or shorthand: highlight-author: "Aye" (defaults to bold).
The filter would walk the #refs div after citeproc and wrap matching author name spans in the appropriate inline element (Strong, Emph, Underline, or Span with a CSS class).
What it needs to handle
Citation styles produce author names in several formats:
- Surname-first: Aye, K.-M., Aye, Klaus Michael
- Given-name-first: K.-M. Aye, Klaus-Michael Aye
- Initials only: K. M. Aye
The highlighting should cover the full name span (surname + given names), not just the surname in isolation.
Existing implementation
I've published a standalone Quarto extension that does this: highlight-author. It's a single Lua filter (~170 lines) that calls pandoc.utils.citeproc(doc) internally and walks the refs div — the same pattern citetools uses.
I'd be happy to contribute a PR adapting this into citetools if you're interested. The core logic is self-contained and could plug into the existing filter pipeline.
References
Use case
A common need in academic documents — CVs, grant proposals, tenure packets, lab group pages — is to visually highlight a specific author's name in bibliography entries. CSL and Pandoc's citeproc don't support this natively.
Since citetools already owns the post-citeproc bibliography processing pipeline (multiple bibliographies, cite-field extraction, backlinks), author highlighting seems like a natural addition.
Proposed behavior
A new metadata key, e.g.:
Or shorthand:
highlight-author: "Aye"(defaults to bold).The filter would walk the
#refsdiv after citeproc and wrap matching author name spans in the appropriate inline element (Strong,Emph,Underline, orSpanwith a CSS class).What it needs to handle
Citation styles produce author names in several formats:
The highlighting should cover the full name span (surname + given names), not just the surname in isolation.
Existing implementation
I've published a standalone Quarto extension that does this: highlight-author. It's a single Lua filter (~170 lines) that calls
pandoc.utils.citeproc(doc)internally and walks the refs div — the same pattern citetools uses.I'd be happy to contribute a PR adapting this into citetools if you're interested. The core logic is self-contained and could plug into the existing filter pipeline.
References