Difference between revisions of "Command/setuppaper"

From Wiki
Jump to navigation Jump to search
(2 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
|attributes=
 
|attributes=
 
}}
 
}}
 +
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>setuppaper</syntax>
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
Line 54: Line 57:
 
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.
 
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 horizontal and vertical adjustments are only applied when {{cmd|setuplayout|[location=middle]}} is passed at some point in the document. If the {{code|dx}} and {{code|dy}}} parameters are 0, the {{code|location=middle}} option will cause the label-pages to be distributed evenly over the space keeping top and bottom and left and right space equally large.  
+
The horizontal and vertical adjustments are only applied when {{cmd|setuplayout|[location=middle]}} is passed at some point in the document. If the {{code|dx}} and {{code|dy}} parameters are 0, the {{code|1=location=middle}} option will cause the label-pages to be distributed evenly over the space keeping top and bottom and left and right space equally large.  
  
 
<texcode>
 
<texcode>

Revision as of 16:12, 12 November 2019

\setuppaper

Syntax (autogenerated)

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


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

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 horizontal and vertical adjustments are only applied when \setuplayout is passed at some point in the document. If the dx and dy parameters are 0, the location=middle option will cause the label-pages to be distributed evenly over the space keeping top and bottom and left and right space equally large.

\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

Help from ConTeXt-Mailinglist/Forum

All issues with: