formatted
symbolica.community.tensor Function
formatted(expression: Expression, show_dimensions: Optional[bool] = None, *, settings: Optional[DisplaySettings] = None, notation_source: Optional[str] = None) -> FormattedOutput Create a lazy rich display value for a notebook.
Parameters
expressionExpressionSymbolica tensor syntax or scalar algebra to display. For a TensorExpression or component Tensor, prefer its formatting methods.
show_dimensionsbool, optionalOverride settings.show_dimensions for this call. None retains the selected settings, whose default omits dimensions.
settingsDisplaySettings, optionalTensor notation and display choices. Defaults to DisplaySettings().
notation_sourcestr, optionalUnsupported for HTML and notebook output; raises ValueError. Use to_typst_project() or to_svg() for custom Typst notation.
Returns
FormattedOutput
Each requested backend renders the complete expression once and caches it.
Notes
Settings are captured here; custom printers run on the first request for each backend. Create a new formatted value after changing printers.
# Errors
Returns ValueError for Typst notation or incomplete MathML. Registered Python printer exceptions are logged and decline the override, allowing native fallback.
Examples
from symbolica import S
expression = S("x") + 1
from symbolica.community.tensor import formatted
output = formatted(expression)View generated signature source: docs/api/python/spynso3.pyi:10937