# Looking for a way to have LaTeX source code and its real-time rendering in side-by-side Emacs windows

I am looking for a way to use Emacs as a LaTeX editor that couples a persistent LaTeX source window with an adjacent real-time rendered view of the LaTeX-encoded content, similar to what is available at several StackExchange sites (e.g. see math.stackexchange.com).

The only difference between what I'm hoping to find and what these StackExchange sites support is that I would like to have the source code and the corresponding real-time-rendered1 output living in side-by-side Emacs windows (i.e. the arrangement of windows one gets by running C-x 3, aka M-x split-window-right), while in the SE sites the source code area is placed above the preview area.

I have looked (very superficially!) at various TeX/LaTeX rendering tools for Emacs (e.g. TeXmacs, org-mode, AUCTEX), but none are/do quite2 what I want.

It could be that, contrary to my first impressions, I may be able to do what I want to do with one of the tools mentioned above. If so, please point me to a suitable how-to guide.

Alternatively, is there some other tool, one that I have not yet explored, that can do what I'm after?

1 Here, by "rendered" I mean the fully typeset output one gets if one runs latex path/to/mypaper.tex; dvipdf path/to/mypaper.dvi.

2 My main problem with TeXmacs is that it looks to me like it tries to be a point-clicky completely WYSIWYG MS Word-like equation editor. I.e. their aim seems to be to keep the TeX/LaTeX out-of-sight. I'm sure there are people who like this way of doing things, but I absolutely detest it, to put it mildly. My problem with both org-mode and AUCTEX is that they display the rendered LaTeX "inline", in a way that hides, at least temporarily, the source code. In other words, one can somehow toggle between the source view and the rendered view. I don't find this approach as awful as I find TeXmacs's, but still I find it far less desirable than the approach I described in my post.

• Do you know latex-preview-pane? (available on melpa) Mar 4 at 15:58
• @gigiair: Thank you!!! latex-preview-pane is great! The interaction with it not quite as fluid as the interaction with SE's MathJax interface, but it is definitely adequate for my purposes. I would be glad to accept your proposal as the answer to my question, if you post it as such.
– kjo
Mar 5 at 22:27
• Mar 6 at 20:45

latex-preview-pane on melpa can do that.
You can enable it in a file being edited with AUCTeX by M-x latex-preview-pane RET or for any LaTeX file opened in this mode by placing
(add-hook 'LaTeX-mode-hook #'latex-preview-pane-mode)