Represents the surrounding system as NoTeX perceives it: where TeX expects user files to live, and whether NoTeX is installed. More...
#include <notex/environment.hpp>
Public Member Functions | |
| Environment (std::filesystem::path start_dir=std::filesystem::current_path()) | |
Resolves TEXMFHOME and checks start_dir for a local installation. | |
| const std::filesystem::path & | texmf_home () const noexcept |
| const std::filesystem::path & | global_latex_dir () const noexcept |
| const std::filesystem::path & | global_fonts_dir () const noexcept |
| const std::filesystem::path & | local_latex_dir () const noexcept |
| const std::filesystem::path & | local_fonts_dir () const noexcept |
| InstallationType | installation_type () const noexcept |
Represents the surrounding system as NoTeX perceives it: where TeX expects user files to live, and whether NoTeX is installed.
An Environment holds no project state and never modifies anything on disk; it is a read-only snapshot that the rest of the program consults. It resolves TEXMFHOME by honouring the TEXMFHOME environment variable first and, only if that is absent, falling back to kpsewhich -var-value=TEXMFHOME.
Definition at line 35 of file environment.hpp.
|
explicit |
Resolves TEXMFHOME and checks start_dir for a local installation.
| start_dir | Directory checked for a local installation (<start_dir>/settings/notex.cls); defaults to the current working directory. |
| EnvironmentError | if TEXMFHOME cannot be resolved from either the environment variable or kpsewhich. |
Definition at line 61 of file environment.cpp.
References notex::GLOBAL, notex::LOCAL, notex::NONE, and notex::to_string().
|
inlinenoexcept |
Definition at line 62 of file environment.hpp.
Referenced by notex::Installer::install_global(), and notex::Installer::uninstall_global().
|
inlinenoexcept |
Definition at line 56 of file environment.hpp.
Referenced by notex::Installer::install_global(), and notex::Installer::uninstall_global().
|
inlinenoexcept |
start_dir. A local installation takes precedence over a global one when both are present. Definition at line 81 of file environment.hpp.
|
inlinenoexcept |
Definition at line 74 of file environment.hpp.
|
inlinenoexcept |
Definition at line 68 of file environment.hpp.
|
inlinenoexcept |
Definition at line 50 of file environment.hpp.
Referenced by notex::Installer::install_global(), and notex::Installer::uninstall_global().