pikchr 1.1.1
CRAN release: 2026-06-14
Bug fixes
- Fixed a memory leak in the C interface (
pikchr_c): the SVG buffer returned bypikchr()was never freed, leaking on every diagram render. - Guarded the C interface against a possible
NULLreturn frompikchr()that could crash the R session. - Fixed the
heightargument default inpikchr(), which never fell back to the SVGviewBoxheight and produced an emptyheight:CSS rule. - Aligned the documented argument defaults of
pikchr()(width,height,fontSize,fontFamily,align) with the actual function defaults.
pikchr 1.1.0
CRAN release: 2026-04-07
New features
-
Quarto and RMarkdown improvements: The knitr engine now supports
fig.cap(figure captions with<figure>/<figcaption>in HTML),fig.alt(accessibility alt text viaaria-label), andfig.alignas standard knitr options. - Non-HTML output support: Automatic PNG conversion for all non-HTML formats including DOCX, EPUB, and Typst (previously only LaTeX/PDF was supported).
-
DPI-aware PNG conversion: The
dpichunk option (default 150) controls PNG resolution for non-HTML outputs. - Error detection: Pikchr compilation errors now produce informative warnings with the error message, instead of silently embedding invalid markup.
-
Quarto cross-referencing: Chunks with labels starting with
fig-receive an HTMLidattribute for Quarto cross-reference compatibility.
Improvements
- Replaced
message(),warning(), andstop()withcli::cli_inform(),cli::cli_warn(), andcli::cli_abort()for consistent and user-friendly messaging. - Removed
dplyr,purrr, andrlangfrom Imports, replaced with base R operations for a lighter dependency footprint. - Replaced
tidyversein Suggests with specific packages (rmarkdown). - Updated authors list.
- Removed compiled objects (
.o,.so) fromsrc/. - Cleaned up commented-out code and removed duplicate engine registration.
pikchr 1.0.0
- Added a
NEWS.mdfile to track changes to the package. - Embedded Google Fonts in SVG Files: Added functionality to embed Google Fonts directly into the generated SVG files, improving the portability and visual consistency of diagrams.
- Improved Processing in RMarkdown: Enhanced integration with RMarkdown for smoother and more efficient rendering of diagrams within documents.
