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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
%D \module
%D [ file=spac-def,
%D version=2009.10.16, % 1997.03.31, was core-spa.tex
%D title=\CONTEXT\ Spacing Macros,
%D subtitle=Definitions,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{ConTeXt Spacing Macros / Definitions}
% todo: move resetters to other modules
\unprotect
\unexpanded\def\forgeteverypar
{\everypar{\the\neverypar}}
% worth trying:
%
% \unexpanded\def\forgeteverypar
% {\everypar\neverypar}
\unexpanded\def\forgetparskip
{\s_spac_whitespace_parskip\zeropoint
\parskip\zeropoint
\let\v_spac_whitespace_current\v!none}
\unexpanded\def\forgetbothskips
{\leftskip\zeropoint
\rightskip\zeropoint
\relax}
\unexpanded\def\forgethorizontalstretch
{\emergencystretch\zeropoint}
\unexpanded\def\forgetverticalstretch
{\spacing\plusone}
\newif\ifforgotten % rather good signal for inner
% This will become better: several resetters that do all in once as currently there is
% redundant code.
\appendtoks \forgottentrue \to \everyforgetall
\appendtoks \forgetragged \to \everyforgetall
\appendtoks \forgetparskip \to \everyforgetall
\appendtoks \forgetparindent \to \everyforgetall
\appendtoks \forgetbothskips \to \everyforgetall
\appendtoks \forgethorizontalstretch \to \everyforgetall % needed in pagebody
\appendtoks \forgetverticalstretch \to \everyforgetall % needed in otr
\appendtoks \everypar\emptytoks \to \everyforgetall % indeed!
\appendtoks \forgetverticalstretch \to \everybodyfont
\appendtoks \presetnormallineheight \to \everybodyfont
\appendtoks \setnormalbaselines \to \everybodyfont % check if redundant (\forgetverticalstretch does it too)
\appendtoks \setstrut \to \everybodyfont % check if redundant (\forgetverticalstretch does it too)
\appendtoks \settopskip \to \everybodyfont % factors set in \forgetverticalstretch
\appendtoks \setmaxdepth \to \everybodyfont % factors set in \forgetverticalstretch
\appendtoks \synchronizeindenting \to \everybodyfont
\appendtoks \synchronizeblank \to \everybodyfont
\appendtoks \synchronizewhitespace \to \everybodyfont
\appendtoks \synchronizespacecodes \to \everybodyfont % not needed, frozen factors
\appendtoks \setrelativeinterlinespace \to \everybodyfont
\appendtoks \updateraggedskips \to \everyfontswitch % under test
\prependtoks \let\par\normalpar \to \everybeforepagebody % see \fillinline (was endgraf)
\appendtoks \synchronizespacecodes \to \everydefinedfont % not needed, frozen factors
\setupwhitespace
[\v!none]
\indenting
[\v!never]
\setupindenting
[\v!none]
\setupblank
[\v!big] % alternatively [\v!standard]
\defineblank[\v!default] [\v!big] % todo: needs to adapt to \setupblank
\defineblank[\v!before] [\v!default] % but we need to avoid circular references
\defineblank[\v!inbetween][\v!default] % then
\defineblank[\v!after] [\v!before]
\setupinterlinespace
[\c!minheight=\zeropoint, % only special purpose
\c!mindepth=\zeropoint, % only special purpose
\c!height=.72,
\c!depth=.28,
\c!top=1.0,
\c!bottom=0.4,
\c!distance=\onepoint,
\c!line=2.8\exheight,
\c!stretch=\zerocount]
\setupnarrower
[\c!before=\endgraf,
\c!after=\endgraf,
\c!left=1.5\emwidth,
\c!right=1.5\emwidth,
\c!middle=1.5\emwidth]
\setuptolerance
[\v!horizontal,\v!verystrict]
\setuptolerance
[\v!vertical,\v!strict]
\setupalign
[\v!bottom,
\v!width]
\setupspacing
[\v!packed]
\protect \endinput
|