I’m looking for a way to render astropy
variables inside LaTeX strings within an IPython notebook. For example, given a simple premise,
from astropy.constants import c import astropy.units as u from astropy import log
the speed of light is beautifully rendered by default as:
by simply typing it in the ipython prompt. Now, what if I would like to embed this in a string? How to hop on the same rendering train already used by astropy to print an example string like 'Speed limit: {}'.format(c)
?
Everything I’ve tried so far, including variations of LaTeX-formatted strings, only displays an ASCII string as an output: