I am trying to generate previews using AUCTeX on Emacs GUI in my tex buffer but I get a "stop" sign error everywhere. See example below:
When I click on the stop sign and select "View Error" I get the following error message
/Library/TeX/texbin/rungs -dOutputFile\=\(_region_.prv/tmpUN6xxH/pr1-4.png\) -q -dDELAYSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBits\=4 -dGraphicsAlphaBits\=4 -sDEVICE\=png16m -r101.002x101.133
GS>{<</PermitFileReading[(_region_.pdf)(_region_.prv/tmpUN6xxH/preview.dsc)]>> setuserparams .locksafe} stopped pop {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 0.246098 0.246098 0.246098 setrgbcolor clippath fill 0.859388 0.859388 0.796887 setrgbcolor}{pop}ifelse}bind/PageSize[1 1]>>setpagedevice/preview-do{/.preview-ST[count 4 roll save]def dup length 0 eq{pop}{setpagedevice}{ifelse exec}stopped{handleerror quit}if .preview-ST aload pop restore}bind def /GS_PDF_ProcSet GS_PDF_ProcSet dup maxlength dict copy dup begin/graphicsbeginpage{//graphicsbeginpage exec 0.859388 0.859388 0.796887 3 copy rg RG}bind store end readonly store (_region_.prv/tmpUN6xxH/preview.dsc)(r)file /.preview-ST 1 index def dup 0 setfileposition 2677()/SubFileDecode filter cvx exec .preview-ST dup dup 5840 setfileposition 54()/SubFileDecode filter cvx<<>>preview-do
Error: /typecheck in --setfileposition--
Operand stack:
GS_PDF_ProcSet GS_PDF_ProcSet GS_PDF_ProcSet 5946 5946 5946 5894 5894 5894 5840
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:742/1123(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Current file position is 29
GS<10>
Additional information that may help:
- I use
Emacs 26.3
(installed with Homebrew on Mac OS X) and I have installedAUCTeX 12.1.2
through MELPA. I have also installedghostscript 9.50
with Homebrew. - It works fine if I try to compile the TeX file or export the PDF
- I have looked at similar questions from a couple of years ago and it sounds like this was a bug in ghostscript. From reading this question, it sounds like a fix has been added to ghostscript but I still have the error (Can not generate Preview by AUCTeX)
- I have also read about modifying the
Preview GS Options
but it didn't work either.