Difference between revisions of "Command/definepapersize"

From Wiki
Jump to navigation Jump to search
(Better example.)
 
Line 3: Line 3:
 
|attributes=
 
|attributes=
 
}}
 
}}
 +
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>definepapersize</syntax>
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==

Latest revision as of 16:05, 12 November 2019

\definepapersize

Syntax (autogenerated)

\definepapersize[...][...=...,...]
[...]name
widthdimension
heightdimension
topcommand
bottomcommand
leftcommand
rightcommand
distancedimension
pagesee \setuppapersize
papersee \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

Help from ConTeXt-Mailinglist/Forum

All issues with: