!pad
Widens the text in its body to length characters with a filler at its start or end.
!pad#Attributes
lengthThe length to pad up to, in characters. A whole number, 0 or more.
Can be written as shorthand:
!pad:valuewithThe filler. Omitted or empty, it is one space: an attribute value is trimmed, so a space cannot be written.
Default
sideWhich end of the text the filler goes on.
startendDefault
start#Allowed content
Body { }Inline Chalk content, flattened to plain text
#Examples
table{
Specimen | Mass (g)
!pad:4{7}(with: 0) | 12.1
!pad:4{12}(with: 0) | 9.8
}#Notes
!pad:6{42}(with: 0)gives000042;!pad:6{42}(with: .; side: end)gives42.....- A filler longer than one character is repeated and cut to fit:
!pad:7{42}(with: ab)givesababa42. - Text already at or beyond the length is unchanged.
- The page collapses runs of spaces as it sets text, so space padding does not line up a column; a visible filler does.
- The body is read as plain text, so markup in it is dropped. A
{{…}}expression in it is read at its current value.