I would like to debug the latex printing of an expression that ambiguous.
To reproduce it:
t = var('t')
x = function('x')(t)
latex( diff(x,t)^2 )
This produces ambiguous output, essentially:
partial_t x^2
instead of
(partial_t x)^2
I have tried:
from sage.misc.trace import trace
trace("latex( diff(x,t)^2 )")
but I can't understand in which .py file the translation of "diff" occurs. As I understand the source code, there should be a _latex_(self) for every object or method to display latex code, but I can't seem to find it here.
Any help is greatly appreciated.