bug-auctex
[Top][All Lists]

## Re: [Bug-AUCTeX] rel-0-9-1; See http://tinyurl.com/qla6w

 From: Christopher Menzel Subject: Re: [Bug-AUCTeX] rel-0-9-1; See http://tinyurl.com/qla6w Date: Thu, 12 Oct 2006 11:37:41 -0500

I'm not seeing any error icons. The first piece of latex code in the buffer is rendered correctly ("\section*{Introduction}") but nothing
else thereafter.  Everything *seems* to be running properly, I just

only ever see the first graphic in the portion of the document being
previewed (i.e., I get the same result if I try to preview a region



One possible reason for that is that preview-latex can't recognize the GhostScript prompt and so is waiting in vain for the proper moment to
feed it further input.

What output do you get when just calling

gs

on a command line? Is the prompt just
GS>
and nothing else?


Ah, here's a problem -- emacs was calling a version of AFPL
ghostscript that DarwinPorts had installed in /opt/local/bin, which
was looking for X:

515: gs
AFPL Ghostscript 8.54 (2006-05-17)

  This software comes with NO WARRANTY: see the file PUBLIC for
details.
AFPL Ghostscript 8.54: Cannot open X display (null)'.
**** Unable to open the initial device, quitting.

I therefore deactivated this port (which was apparently installed as
a dependency for another DarwinPorts port) so that a call to gs would
run the version that comes with OS X in /usr/local/bin; calling gs
from the command line now brings up a prompt, although one that is
preceded by essentially the msg above:

517: gs
AFPL Ghostscript 8.51 (2005-04-18)

  This software comes with NO WARRANTY: see the file PUBLIC for
details.
GS>


Well, the above should probably not have made much of a problem since
gs is called with a command line setting a device.  One can, if
everything else fails, perhaps use "gsnd" as an executable ("nd"
stands for "no device").



Not sure what you have in mind here, but I tried symlinking "gs" to "gsnd" instead of "gs-noX11", but that simply caused some shell script (presumably pdf2dsc) to hang.


Unfortunately, switching to this flavor of gs did not solve the
problem with preview; however, instead of rendering exactly one
graphic, I now get an error icon at the corresponding point in the
source file:

gs -dOutputFile\=$$_region_.prv/tmp6377-bf/pr1-1.png$$ -q -dSAFER -
dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBits\=4 -
dGraphicsAlphaBits\=4 -sDEVICE\=png16m -r115.257x115.291
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}
stopped{handleerror quit}if}ifelse systemdict /.runandhide known
{{.runandhide}}if stopped{handleerror quit}if count 1 gt{pop/exec
errordict/stackoverflow get exec}if aload pop restore}bind def
(_region_.prv/tmp6377-bf/preview.dsc)(r)file dup dup 0
setfileposition 5084()/SubFileDecode filter cvx exec dup dup 5084
setfileposition 53()/SubFileDecode filter cvx<<>>preview-do
**** Embedded font uses undefined procedure RD
**** Embedded font uses undefined procedure RD
<Repeated many many times, then...>
**** Embedded font uses undefined procedure ND
**** Embedded font uses undefined procedure RD
**** Embedded font uses undefined procedure ND
**** Embedded font uses undefined procedure RD
<Repeated many times>
GS<1>


That looks like "pdf2dsc", which is a shell script using Ghostscript
internally, uses a different version of Ghostscript than your
interactive one, or it uses one which does not work with the script
itself.  Basically, you probably have some version mismatch among
pdf2dsc and gs.  Or your version of gs is not able to find its library
files.



Well, looking at the script, it's just calling "gs" as the executable. And when I execute it from the command line, it generates an error that reports the right gs executable. I looked at an older version associated with an early version of Ghostscript 7 and the only difference was that it called gs by name in an "exec" line whereas the new version first loads "gs" into a variable "GS_EXECUTABLE" which is used on the "exec" line instead.


l.1 \begin{thebibliography}{10}

[942])
\newlabel{tocindent-1}{0pt}
\newlabel{tocindent0}{12.26888pt}
\newlabel{tocindent1}{17.6065pt}
\newlabel{tocindent2}{26.30417pt}
\newlabel{tocindent3}{0pt}
)


As a note aside: the last output here means that the .aux file was
closed before all entries have been written to it, thus having the
last entries appear on screen instead.

This has nothing to do with preview-latex, but might still cause
unexpected results for you at one time.  The rest looks pretty normal:


Preview-LaTeX exited as expected with code 1 at Wed Oct 11 15:44:19
Running Preview-PDF2DSC' with pdf2dsc _region_.pdf _region_.prv/
tmp6377-bf/preview.dsc''

Preview-PDF2DSC finished at Wed Oct 11 15:44:20
Running Preview-Ghostscript' with gs -dOutputFile\=$$_region_.prv/ tmp6377-bf/pr1-\%d.png$$ -q -dSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted
-dTextAlphaBits\=4 -dGraphicsAlphaBits\=4 -sDEVICE\=png16m -
r115.257x115.291''

Preview-Ghostscript finished at Wed Oct 11 15:44:20

gs -h:

Search path:
. : /usr/local/share/ghostscript/8.51/lib :
/usr/local/share/ghostscript/8.51/Resource :
/usr/local/share/ghostscript/fonts


The search path directories mentioned above exist and are filled?



Yes, they are. I just tried upgrading TeX (via Wierda's i-Installer) and ghostscript (back to the version 8.54 that I started with). The problem remains identical to my original description, alas. I can't imagine what I did to cause preview to stop working properly, but it's a bummer.

-chris

`