Attribute shorthands
The four ways an attribute can be written shorter than key: value — implicit values, bare booleans, ! negation and aliases.
#:value, the implicit attribute
:value in the head fills the one attribute the element names for it — its implicit attribute. Every reference page marks which one that is, and an element that names none has no : form: divider:x is an error, not a value. The value is a simple token: it ends at the first bracket, whitespace, or end of line, so anything longer is written in the group instead.
image:photo.jpg(caption: Fig 1) image(source: photo.jpg; caption: Fig 1)
curve:x^2(colour: blue) curve(expression: x^2; colour: blue)A node is still recognised only by its bracket, so the shorthand does not remove the need for one: image:photo.jpg on its own is a paragraph, and image:photo.jpg() is the node. Micronodes and directives carry their own sigil and stand bare — :overview.part.chalk needs no bracket.
#Boolean shorthand
An attribute typed bool may be written as a bare name, with no : and no value, and ! before the name sets it false. curve(dashed) is curve(dashed: true); curve(!dashed) is curve(dashed: false). The negated form reaches attributes that default to true — show-ticks, show-axes, show-grid and show-background among them.
Written out, a bool takes true, false, yes or no, in any case. 1 and 0 are not booleans: they are numbers, and admitting them here would make bool and number accept the same text, which is the one thing a union of the two may not do.
curve(expression: x^2; dashed)
canvas.graph{ … }(show-grid; !show-ticks)! here is not the micronode sigil. In an attribute group a leading ! on a name negates a boolean; in prose or a value it opens a micronode. The position tells them apart, so hidden: false, !hidden and hidden: true !cue.to{false}(at: 2) are three different statements about the same attribute.#Hyphens and case in attribute names
An attribute name is an identifier. Written as a key, it folds internal whitespace to a single hyphen and matches case-insensitively, so x-domain, x domain, X-DOMAIN and X Domain all set the same attribute.
canvas.graph{ … }(x domain: [0, 5]) sets x-domain
canvas.graph{ … }(Show-Grid) sets show-grid: trueThe folding applies to keys and to {{ }} substitutions, not to bindings. A binding carries the name through to the renderer exactly as written, so a hyphenated attribute must be referred to by its canonical spelling — #id.text-size resolves and #id.text size does not. Every reference page lists the canonical name, and it is the one to write in every position.
Both spellings compile, so which to write is a convention: Source style takes the spaced form in a group and the canonical one everywhere else.
#Aliases
Many attributes accept more than one spelling: colour and color, segment's start and from, curve's expression, exp, f, func and function. Aliases are declared by the element, not general rewriting, so a reference page's attribute table is the list of what that element takes.