formatters.format_pint
format_pint(value, col_index=0, **kwargs)Format Pint quantities by converting to SymPy first.
This is a transformer formatter - it converts Pint Quantity to SymPy expression, then calls format_sympy() directly.
Transformation chain: Quantity -> SymPy -> format_sympy
Parameters
value : pint.Quantity Pint quantity to format col_index : int, optional Column index (0 = LHS, 1+ = RHS) **kwargs Passed to format_sympy()
Returns
str LaTeX string from SymPy formatting