latex_inline_dict

latex_inline_dict(var, mapping, **kwargs)

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).

Parameters

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 {}

Returns

Name Type Description
str Formatted LaTeX string with localization applied

Examples

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'
# Inline mode with $ delimiters
latex_inline_dict(sigma_Sd, {sigma_Sd: 5}, mode="inline")  # Returns: '$\sigma_{Sd} = 5$'
'$\\sigma_{Sd} = 5$'

See Also

  • show_eqn: Main display function for multiple equations
  • dict_to_eq: Convert dictionary to SymPy Eq objects