LoginSignup
5
5

More than 5 years have passed since last update.

Atom で LaTeX を使うための準備

Last updated at Posted at 2016-12-05

修論執筆のため Mac の Atom で LaTeX を使えるようにしたときのメモ。

環境

Mac OS X El Capitan (10.11.6)

MacTeX のインストール

https://tug.org/mactex/mactex-download.html からパッケージファイルをダウンロード(時間かかる)してインストール。

PATH を通す

.bash_profile
export PATH=$PATH:/Library/TeX/texbin

上記をシェルに反映させる

$ source ~/.bash_profile

TeX Live のアップデート(時間かかる)

$ sudo tlmgr update --self --all

Atom の設定

インストールするパッケージ

  • latex (LaTeX コンパイラを呼び出すやつ)
  • language-latex (シンタックスハイライト)
  • pdf-view

テスト

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

Packages -> LaTeX -> build (Ctrl-Option-b)

その他の設定

保存時に自動コンパイル

latex パッケージの Settings で "Build on Save" を設定すると、ファイルを保存したときに自動でビルドしてくれる。便利。

スペルチェック

プリインストールされている spell-check パッケージの設定で "Grammars" に "text.tex.latex" を追加する。
英語のスペルチェックをする場合は "Locales" に "en-US" を追加する。

残念なことに LaTeX のキーワード(documentclass, usepacakge などもろもろ)がミススペリングと認識されてしまう。設定の "Known Words" に入れておけばとりあえず逃れられる。LaTeX のキーワードの辞書をどっかから拾ってきて入れるといいかも。

参考

http://ayihis.hatenablog.com/entry/2016/09/24/143641
http://qiita.com/NariseT/items/4b80c80f8e39ea35f597
https://snap.textfile.org/20151006085255/

5
5
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
5
5