Difference between revisions of "Command/definepapersize"
< Command
m (Text replace - "\[\[cmd:(.*)\|(.*)\]\]" to "{{cmd|$1}}") |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
|attributes= | |attributes= | ||
}} | }} | ||
+ | |||
+ | == [[Help:Reference|Syntax]] (autogenerated) == | ||
+ | <syntax>definepapersize</syntax> | ||
== [[Help:Reference|Syntax]] == | == [[Help:Reference|Syntax]] == | ||
Line 15: | Line 18: | ||
<tr valign="top" class="second"> | <tr valign="top" class="second"> | ||
<td class="cmd">[[Command/keyword:width|width]]</td> | <td class="cmd">[[Command/keyword:width|width]]</td> | ||
− | <td>[[Command/value:dimension|dimension]] </td> | + | <td>[[Command/value:dimension|dimension]] : width of the new size</td> |
</tr> | </tr> | ||
<tr valign="top" class="second"> | <tr valign="top" class="second"> | ||
<td class="cmd">[[Command/keyword:height|height]]</td> | <td class="cmd">[[Command/keyword:height|height]]</td> | ||
− | <td>[[Command/value:dimension|dimension]] </td> | + | <td>[[Command/value:dimension|dimension]] : height of the new size</td> |
</tr> | </tr> | ||
<tr valign="top" class="second"> | <tr valign="top" class="second"> | ||
<td class="cmd">[[Command/keyword:offset|offset]]</td> | <td class="cmd">[[Command/keyword:offset|offset]]</td> | ||
− | <td>[[Command/value:dimension|dimension]] </td> | + | <td>[[Command/value:dimension|dimension]] : FIXME what is this?</td> |
</tr> | </tr> | ||
<tr valign="top" class="second"> | <tr valign="top" class="second"> | ||
<td class="cmd">[[Command/keyword:scale|scale]]</td> | <td class="cmd">[[Command/keyword:scale|scale]]</td> | ||
− | <td>[[Command/value:number|number]] </td> | + | <td>[[Command/value:number|number]] : scale width and height by this much</td> |
</tr> | </tr> | ||
</table> | </table> | ||
Line 35: | Line 38: | ||
Using this command we can define a paper size. | Using this command we can define a paper size. | ||
− | < | + | == Example == |
− | \definepapersize[ | + | |
− | \definepapersize[ | + | <context source=yes> |
+ | % Create a paper that can accomodate 2x4 squares of 52x52mm | ||
+ | % (A9 is 37x52mm, and we're placing it both portrait and landscape) | ||
+ | \definepapersize[sheet][width=104mm,height=156mm] | ||
+ | |||
+ | % We want 2x3 pages. | ||
+ | \setuppaper[nx=2, ny=3, dx=0mm, dy=0mm] % must come before \setuparranging! | ||
+ | \setuparranging[XY] | ||
+ | |||
+ | % Create two A9-derived paper sizes | ||
+ | \definepapersize[standing][A9] [sheet] | ||
+ | \definepapersize[lying] [A9,landscape][sheet] | ||
+ | |||
+ | \showframe | ||
\starttext | \starttext | ||
− | \setuppapersize[ | + | \setuppapersize[standing] |
− | Page 1. \page | + | Page 1: standing pages from here on. \page |
Page 2. \page | Page 2. \page | ||
− | \setuppapersize[ | + | \setuppapersize[lying] |
− | + | Page 3: lying pages from here on. \page | |
− | |||
− | Page 3. \page | ||
Page 4. \page | Page 4. \page | ||
− | \adaptpapersize[ | + | \adaptpapersize[standing] |
− | Page 5 | + | Page 5: adapted to standing \page |
− | Page 6 | + | Page 6: automatically back to lying \page |
\stoptext | \stoptext | ||
− | </ | + | </context> |
− | |||
− | |||
− | |||
== See also == | == See also == | ||
− | |||
− | [[PaperSetup]] | + | * [[PaperSetup]] |
+ | * {{cmd|setuppapersize}} to start using a defined paper size. | ||
+ | * {{cmd|adaptpapersize}} to make a single page a different defined size | ||
== Help from ConTeXt-Mailinglist/Forum == | == Help from ConTeXt-Mailinglist/Forum == | ||
Line 67: | Line 79: | ||
{{Forum|{{SUBPAGENAME}}}} | {{Forum|{{SUBPAGENAME}}}} | ||
− | [[Category: | + | [[Category:Command/Layout|definepapersize]] |
Latest revision as of 16:05, 12 November 2019
\definepapersize
Syntax (autogenerated)
\definepapersize[...][...=...,...] | |
[...] | name |
width | dimension |
height | dimension |
top | command |
bottom | command |
left | command |
right | command |
distance | dimension |
page | see \setuppapersize |
paper | see \setuppapersize |
\definepapersize[...][...,...][...,...] | |
[...] | name |
[...,...] | inherits from \setuppapersize |
[...,...] | inherits from \setuppapersize |
Syntax
\definepapersize[...][...,...=...,...] | |
[...] | name |
width | dimension : width of the new size |
height | dimension : height of the new size |
offset | dimension : FIXME what is this? |
scale | number : scale width and height by this much |
Description
Using this command we can define a paper size.
Example
% Create a paper that can accomodate 2x4 squares of 52x52mm % (A9 is 37x52mm, and we're placing it both portrait and landscape) \definepapersize[sheet][width=104mm,height=156mm] % We want 2x3 pages. \setuppaper[nx=2, ny=3, dx=0mm, dy=0mm] % must come before \setuparranging! \setuparranging[XY] % Create two A9-derived paper sizes \definepapersize[standing][A9] [sheet] \definepapersize[lying] [A9,landscape][sheet] \showframe \starttext \setuppapersize[standing] Page 1: standing pages from here on. \page Page 2. \page \setuppapersize[lying] Page 3: lying pages from here on. \page Page 4. \page \adaptpapersize[standing] Page 5: adapted to standing \page Page 6: automatically back to lying \page \stoptext
See also
- PaperSetup
- \setuppapersize to start using a defined paper size.
- \adaptpapersize to make a single page a different defined size
Help from ConTeXt-Mailinglist/Forum
All issues with: