NoTeX 1.0.0
A modern noteworthy LaTeX template
Loading...
Searching...
No Matches
templates.hpp
Go to the documentation of this file.
1
10
11#pragma once
12
13#include <optional>
14#include <string>
15#include <string_view>
16#include <vector>
17
19
22enum class ProjectType {
25};
26
28std::string_view to_string(ProjectType type);
29
36std::optional<ProjectType> project_type_from_string(std::string_view name);
37
43std::string mono_main(std::string_view class_path);
44
55std::string multi_main(
56 std::string_view class_path,
57 const std::vector<std::string>& section_stems = {"1_introduction"});
58
68std::string section_stem(int number, std::string_view title);
69
77std::string section(int number, std::string_view title);
78
80std::string bibliography_starter();
81
82} // namespace notex::templates
std::string section(int number, std::string_view title)
Generates a numbered section subfile.
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 > &section_stems={"1_introduction"})
Generates the entry file for a multi-file project, referencing section_stems in order.
std::string bibliography_starter()
std::string section_stem(int number, std::string_view title)
Computes the filename stem (no directory, no extension) for a numbered section.
@ MULTI
main.tex plus a sections/ directory of subfiles.
Definition templates.hpp:24
@ MONO
A single main.tex file.
Definition templates.hpp:23
std::optional< ProjectType > project_type_from_string(std::string_view name)
Parses a project type name.
std::string_view to_string(ProjectType type)