meta-pag.mkiv /size: 3949 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=meta-pag,
3
%D version=1999.07.10,
4
%D title=\METAPOST\ Graphics,
5
%D subtitle=Initialization,
6
%D author=Hans Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is
11
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12
%C details.
13 14
%D These definitions used to be part of the old \type {core-mps} file, later changed
15
%D into \type {meta-ini}, but keeping them separate is cleaner.
16 17
\writestatus
{
loading
}{
MetaPost
Graphics
/
Page
Data
Management
}
18 19
\unprotect
20 21
%D The next few macros tell \METAPOST\ how the \CONTEXT\ pagebody looks.
22 23
% \startMPextensions
24
% boolean PageStateAvailable;
25
% PageStateAvailable:=true;
26
% \stopMPextensions
27 28
% maybe always set as frozen anyway
29 30
% \startMPinitializations
31
% PaperHeight:=\the\paperheight;
32
% PaperWidth:=\the\paperwidth;
33
% PrintPaperHeight:=\the\printpaperheight;
34
% PrintPaperWidth:=\the\printpaperwidth;
35
% TopSpace:=\the\topspace;
36
% BottomSpace:=\the\bottomspace;
37
% BackSpace:=\the\backspace;
38
% CutSpace:=\the\cutspace;
39
% MakeupHeight:=\the\makeupheight;
40
% MakeupWidth:=\the\makeupwidth;
41
% TopHeight:=\the\topheight;
42
% TopDistance:=\the\topdistance;
43
% HeaderHeight:=\the\headerheight;
44
% HeaderDistance:=\the\headerdistance;
45
% TextHeight:=\the\textheight;
46
% FooterDistance:=\the\footerdistance;
47
% FooterHeight:=\the\footerheight;
48
% BottomDistance:=\the\bottomdistance;
49
% BottomHeight:=\the\bottomheight;
50
% LeftEdgeWidth:=\the\leftedgewidth;
51
% LeftEdgeDistance:=\the\leftedgedistance;
52
% LeftMarginWidth:=\the\leftmarginwidth;
53
% LeftMarginDistance:=\the\leftmargindistance;
54
% TextWidth:=\the\textwidth;
55
% RightMarginDistance:=\the\rightmargindistance;
56
% RightMarginWidth:=\the\rightmarginwidth;
57
% RightEdgeDistance:=\the\rightedgedistance;
58
% RightEdgeWidth:=\the\rightedgewidth;
59
% InnerMarginDistance:=\the\innermargindistance;
60
% InnerMarginWidth:=\the\innermarginwidth;
61
% OuterMarginDistance:=\the\outermargindistance;
62
% OuterMarginWidth:=\the\outermarginwidth;
63
% InnerEdgeDistance:=\the\inneredgedistance;
64
% InnerEdgeWidth:=\the\inneredgewidth;
65
% OuterEdgeDistance:=\the\outeredgedistance;
66
% OuterEdgeWidth:=\the\outeredgewidth;
67
% PageOffset:=\the\pagebackgroundoffset;
68
% PageDepth:=\the\pagebackgrounddepth;
69
% LayoutColumns:=\the\layoutcolumns;
70
% LayoutColumnDistance:=\the\layoutcolumndistance;
71
% LayoutColumnWidth:=\the\layoutcolumnwidth;
72
% %
73
% boolean OnRightPage,OnOddPage,InPageBody;
74
% %
75
% OnRightPage:=\MPonrightpage;
76
% OnOddPage:=\MPonoddpage;
77
% InPageBody:=\ifinpagebody true \else false \fi;
78
% %
79
% RealPageNumber:=\the\realpageno;
80
% PageNumber:=\the\pageno;
81
% NOfPages:=\lastpage;
82
% LastPageNumber:=\lastpage;
83
% %
84
% CurrentColumn:=\number\mofcolumns;
85
% NOfColumns:=\number\nofcolumns;
86
% \stopMPinitializations
87 88
% \def\MPonrightpage{true} % just in case they're used
89
% \def\MPonoddpage {true} % just in case they're used
90 91
% \def\freezeMPpagelayout
92
% {\edef\MPonrightpage{\doifbothsides {tru}{tru}{fals}e}%
93
% \edef\MPonoddpage {\doifelseoddpage {tru}{fals}e}}
94 95
%D We need to freeze the pagelayout before the backgrounds are build, because the
96
%D overlay will temporarily become zero (overlay).
97 98
% \appendtoks
99
% \freezeMPpagelayout
100
% \to \everybeforepagebody
101 102
%D By freezing these value every graphic, we can use layout variables that change
103
%D halfways a page, whatever use that has.
104 105
% obsolete (but keep the code)
106
%
107
% \prependtoks
108
% \calculatereducedvsizes % this is really needed
109
% \freezeMPpagelayout
110
% \freezeMPlayout % to be used grouped
111
% \to \everyMPgraphic
112 113
\prependtoks
114
\calculatereducedvsizes
% bah, this is really needed
115
\to
\everyMPgraphic
116 117
\protect
\endinput
118