1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
%D \module
%D [ file=t-fullpage,
%D version=2008.12.23,
%D title=\CONTEXT\ User Module,
%D subtitle=Fullpage documents,
%D author=Wolfgang Schuster,
%D date=\currentdate,
%D copyright=Wolfgang Schuster,
%D license=Public Domain]
%D \subject{Documentation}
%D
%D This module tries to copy the behaviour of the \filename {fullpage} package
%D for \LaTeX, Mohamed Bana asked on the \ConTeXt\ mailing list if a module
%D with the same functions is available and this module was the result.
%D
%D To use this module load it with the \type {\usemodule} commmand and pass
%D a option with the \type {style} key in the optional argument.
%D
%D \starttyping
%D \usemodule[fullpage][style={cm,empty}]
%D
%D \starttext
%D \input knuth
%D \stoptext
%D \stoptyping
%D
%D The module provides the following styles:
%D
%D \starttable[|Bl|l|]
%D \HL
%D \NC in \NC set the margins to 1in \NC\AR
%D \NC cm \NC set the margins to 1.5cm \NC\AR
%D \NC plain \NC no header and narrow footer with 0.5cm \NC\AR
%D \NC headings \NC narrow header and footer with 0.5cm \NC\AR
%D \NC empty \NC no header and footer \NC\AR
%D \HL
%D \stoptable
%D
%D \subject{Implementation}
\unprotect
\startinterface all
\setinterfacevariable {fullpage} {fullpage}
\setinterfacevariable {in} {in}
\setinterfacevariable {cm} {cm}
\setinterfacevariable {plain} {plain}
\setinterfacevariable {headings} {headings}
\stopinterface
\startmodule[\v!fullpage]
\setupmodule
[\c!style={\v!in,\v!plain}]
\startsetups[\v!fullpage:\v!in]
\setuplayout
[\c!backspace=1in,
\c!width=\v!middle,
\c!topspace=1in,
\c!height=\v!middle]
\stopsetups
\startsetups[\v!fullpage:\v!cm]
\setuplayout
[\c!backspace=15mm,
\c!width=\v!middle,
\c!topspace=15mm,
\c!height=\v!middle]
\stopsetups
\startsetups[\v!fullpage:\v!plain]
\setuplayout
[\c!header=0pt,
\c!footer=.5in]
\stopsetups
\startsetups[\v!fullpage:\v!empty]
\setuplayout
[\c!header=0pt,
\c!footer=0pt]
\stopsetups
\startsetups[\v!fullpage:\v!headings]
\setuplayout
[\c!header=.5in,
\c!footer=.5in]
\stopsetups
\def\dofullpagelayout#1%
{\directsetup{\v!fullpage:#1}}
\processcommacommand[\currentmoduleparameter\c!style]\dofullpagelayout
\stopmodule
\protect \endinput
|