Creating Your First PDF with LaTeX and Atom

This tutorial will walk you through the steps of creating your first PDF with LaTeX and Atom. This guide focuses on installing LaTeX and Atom on a Mac, but since Atom is a cross-platform editor, most of the instructions should work on Windows and Linux as well. You will need about an hour to download everything and to produce your first PDF.

See our previous tutorials on creating PDFs with LaTeX and SublimeText:

Making your first PDF with LaTeX and Sublime Text 2

Making your first PDF with LaTeX and Sublime Text 2 for Mac

Install MacTex

Download MacTeX. MacTeX installs everything you need to compile tex files into PDFs. This will take a while, so grab a coffee.

Install Atom

If you haven’t already, download the awesome Atom text editor Atom text editor. Atom is awesome because it is open source and supported by GitHub.

On my MacBook Pro running Yosemite, I clicked on the “Download For Mac” buttun, then openned the downloaded In Finder, just drag “Atom” to your Applications folder. You can then find Atom in your Applications folder or launch it from Spotlight. The first time you open Atom, press the “Open” button to trust Atom if prompted.

Install Skim (for previewing PDFs)

LatexTools makes use of Skim for previewing works-in-progress. Download and install Skim. On OS X Yosemite, I installed version 1.4.17.

To make Skim trusted so that the preview will work, open Skim by holding down the control key while clicking on the Skim icon in the “Applications” folder in Finder. Click “Open” at the prompt.

Install LatexTools

Open the “Settings” tab by pressing `Command+`` or using the menu “Atom > Preferences…”.

Click on the “Install” tab on the left. Type in language-latex and click the “Install” button in the language-latex package box. I installed version 0.6.1. This package provides syntax highlighting that will make working with TeX much more enjoyable.

Next Type in latextools and install the latextools package.

Create a tex source file

Create a new file if you don’t already have one up (you should see a tab titled “untitled” if you already have a new file open). To create a new file go to “File > New File” in the menu or use the keyboard shortcut Command+N.

In the new file paste the following TeX sample:

\author{Your Name}
This is where you will write your content.

Save this file as sample.tex. You should now see that the content is now recognized by the syntax highlighter (see all the pretty colors?).

Build and view your PDF

To build this PDF, use the following keyboard shortcut: Command+Alt+B (i.e., all three of those keys at the same time). If that doesn’t work, check your keybindings in the “Settings” tab, in the “Keybindings” tab on the left. Type in latextools:build to see what the command for your system is. On a Mac (i.e., “Darwin”) the keybinding should read alt-cmd-b, for Windowss and Linux the default is probably ctrl-alt-b.


Hopefully now you have your first PDF ready to show off to all your neighbors. If not, let me know in the comments below so I can update the tutorial.