NoTeX 1.0.0
A modern noteworthy LaTeX template
Loading...
Searching...
No Matches
notex::assets Namespace Reference

Classes

struct  EmbeddedFile
struct  EmbeddedHexFile
 One binary file embedded into the binary as hexadecimal text. More...

Functions

const std::vector< EmbeddedFile > & latex_files ()
std::optional< EmbeddedFilefind_latex_file (std::string_view name)
 Looks up a single embedded LaTeX template file by name.
const std::vector< EmbeddedFile > & font_files ()
std::optional< EmbeddedFilefind_font_file (std::string_view name)
 Looks up a single embedded font file by name.

Detailed Description

NoTeX Copyright (c) 2026 Marco Tallone Licensed under the MIT License. See LICENCE for details.

Implements the notex::assets accessors declared in notex/assets.hpp. This is the only translation unit that includes the generated, build-time embedded-asset headers.

Function Documentation

◆ find_font_file()

std::optional< EmbeddedFile > notex::assets::find_font_file ( std::string_view name)

Looks up a single embedded font file by name.

Parameters
nameFile name to look for, e.g. "JetBrainsMono-Regular.ttf".
Returns
The matching file, or std::nullopt if no embedded font has that name.

Definition at line 84 of file assets.cpp.

References font_files().

◆ find_latex_file()

std::optional< EmbeddedFile > notex::assets::find_latex_file ( std::string_view name)

Looks up a single embedded LaTeX template file by name.

Parameters
nameFile name to look for, e.g. "notex-theme-dark.tex".
Returns
The matching file, or std::nullopt if no embedded file has that name.

Definition at line 63 of file assets.cpp.

References latex_files().

◆ font_files()

const std::vector< EmbeddedFile > & notex::assets::font_files ( )
Returns
Every static font file embedded from notex/fonts/ at build time, decoded back into their raw bytes.

Definition at line 70 of file assets.cpp.

Referenced by find_font_file(), notex::Installer::install_global(), notex::Installer::install_local(), and notex::Installer::installation_differs().

◆ latex_files()

const std::vector< EmbeddedFile > & notex::assets::latex_files ( )
Returns
Every LaTeX template file embedded from notex/latex/ at build time.

Definition at line 56 of file assets.cpp.

Referenced by notex::Manager::available_themes(), find_latex_file(), notex::Installer::install_global(), notex::Installer::install_local(), and notex::Installer::installation_differs().