I have just transitioned to using Atom as my main editor and have set it up for my LaTeX writing. This post summarizes that process for my own reference and maybe it helps some other people. Useful information sources that I found and are worth checking out are here and here, particularly if you are interested in finding more useful packages for Atom and LaTeX. In the end I pretty much ended up using this tutorial, but it is Mac specific.
What you need are (i) an Atom package that can compile your LaTeX file, (ii) an Atom package for LaTeX syntax highlighting, and (iii) a compatible pdf viewer. These three choices can not always be made independently of each other, since some packages only support specific other options.
Atom packages for compiling LaTeX code
latex Seems to be the most commonly used Atom package specifically for LaTeX compiling, though it is still in beta version. The package pretty much only offers compiling. It requires
language-latex (or something similar to it) and supports the following pdf viewers: Atril, Evince, Okular,
pdf-view, Preview, Skim, Sumatra PDF, Windows shell open, xdg-open, Xreader and Zathura.
latextools The Atom version of the LaTeXTools package for Sublime Text. Includes more functionality than just compiling, like reference completion which I really like. It requires the
language-latex package for syntax highlighting and supports the following pdf viewers: SumatraPDF previewer on Windows, MacTeX and Skim on OSX, and texlive and okular on Linux, as well as the
latextools also suggests to install
atom-latex Another relatively popular package, but the original author has left the project and the documentation didn’t convince me (I guess a case of “I already figured out another option to do what I want and you couldn’t convince me in the 2 minutes I invested in you that you were worth investing more time to figure out if you are better.”).
There are definitely more than these three options, but they seemed to be the most relevant options (by popularity, how updated they are, and functionality).
language-latex Most commonly used package for this. Everyone seems to recommend it.
The question here is pretty much whether to use the
pdf-view package or some other (operating system dependent) pdf viewer that is compatible with the package used for compiling. Things to consider here are (i) pdf-view opens the PDF in a pane in Atom compared to opening a new window for another pdf viewer software, and (ii) forward and inverse search functionality (which can save a lot of time). The first point is pretty much personal preference. For the second point, however, the
latextools manual suggests that
pdf-view has some forward search limitations and the fact that it uses the synctex command-line utility to implement reverse search makes setting it up complicated if you are not working with a Mac and installed the full MacTeX distribution.
language-latex seems to be the thing to do, so I do. In terms of compiling, I ended up using
latextools because of its added functionality. Depending on how it goes I might switch to
latex and supplement it with packages such as
autocomplete-bibtex. I might also give
linter) for syntax cleaning a try in the future. For the pdf viewer, I tried both
pdf-view and Skim (I am on a Mac) and will try both for now to see what fits my needs better.
In the process of setting everything up I ran into the problem that building (keystroke option + command + b on a mac) the pdf would work, but it wouldn’t automatically launch the pdf viewer. The problem was that my tex file didn’t actually have .tex at the end of the filename. Fixed it all 😉
I will update with more insights after I have used it all for a while.
Update: I am now also
using latex-autocomplete (I love it!) and I realized that the
language-latex package doesn’t cooperate well with the native light syntax themes in Atom. I therefore switched to the
kary-foundation-light syntax theme, which works great.
Please excuse the probably numerous typos in this text. This is mostly written for my own reference.