Enumerations | |
| enum class | ProjectType { MONO , MULTI } |
Functions | |
| std::string_view | to_string (ProjectType type) |
| std::optional< ProjectType > | project_type_from_string (std::string_view name) |
| Parses a project type name. | |
| std::string | mono_main (std::string_view class_path) |
| Generates the entry file for a single-file project. | |
| std::string | multi_main (std::string_view class_path, const std::vector< std::string > §ion_stems={"1_introduction"}) |
Generates the entry file for a multi-file project, referencing section_stems in order. | |
| std::string | section_stem (int number, std::string_view title) |
| Computes the filename stem (no directory, no extension) for a numbered section. | |
| std::string | section (int number, std::string_view title) |
| Generates a numbered section subfile. | |
| std::string | bibliography_starter () |
NoTeX Copyright (c) 2026 Marco Tallone Licensed under the MIT License. See LICENCE for details.
Implements templates: the encoded project skeletons used by Manager::init.
|
strong |
Which project skeleton to scaffold: a single main.tex, or a main.tex plus a sections/ tree of subfiles.
| Enumerator | |
|---|---|
| MONO | A single main.tex file. |
| MULTI | main.tex plus a sections/ directory of subfiles. |
Definition at line 22 of file templates.hpp.
| std::string notex::templates::bibliography_starter | ( | ) |
Definition at line 167 of file templates.cpp.
Referenced by notex::Manager::add_bibliography().
| std::string notex::templates::mono_main | ( | std::string_view | class_path | ) |
Generates the entry file for a single-file project.
| class_path | Argument to \documentclass, e.g. "notex" or "settings/notex". |
Definition at line 140 of file templates.cpp.
Referenced by notex::Manager::init(), and notex::Manager::reset().
| std::string notex::templates::multi_main | ( | std::string_view | class_path, |
| const std::vector< std::string > & | section_stems = {"1_introduction"} ) |
Generates the entry file for a multi-file project, referencing section_stems in order.
| class_path | See mono_main(). |
| section_stems | Filename stems (as returned by section_stem(), no directory or extension) of the sections to reference via \subfile, in order; defaults to a single introductory section, matching a fresh project's initial state. |
Definition at line 144 of file templates.cpp.
Referenced by notex::Manager::init(), and notex::Manager::reset().
| std::optional< ProjectType > notex::templates::project_type_from_string | ( | std::string_view | name | ) |
Parses a project type name.
| name | Candidate name, e.g. from a command-line argument. |
name is neither "mono" nor "multi". Definition at line 134 of file templates.cpp.
| std::string notex::templates::section | ( | int | number, |
| std::string_view | title ) |
Generates a numbered section subfile.
| number | Section number; substituted only into a landmark comment, since the number itself lives in the filename rather than the file's content. |
| title | Section title, substituted into the \section{} heading. |
Definition at line 161 of file templates.cpp.
Referenced by notex::Manager::add_section(), and notex::Manager::init().
| std::string notex::templates::section_stem | ( | int | number, |
| std::string_view | title ) |
Computes the filename stem (no directory, no extension) for a numbered section.
| number | Section number, prefixed onto the returned stem. |
| title | Section title, slugified (lower-cased, non-alphanumeric runs collapsed to a single underscore) to form the rest of the stem. |
Definition at line 157 of file templates.cpp.
Referenced by notex::Manager::add_section(), and notex::Manager::init().
| std::string_view notex::templates::to_string | ( | ProjectType | type | ) |
Definition at line 124 of file templates.cpp.
Referenced by notex::Manager::init().