Skip to content

Page margin content

Giorgio Garofalo edited this page Dec 13, 2024 · 4 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 (default), topright, toprightcorner, righttop, rightmiddle, rightbottom, bottomrightcorner, bottomright, bottomcenter, bottomleft, bottomleftcorner, leftbottom, leftmiddle, lefttop
content Element to display. Block content
.pagemargin {topright}
  **This** is a margin content.

(todo: result image)

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.

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

.footer
  .docauthor

  **.docname**

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

(todo: result image)

Page counter

A page margin can be used as a page counter: see Page counter.

Clone this wiki locally