Setting up Sublime Text (Windows version)

Setting up Sublime Text (Windows version) #

Author: 二花

Keywords: sublime, Windows

Introduction to how to configure a very useful editor for LaTeX


Sublime Text is an excellent editor with fast speed, clean interface and numerous plugins. It can be used on both Mac and Windows, and the author provides an unlimited trial period even though it is a paid software. As its official website advertises, it is “The text editor you’ll fall in love with.”

SumatraPDF is a PDF viewer for Windows that works well with LaTeX.

LaTeX is an authoritative typesetting software for scientific papers, capable of handling various document tasks such as writing papers, creating slides, etc. Its biggest advantage over Word is the beautiful typesetting of complex formulas. Moreover, it can easily generate complex structures like footnotes, indexes, tables of contents, and references using simple commands. All these advantages allow “scientists” around the world to focus more on the content of their articles without having to simultaneously be authors and typesetters.

The purpose of this article is to integrate the three aforementioned software on Windows. After completing the setup, you will be able to edit LaTeX code within Sublime Text and preview the generated PDF with SumatraPDF. More importantly, it will make you realize that writing papers can also be a beautiful thing.

Prerequisites: #

  • At least 4GB of free space on Windows
  • High-speed internet connection

Step 1: Install TeXLive #

  • Go to the official website of TeXLive and download the TeXLive.exe file. The file size is approximately 4GB.
  • After downloading, double-click to start the installation.
  • After installation, you will see many program icons related to TeX.

Step 2: Install Sublime Text #

Step 3: Install Package Control in Sublime Text #

We need to download plugins in Sublime Text to be able to work well with LaTeX-related files. Plugins can be installed through Package Control.

  • Go to the official website of Package Control and copy the code in the gray block.
  • Open Sublime Text.
  • Press the shortcut key control+~ (the ~ key is just below the Esc key) to open the control panel console. You will see a white window pop up at the bottom of Sublime Text.
  • Paste the copied code into the control panel.
  • Press Enter to execute the code and wait for a while. Then exit and restart Sublime Text.

Step 4: Install LaTeX Tools #

  • After restarting Sublime Text, press control+Shift+P to open the command palette, or you can do it through the Tools drop-down menu.
  • In the command palette, type “Install Package” and press Enter.
  • After that, type “LaTeX Tools” and find it to install.
  • Exit and restart Sublime Text.

Step 5: Install SumatraPDF #

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 finishing editing, press Command+S to save the file and Command+B to compile and run. At this point, you can preview the PDF in SumatraPDF.

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

%!TEX program = xelatex

In the preamble, use:

\usepackage [UTF8]{ctex}

For more details, please refer to http://blog.csdn.net/cdqn10086/article/details/54980846.