The _latex method was implemented in a wrong way, which didn't allowed the use of a custom printer.
The capability to use custom printer is essential. Think for example to an equation containing multiple
undefined applied functions, f(x, y, z), g(x, y, z), .... We quickly run out of display
space on a Jupyter Notebook cell because (x, y, z) is rendered multiple times. With a custom printer we
can easily hide these repetitions.
The
_latex
method was implemented in a wrong way, which didn't allowed the use of a custom printer. The capability to use custom printer is essential. Think for example to an equation containing multiple undefined applied functions,f(x, y, z), g(x, y, z), ...
. We quickly run out of display space on a Jupyter Notebook cell because(x, y, z)
is rendered multiple times. With a custom printer we can easily hide these repetitions.This PR implements the
def _latex(self, printer)
as pointed out in the documentation: https://docs.sympy.org/latest/modules/printing.htmlThis way allows the use of a custom printer. Tests have been added to assert this behavior.