auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] pdfsizeopt does not work when called from Emacs, but works


From: AW
Subject: Re: [AUCTeX] pdfsizeopt does not work when called from Emacs, but works when called from cmd.exe
Date: Wed, 02 Aug 2017 15:44:49 +0200

Am Mittwoch, 2. August 2017, 15:04:30 CEST schrieb address@hidden:
> Hi Alexander,
> 
> Sorry to hear it wasn't of any help. To be honest I don't know how Emacs
> finds ghostscript for general purposes. For the preview function in AUCTeX
> I set this variable manually:
> 
> (setq preview-gs-command "c:\\PROGRA~1\\GS\\BIN\\GSWIN32C.EXE")
> 
> and for Emacs' doc-view functionality I set
> 
> (setq doc-view-ghostscript-program "gswin32.exe")
> 
> Both work – and both are necessary, so it seems that my Emacs (on Windows 7)
> isn't able to find GS by itself either...

Hi Joe,

I even set the full path to gswin32c.exe in my .emacs.

I have to add that the pdfsizeopt worked for many years, even under Windows 
8.1 I had to install freshly and run into this issue.

By the way, in my .emacs I set up a shortcut this way:

(eval-after-load "tex"
'(add-to-list 'TeX-command-list
'("pdfsizeopt" "pdfsizeopt.exe %s.pdf %s.pdf" TeX-run-command t t :help "Run 
pdfsizeopt.exe") t))

But as mentioned, I did that for years...

-- 
Regards,

Alexander


> On 2017-08-02 14:54, AW wrote:
> > Am Mittwoch, 2. August 2017, 13:10:58 CEST schrieb address@hidden:
> >> Hi Alexander,
> >> 
> >> Does your PATH environment variable contain the path to ghostscript? I
> >> see
> >> that when you run from cmd.exe the system is prepending
> >> "C:\pdfsizeopt\pdfsizeopt_win32exec" to PATH, and then it's using the
> >> ghostscript that's in one subdirectory there, rather than the system's
> >> ghostscript.
> >> 
> >> Cheers,
> >> J
> > 
> > Hi Joe!
> > 
> > When I'm running from cmd.exe either or from Emacs, in both cases there is
> > line
> > 
> > | info: prepending to PATH: C:\pdfsizeopt\pdfsizeopt_win32exec
> > 
> > There is another GS, it resides in the msys64 system. I added the /bin
> > path to the PATH and tried again, no success.
> > 
> > And furthermore: if pdfsizeopt is called by Emacs, python is being found:
> > | Traceback (most recent call last):
> > |    File "C:\pdfsizeopt\pdfsizeopt_win32exec\python26.zip\runpy.py", line
> > |    122,
> > 
> > And if pdfsizeopt finds python, why not gswin32c.exe?
> > 
> > Next idea: what if I rename the gs-exes of msys64? Maybe Emacs, depending
> > on mingw64, asks the mings64 Ghostscript installation? So I renamed the
> > gs-exes there, but no success.
> > 
> > What does Emacs do differently from cmd.exe?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]