[OS X Emacs] latex + dvips + ps2pdf from Aquamacs

Ettore Aldrovandi ealdrov at math.fsu.edu
Sun Nov 1 16:17:55 EST 2020


Hi Roussanka,

> On Nov 1, 2020, at 15:43, Roussanka Loukanova <rl.stpuu at gmail.com> wrote:
> 
> With José's suggestion for running the command getenv:
> M-x getenv
> PATH
> /usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/Library/TeX/texbin:/usr/local/texlive/2020/bin
> 

The path form Aquamacs is a bit strange. I’m puzzled: I don’t see /usr/local/bin in it. Aquamacs should add to the path, not replace it, I think. 

To understand what’s going on, what is the PATH value in Terminal, and what is your shell?

echo $PATH
echo $SHELL

Bettery yet, run:

dscl . -read /Users/<yourusername> UserShell

> Ghostscript is located in:
> /usr/local/share/ghostscript
> 
> I had this problem with ps2pdf when I had ghostscript 9.50. Yesterday, I downloaded and installed ghostscript 9.53.3, from Dick Koch:
> 
> https://pages.uoregon.edu/koch/ <https://pages.uoregon.edu/koch/>
> 
> But I am still puzzled why ps2pdf is getting reached and running ok in Terminal.

In both cases, even with Dick Koch’s version of Ghostscript, the binary should be in /usr/local/bin. If you run

which gs

or 

type gs

in your Terminal we can confirm it. (I can’t because I install ghostscript in /opt myself.) If that’s the case, with the path that Aquamacs reports, it can’t find ps2pdf.

—Ettore

> I always have been installing TexLive from MacTeX:
> http://www.tug.org/mactex/ <http://www.tug.org/mactex/>
> 
> Best Regards,
> Roussanka
> 
> On Sun, Nov 1, 2020 at 9:26 PM José Miguel Figueroa-O'Farrill <j.m.figueroa at ed.ac.uk <mailto:j.m.figueroa at ed.ac.uk>> wrote:
> Hi,
> 
> If you just do M-x getenv it will prompt for the variable and then you can simply type PATH.  You can then go the *Messages* buffer to read the (typically, lengthy) path.
> 
> Cheers,
>         José
> 
> 
> > On 1 Nov 2020, at 20:17, Roussanka Loukanova <rl.stpuu at gmail.com <mailto:rl.stpuu at gmail.com>> wrote:
> > 
> > Hi,
> > 
> > I tried the following, in the *scratch* buffer of Aquamacs, but they do not produce anything visible by me in "scratch":
> > 
> > (getenv "PATH") ctrl-J
> > getenv "PATH" ctrl-J
> > getenv("PATH")ctrl-J
> > 
> > The "man getenv" gives the following syntax:
> > getenv(const char *name);
> > 
> > The problem continues from Aquamacs. But ps2pdf runs ok from Terminal.
> > 
> > Best Regards,
> > Roussanka
> > 
> > On Sun, Nov 1, 2020 at 7:16 PM Ettore Aldrovandi <ealdrov at math.fsu.edu <mailto:ealdrov at math.fsu.edu>> wrote:
> > Hi John,
> > 
> > thanks for the clarifications.
> > 
> > > On Nov 1, 2020, at 12:44, John Wroclawski <jtw at csail.mit.edu <mailto:jtw at csail.mit.edu>> wrote:
> > >
> > >> On Nov 1, 2020, at 12:30 PM, Ettore Aldrovandi <ealdrov at math.fsu.edu <mailto:ealdrov at math.fsu.edu>> wrote:
> > >>
> > >> what Pete says is correct. (It’s indeed great to see him back on the list.) However, if you install TeX Live via MacTex, the installer takes care of putting the appropriate item in /etc/paths.d, so that shouldn’t be the issue, as you say.
> > >
> > > Without speculating at all on what’s happening to Roussanka, it might be worth noting in passing that
> > >
> > > - ps2pdf is part of ghostscript, not TeXLive, and normally lives in /usr/local/bin. (so the TeXLive /etc/paths.d file isn’t relevant to this particular program..)
> > 
> > Yes, you are right. Even better. The path is synthesized by calling /usr/libexec/path_helper, which takes care of putting /usr/local/bin in it before looking into /etc/paths.d.  This happens in both bash and zsh (through different startup files, of course).
> > 
> > > - ps2pdf is also typically a chain of three or four shell scripts before it gets to actually running gs, and I suppose it could possibly have been broken by the switch to zsh (running 10.14 here, can’t check..)
> > 
> > Eventually they all call ps2pdfwr, which calls gs. But due to the way bash and zsh construct the path, the result should be the same.  Bash would call path_helper in /etc/profile. Zsh does the same in /etc/zprofile.
> > 
> > > - simpdftex, which Roussanka mentioned in other contexts, _is_ part of TeXLive and typically lives in /Library/TeX/texbin/. But it itself manipulates paths to find the programs it uses. So the fact that simpdftex can find ps2pdf doesn’t necessarily mean that other things will.
> > >
> > > (Is AQM using simpdftex, or calling programs directly?)
> > 
> > No idea. I see that Aquamacs adds /Library/TeX/texbin to the path itself. I have TeXLive installed in /opt and therefore no /Library/TeX/texbin in my path, but it’s there in Aquamacs when I run (getenv “PATH”).
> > 
> > —Ettore
> > 
> > 
> > _____________________________________________________________
> > MacOSX-Emacs mailing list
> > MacOSX-Emacs at email.esm.psu.edu <mailto:MacOSX-Emacs at email.esm.psu.edu>
> > https://email.esm.psu.edu/mailman/listinfo/macosx-emacs <https://email.esm.psu.edu/mailman/listinfo/macosx-emacs>
> > List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx <http://dir.gmane.org/gmane.emacs.macintosh.osx>
> > 
> > _____________________________________________________________
> > MacOSX-Emacs mailing list
> > MacOSX-Emacs at email.esm.psu.edu <mailto:MacOSX-Emacs at email.esm.psu.edu>
> > https://email.esm.psu.edu/mailman/listinfo/macosx-emacs <https://email.esm.psu.edu/mailman/listinfo/macosx-emacs>
> > List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx <http://dir.gmane.org/gmane.emacs.macintosh.osx>
> 
> Prof José Figueroa-O'Farrill
> School of Mathematics
> University of Edinburgh
> PGP Key: 0x6A6BD529 (MIT PGP Key Server)
> 
> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
> 
> 
> 
> 
> _____________________________________________________________
> MacOSX-Emacs mailing list
> MacOSX-Emacs at email.esm.psu.edu <mailto:MacOSX-Emacs at email.esm.psu.edu>
> https://email.esm.psu.edu/mailman/listinfo/macosx-emacs <https://email.esm.psu.edu/mailman/listinfo/macosx-emacs>
> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx <http://dir.gmane.org/gmane.emacs.macintosh.osx>
> 
> _____________________________________________________________
> MacOSX-Emacs mailing list
> MacOSX-Emacs at email.esm.psu.edu
> https://email.esm.psu.edu/mailman/listinfo/macosx-emacs
> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20201101/7eaeba5d/attachment.htm>


More information about the MacOSX-Emacs mailing list