Rhythm & Biology

Engineering, Science, et al.

macにLaTeXiT環境を整える

新しいmacbook proに買い換えてからLaTeXiT環境を整えていなかったので整備。
LaTeXiTがあれば資料に貼る用の綺麗な数式を簡単に作れる。

まず、brew(cask)にLaTeXiTがあるか調べたらあったのでそれを入れてみた。

$ brew search latexit
caskroom/cask/latexit

$ brew cask install latexit

で、これを起動しても動かない。
brewでLaTeXiTを入れても、そもそものTeX環境を自動では入れてくれないので、「pdflatexが無い」などと怒られる。

ではLaTeX環境をbrewで入れてみようとすると、どうやらMacTeXを入れることが推奨されている様子。

$ brew search latex
latex2html                         latex2rtf                          latexila                           latexml                            rtf2latex2e

If you meant "latex" specifically:
Installing TeX from source is weird and gross, requires a lot of patches,
and only builds 32-bit (and thus can't use Homebrew dependencies)

We recommend using a MacTeX distribution: https://www.tug.org/mactex/

You can install it with Homebrew-Cask:
  brew cask install mactex

MacTeXにはLaTeXiTも含まれている。
https://www.tug.org/mactex/mactex-download.html

MacTeX also installs Ghostscript, an open source version of Postscript, and it installs the GUI programs TeXShop, LaTeXiT, TeX Live Utility, BibDesk, and Excalibur, as well as an install package for cocoAspell, a spelling service which does not mark LaTeX commands as misspelled.

先ほどインストールしたLaTeXiTは無駄なので消してしまう。

$ brew cask uninstall latexit
==> Uninstalling Cask latexit
==> Removing App '/Applications/LaTeXiT.app'.

ここでようやくMacTeXをインストールする。ダウンロードにかなりの時間がかかるので気長に待つ。
また途中でsudoパスワードを聞かれるので入力する。

$ brew cask install mactex

以上で環境セットアップが完了。 f:id:aka_mythosil:20170714005920p:plain