NoTeX
1.0.0
A modern noteworthy LaTeX template
Toggle main menu visibility
Loading...
Searching...
No Matches
notex
include
notex
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
18
namespace
notex::templates
{
19
22
enum class
ProjectType
{
23
MONO
,
24
MULTI
,
25
};
26
28
std::string_view
to_string
(
ProjectType
type);
29
36
std::optional<ProjectType>
project_type_from_string
(std::string_view name);
37
43
std::string
mono_main
(std::string_view class_path);
44
55
std::string
multi_main
(
56
std::string_view class_path,
57
const
std::vector<std::string>& section_stems = {
"1_introduction"
});
58
68
std::string
section_stem
(
int
number, std::string_view title);
69
77
std::string
section
(
int
number, std::string_view title);
78
80
std::string
bibliography_starter
();
81
82
}
// namespace notex::templates
notex::templates
Definition
templates.hpp:18
notex::templates::section
std::string section(int number, std::string_view title)
Generates a numbered section subfile.
Definition
templates.cpp:161
notex::templates::mono_main
std::string mono_main(std::string_view class_path)
Generates the entry file for a single-file project.
Definition
templates.cpp:140
notex::templates::multi_main
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.
Definition
templates.cpp:144
notex::templates::bibliography_starter
std::string bibliography_starter()
Definition
templates.cpp:167
notex::templates::section_stem
std::string section_stem(int number, std::string_view title)
Computes the filename stem (no directory, no extension) for a numbered section.
Definition
templates.cpp:157
notex::templates::ProjectType
ProjectType
Definition
templates.hpp:22
notex::templates::ProjectType::MULTI
@ MULTI
main.tex plus a sections/ directory of subfiles.
Definition
templates.hpp:24
notex::templates::ProjectType::MONO
@ MONO
A single main.tex file.
Definition
templates.hpp:23
notex::templates::project_type_from_string
std::optional< ProjectType > project_type_from_string(std::string_view name)
Parses a project type name.
Definition
templates.cpp:134
notex::templates::to_string
std::string_view to_string(ProjectType type)
Definition
templates.cpp:124
Generated by
1.17.0