Difference between revisions of "Command/setuppaper"

From Wiki
Jump to navigation Jump to search
m (Stray brace)
(14 intermediate revisions by 3 users not shown)
Line 10: Line 10:
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
     <td class="cmd">[[Reference/en/keyword:paper|paper]]</td>
+
     <td class="cmd">[[Command/keyword:paper|paper]]</td>
     <td>[[Reference/en/value:name|name]] </td>
+
     <td>[[Command/value:name|name]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
     <td class="cmd">[[Reference/en/keyword:page|page]]</td>
+
     <td class="cmd">[[Command/keyword:page|page]]</td>
     <td>[[Reference/en/value:name|name]] </td>
+
     <td>[[Command/value:name|name]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
     <td class="cmd">[[Reference/en/keyword:nx|nx]]</td>
+
     <td class="cmd">[[Command/keyword:nx|nx]]</td>
     <td>[[Reference/en/value:number|number]] </td>
+
     <td>[[Command/value:number|number]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
     <td class="cmd">[[Reference/en/keyword:ny|ny]]</td>
+
     <td class="cmd">[[Command/keyword:ny|ny]]</td>
     <td>[[Reference/en/value:number|number]] </td>
+
     <td>[[Command/value:number|number]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
     <td class="cmd">[[Reference/en/keyword:width|width]]</td>
+
     <td class="cmd">[[Command/keyword:width|width]]</td>
     <td>[[Reference/en/value:dimension|dimension]] </td>
+
     <td>[[Command/value:dimension|dimension]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
     <td class="cmd">[[Reference/en/keyword:height|height]]</td>
+
     <td class="cmd">[[Command/keyword:height|height]]</td>
     <td>[[Reference/en/value:dimension|dimension]] </td>
+
     <td>[[Command/value:dimension|dimension]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
     <td class="cmd">[[Reference/en/keyword:topspace|topspace]]</td>
+
     <td class="cmd">[[Command/keyword:topspace|topspace]]</td>
     <td>[[Reference/en/value:dimension|dimension]] </td>
+
     <td>[[Command/value:dimension|dimension]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
     <td class="cmd">[[Reference/en/keyword:backspace|backspace]]</td>
+
     <td class="cmd">[[Command/keyword:backspace|backspace]]</td>
     <td>[[Reference/en/value:dimension|dimension]] </td>
+
     <td>[[Command/value:dimension|dimension]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
     <td class="cmd">[[Reference/en/keyword:option|option]]</td>
+
     <td class="cmd">[[Command/keyword:option|option]]</td>
     <td>[[Reference/en/value:max|max]] [[Reference/en/value:fit|fit]] </td>
+
     <td>[[Command/value:max|max]] [[Command/value:fit|fit]] </td>
 
   </tr>
 
   </tr>
 
</table>
 
</table>
Line 49: Line 49:
  
 
== Description ==
 
== Description ==
This command is used in connection with [XY] arranging only!
+
This command is only used in connection with {{cmd|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.
  
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 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>
 +
\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]
  
== Example ==
+
\starttext
<!-- Please fill in an example if you can -->
+
\dorecurse{12}
 +
      {\setlayerframed
 +
        [Label]
 +
        [preset=leftbottom,y=.9cm,x=0mm]
 +
        [frame=off, style=\tfx]
 +
        {\CONTEXT\ is fun!}
 +
    \startstandardmakeup
 +
      \placelayer[Label]\page
 +
    \stopstandardmakeup}
 +
\stoptext
 +
</texcode>
  
 
== See also ==
 
== See also ==
<!-- something like [[cmd:goto|\goto]] -->
+
* {{cmd|setuparranging}}
 +
* {{cmd|setuppapersize}}
 +
* {{cmd|setuplayout}}
 +
 
 +
== Help from ConTeXt-Mailinglist/Forum ==
 +
All issues with:
 +
{{Forum|{{SUBPAGENAME}}}}
  
[[Category:Reference/en|setuppaper]]
+
[[Category:Command/Layout|setuppaper]]

Revision as of 11:00, 25 May 2013

\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 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: