8000 Customizable latex for functions · Issue #11428 · sagemath/sage · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Customizable latex for functions #11428
Open
@simon-king-jena

Description

@simon-king-jena

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0