I tried to get into jupyter the other day, but there's no native way to reference python variables in markdown cells. This seems like an insanely huge oversight, being able to include the results of calculations within text and TeX equations would be half the utility of the thing...
Huh, you'd think with the prior art [1], it would have this capability. I haven't tried jupyter, but I use and rely on Org which seems like it satisfies the same need.
R markdown is able to evaluate expressions inline outside of code blocks as well.
It’s possible, though not quite as clean as you’d like:
from IPython.display import display, Markdown as md
display(md(f'*pi = {math.pi}*'))
Tried that, it works well for simple equations but python's string escape character is the same as LaTeX's control character for math objects (\frac{}{}, etc). Doing anything beyond the simplest of equations becomes ridiculously tedious.