Skip to content

Troubleshooting

B.5.1 Preview causes all sort of strange error messages

When running preview-latex and taking a look at either log file or terminal output, lots of messages like

bash
! Preview: Snippet 3 started.
<-><->
      
l.52 \item Sie lassen sich als Funktion $
                                         y = f(x)$ darstellen.
! Preview: Snippet 3 ended.(491520+163840x2494310).
<-><->
      
l.52 \item Sie lassen sich als Funktion $y = f(x)$
                                                   darstellen.

appear (previous versions generated messages looking even more like errors). Those are not real errors (as will be noted in the log file). Or rather, while they are really TeX error messages, they are intentional. This currently is the only reliable way to pass the information from the LaTeX run of preview-latex to its Emacs part about where the previews originated in the source text. Since they are actual errors, you will also get AUCTeX to state

Preview-LaTeX exited as expected with code 1 at Wed Sep  4 17:03:30

after the LaTeX run in the run buffer. This merely indicates that errors were present, and errors will always be present when preview-latex is operating. There might be also real errors, so in case of doubt, look for them explicitly in either run buffer or the resulting .log file.

B.5.2 Why do my DVI and PDF output files vanish?

In order to produce the preview images preview-latex runs LaTeX on the master or region file. The resulting DVI or PDF file can happen to have the same name as the output file of a regular LaTeX run. So the regular output file gets overwritten and is subsequently deleted by preview-latex.

B.5.3 My output file suddenly only contains preview images?!

As mentioned in the previews FAQ entry, preview-latex might use the file name of the original output file for the creation of preview images. If the original output file is being displayed with a viewer when this happens, you might see strange effects depending on the viewer, e.g. a message about the file being corrupted or the display of all the preview images instead of your typeset document. (Also see Customization.)