Basic Macros

MarkCharm Team

September 8, 2026

1 Custom Macros

MarkCharm provides a powerful macro system inspired by LaTeX's \newcommand.

1.1 Simple Text Replacement

Define a macro once, use it everywhere:

If the name changes, you update it in one place — the definition.

1.2 Macros with Arguments

Macros can accept arguments using #{1}, #{2}, etc.:

1.3 Macro Definition Syntax

\newcommand{name}{\textbf{#{1}} — #{2}}

The compiler enforces a recursion depth limit of 10 levels to prevent infinite expansion loops.