Andy,

The code you are looking for is at line 891 in 
src/sage/symbolic/expression.pyx

  
https://github.com/sagemath/sage/blob/master/src/sage/symbolic/expression.pyx#L891

https://github.com/sagemath/sage/blob/master/src/sage/symbolic/expression.pyx#L891

Here is how I found out. Define:
```
sage: y = function('y')(x) # declare y to be a function of x
sage: h = expand(desolve(diff(y, x) + y - 2, y, ics=[0,7]))
sage: h
5*e^(-x) + 2
```

If you know Sage enough, you can guess that the method to get
the LaTeX representation is:
```
sage: h._latex_()
'5 \\, e^{\\left(-x\\right)} + 2'
```

Otherwise, you could try the `?` (get documentation) and `??` (get source
code) on the global function `latex` as follows and track things from there:
```
sage: latex?
sage: latex??
```

You can also get the documentation and source code for `h._latex_`:
```
sage: h._latex_?
sage: h._latex_??
```
and when doing that you get an indication of where the source for the code 
is.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to