from keecas import symbols
from keecas.display import latex_inline_dict
# Define symbol with subscript
sigma_Sd = symbols(r"\sigma_{Sd}")
# Basic usage
latex_inline_dict(sigma_Sd, {sigma_Sd: 5}) # Returns: '\sigma_{Sd} = 5''\\sigma_{Sd} = 5'
Generate inline LaTeX equation from a variable and its value in a mapping.
Creates a formatted LaTeX string showing “var = value” where both the variable and value are rendered as LaTeX. Supports different modes for wrapping the output (plain, inline math, or environment).
| Name | Type | Description | Default |
|---|---|---|---|
| var | Basic |
SymPy symbol to display on left-hand side | required |
| mapping | dict[Basic, Any] |
Dictionary containing the value for the variable | required |
| **kwargs | Any |
Additional arguments passed to sympy.latex() - mode: Output mode - “plain” (default), “inline” (with \(...\)), or environment name (with | {} |
| Name | Type | Description |
|---|---|---|
str |
Formatted LaTeX string with localization applied |
'\\sigma_{Sd} = 5'
show_eqn: Main display function for multiple equationsdict_to_eq: Convert dictionary to SymPy Eq objects