diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/spac-def.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/spac-def.mkiv | 110 |
1 files changed, 57 insertions, 53 deletions
diff --git a/Master/texmf-dist/tex/context/base/spac-def.mkiv b/Master/texmf-dist/tex/context/base/spac-def.mkiv index 3aa85dda515..4cd7b1d1c76 100644 --- a/Master/texmf-dist/tex/context/base/spac-def.mkiv +++ b/Master/texmf-dist/tex/context/base/spac-def.mkiv @@ -5,7 +5,7 @@ %D subtitle=Definitions, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 @@ -13,59 +13,64 @@ \writestatus{loading}{ConTeXt Spacing Macros / Definitions} +% todo: move resetters to other modules + \unprotect -\def\forgeteverypar +\unexpanded\def\forgeteverypar {\everypar{\the\neverypar}} -\def\forgetparindent - {\forgeteverypar - \indentfirstparagraphtrue % recently added - \let\currentindentation\v!none - \ctxparindent\zeropoint - \parindent\zeropoint\relax} +% worth trying: +% +% \unexpanded\def\forgeteverypar +% {\everypar\neverypar} -\def\forgetparskip - {\let\currentwhitespace\v!none - \ctxparskip\zeropoint - \parskip\zeropoint\relax} +\unexpanded\def\forgetparskip + {\s_spac_whitespace_parskip\zeropoint + \parskip\zeropoint + \let\v_spac_whitespace_current\v!none} -\def\forgetbothskips - {\tolerance1500 - \leftskip\zeropoint - \rightskip\zeropoint\relax} +\unexpanded\def\forgetbothskips + {\leftskip\zeropoint + \rightskip\zeropoint + \relax} -\def\forgetspacing +\unexpanded\def\forgethorizontalstretch {\emergencystretch\zeropoint} +\unexpanded\def\forgetverticalstretch + {\spacing\plusone} + \newif\ifforgotten % rather good signal for inner -\appendtoks \forgottentrue \to \everyforgetall -\appendtoks \forgetragged \to \everyforgetall -\appendtoks \forgetparskip \to \everyforgetall -\appendtoks \forgetparindent \to \everyforgetall -\appendtoks \forgetbothskips \to \everyforgetall -\appendtoks \forgetspacing \to \everyforgetall % i.v.m. funny spacing in pagebody -\appendtoks \spacing\plusone \to \everyforgetall % new per 10/08/2004, else problems in otr / !! needed -\appendtoks \everypar\emptytoks \to \everyforgetall % indeed! +% 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 \spacing\plusone \to \everybodyfont +\appendtoks \forgetverticalstretch \to \everybodyfont \appendtoks \presetnormallineheight \to \everybodyfont -\appendtoks \setnormalbaselines \to \everybodyfont % check if redundant -\appendtoks \setstrut \to \everybodyfont % check if redundant -\appendtoks \settopskip \to \everybodyfont -\appendtoks \setmaxdepth \to \everybodyfont -\appendtoks \simplesetupindenting \to \everybodyfont -\appendtoks \simplesetupblank \to \everybodyfont -\appendtoks \simplesetupwhitespace \to \everybodyfont -\appendtoks \simplesetupspacing \to \everybodyfont % nieuw +\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\endgraf \to \everypagebody % see \fillinline -\appendtoks \simplesetupspacing \to \everydefinedfont - +\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] @@ -75,32 +80,31 @@ \setupindenting [\v!none] -\setupvspacing - [\v!standard, - \v!big] +\setupblank + [\v!big] % alternatively [\v!standard] -\definevspacing[\v!default] [\currentblank] -\definevspacing[\v!before] [\v!default] -\definevspacing[\v!inbetween][\v!default] -\definevspacing[\v!after] [\v!before] +\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=0pt, % only special purpose - \c!mindepth=0pt, % only special purpose + [\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=1pt, - \c!line=2.8ex, - \c!stretch=0] + \c!distance=\onepoint, + \c!line=2.8\exheight, + \c!stretch=\zerocount] \setupnarrower [\c!before=\endgraf, \c!after=\endgraf, - \c!left=1.5em, - \c!right=1.5em, - \c!middle=1.5em] + \c!left=1.5\emwidth, + \c!right=1.5\emwidth, + \c!middle=1.5\emwidth] \setuptolerance [\v!horizontal,\v!verystrict] |