/[auctex]/auctex/preview/preview.el
ViewVC logotype

Diff of /auctex/preview/preview.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.251 by angeli, Mon Apr 11 18:38:10 2005 UTC revision 1.252 by dak, Tue Apr 12 15:12:39 2005 UTC
# Line 702  SETUP may contain a parser setup functio Line 702  SETUP may contain a parser setup functio
702            preview-gs-init-string            preview-gs-init-string
703            (format "{DELAYSAFER{.setsafe}if}stopped pop\            (format "{DELAYSAFER{.setsafe}if}stopped pop\
704  /.preview-BP currentpagedevice/BeginPage get dup \  /.preview-BP currentpagedevice/BeginPage get dup \
705  null eq {pop{pop}bind}if def \  null eq {pop{pop}bind}if def\
706  <</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get 1 ne or\  <</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get 1 ne or\
707  {.preview-BP %s}{pop}ifelse}bind/PageSize[1 1]>>setpagedevice\  {.preview-BP %s}{pop}ifelse}bind/PageSize[1 1]>>setpagedevice\
708  /preview-do{[count 3 roll save]3 1 roll dup length 0 eq\  /preview-do{[count 3 roll save]3 1 roll dup length 0 eq\
# Line 721  Conversion from Emacs color numbers (0 t Line 721  Conversion from Emacs color numbers (0 t
721  to Ghostscript floats."  to Ghostscript floats."
722    (format "%g" (/ value 65535.0)))    (format "%g" (/ value 65535.0)))
723    
724    (defun preview-pdf-color-string (colors)
725      "Return a string that patches PDF foreground color to work properly."
726      ;; Actually, this is rather brutal.  It will only be invoked in
727      ;; cases, however, where previously it was not expected that
728      ;; anything readable turned up, anyway.
729      (let ((fg (aref colors 1)))
730        (if fg
731            (concat
732             "/GS_PDF_ProcSet GS_PDF_ProcSet dup maxlength dict copy dup begin\
733    /graphicsbeginpage{//graphicsbeginpage exec "
734             (mapconcat #'preview-gs-color-value fg " ")
735             " 3 copy rg RG}bind store end readonly store "))))
736    
737  (defun preview-gs-color-string (colors)  (defun preview-gs-color-string (colors)
738    "Return a string setting up colors"    "Return a string setting up colors"
739    (let ((bg (aref colors 0))    (let ((bg (aref colors 0))
# Line 874  The usual PROCESS and COMMAND arguments Line 887  The usual PROCESS and COMMAND arguments
887          (cond ((eq status 'exit)          (cond ((eq status 'exit)
888                 (delete-process process)                 (delete-process process)
889                 (setq TeX-sentinel-function nil)                 (setq TeX-sentinel-function nil)
890                   (setq preview-gs-init-string
891                         (concat preview-gs-init-string
892                                 (preview-pdf-color-string preview-colors)))
893                 (preview-prepare-fast-conversion)                 (preview-prepare-fast-conversion)
894                 (when gsstart                 (when gsstart
895                   (if preview-gs-queue                   (if preview-gs-queue

Legend:
Removed from v.1.251  
changed lines
  Added in v.1.252

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26