[OS X Emacs] Re: Preview-latex errors

Dave Burnham david.j.burnham at gmail.com
Sat Nov 29 18:36:46 EST 2008


Thanks for the help. I've made some progress, but it's still not fully
working yet.

I think that most of the problems are related to preview-latex being
able to find the programs it needs. As mentioned before, I had to
modify PATH in my .emacs so that AUCTeX could find latex, gs, and
their friends. However, it seems that this doesn't fix
preview-latex. I had to set preview-gs-command to the full path
(/usr/local/bin/gs) to make it work. Not sure how I missed this

Two issues remain:

1) Running preview-document still fails with the "LaTeX found no
preview images" error. However, preview-buffer, preview-section,
etc. work fine.

2) If I switch AUCTeX to use PDFLaTeX (C-c C-t C-p) I get a
GhostScript errors for all of the places where I should see
preview-images. I've attached a sample error at the end of this
message. I think the relevant line is "Error: /typecheck in
--setmatrix--" but I know very little about GS. I can live without
PDFLaTeX for the moment, but eventually I'd like to get it working.

It turns out that doc-view suffers from the same problems with the
PATH. I also had to specify the full paths to all the executables
needed by doc-view to make it work.

I'm running Panther 10.5.5 on an Intel Mac.


-dOutputFile\=\(_region_.prv/tmp3165709c/pr102-1.png\) -q -dNOPAUSE
-DNOPLATFONTS -dPrinted -dTextAlphaBits\=4 -dGraphicsAlphaBits\=4
-dSAFER -sDEVICE\=png16m -r110.557x110.613

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 0.996109 0.996109 0.996109 0.996109
setrgbcolor clippath fill 0 0 0 0.996109
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 /GS_PDF_ProcSet GS_PDF_ProcSet dup
maxlength dict copy dup begin/graphicsbeginpage{//graphicsbeginpage
exec 0 0 0 0.996109 3 copy rg RG}bind store end readonly store
[(_region_.prv/tmp3165709c/preview.dsc)(r)file]aload exch dup 0
setfileposition 2756()/SubFileDecode filter cvx .runandhide aload pop
dup dup 2809 setfileposition 53()/SubFileDecode filter

Error: /typecheck in --setmatrix--
Operand stack:
   --dict:6/15(L)--   --nostringval--   0
Execution stack:

   %interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- --nostringval--
%loop_continue 1785 2 3 %oparray_pop --nostringval-- --nostringval--
false 1 %stopped_push .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- --nostringval-- false
1 %stopped_push 1148 --nostringval-- %end_runandhide --nostringval--
--nostringval-- 1776 3 8 %oparray_pop --nostringval-- Dictionary
stack: --dict:1152/1684(ro)(G)-- --dict:1/20(G)-- --dict:77/200(L)--
--dict:108/127(ro)(L)-- --dict:275/300(ro)(G)-- --dict:21/25(L)--
--dict:4/6(L)-- --dict:20/20(L)-- Current allocation mode is local
Last OS error: 2

Preview-Ghostscript finished

More information about the MacOSX-Emacs mailing list