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

Classes

struct  Snippet
 One ready-to-paste snippet served by notex get. More...

Functions

const std::vector< Snippet > & all_snippets ()
std::vector< std::string_view > snippet_names ()
std::vector< Snippetfind_snippets (std::string_view name)
 Looks up every snippet registered under name, whether as its canonical name or as an alias.

Detailed Description

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

Implements reference: the encoded snippet table served by notex get.

Function Documentation

◆ all_snippets()

const std::vector< Snippet > & notex::reference::all_snippets ( )
Returns
Every snippet known to notex get, one entry per canonical name, in a stable order.

Definition at line 108 of file reference.cpp.

◆ find_snippets()

std::vector< Snippet > notex::reference::find_snippets ( std::string_view name)

Looks up every snippet registered under name, whether as its canonical name or as an alias.

A name can resolve to more than one snippet: notex get box returns both cbox and ebox, since a user asking for "a box" may not remember which specific name they want.

Parameters
nameName to look up.
Returns
Every matching snippet, in registration order; empty if name matches nothing.

Definition at line 132 of file reference.cpp.

◆ snippet_names()

std::vector< std::string_view > notex::reference::snippet_names ( )
Returns
Every distinct name a snippet can be looked up by — both canonical names and aliases, such as "box" for "cbox" and "ebox" — sorted alphabetically with duplicates removed.

Definition at line 119 of file reference.cpp.