rpic_manifest: Compile to a JSON bundle (as a string)

View source: R/rpic.R

rpic_manifestR Documentation

Compile to a JSON bundle (as a string)

Description

Returns ⁠{svg, animations, diagnostics, warnings}⁠warnings carries structured compiler warnings for accepted-but-ignored input (unknown attribute words, unknown animate effects), each with the same fields as the rpic_error diagnostic. On a pic error the JSON is ⁠{error, error_info}⁠ instead (no condition is raised — the error travels in-band).

Usage

rpic_manifest(src, circuits = FALSE, texlabels = FALSE)

Arguments

src

pic source code.

circuits

load the native circuit-element library (or write ⁠copy "circuits"⁠ in the source itself).

texlabels

typeset fully ⁠$...$⁠-delimited labels as TeX math (initializer only — the source can still set texlabels = 0).

Value

a JSON string; parse with e.g. jsonlite::fromJSON().

Examples

rpic_manifest('box; animate last box with "pop"')

rpic documentation built on July 15, 2026, 9:06 a.m.