atom-latextools icon indicating copy to clipboard operation
atom-latextools copied to clipboard

Add support for project files

Open ig0774 opened this issue 8 years ago • 0 comments

Adds support for project files to latextools which allows configuration on a per-project basis. It's main use right now is to set the TEXroot without needing to use a magic comment, but I envision being able to use them similar to how we use project files on Sublime Text (especially pending #86).

A project file is a small configuration file, which can be formatted either as CSON, JSON, or YAML, consisting of configuration data that basically matches Atom's configuration format. Project files are called .latextools.cson or .latextools.json, etc. and must be placed in the directory open in the current Atom project—usually this means a directory open in the Tree View. If they are placed in a subfolder, they will be ignored, unless that subfolder is separately open as a directory in the Tree View. This a concession to performance / sanity. Any setting that can be set in LaTeXTools configuration can be set in the project file, sans the nice GUI, which means its important that you're careful only to select values LaTeXTools understands.

Basically, the main extra is support for a configuration value called either TEXroot or latextools.TEXroot which specifies the file to treat as the main document. This can be specified either as an absolute or relative path. If a relative path, it is resolved relative to the directory containing the project file.

This should resolve #71.

ig0774 avatar Jul 19 '16 16:07 ig0774