/

Page margin content

The .pagemargin function displays content on each page in a fixed position along its margins.

The function accepts an optional position and a body argument content:

ParameterDescriptionAccepts
positionPage area to target.topleftcorner, topleft, topcenter, topright, toprightcorner, righttop, rightmiddle, rightbottom, bottomrightcorner, bottomright, bottomcenter, bottomleft, bottomleftcorner, leftbottom, leftmiddle, lefttop, topoutsidecorner, topoutside, topinsidecorner, topinside, bottomoutsidecorner, bottomoutside, bottominsidecorner, bottominside
contentElement to display.Block content

Example 1

.pagemargin {topright}
    **This** is a margin content.
Fixed positions

Scoped margins

When used in paged and slides documents, page margin content takes effect only from the page where it is declared onward. This allows for different page margin settings in different parts of the document.

Example 2

.pagemargin {topcenter}
    On all pages

## First page

## Second page

.pagemargin {topleft}
    From second page

## Third page
Scoped page margins

Overwriting the page margin again changes it from that point onward.

Example 3

...

## Third page

.pagemargin {topcenter}
    From third page
Scoped page margins

Mirror positions

Along with fixed positions such as topright or bottomleft, Quarkdown also supports mirror positions, which adapt based on whether the page is left (even number) or right (odd number).

Mirror positions are marked in italics in the table above and refer to outside and inside areas:

Example 4

.pagemargin {topoutside}
    **This** is a margin content.
Mirror positions

Most layout themes associate the bottomcenter margin with the document footer and style it differently. For instance, different blocks may be displayed in a row. Footers are particularly common in slides documents.

The .footer function is a shorthand for .pagemargin {bottomcenter}.

Example 5

.theme {beaver} layout:{beamer}

.footer
    .docauthor

    **.docname**

    [GitHub](https://github.com/iamgio/quarkdown)
Page footer

Page counter

A page margin can host a page counter. See Page counter for more information.