uconf.core.display

Display helpers shared by custom Sage element classes.

Functions

latex_linear_combination(element, term_latex)

Format a module element as a LaTeX linear combination.

uconf.core.display.latex_linear_combination(element, term_latex)[source]

Format a module element as a LaTeX linear combination.

Parameters:
  • element – A Sage free-module element with iterable (basis, coeff) terms.

  • term_latex (Callable[[Any], str]) – Callable mapping one basis key to a LaTeX term string without outer $...$.

Return type:

str