LoginSignup
15

More than 3 years have passed since last update.

SublimeText3でUTF-8のLaTeX環境を構築する(Mac)

Last updated at Posted at 2017-03-27

確認済みのバージョン

  • macOS Mojave
  • Sublime Text 3
  • MacTex2019

手順

  • MacTex2019のインストール(時間かかります)
brew cask install mactex
  • PDF ViewerのSkimをインストールする
brew cask install skim
  • Sublime Text 3をインストールする
  • SublimeにPackage ControlをインストールしてLaTeXToolsをインストールする

  • Sublimeのメニュー[Preferences]->[Package Settings]->[LaTeXTools]->[Settings-User]を選択してLaTeXTools.sublime-settingsのbuidlder_settingsの部分を下記のように編集する

LaTeXTools.sublime-settings
    "builder_settings" : {

        // General settings:
        // See README or third-party documentation

        "command" : ["latexmk", "-cd",
                "-e", "$latex = 'platex %O -no-guess-input-enc -kanji=utf8 -interaction=nonstopmode -synctex=1 %S'",
                "-e", "$biber = 'biber %O --bblencoding=utf8 -u -U --output_safechars %B'",
                "-e", "$bibtex = 'pbibtex %O %B -kanji=utf8'",
                "-e", "$makeindex = 'upmendex %O -o %D %S'",
                "-e", "$dvipdf = 'dvipdfmx %O -o %D %S'",
                "-f", "-%E", "-norc", "-gg", "-pdfdvi"],

        // (built-ins): true shows the log of each command in the output panel
        "display_log" : false,

        // Platform-specific settings:
        "osx" : {
            // See README or third-party documentation
        },

        "windows" : {
            // See README or third-party documentation
        },

        "linux" : {
            // See README or third-party documentation
        }
    },

確認

下記のソースをコピペしてCtrl+bを押し、Skimが起動すればOKです。
初回はビルド方法を聞いてくるのでBuild With LaTeX - Traditionalを選ぶ。[Tool]->[Build With...]からもビルド方法の選択は可能です。

sample.tex
\documentclass[a4j,12pt]{jarticle}

\title{ {\LaTeX} サンプルファイル}
\author{長谷川大}
\date{\today}
\begin{document}
\maketitle

\section{はじめに}
ハローワールド!

\section{おわりに}
ハローワールド!

\end{document}

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
15