from keecas import wrap_column, symbols
# Define symbol
sigma = symbols(r"\sigma")
# Wrap symbol in LHS (column 0)
wrap_column(sigma, col_index=0) # Returns: ('', '')('', '')
Column wrapper for LaTeX equation formatting.
This module provides a singledispatch-based wrapper system for decorating columns in mathematical equations. Wrappers add prefix/suffix around formatted values (e.g., “=” before RHS numeric values, “” before RHS text).
('', '')
Custom type registration:
| Name | Description |
|---|---|
wrap_column |
Return (prefix, suffix) for column wrapping based on value type. |
wrap_numeric |
Wrap numeric types with equals prefix in RHS columns. |
wrap_str |
Wrap strings with quad spacing in RHS columns. |
wrap_sympy |
Wrap SymPy expressions with equals prefix in RHS columns. |
wrap_pint |
Wrap Pint quantities with equals prefix in RHS columns. |
wrap_markdown |
Wrap IPython Markdown/Latex objects with quad spacing in RHS columns. |