1

I performed the following steps:

  1. Reinstalled macOS Ventura 13.4 on my system. (I was taken aback to not find /usr/local/bin/, but then this answer provided relief.)
  2. Installed Homebrew. (It is in /opt as expected.)
  3. Did brew install --cask xquartz. This
    • installed X11/ in /opt/,
    • added XQuartz.app in /Applications/, and
    • created symlinks X11 and X11R6 in /usr/, both pointing to X11/ in /opt.
  4. Did brew install --cask mactex. This resulted in things including:
    • Installed texlive/ in /usr/local.
    • Installed ghostscript/ in /opt/Homebrew/Cellar/.
    • Installed TeX/ containing TeXShop, etc. in /Applications/.

(I have everything updated to the latest at I write. Also, I cross-verified the md5 checksum of .pkg.)

Now, when I tried to run LaTeXiT, it greeted me with the following error:

enter image description here

I went through the READ ME FIRST.pdf that came with the applications which mentions:

Ghostscript installs support files in /usr/local/share/ghostscript/10.00.0 and a few binaries in /usr/local/bin. In particular, it installs gs-X11 and gs-noX11 in /usr/local/bin, where the first requires X11 and the second does not. Then MacTeX installs a symbolic link gs pointing to the first binary if the user’s machine has X11, and to the second binary otherwise. New versions of Ghostscript can be installed over version 10.00 without removing 10.00 first.

This documentation doesn't seem to be updated with the fact that Homebrew's prefix is in /opt/Homebrew/ for Apple Silicon: /usr/local/share/ should have been /opt/Homebrew/Cellar.

Next, I still don't have usr/local/bin, wherein to find gs-X11 and gs-noX11. In fact, an mdfind or find search yields no results for these.

Furthermore, from the MacTeX website:

The TeX Live programs xdvi, pdfopen, and pdfclose require X11. In addition, the Ghostscript library libgs requires X11 (but notice that dvisvgm is the only TeX Live program using it). Ghostscript comes with two binaries, gs-X11 and gs-noX11, where gs-X11 has support for X11 and gs-noX11 does not. When Ghostscript is first installed, a symbolic link named gs is created in /usr/local/bin. If X11 is present, gs points to gs-X11; otherwise it points to gs-noX11. On Arm machines, gs points to gs-X11 only if XQuartz 2.8.0 or higher is present.

Questions:

  1. Where are gs-X11, gs-noX11, and the symlink gs on my system?
  2. How to have everything integrated, so that TeX detects Ghostscript, and LaTeXiT works fine?

Edit:

Some further relevant observations:

  1. I confirm that TeX is working correctly: latex file.tex on the terminal produces file.dvi in the same (writeable) directory. However, I also observe another issue (most likely related): According to this TUG post, I should be having no trouble viewing the generated file.dvi using TeXShop, for according to the post, it is just executing dvips and ps2pdf. (I confirm that dvips file.ps and then ps2pdf file.ps generate the expected file.pdf in the concerned directory.) However, when I open it with TeXShop, it does nothing.
  2. Installing with brew should not be causing any problem since I checked the md5 checksum of the mactex-20230314.pkg that brew fetched, and it matched with what MacTeX reports.
2
  • Please do not put [SOLVED] in the title, this will not help most search engines. Instead accept one of the answers that happened to solve your problem. Commented Jun 3, 2023 at 17:53
  • 1
    @Atom take a look at the same question I raised on Tex StackExchange.
    – John
    Commented Sep 3 at 14:44

2 Answers 2

3

Everything has been sorted out now by what Richard Koch (author of the TeXShop application) suggested me on email: Changing the following paths in the preferences/settings did the trick:

  1. In TeXShop, under the Engine tab, changed the "Distiller (ghostscript)" field to /opt/homebrew/bin.
  2. In LaTeXiT, under the Typesetting tab, changed the "Ghostscript (gs)" field to /opt/homebrew/bin/gs, and the "ps2pdf" field to /opt/homebrew/bin/ps2pdf.

Turns out the problem was that Brew changed the HOMEBREW_PREFIX for Apple Silicon to /opt/homebrew, and MacTeX is yet to incorporate this recent change.

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Jun 3, 2023 at 17:52
0

See the homebrew-gs-x11 project, which says this :

The Homebrew core Ghostscript formula no longer supports X11, which also prevents use of GV (a derivative of Ghostview). I created this custom tap to allow users to install these formulae once again, on either Mac and Linux systems. First, install Homebrew if necessary.

To install Ghostscript with X11 support:

brew install johnhcc/gs-x11/ghostscript-x11

This builds from source and it may take 10 minutes or more to complete. Please be patient, even if it seems to be stuck.

Ghostscript will be installed as keg-only, meaning it will not be linked into /usr/local to prevent conflicts with the core Ghostscript formula. However you can still access the X11-enabled binaries directly at $(brew --prefix)/opt/ghostscript-x11/bin.

Similarly, GV can be installed with:

brew install johnhcc/gs-x11/gv
5
  • Unfortunately, it's not working either.
    – Atom
    Commented Jun 2, 2023 at 18:01
  • Here's what I did: 1.) Ran brew install johnhcc/gs-x11/ghostscript-x11. 2.) Ran echo 'export PATH="/opt/homebrew/opt/ghostscript-x11/bin:$PATH"' >> ~/.zshrc (as was suggested in the final prompt). 3.) Opened LaTeXit to get the same error.
    – Atom
    Commented Jun 2, 2023 at 18:04
  • A pity that it doesn't work, as the project was last updated only a year ago. Try perhaps to get in touch with the developer.
    – harrymc
    Commented Jun 2, 2023 at 18:12
  • See if this post is helpful.
    – harrymc
    Commented Jun 2, 2023 at 19:17
  • @harrymac The issue is solved now.
    – Atom
    Commented Jun 3, 2023 at 16:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .