Problem setting up atom-latex

I’m trying to use atom-latex and I’m stuck at making the root file. I have the following directories:
class/paper1 and class/paper2. I put a blank file atom.tex as the root file in class and under each paper directory I have the .latexcfg file with the contents as follows{ “root” : “…\atom.tex”} then i open atom.tex and run Build Here. I can see a few new atom.* created. But when I go to write the first source file in class/paper1, I get the error

Failed Building LaTex(code 12)
Command Failed: latexmk -synctex=1 -
interaction=nonstopmode -file-line-error -pdf atom

My questions are

  1. Am I setting up the location for the root file correctly?
  2. Am I supposed to recreate this structure for every project. Let’s say I have another class to write papers for, I’d create OtherClass/paper1, OtherClass/paper2, OtherClass/atom.tex (root file) OtherClass/paper1/.latexcfg This seems so repetitive. Is there a better way?
  3. How do I fix the error above?

P.S. This is my first post, and I don’t know if this forum provides special tags to mark lines of code or other mark-ups. Please advise.

I have not used atom-latex and you might get it to work to fit your needs.

But I suggest exploring (or adding) an alternative mix of packages for your work flow.

markdown-preview-enhanced allows input documents to be written in markdown and then with pandoc installed you can preview and print LaTeX.

Read here and here

You basically create a set of markdown files (extension *.md) and setup the “front matter” in the markdown files to output PDF.

I would also explore R-markdownfor academic papers.

[Later addition to his post]

Here is reference to LaTeX options available in markdown-preview-enhanced package …

Does this work when compiling from the command line or other LaTeX editors, or is this a problem specific to atom-latex?

If Class A’s paper1 and paper2 are supposed to be different documents (as I imagine they are), you don’t really need a root file. Create a new LaTeX document classA/paper1/classA-paper1.tex and simply saving the file should prompt atom-latex to compile it. You would only need a root file if you wanted to split paper1 into multiple source files, say paper1.tex, introduction.tex, body.tex and conclusion.tex, where main.tex defines the document class and includes the other files. You would set % !TEX root = /path/to/classA/paper1.tex at the top of paper1.tex or simply use build here.