I'm learning Emacs and I was reading the mighty LaTeX Editors/IDEs, where it says that Emacs has a "built-in output viewer". However I can't seem to find it.

According to my understanding, a "built-in output viewer" is a previewer like the one we have in TeXmaker, i.e. a pdf viewer embedded into the IDE that shows the resulting pdf.

Is there something similar in Emacs?

Up to now I've found the following "output viewers":

  1. AUCTeX preview, which lets you preview code snippets like equations, figures, etc. but not the entire pdf;
  2. latex-preview-pane, which implements a modern previewer similar to that we have in TeXmaker, etc. but is not built-in (you need to install a package to get it) and a bit buggy.

So, am I missing something here? What is the meaning of "built-in output viewer" in Emacs?

  • 2
    May be doc-view?
    – user11232
    Nov 26, 2014 at 10:15
  • could you elaborate?
    – skey
    Nov 26, 2014 at 10:31
  • 1
    Nah! I am not an emacs guy. But certainly some emacs geeks will. Please wait.
    – user11232
    Nov 26, 2014 at 10:32
  • 1
    Doc-view mode requires ghostscript, and some more gismos if using Windows (e.g., certain *.dll files). This permits viewing a *.pdf file (converted to *.png images) in an Emacs buffer without leaving Emacs. The images are not high quality or very clear for small text, but are sufficient for many situations.
    – lawlist
    Nov 27, 2014 at 21:26
  • Maybe you mean preview-latex which is installed with AucTeX. Check the corresponding commands in the preview menu. Aug 17, 2015 at 5:29

3 Answers 3


Emacs has a built-in DVI, PS, PDF, Open document, and Microsoft Office document viewer: DocView.

There is also a nice third-party embedded PDF viewer: PDF Tools. Differently from DocView, pages are not pre-rendered by e.g. ghostscript and stored in the file-system, but rather created on-demand and stored in memory. In addition, PDF Tools has forward and backward search accurate at word level, which is pretty powerful if you use this feature a lot.


If you are on Linux:

  • when you are on your TeX file, you can compile it with M-x compile writing the wanted command.
  • open the ps/pdf produced as any other file. (C-x C-f file_name.pdf/ps)

If you are on Windows:

  • follow the intruction on emacswiki to install a ps/pdf viewer
  • open the ps/pdf produced as any other file. (C-x C-f file_name.pdf/ps)

If you are on Mac OS:

  • probably the same as Linux but not sure.

As far as I know, you can't view the output as a pdf within emacs. Commands that show the pdf (such as C-c C-a) open an external viewer.

Previews work by superposing png images to parts of the source such as math and figures that are most different in the code and the output. There are a few commands for them. For example, hit C-c C-p C-r to show a preview for the selected text (clear out with C-c C-p C-c C-r). Look up in preview-latex's manual for more on this.

To make the code a bit cleaner you may also fold markup commands: type C-c C-o C-b while in TeX-fold-mode (C-c C-o C-f). To unfold, disable TeX-fold mode (C-c C-o C-f again) or do C-c C-o b.

Lastly, you can compile compile just the selected portion of a document with C-c C-r and view it as usual (C-c C-v).


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .