Skip to main content

config-page

The configuration of the page layout.

It is equivalent to the #set page() rule in Touying.

Example:

config-page(
paper: "presentation-16-9",
header: none,
footer: none,
fill: rgb("#ffffff"),
margin: (x: 3em, y: 2.8em),
)
Parameters

paper : str

A standard paper size to set width and height. The default value is "presentation-16-9". You can also use aspect-ratio to set the aspect ratio of the paper.

The page's header. Fills the top margin of each page.

The page's footer. Fills the bottom margin of each page.

fill : color

The background color of the page. The default value is rgb("#ffffff").

margin : length | dictionary

The margin of the page. The default value is (x: 3em, y: 2.8em). - A single length: The same margin on all sides. - A dictionary: With a dictionary, the margins can be set individually. The dictionary can contain the following keys in order of precedence: - top: The top margin. - right: The right margin. - bottom: The bottom margin. - left: The left margin. - inside: The margin at the inner side of the page (where the binding is). - outside: The margin at the outer side of the page (opposite to the binding). - x: The horizontal margins. - y: The vertical margins. - rest: The margins on all sides except those for which the dictionary explicitly sets a size.

numbering : str | function

The numbering style of the page. The default value is "1". The values for left and right are mutually exclusive with the values for inside and outside.

Returns: dictionary