Repository navigation
BOT: Fix #1002: enable KaTeX math rendering in pkgdown site - #1076
Merged
Merged
Conversation
pkgdown defaults to mathml which fails to render \eqn{}/\deqn{} LaTeX
expressions in function reference pages. Adding math-rendering: katex
to _pkgdown.yml fixes all 63 LaTeX expressions across 4 documentation
files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nikosbosse
added a commit
that referenced
this pull request
Feb 13, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1076 +/- ##
=======================================
Coverage 97.94% 97.94%
=======================================
Files 37 37
Lines 1951 1951
=======================================
Hits 1911 1911
Misses 40 40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nikosbosse
commented
Feb 13, 2026
nikosbosse
left a comment
Collaborator
Author
There was a problem hiding this comment.
CLAUDE: Approved (posted as comment because self-approval not allowed). Clean, minimal fix. One-line config change (math-rendering: katex under template: in _pkgdown.yml) correctly addresses the root cause — pkgdown's default mathml renderer cannot handle the 63 \eqn{}/\deqn{} LaTeX expressions. Placement in YAML is correct. Two regression-prevention tests are well-structured with appropriate skip guards for R CMD check. No issues found.
nikosbosse
marked this pull request as draft
February 13, 2026 08:26
seabbs
approved these changes
Mar 30, 2026
seabbs
marked this pull request as ready for review
March 30, 2026 14:35
seabbs
enabled auto-merge
March 30, 2026 14:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
\eqn{}/\deqn{}) in function reference pages were not rendering because pkgdown defaults tomathml, which fails for these expressionsmath-rendering: katexundertemplate:in_pkgdown.yml(one-line config change)Root cause
pkgdown's default math renderer (
mathml) cannot handle the 63\eqn{}/\deqn{}occurrences acrossR/metrics-binary.R,R/metrics-interval-range.R,R/metrics-sample.R, andR/metrics-quantile.R. The upstream pkgdown issue (r-lib/pkgdown#2704) was closed with the recommendation to usekatexormathjax.What changed
_pkgdown.yml: Addedmath-rendering: katexundertemplate:tests/testthat/test-pkgdown-config.R: New test file with two tests:_pkgdown.ymlhasmath-renderingset tokatexormathjax\eqn{}/\deqn{}patternsTest plan
math-renderingkey)🤖 Generated with Claude Code