Native 'LaTeX' Math Rendering for Grid Graphics
Overview
Renders 'LaTeX' math equations as native R grid graphics objects (grobs) using the 'MicroTeX' 'C++' library as the layout engine. Produces resolution-independent vector output that works on any R graphics device, with no external 'LaTeX' installation required. Markdown labels and block documents that mix prose formatting with math are also rendered, for use with both 'grid' and 'ggplot2'.
- LaTeX is read by a new, faster parser that follows TeX's rules, so macros, environments and starred forms work as in LaTeX, and malformed input is drawn with a warning giving its line:col instead of failing. As in TeX, a space after a command is dropped (write
\LaTeX{} is), and_,^,#and&outside math warn. - New
input_mode = "document"renders a LaTeX document body, or a whole pasted paper, wrapped atmax_width(seevignette("documents")). Markdown is now laid out the same way, so its paragraphs, styled spans and tables stay within their box. - New
latex_options(device_math = TRUE)renders$…$math in base graphics labels. - New
load_font()names a font file or an installed family, with its bold and italic files, andavailable_fonts()lists them.latex_options()takesmain_font,sans_fontandmono_font, the fonts of the body,\textsfand\texttt.load_math_font(),available_math_fonts()andcheck_math_fonts()are superseded byload_font()andavailable_fonts(); they still work. - Text in a font given to
load_font()is measured and drawn from the font file, so it looks the same on every device, basepdf()included, where a font file never worked before. Other families are still the device's. - An image that cannot be drawn is now an error saying why, figures load about ten times faster, and many bugs are fixed.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK13 OK2026-05-17
Show 1 earlier changeHide 1 earlier change
- WARNING6 OK, 1 WARNING2026-05-09
Documentation
- Help pages
- 22 (2 internal)includes a package overview page
- Examples that run
- 38%8 run in a plain check · 13 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 92%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 93%
- Median days to close, 50 most recently updated closed issues
- not measured
- Median days to close, 50 most recently updated closed PRs
- 0
Releases over time
PRs over time
Commits over time
Commit identities over time
11 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/adayim/gridmicrotex on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-10-18 · The repository has a site deploy workflow
pkgdown site last built 2026-10-18
Show all practicesHide 2 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-04-18Named in .Rbuildignore: .claude, CLAUDE.mdNamed in .gitignore: CLAUDE.mdCommits: at least 147 crediting it in the message
- GitHub Copilotfirst seen 2026-08-23Pull request: opened by its own account
- Claude Sonnet 5.540 commits · Oct 2026
- Claude Opus 522 commits · Sep 2026
- Claude Opus 5.519 commits · Sep 2026
- Claude Opus 4.816 commits · Jul 2026
- Claude Sonnet 52 commits · Oct 2026
1 more model not listed. Some of these counts are a minimum, because the search stopped before the oldest commits.
Dependencies
Installing gridmicrotex adds 10 packages (8 with compiled code, 5.4 MB of source tarballs). Heaviest: Rcpp 1.8 MB, jsonlite 1.0 MB, rlang 766 KB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.2.0Latest2026-10-04 · current release · diff ↗ ·
removed 1 export
check_fonts·added 1 export
available_fontslisted once in CRAN's queue
Seen in one reading of CRAN's incoming queue, at 2026-10-04 20:43 UTC, so it stayed less than the time between readings. - 0.1.12026-08-24 · diff ↗
- 0.1.02026-08-21 · diff ↗ ·
added 12 exports
GeomMarkdown, available_highlighters, check_math_fonts, element_markdown, geom_markdown, grid.markdown, load_math_font, markdown_box_grob, markdown_grob, markdown_style, md_style, register_highlighter - 0.0.52026-07-21 · diff ↗
- 0.0.42026-06-01 · diff ↗
- 0.0.32026-05-18 · diff ↗
- 0.0.2
- 0.0.12026-05-08
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-05-08
- Total releases
- 8 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.2.0
- Download size
- 2.7 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("gridmicrotex")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.