Sotanaht
Sotanaht

Reputation: 177

Display LaTeX Equations in-line with terminal

I'm writing a python library to solve various physics equations, and would like to add a method to each equation to display the equation formatted in LaTeX. I thought about using a LaTeX to PNG converter, and then somehow displaying the image in-line with the terminal, which led me to trying to figure out displaying images in the terminal, to no avail. If it makes things simpler, I mainly use IPython, and wouldn't mind if it only worked in that.

If there really is no way to display images in-line, then I could always just display them in a window, but that wouldn't be nearly as clean.

Upvotes: 2

Views: 3988

Answers (2)

Andrew Walker
Andrew Walker

Reputation: 42500

Not exactly a terminal, but the ipython notebook interface is capable of doing this already.

One of the PyCon2012 sprints was on writing notebook converters to and from a number of text formats, so if you can't conveniently do what you're trying to do yet, expect it soon.

Upvotes: 2

Burhan Khalid
Burhan Khalid

Reputation: 174672

This excellent ipython talk from PyCon 2012 has a demonstration of converting equations (algebraic) to their graphical representations and displaying them inline and could possibly help you figure out how to do the same for your physics equations.

Upvotes: 4

Related Questions