I have emacs+gtk installed on Ubuntu11. I'm just new to Auctex but very interested in it. When completed my .tex document, command C-c,C-c compiles successfully. But repeating C-c,C-c yields option

Command:(default View)

So I prompt the default, which further yields

View command: xdvi myfile.tex.

It opens a new window. But I want it to be shown in a split window of myfile.tex so that I can edit and preview simultaneously. Any way to suppress the new window? Thanks.


1 Answer 1


No such thing is available. While it is true that Emacs can by now display PDF files in a separate window, that is not really feasible for anything but quite small documents, like 1 or 2 pages. You are missing a lot of features from a proper PDF viewer, though, and it has considerable memory impact depending on document size. AUCTeX has no interface to that functionality, though you can just load the PDF file into a separate split window with C-x 4 f.

What AUCTeX does offer is preview-latex: this will not create a split window. Instead, selected graphical elements (typically images and math) will be replaced right in the buffer with graphics, and you can run the cursor (left/right) into them in order to get the source text back. While its use is more limited than that of a full-bodied preview (for example, it is useless for checking the vertical page layout), access is much more direct and intuitive than even a split window. Try C-c C-p C-p and/or the Preview menu. It is conceivable that you need to follow installation instructions for making it available, depending on the version of AUCTeX installed on your system.

You must log in to answer this question.

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