Settings for Sublime Text (Mac Version)

Settings for Sublime Text (Mac Version) #

Author: Erhua

Keywords: sublime, Mac

Introduction to the configuration of a very useful editor for LaTeX.

Sublime Text is an excellent text editor with fast speed, clean interface, and numerous plugins. It can be used on both Mac and Windows, and offers an unlimited trial period. As its official website says, it is “The text editor you’ll fall in love with.”

Skim is a free lightweight PDF reader and annotation tool, which has a user-friendly layout and is better than the built-in Previewer in OS X for annotating PDF files.

LaTeX is an authoritative typesetting software for scientific papers. It is not only used for writing papers, but also for various document tasks in daily life, and even for making slides. The biggest advantage of LaTeX compared to Word is its beautiful handling of complex formulas. Moreover, it can generate complex structures such as footnotes, indexes, tables of contents, and references with simple commands. These advantages allow “scientists” to focus more on the content of their articles, without having to be both authors and typesetters.

The purpose of this article is to integrate the above three software on a Mac. After completing the setup, you will be able to edit LaTeX code in Sublime Text and preview the generated PDF files with Skim. Most importantly, you will find that writing papers can be a beautiful thing.

Prerequisites: #

  • At least 4GB of free space on your Mac
  • High-speed Internet connection

Step 1: Install MacTeX #

  • Go to MacTeX website and download the MacTeX.pkg file. The file is about 3GB.
  • After downloading, double-click on MacTeX.pkg to install it.
  • After installation, you will see many program icons related to TeX.

Step 2: Install Sublime Text #

  • Go to Sublime Text website and download the latest version of Sublime Text. I downloaded Sublime Text 3.
  • After downloading, drag the file into the Applications folder to install it.

Step 3: Install Package Control in Sublime Text #

We need to download plugins in Sublime Text in order to operate files related to LaTeX effectively. The plugins can be downloaded through Package Control.

  • Go to Package Control website and copy the code in the gray area.
  • Open Sublime Text.
  • Use the shortcut control+~ (the tilde key is below the Esc key) to open the Control Panel Console. You will see a white window popping up at the bottom of Sublime Text.
  • Paste the code you just copied into the Control Panel.
  • Press Enter and then exit and restart Sublime Text.

Step 4: Install LaTeX Tools #

  • After restarting Sublime Text, press Command+Shift+P to open the Command Palette. This can also be done through the Tools dropdown menu.
  • In the Command Palette, type “Install Package” and press Enter.
  • After that, type “LaTeX Tools” and select it to install.
  • Exit and restart Sublime Text.

Step 5: Install Skim #

  • Go to Skim and download Skim.

  • Open Skim and go to the menu Skim > Preference > Sync.

  • In the Presets menu, select Sublime Text.

  • Close the window.

Completion #

Now, we have completed all the steps. You can open Sublime Text, press Command+N to create a new file, and write LaTeX code in it. After editing, press Command+S to save the file, and press Command+B to compile and run it. You can then preview the PDF in Skim.

Note that if you want to use Chinese, you need to add the following line at the beginning of your document:

%!TEX program = xelatex

And in the preamble, you can use: