Skip to content

Page margin content

Giorgio Garofalo edited this page Oct 19, 2025 · 7 revisions

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

  • In paged documents, a special area of each page is reserved for margins:

    Paged margin areas

    Credits: Paged.js

  • In plain and slides documents, content set on margins could potentially overlap page content.

  • In plain documents, where the concept of page does not exist, page margins are displayed once per document.

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

Parameter Description Accepts
position Page 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
content Element to display. Block content
.pagemargin {topright}
    **This** is a margin content.
Fixed positions

 

Mirror positions

Along with fixed positions, such as topright or bottomleft, there is also support for 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:

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

Although they are primarily designed for paged documents, mirror positions are also supported in slides ones.

 

Footer

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

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

.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.

Getting started [NEW!]

Documentation

CLI tools

Markdown enhancements

Functions

Setting up

Multi-file projects

Layout

Charts & diagrams

Scripting & control flow

Utilities

Slides

I/O

Native content

Value types

Built-in libraries

  • Paper: abstract, definitions, theorems, and more

Extra features

Inside Quarkdown

Clone this wiki locally