CVS-1.224; pdftex-mode not displaying previews

"Bj?rn Pedersen" <[email protected]> Sat, 5 Feb 2005 11:28:44 +0100
Newsgroups gmane.emacs.latex.preview.devel
Message-ID <200502051028.j15ASign004773__30541.1032670692$1107602245$gmane$org@bjoern.home.de>
Remember to cover the basics.  Including a minimal LaTeX example
file exhibiting the problem might help.

This is an update to previous reports. I have found the reason for my problems
in getting previews in pdftexlatex-mode:
teh file preview.dsc generated by pdf2dsc starts like: 
%%BeginSetup
(circ.pdf) (r) file { DELAYSAFER { .setsafe } if } stopped pop
 pdfopen begin
%%EndSetup
and  is located in the preview temp dir

runnig gs on this file results in the following  error:

AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefinedfilename in --file--
Operand stack:
   (circ.pdf)   (r)

manually changing preview.dsc to contain:

%%BeginSetup
(../../circ.pdf) (r) file { DELAYSAFER { .setsafe } if } stopped pop
 pdfopen begin
%%EndSetup

and running ps-execute-buffer generates the preview images. 

So, solutions to the problem: generate the preview-pdf in the temp dir (or move it there after generation...

or put preview.dsc in the top  dir

or patch preview.dsc before running gs.

Regards Björn


Emacs  : XEmacs 21.4 (patch 15) "Security Through Obscurity" [Lucid] (i686-pc-linux, Mule) of Sat May 22 2004 on bjoern
Package: CVS-1.224

current state:
==============

Output from running `/usr/local/bin/gs -h':
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
Most frequently used switches: (you can use # in place of =)
 -dNOPAUSE           no pause after page   | -q       `quiet', fewer messages
 -g<width>x<height>  page size in pixels   | -r<res>  pixels/inch resolution
 -sDEVICE=<devname>  select device         | -dBATCH  exit after last file
 -sOutputFile=<file> select output file: - for stdout, |command for pipe,
                                         embed %d or %ld for page #
Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PostScriptLevel3 PDF
Default output device: x11
Available devices:
   bbox bit bitcmyk bitrgb bj10e bj200 bjc600 bjc800 bmp16 bmp16m bmp256
   bmp32b bmpgray bmpmono bmpsep1 bmpsep8 cdeskjet cdj550 cdjcolor cdjmono
   cljet5 cljet5c deskjet devicen djet500 epswrite faxg3 faxg32d faxg4 ijs
   jpeg jpeggray laserjet lj5gray lj5mono ljet2p ljet3 ljet3d ljet4 ljet4d
   ljetplus nullpage pbm pbmraw pcx16 pcx24b pcx256 pcxcmyk pcxgray pcxmono
   pdfwrite pgm pgmraw pgnm pgnmraw pj pjxl pjxl300 pkm pkmraw pksm pksmraw
   png16 png16m png256 pngalpha pnggray pngmono pnm pnmraw ppm ppmraw
   psdcmyk psdrgb psgray psmono psrgb pswrite pxlcolor pxlmono spotcmyk
   tiff12nc tiff24nc tiffcrle tiffg3 tiffg32d tiffg4 tifflzw tiffpack
   uniprint x11 x11alpha x11cmyk x11gray2 x11gray4 x11mono xcf
Search path:
   . : /usr/share/lilypond/ps : /usr/share/lilypond/ps :
   /usr/local/share/ghostscript/8.14/lib :
   /usr/local/share/ghostscript/8.14/Resource :
   /usr/local/share/ghostscript/fonts
For more information, see /usr/local/share/ghostscript/8.14/doc/Use.htm.
Report bugs to [email protected], using the form in Bug-form.htm.

(setq
 AUC-TeX-version "CVS-5.482"
 LaTeX-command-style '(("" "%(PDF)%(latex) %S%(PDFout)"))
 preview-image-type 'png
 preview-image-creators '((dvipng
			   (open preview-gs-open preview-dvipng-process-setup)
			   (place preview-gs-place)
			   (close preview-dvipng-close))
			  (png (open preview-gs-open) (place preview-gs-place)
			   (close preview-gs-close))
			  (jpeg (open preview-gs-open)
			   (place preview-gs-place) (close preview-gs-close))
			  (pnm (open preview-gs-open) (place preview-gs-place)
			   (close preview-gs-close))
			  (tiff (open preview-gs-open)
			   (place preview-gs-place) (close preview-gs-close))
			  )
 preview-dvipng-image-type 'png
 preview-dvipng-command "dvipng -picky -noghostscript %d -o \"%m/prev%%03d.png\""
 preview-pdf2dsc-command "pdf2dsc %s.pdf %m/preview.dsc"
 preview-gs-command "/usr/local/bin/gs"
 preview-gs-options '("-q" "-dSAFER" "-dDELAYSAFER" "-dNOPAUSE"
		      "-DNOPLATFONTS" "-dPrinted" "-dTextAlphaBits=4"
		      "-dGraphicsAlphaBits=4")
 preview-gs-image-type-alist '((png png "-sDEVICE=png16m")
			       (dvipng png "-sDEVICE=png16m")
			       (jpeg jpeg "-sDEVICE=jpeg")
			       (pnm pbm "-sDEVICE=pnmraw")
			       (tiff tiff "-sDEVICE=tiff12nc"))
 preview-fast-conversion t
 preview-prefer-TeX-bb nil
 preview-dvips-command "dvips -Pwww -i -E %d -o %m/preview.000"
 preview-fast-dvips-command "dvips -Pwww %d -o %m/preview.ps"
 preview-scale-function 'preview-scale-from-face
 preview-LaTeX-command '("%l \"\\nonstopmode\\PassOptionsToPackage{"
			 ("," . preview-required-option-list)
			 "}{preview}\\AtBeginDocument{\\ifx\\ifPreview\\undefined" preview-default-preamble "\\fi}\\input{%t}\"")
 preview-required-option-list '("active" "tightpage" "auctex")
 preview-default-option-list '("displaymath" "floats" "graphics" "textmath"
			       "sections" "footnotes")
 preview-default-preamble '("\\RequirePackage["
			    ("," . preview-default-option-list)
			    "]{preview}[2004/11/05]")
 preview-LaTeX-command-replacements nil
 preview-dump-replacements '(preview-LaTeX-command-replacements
			     ("\\`\\([^ ]+\\)\\(\\( -\\([^ \"]\\|\"[^\"]*\"\\)*\\)*\\)\\(.*\\)\\'" "\\1 -ini \"&\\1\" " preview-format-name ".ini \\5")
			     )
 preview-undump-replacements '(("\\`\\([^ ]+\\)\\(\\( -\\([^ \"]\\|\"[^\"]*\"\\)*\\)*\\).*\\input{\\([^}]*\\)}.*\\'" "\\1 \"&" preview-format-name "\" \\5")
			       )
 preview-auto-cache-preamble 'ask
 )


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
preview-latex-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/preview-latex-bugs


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl