LoginSignup
28
30

More than 5 years have passed since last update.

Mac の Atom で Latex

Last updated at Posted at 2015-12-19

Mac の Atom で Latex

(2015.12.19 El Capitan)

Mac の Atom で tex ファイルをコンパイルして、
作成された pdf ファイルを見れるようにしました。


MacTeX の導入

OS X El CapitanへのLaTex環境のインストール などを参考にさせてもらいました

brew install caskroom/cask/brew-cask
brew cask install mactex

vim ~/.zshenv として以下を追記してパスを通す

# for MacTeX
export PATH="/Library/TeX/texbin:$PATH"

アップデート(かなり時間がかかりました。1時間半くらい。)

source ~/.zshenv
sudo tlmgr update --self --all

Atom に LaTeX, PDF View パッケージを導入

Atom LaTeX package
Atom PDF View package より

apm install latex
apm install pdf-view
apm list --installed

作成された pdf を Atom で見れるようにする
-> メニューの Atom をクリック
-> Preferences
-> Packages
-> latex
-> Settings
-> Always Open Result in Atom にチェックを入れる


テスト

Atom を起動
-> Ctrl + 0 でツリーに移動
-> a と押して、"test.tex" を新規作成
-> test.tex を以下のように作成して Ctrl + Option + b と入力 (or Packages -> LaTeX -> Build)

test.tex
\documentclass{article}
\begin{document}
Hello \LaTeX
\end{document}
28
30
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
28
30