You can also tap into the entire Jupyter system using emacs-jupyter [1] which also includes an org-babel component – and it looks like you can preview the LaTeX in Org mode given a few options options [2].<p>[1] <a href="https://github.com/nnicandro/emacs-jupyter" rel="nofollow">https://github.com/nnicandro/emacs-jupyter</a><p>[2] See <a href="https://github.com/nnicandro/emacs-jupyter#a-note-on-using-the-results-header-argument" rel="nofollow">https://github.com/nnicandro/emacs-jupyter#a-note-on-using-t...</a> and <a href="https://github.com/nnicandro/emacs-jupyter/issues/218" rel="nofollow">https://github.com/nnicandro/emacs-jupyter/issues/218</a>
This really makes me want to give SymPy a proper try. And I didn't know about `org-fragtog`, that's really neat!<p>I'm a bit confused about the main idea here: doesn't the usage of `:results raw` mean the output will be inserted multiple times, if the code is re-run? As far as I know `replace` doesn't actually work with `raw`. Would love to be wrong though.
How I wish papers in science and engineering were written in such format (or were created with org-mode source files with code which one could download and play with), where we could preview steps of derivations in some symbolic manipulation program, instead of "after simple transformation we get..."