DiagramRender

Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.

DiagramRender

class DiagramRender

An immutable native SVG rendering with file exports and notebook display. Geometry and typeset labels are captured when the result is created.

Attributes

Name Description
diagrams Configured child snapshots for a rendered collection, in display order.

diagrams

DiagramRender.diagrams: builtins.list[DiagramRender]

Configured child snapshots for a rendered collection, in display order.

Methods

Name Description
__repr__
_mime_
_repr_html_
_repr_svg_
save Export SVG, HTML, Typst, PDF, or PNG, selected by the filename suffix.
save_pages Export every SVG or PNG page to a directory and return the written paths.
to_html
to_linnest
to_svg Return the one-page SVG
to_svg_pages

__repr__

DiagramRender.__repr__() -> builtins.str

_mime_

DiagramRender._mime_() -> tuple[builtins.str, builtins.str]

_repr_html_

DiagramRender._repr_html_() -> builtins.str

_repr_svg_

DiagramRender._repr_svg_() -> typing.Optional[builtins.str]

save

DiagramRender.save(output: builtins.str | os.PathLike | pathlib.Path) -> pathlib.Path

Export SVG, HTML, Typst, PDF, or PNG, selected by the filename suffix.

save_pages

DiagramRender.save_pages(
    directory: builtins.str | os.PathLike | pathlib.Path,
    *,
    format: builtins.str = 'svg',
) -> builtins.list[pathlib.Path]

Export every SVG or PNG page to a directory and return the written paths.

to_html

DiagramRender.to_html() -> builtins.str

to_linnest

DiagramRender.to_linnest() -> builtins.str

to_svg

DiagramRender.to_svg() -> builtins.str

Return the one-page SVG. Use to_svg_pages for multipage documents.

to_svg_pages

DiagramRender.to_svg_pages() -> builtins.list[builtins.str]