Changelog
Source:NEWS.md
gridmicrotex 0.2.0
- 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. - An image that cannot be drawn is now an error saying why, figures load about ten times faster, and many bugs are fixed.
gridmicrotex 0.1.1
CRAN release: 2026-08-24
- The typeface fallback is now a message rather than a warning, is raised only when
render_mode = "typeface"was actually asked for, and at most once per device. A figure holding many math labels no longer repeats it. - Bug fix: the layout engine’s macro tables were never freed. They leaked at process exit, and
unloadNamespace()left both them and the shared object in place. All are now released.
gridmicrotex 0.1.0
CRAN release: 2026-08-21
- Text inside
\text{}is drawn a line at a time rather than a letter at a time, so kerning is applied, PDF/SVG output can be searched for a phrase, and files are several times smaller. Text given amax_widthis drawn a word at a time, since the spaces are where it breaks. - Right-to-left text renders in the correct order, including across emphasis, colour and other font changes, and with or without
max_width. - New
markdown_grob()andgrid.markdown()render inline markdown with LaTeX math;markdown_box_grob()renders a block document. - New
geom_markdown()andelement_markdown()for ggplot2, both takingstyle. A title containing headings or lists is laid out as blocks, not flattened. - Markdown covers headings, lists, task lists, quotes, code, tables, images, footnotes, display
$$…$$, links and inline HTML. A fenced code block keeps its indentation and is syntax-highlighted when it names a language. - New
register_highlighter()andavailable_highlighters(). R, Python, SQL, shell, C++, YAML, JSON, Stan, Julia and LaTeX are built in, along with the usual GitHub aliases; token colours are CSS classes (.kw,.co,.st, …), the names knitr already writes into HTML output. Grammars are KDE syntax XML files. - New
markdown_style()andmd_style()style markdown through a CSS cascade of HTML tag names; thebodyrule styles the box itself. - New
latex_options(markdown_style = )sets a document-wide default. - New
"github"style preset, shipped as a CSS file. -
<div class=>and<div style=>style a chunk of markdown;<span class=>styles an inline run. - New
justifyandline_breakarguments control paragraph line breaking. - New
\gmfontfamily{family}{content}sets the font for one run of text. -
\includegraphics[width=,height=,scale=,keepaspectratio]{file}draws PNG, JPEG and SVG images inline in a formula; it previously parsed and drew nothing. The extension may be omitted and\graphicspath{}is searched, as in LaTeX. An SVG is drawn as real vector, so it stays sharp at any output resolution. - New
p{len}column type givestabularfixed-width, wrapping cells. -
\url{}and\href{}{}render as styled text instead of literally. -
load_font()is renamedload_math_font(); the old name is deprecated. -
check_fonts()is renamedcheck_math_fonts(); the old name is deprecated. - Bug fix:
\rotateboxpast a quarter turn drew text and glyphs 180 degrees out, so a\rotatebox{90}label came out upside down. - Bug fix:
\textrm{}now returns text togp$fontfamily; it previously did nothing. - Bug fix:
\texttt{}drew in the body font instead of a monospace one. - Bug fix:
max_widthis now honoured by content containing\\line breaks. - Bug fix: in
"mixed"mode a line break was kept inside the text rather than breaking the formula, so anything after it was drawn beside the whole block instead of on its own line. A pasted\captionlanded to the left of its table, and math following a line break sat between the lines. - Bug fix: LaTeX tick labels measured 0 x 0, so ggplot2 reserved no room and they overlapped the axis title.
- Bug fix: reloading the package corrupted MicroTeX’s macro registry, so a later large formula could crash R.
- Bug fix:
\-offered a line break but drew no hyphen at it. - Bug fix: an
&in text was read as an alignment tab and everything after it was dropped, so"Treatment & Control"rendered as"Treatment ". - Bug fix:
tabular*failed to parse, reporting an invalid alignment; its width argument is now dropped along with the star. - Bug fix: a layout measured on one graphics device could be reused on another, placing text at the wrong widths — the layout cache now keys on the device.
- Bug fix: the package failed to compile on compilers that no longer declare
strtod()andstrtol()through other headers, such as clang 23.
gridmicrotex 0.0.5
CRAN release: 2026-07-21
- Bug fix: correct
grobX()/grobY()boundary points. - Bug fix:
geom_latex(fontsize = )was ignored. - Bug fix: spurious “font metrics unknown” warnings in
"mixed"mode. - Bug fix: CJK fallback width on Windows was ~6x too narrow.
- Bug fix: layout-cache collisions between unresolved text fonts.
- Bug fix: measuring
\text{}runs no longer pushes a viewport on the caller’s device. The push/pop was recorded on the graphics engine display list, so the device looked like it already held a plot andknitremitted a spurious blank figure ahead of the real one. - Hardened the OTF MATH reader against malformed fonts that could hang R.
- Docs:
input_modedefaults to"mixed"; use\textbf{}etc. instead ofgp$fontface.
gridmicrotex 0.0.4
CRAN release: 2026-06-01
- Accept raw latex code from other packages, like
xtable::print.xtable()/knitr::kable()/ booktabs output. - New MicroTeX commands
\thickhlineand\cline{a-b}. - New
itemizeandenumeratelist environments. Lists may nest. - Bug fix:
$…$inside tabular cells no longer chops the table. - Bug fix: starred alignment envs (
align*,eqnarray*, …) now render. - Bug fix:
latex_wrap()is now vectorised over its input, matching its documented contract, and errors onNAinput instead of rendering “NA”. - Bug fix: the
\mark{}macro survives amicrotex_release()/ re-init cycle. -
gp$coltransparency is now honoured (alpha passed through to MicroTeX). - Macro expansion warns on circular definitions instead of silently producing wrong output.
gridmicrotex 0.0.3
CRAN release: 2026-05-18
- Self-contained
load_font()example so CRAN’s donttest additional checks no longer fail on the unreliable CTAN font download. - New commands.
gridmicrotex 0.0.2
CRAN release: 2026-05-16
- Support the
\defcommand - New function
grobMark. - Bug fix
ggplot2integration. - Bug fix coloring body.
-
ggplot2integration respectslatex_options. - Defer
systemfontsregistration of the bundled Lete and STIX fonts to first render. This avoids theXType: Using static font registry.notice that older macOS SDKs emit on Core Text font registration, which had caused spurious WARN/NOTEs onr-oldrel-macos-arm64.