Basics
Syntax
Learn Tiramisu's core syntax: function calls, nesting, paragraphs, and special character escaping.
Tiramisu has one fundamental construct: the function call.
Function Calls
A function call has a name followed by content in curly braces:
name { content } The name can be any text before the opening brace. The content can include plain text, other function calls, or a mix of both.
Nesting
Function calls can be nested to any depth:
bold { italic { underline { deeply nested } } } Each function call can contain plain text, other function calls, or both:
bold { This is italic { partially } formatted } Paragraphs
Plain text outside of function calls becomes paragraph content. Paragraphs are separated by blank lines:
This is the first paragraph.
This is the second paragraph.
This is the third. Function Names
A function name is any text immediately before an opening {. This means function names can include spaces, numbers, and special characters — though by convention most function names are simple identifiers:
bold { works }
myWidget { works } Escaping
To prevent a function call from being parsed, prefix the function name with a backslash:
bold { this is literal text } This renders as: bold { this is literal text } — the backslash tells the parser to treat bold as plain text rather than a function call.
Special Characters
Some characters have special meaning inside function call parameters. You only need to escape them when they appear inside { } — in plain paragraph text, they are treated literally and need no escaping.
| Escape | Character | Why |
|---|---|---|
\, | Comma | Prevents parameter separation |
\= | Equals | Prevents named parameter parsing |
\{ | Opening brace | Prevents function call parsing |
\} | Closing brace | Prevents closing a function call |
\[ | Opening bracket | Prevents array parsing |
\] | Closing bracket | Prevents closing an array |
\name | Function name | Treats name as literal text |
{ }, commas, equals signs, and brackets are just regular characters.