Tell me more ×
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
2  
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

2 Answers

up vote 9 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

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

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.