Open
Description
There should be a way to customize how a function is printed and how it is translated into Latex, as requested on ask-sage.
I suggest, as a first step, to add methods set_name()
and set_latex_name()
that change the value of the cdefined attributes _name
used for printing and _latex_name
used for translation to latex. Then, the following would work:
sage: tan.set_name('tg')
sage: tan
tg
sage: tan.set_latex_name(r'\tg')
sage: latex(tan)
\tg
However, that can really only be the first step. Because, when I did so, I still got
sage: tan(x)
tan(x)
sage: latex(tan(x))
\tan\left(x\right)
Hence, in addition to that, the given latex name should be propagated to expressions.
Component: symbolics
Issue created by migration from https://trac.sagemath.org/ticket/11428