| eqns |
dict[Any, Any] | list[dict[Any, Any]] | Dataframe |
Equation data as dict, list of dicts, or Dataframe object. Automatically converted to Dataframe internally. For list of dicts: first dict’s keys become Dataframe keys, subsequent dicts add columns where keys match (None for mismatches). See Dataframe.__init__ for details. |
required |
| environment |
str | dict[str, Any] | None |
LaTeX environment name or custom definition. Built-in environments include “align”, “equation”, “cases”, “gather”, “split”, “alignat”, “rcases”. Can also be a dict or EnvironmentDefinition object for custom environments. Defaults to config.latex.default_environment. |
None |
| sep |
str | list[str] | None |
Separator(s) between cells in the amsmath block (e.g. LHS & RHS & ...). Can be string or list of strings for finer customization (separator goes between columns: first separator between columns 1-2, etc). Defaults to environment’s default separator (None uses environment default: “&” for align, “” for equation/gather). |
None |
| label |
str | dict[str, str | Callable] | Callable | None |
Label(s) for cross-referencing equations. Can be: - str: Single label string (pre-formatted with generate_label) - dict: Mapping symbols to label strings or callables - Callable: Function that generates labels, receives single list: [key] + Dataframe[key] Labels should be pre-formatted using generate_label() before passing to show_eqn. Callable labels receive a single list argument: [key, value1, value2, …]. Omitted in KaTeX mode for notebook compatibility. |
None |
| label_command |
str | None |
LaTeX label command (e.g., r”“). Defaults to config.latex.default_label_command. |
None |
| col_wrap |
str | dict | list | Dataframe | Callable | None |
Column wrapping specifications for LaTeX formatting. Can be str, dict, list, Dataframe, or Callable. For lists, the last element automatically fills remaining columns. Supports tuple values for prefix/suffix: [None, (“=”, ““), (r”\quad(“,”)“)] works correctly. List elements: None (no wrapping), str (prefix only), tuple (prefix, suffix), or Callable. Defaults to config.display.col_wrap. |
None |
| float_format |
str | dict | list | Dataframe | None |
Format specification for float values (does not affect int). Can be str (all floats), list of str (per column), dict (per row), dict of list or Dataframe (per cell). For lists, the last element automatically fills remaining columns. Example: [None, “.3f”, “.2f”] means col 0: no format, col 1: “.3f”, col 2+: “.2f”. Supports format specs with or without braces (e.g., “.3f” or “{:.3f}”). Defaults to config.display.default_float_format. |
None |
| cell_formatter |
Callable | dict | list | Dataframe | None |
Custom cell value formatter function(s). Can be single Callable[(value, col_index) -> str] (all cells), list of Callable (per column), dict of Callable (per row if key matches), dict of list of Callable or Dataframe (per cell). For lists, the last element automatically fills remaining columns. Defaults to config.display.cell_formatter. |
None |
| row_formatter |
Callable | dict | None |
Custom row-level formatter function(s). Can be single Callable[(row_latex_str) -> str] or dict mapping symbol keys to formatters. Applies to the composed entire row (str). Defaults to config.display.row_formatter. |
None |
| debug |
bool | None |
Enable debug mode to print generated LaTeX source code. Defaults to config.display.debug. |
None |
| print_label |
bool | None |
Print labels to console for easy copy-paste reference. Defaults to config.display.print_label. |
None |
| katex |
bool | None |
Enable KaTeX compatibility mode (disables label commands). Defaults to config.display.katex. |
None |
| env_arg |
str | None |
Optional environment argument (e.g., “{2}” for alignat{2}). User provides complete argument string including braces. |
None |
| **kwargs |
Any |
Additional keyword arguments: - language (str): Document-level language override for translations - substitutions (dict): Custom translation dictionary (highest priority) - Other sympy.latex() parameters (e.g., mul_symbol, fold_frac_powers) |
{} |