Command/setuppaper

Unofficial ConTeXt Wiki mirror

Last modified: 2026-09-21

Summary

The command \setuppaper is used to define a grid of labels for use with \setuparranging[XY].

Settings

\setuppaper[...=...,...]
...=...,... inherits from \setuppapersize

Description

This command is only used in connection with \setuparranging [XY] . It lets you set up the number of rows and columns, and the spaces between them, as well as letting you add an offset to the resulting grid.

The horizontal and vertical adjustments are only applied if \setuplayout[location=middle] is passed at some point in the document.

If the distance parameters dx and dy are 0, the label pages are distributed evenly over the space, but without margins (this behavior changed in LMTX). The topspace and backspace options are only observed if distance parameters have at least a minimal value (like 1sp).

Examples

Example 1

Consider an A4 sheet of labels which carries 12 labels. The topspace before the first label is 21 mm, the left and right space alongside the edges of the sheet is 8 mm.

\definepapersize[Label][height=42.3mm,width=97mm]
\setuppapersize[Label][A4]
\setuppaper
   [topspace=21mm,
    backspace=8mm,
    dx=1sp,
    dy=1sp,
    nx=2,
    ny=6]

\setuplayout
   [page=Label,
    topspace=4mm,
    backspace=5mm,
    margin=0mm,
    width=87mm,
    height=34.3mm,
    header=0mm,
    footer=0mm]

\setuplayout[location=middle]

\showframe
\definelayer[Label][width=\paperwidth, height=\paperheight]
\setuparranging[XY]

\starttext
\dorecurse{12}
      {\setlayerframed
         [Label]
         [preset=leftbottom,y=.9cm,x=0mm]
         [frame=off, style=\tfx]
         {\CONTEXT\ is fun!}
    \startstandardmakeup
       \placelayer[Label]\page
    \stopstandardmakeup}
\stoptext

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: