Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want a similar layout as in SO, I use it currently as my editor but I would like to find such tool under my fingers. I am more vi-prone so having hard time to get preview-latex working with emacs. I don't know whether it is the right tool but I want to see things shortly after typing some long latex equations without compiling cycle. How can I preview LaTeX?

Ps. I am using obsd and ubuntu.

share|improve this question
4  
The most used package for emacs to preview latex is AucTeX (gnu.org/software/auctex/preview-latex.html) –  M. Alaggan May 18 '11 at 3:54

3 Answers 3

up vote 13 down vote accepted

The most common package to preview text in Emacs is Preview TeX, a package now build into AUCTeX

http://gnu.org/software/auctex

It works with both latex and pdflatex. Within a LaTeX buffer, just type C-c C-p C-b, or within the menu do Preview->for buffer.

A simpler, but less effective alternative is to use the X-Symbol package:

http://x-symbol.sourceforge.net/

This one only shows special symbols (such as math operators or greek letters), but not much more than that. This package also does not seem to be developed anymore.

share|improve this answer
    
For the preview to work in my case, I had to disable the pdf-mode. This can be done by: C-c C-t C-p –  Dror Jun 1 '11 at 9:13
    
preview-latex is supposed to work in PDF mode as well. –  user9588 May 12 '12 at 12:25
    
could some #Emacs guru help me to press "C-c C-p C-b" in the right spot? CTRL+c (hands up) CTRL+P (hands up) CTRL+b? I am using Emacs23 from aptitude, now in Debian. I wish videos, researching... –  hhh Oct 13 '12 at 23:19
    
none of this works for me. I get error No file _region_.aux. –  Nasser Feb 22 at 13:06

Sorry, I don't know what SO is, but have you ever heard of latexmk? It re-runs pdftex or whatever every time you save your *.tex-file. Instead of preview I do:

  1. Open Emacs, C-x C-f => new file, type some skeleton of the LaTeX-file including \end{document}, save it (C-x C-s), compile it the first time (C-c C-c RET) and open it in the viewer (again C-c C-c RET).
  2. I open a command window (if you use Linux, you know what I mean, if you use windows, its cmd.exe), navigate into the folder containing my LaTeX-file and type latexmk -pvc -pdf filename.tex Then latexmk compiles my document and repeats that each time I save a new version inside Emacs.

If you employ a pdf-viewer which is able to reload the pdf from harddisk every time it changes (okular, evince, sumatra for windows . . .), you are very close to an instant preview.

Alexander

share|improve this answer
    
This is great. However, in OSX, Preview (the program) does not update / refresh the PDF unless you have it active. I wonder if anyone came with a solution to it! –  user815423426 Mar 15 at 0:11
    
@user815423426 Nobody will see your question here. Please proceed as follows: a) Get a real nickname, user450328402398 is disturbing, sorry | b) search for OSX and latexmk, if no solution => c) ask a new question in this forum. –  Keks Dose Mar 15 at 11:54

Another option is LaTeX Preview Pane. It supports side by side editing and previews of your LaTeX document. It also supports error highlighting in your buffer, similar to flymake.

Emacs Wiki Page: http://www.emacswiki.org/emacs/LaTeXPreviewPane

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.