Command/setuppaper

From Wiki
Jump to navigation Jump to search

\setuppaper

Syntax

\setuppaper[...,...=...,...]
paper name
page name
nx number
ny number
width dimension
height dimension
topspace dimension
backspace dimension
option max fit


Description

This command is used in connection with [XY] arranging only!

This command provides the means to setup the parameters needed for [XY] arrangement. Next to this it is possible to adjust the horizontal and vertical placement of the total of the arranged part.

Example

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.

The important thing is, that the horizontal and vertical adjustments only take place, if the command

\setuplayout[location=middle]

is issued again as shown in the example code below.

\definepapersize[Label][height=42.3mm,width=97mm]
\setuppapersize[Label][A4]
\setuppaper
   [topspace=21mm, 
    backspace=8mm,
    dx=0.5mm,
    dy=0mm,
    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

See also