There are a lot of front-end editors for writing LaTeX source, for example, Texmaker, TeXstudio, WinEdt. I have used TeXstudio for a while. But its user interface is a little dull. So I decided to give Sublime Text a shot. In this post, I will summarize the configurations necessary to write and compile LaTeX source code and to preview the produced PDF files.
Choose a TeX distribution
$\TeX$ is like a programming language, you need a compiler and other necessary components such as packages and classes to compile your source files. For Windows, TeX Live is an excellent choice. You can download it here. When installing TeX Live, you can choose the full scheme, which will install everything you need on your computer.
The full installation of TeX Live may take more than half of an hour. Stay patient. After installation, you should add TeX Live executables to your system
PATH. On my system, the directory where these executables reside is:
Restarting your computer may be required for
PATH change to take effect.
Install the LaTeXTools package
Now, you should install the LaTeXTools package, which provides a lot of functionalities for writing and compiling LaTeX files. If you have installed package control, you can install this package using package control.
Install Sumatra PDF reader
To preview the produced PDF files, I recommend using the well-known light-weight Sumatra PDF reader. After install, you should also set its path properly.
Check your system
After all these installations and settings, you can use the built-in function of LaTexTools to check your system. To check if there are any issues, follow the image below on how to do it:
The result of
Check System is shown below:
If there are no issues found, you can now write and compile your LaTeX source files.
Write and compile LaTeX source files
Use the shortcut key Ctrl+B to compile the file. You may be prompted to choose a builder. Just choose the basic builder.
Other packages to install
Configure inverse search for PDF files
Inverse search is a handy feature. First, compile any tex files and open it with Sumatra PDF reader. Then go to
Settings -> Options. In the
inverse search part, use the following setting:
"D:\Program Files\Sublime Text 3\sublime_text.exe" "%f:%l"
In the above setting, change the directory of Sublime Text executable to the actual location on your system.
The LaTeXTools package has an online documentation, which is well written. You can read it here.
- Set up inverse search on Sumatra: https://tex.stackexchange.com/questions/194645/jump-to-the-last-line-of-pdf-when-compiling-text-in-sublime-text
License CC BY-NC-ND 4.0