[GiNaC-list] print methods for functions
Luke
hazelnusse at gmail.com
Tue May 3 22:56:08 CEST 2011
I would like to customize the latex printing of sin, cos, and tan to
be more concise. For example, for an expression like sin(delta),
instead of the default:
\sin(\delta)
I would like it to print:
s_{\delta}
I read section 6.3.2 in the documentation about print methods for
functions, in which there was an example for the "abs()" function. I
am confused about what needs to go in abs_eval and abs_evalf -- I
tried to run that example and wasn't able to get it to compile.
If I only want to change the latex printing for sin/cos/tan, but leave
everything else the same as the default, what approach should I take?
Should I just copy the code from inifcns_trans.cpp into my own, or is
there a way to call REGISTER_FUNCTION in a simple way that only
modifies the latex printing?
~Luke
More information about the GiNaC-list
mailing list