LaTeX forum ⇒ AUCTeXpreview-latex does not show any pictures

Information and discussion about AUCTeX, an integrated LaTeX environment based on GNU Emacs and XEmacs
Posts: 6
Joined: Wed Feb 23, 2011 12:04 pm

preview-latex does not show any pictures

Postby beaver » Wed Feb 23, 2011 12:21 pm

---- This problem has been solved already(see latest reply)! ---

Hi @all,

First of all, i have already searched in various forums and ducomentation files to get rid of the problem, but somehow nothing did solve the problem , so here we go.

I use Windows with GNU Emacs 23.1 installed on the machine and a obviously working auctex running (auctex was installed as in the tutorial by running the "make" and "make install" commands.) PDF Files as well as DVI output files can be generated without any problems. I also have added the necessary lines to the .emacs file as described in the tutorial to load auctex und preview-latex.

The problem arises when i try to get preview pictures rendered in source by preview-latex.
I have the actual Ghostscript (version 9.01) installed and the PATH variable set.
The file used for testing is an unmodified version of "circ.tex".
I alos tried this for different picture types such as PNG, PNM, ... and i have also additionally installed the libpng and zlib into the bin directory of GNU emacs.

The problem is, after running the "preview for document" command i see no preview pictures but "no-entry" error signs in the source code. Clicking with mouse button 3 resuts in the following Post-script error message:

"GSWIN32C.EXE" "-dOutputFile=(circ.prv/tmp2436cuI/pr1-34.png)" "-q" "-dSAFER" "-dNOPAUSE" "-DNOPLATFONTS" "-dPrinted" "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-sDEVICE=png16m" "-r70.5947x70.56"
GS>{DELAYSAFER{.setsafe}if}stopped pop/.preview-BP currentpagedevice/BeginPage get dup null eq{pop{pop}bind}if def<</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get 1 ne or{.preview-BP }{pop}ifelse}bind/PageSize[1 1]>>setpagedevice/preview-do{[count 3 roll save]3 1 roll dup length 0 eq{pop}{setpagedevice}{ifelse .runandhide}stopped{handleerror quit}if aload pop restore}bind def [(circ.prv/tmp2436cuI/preview.dsc)(r)file]aload exch dup 0 setfileposition 2755()/SubFileDecode filter cvx .runandhide aload pop dup dup 3859 setfileposition 54()/SubFileDecode filter cvx<<>>preview-do
Error: /typecheck in --setfileposition--
Operand stack:
--nostringval-- (circ.prv/tmp2436cuI/preview.dsc) (r) (r) (r) 5580 5580 5580 5526 5526 5526 5474 5474 5474 5421 5421 5421 5368 5368 5368 5312 5312 5312 5258 5258 5258 5204 5204 5204 5148 5148 5148 5091 5091 5091 5034 5034 5034 4981 4981 4981 4928 4928 4928 4875 4875 4875 4822 4822 4822 4770 4770 4770 4717 4717 4717 4665 4665 4665 4611 4611 4611 4557 4557 4557 4504 4504 4504 4451 4451 4451 4397 4397 4397 4343 4343 4343 4289 4289 4289 4235 4235 4235 4182 4182 4182 4128 4128 4128 4075 4075 4075 4019 4019 4019 3966 3966 3966 3913 3913 3913 3859
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- %loop_continue --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1164/1684(ro)(G)-- --dict:0/20(G)-- --dict:79/200(L)--
Current allocation mode is local
Current file position is 29

Compiling process itself ends with the following message:

Preview-LaTeX exited as expected with code 1 at Wed Feb 23 11:18:00
Running `Preview-PDF2DSC' with ``pdf2dsc "circ".pdf "circ.prv/tmp24362CV"/preview.dsc''

Preview-PDF2DSC finished at Wed Feb 23 11:18:00
Running `Preview-Ghostscript' with ``"GSWIN32C.EXE" "-dOutputFile=(circ.prv/tmp24362CV/pr1-%d.png)" "-q" "-dSAFER" "-dNOPAUSE" "-DNOPLATFONTS" "-dPrinted" "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-sDEVICE=png16m" "-r70.5947x70.56"''

Preview-Ghostscript finished at Wed Feb 23 11:18:09

Unfortunately, i have no idea, what´s really going wrong here, so maybe someone can lend a hand? ;-)

Thanks in advance,
Last edited by beaver on Fri Feb 25, 2011 10:27 am, edited 2 times in total.

User avatar
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

Postby shadgrind » Thu Feb 24, 2011 11:47 am

It could be this bug with the preview.el file in recent versions of Auctex. Though that bug report is for Fedora, there have been reports of the same problem in other OSes. The procedure in the comment #2 in the first link worked for me; you should be able to do something similar in Windows.
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2

Posts: 6
Joined: Wed Feb 23, 2011 12:04 pm

Postby beaver » Thu Feb 24, 2011 4:05 pm


Thank you very much for your reply and the hint with the bug.

Re- installing the actual svn-snapshot of auctex solved the problem.
Now i get nice preview rendering also with GS 9.01

Kind regards!

User avatar
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Thu Feb 24, 2011 7:26 pm

beaver wrote:[…] Re- installing the actual svn-snapshot of auctex solved the problem. […]

Then please mark the topic (not the last post) accordingly.

Best regards and welcome to the board
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Posts: 4
Joined: Thu Feb 24, 2011 6:27 pm

Postby gsmm » Tue Apr 12, 2011 3:25 pm

I downloaded the the file,

and followed the instructions for installation. But still I get the same error message posted above. I am using the latest gs9.02.

Am I using the latest development version of the auctex? If not, where do I get the latest svn snapshot of the auctex?


Posts: 4
Joined: Thu Feb 24, 2011 6:27 pm

Postby gsmm » Tue Apr 12, 2011 4:13 pm


I got the latex auctex source from ... ent.tar.gz

I compiled and installed afresh. Preview now works fine.

Thanks for the input on this.


Posts: 17
Joined: Wed Apr 21, 2010 6:35 pm

Postby spinner » Wed May 25, 2011 5:08 am

I'm new to emacs and Auctex. After spending many hours trying to get preview working, I came across this thread for the solution.

Downgrading from Ghostscript v. 9.02 to v. 8.71 worked for me.

My set-up:
GNU Emacs 23.3.1
Auctex 11.86-e23.3-msw (precompiled)

I also discovered a second problem that the LaTex hyperref package was causing my Auctex preview to not function. Found two alternative solutions. First, switch Auctex to Tex-PDF mode C-c C-t C-p or by menu Command\Texing Options. Second, comment out the hyperref package. ... bug/524961

Return to “AUCTeX”

Who is online

Users browsing this forum: No registered users and 2 guests