Macros with Arguments

MarkCharm Team

September 8, 2026

1 Advanced Macro Usage

1.1 Multi-Argument Macros

Macros can accept multiple positional arguments (#{1}, #{2}, #{3}, ...):

\person{Ada Lovelace}{Mathematician}{Algorithms and computation}

\person{Alan Turing}{Computer Scientist}{Computability and AI}

\person{Grace Hopper}{Rear Admiral}{Compilers and COBOL}

Ada Lovelace — Mathematician. Expertise: Algorithms and computation.

Alan Turing — Computer Scientist. Expertise: Computability and AI.

Grace Hopper — Rear Admiral. Expertise: Compilers and COBOL.

1.2 Inline Usage

Status: \statusbadge{Build}{Passing} \statusbadge{Tests}{1640 passed} \statusbadge{Coverage}{92%}

Status: [Build: Passing] [Tests: 1640 passed] [Coverage: 92%]

1.3 Multiline Arguments

MarkCharm supports multiline formatting in macro calls:

\person{
    Claude Shannon
}{
    Electrical Engineer
}{
    Information theory and digital circuits
}

Claude Shannon — Electrical Engineer. Expertise: Information theory and digital circuits.

1.4 Practical Notes

\note{Macros are expanded at compile time, not at runtime.}

\note{The maximum recursion depth is 10 levels to prevent infinite loops.}

Note: Macros are expanded at compile time, not at runtime.

Note: The maximum recursion depth is 10 levels to prevent infinite loops.