Block attributes
Align or indent any block, or give it an anchor, with one line above it
On this page
A block attribute line sets a property of the block right below it:
Cambridge: at the University Press
The sentence that continues after a display equation.
{align=center}
Cambridge: at the University Press
{indent=none}
The sentence that continues after a display equation.
{align=left}
$$
\int_0^1 x\,dx = \tfrac12
$$The line is {…} on its own, at the start of the line, directly above the
block with no blank line in between. It works above a paragraph, a heading, a
list, a table, a quote, a code block or display math. Above a
directive it means the same as writing
the attributes on the directive itself: :::epigraph{align=right}.
The attributes
| Key | Values | Where | Means |
|---|---|---|---|
#id |
[A-Za-z][A-Za-z0-9_.:-]{0,99} |
any block: on an attribute line or a directive fence | A stable anchor on the block, so [see](#name) links to it. |
align |
left flush left, center centred, right flush right, justify justified |
any block: on an attribute line or a directive fence | How the lines sit in the measure. |
indent |
none no first-line indent, first a first-line indent, hanging a hanging indent |
any block: on an attribute line or a directive fence | The shape of the left edge. |
number |
text, at most 32 characters, one line | the fence of: Statements | The number the source printed, shown in place of an automatic one. |
label |
text, at most 32 characters, one line | the fence of: Statements | The word the source printed, in place of the kind's label. label="" prints no word. |
label |
text, at most 32 characters, one line | the fence of: Admonitions | The box's title, in place of the translated one. label="" removes the title bar. |
group |
[A-Za-z0-9_-]{1,40} |
the fence of: :::tabs |
Tab groups with the same name switch together. |
name |
text | the fence of: :::tab |
The tab's title. |
bg |
set by the editor | the fence of: :::tikz |
The background the editor previews the diagram on. The published page does not use it. |
id |
the attachment's id | the fence of: :attach[…] |
The attachment the chip opens. |
The first three work on any block. The others belong to one directive and go on its opening fence, never on an attribute line of their own.
Several can go on one line: {#intro align=center}. On a directive they apply
to everything inside it.
When it stays as text
If anything in the braces is not one of the attributes above, or the line is
not directly above a block, it is shown exactly as you typed it. So a typo like
{alig=center} is visible instead of silently doing nothing, and a line such
as {x} in your prose is left alone.
Inside a list item or a quote, an attribute line is plain text.
The editor's alignment buttons write this line for you.