# Revision history [back]

### Getting LaTeX code from Sage when running %display latex

I typically use

%display latex


at the beginning of all of my worksheets, so that the equations are rendered in LaTeX (when using .display(), for example). However, now I want to copy some of these equations into a LaTeX document, and I can't figure out how to "revert" them back to code. All my view(eq), print(eq), latex(eq.display()) all seem to spit out the rendered tex, or sometimes information about the object, like "rank 2 tensor g".

Is there a way I can do this without removing the display command at the beginning and re-running the sheet?

### Getting LaTeX code from Sage when running %display latex

I typically use

%display latex


at the beginning of all of my worksheets, so that the equations are rendered in LaTeX (when using .display(), for example). However, now I want to copy some of these equations into a LaTeX document, and I can't figure out how to "revert" them back to code. All my view(eq), print(eq), latex(eq.display()) all seem to spit out the rendered tex, or sometimes information about the object, like "rank 2 tensor g".

Is there a way I can do this without removing the display command at the beginning and re-running the sheet?

EDIT: Maybe more info is needed. I'm running Jupyter notebooks, Sage 8.7 on a linux machine. I'm pretty sure I used the Ubuntu binaries in this case to install.