[texworks] Adding to typesetting path on MacOS

Duncan Murdoch murdoch.duncan at gmail.com
Sun Oct 27 13:42:18 CET 2024


On 2024-10-27 6:03 a.m., Duncan Murdoch wrote:
> For one of the typesetting tools I'm using, I need access to ghostscript
> for graphics file format conversion.  My copy of gs is in /opt/homebrew/bin.
> 
> I am having trouble adding /opt/homebrew/bin to the typesetting path,
> because the preferences dialog opens a file dialog for changes, and /opt
> isn't showing up.  If I open / in the Finder, it shows opt as a grayed
> out entry, presumably indicating some sort of hidden attribute, but I
> don't see it at all in the TeXWorks dialog.
> 
> Any suggestions how to add it to the typesetting path?  I suuppose I
> could link to gs from an existing directory in the path, but I'd prefer
> a cleaner solution.

I found a solution to this:  if I open / in the TeXworks dialog, and 
also in a Finder window, I can drag /opt from Finder to the TeXworks 
dialog and it will open.  Then I can add my /opt/homebrew/bin entry.

HOWEVER, this doesn't help.  gs is still not being found.  If my 
typesetting tool prints the PATH that it sees, it shows a minimal path:

   /usr/bin:/bin:/usr/sbin:/usr/local/bin

If I start TeXworks from a shell, then it sees the full path that was 
active in the shell, and things are fine.

So now my question is:  how do I change the PATH environment variable 
that typesetting tools see?

Duncan Murdoch


More information about the texworks mailing list.