diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/spac-ver.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/spac-ver.mkiv | 398 |
1 files changed, 94 insertions, 304 deletions
diff --git a/Master/texmf-dist/tex/context/base/spac-ver.mkiv b/Master/texmf-dist/tex/context/base/spac-ver.mkiv index 75af82df79a..d04ed672423 100644 --- a/Master/texmf-dist/tex/context/base/spac-ver.mkiv +++ b/Master/texmf-dist/tex/context/base/spac-ver.mkiv @@ -78,39 +78,6 @@ \fi -% \def\presetnormallineheight -% {\edef\normallineheight{\@@itline}% -% %done elsewhere : \spacing\!!plusone % new per 10/08/2004, else problems in otr / !! needed -% \iflocalinterlinespace \else -% \doifdefined\bodyfontinterlinespecs -% {\doifsomething\bodyfontinterlinespace -% {\edef\normallineheight{\bodyfontinterlinespace}}}% -% \fi} - -% \unexpanded\def\setupspecifiedinterlinespace[#1]% -% {\getparameters[\??it][#1]% -% \scratchdimen0\@@itheight\points -% \advance\scratchdimen 0\@@itdepth\points -% \ifdim\scratchdimen>\onepoint -% \showmessage\m!layouts{10}{\@@itheight,\@@itdepth}% -% \let\@@itheight\strutheightfactor -% \let\@@itdepth \strutdepthfactor -% \else -% \let\strutheightfactor\@@itheight -% \let\strutdepthfactor \@@itdepth -% \fi -% \let\minimumstrutheight \@@itminheight -% \let\minimumstrutdepth \@@itmindepth -% \let\minimumlinedistance\@@itdistance -% \let\normallineheight \@@itline % let ! ! ! ! ! ivm ex -% \doifelse\@@ittop\v!height % new, topskip does more bad than good -% {\let\topskipfactor \@@itheight} -% {\let\topskipfactor \@@ittop }% -% \let\maxdepthfactor \@@itbottom -% \let\baselinegluefactor \@@itstretch -% \setfontparameters % redundant, can be \setstrut, test first -% \updateraggedskips} % yes indeed - \def\presetnormallineheight {\edef\normallineheight{\interlinespaceparameter\c!line}% %done elsewhere : \spacing\!!plusone % new per 10/08/2004, else problems in otr / !! needed @@ -150,16 +117,6 @@ \setfontparameters} \setvalue{\??it::\v!auto }{\let\setrelativeinterlinespace\dosetrelativeinterlinespace} -% \def\dosetspecifiedrelativeinterlinespace#1% -% {\assignvalue{#1}\currentrelativeinterlinespace{1.00}{1.25}{1.50}% -% \spacing\currentrelativeinterlinespace} - -% \def\dosetspecifiedrelativeinterlinespace#1% fragile? -% {\doifdimensionelse{#1} -% {\setupspecifiedinterlinespace[\c!line=#1]} -% {\assignvalue{#1}\currentrelativeinterlinespace{1.00}{1.25}{1.50}% -% \spacing\currentrelativeinterlinespace}} - \def\dosetspecifiedrelativeinterlinespace#1% fragile? {\doifdimenstringelse{#1} {\setupspecifiedinterlinespace[\c!line=#1]} @@ -183,15 +140,9 @@ \let\setrelativeinterlinespace\relax -% \appendtoks \setrelativeinterlinespace \to \everybodyfont - \newtoks \everysetupglobalinterlinespace \newtoks \everysetuplocalinterlinespace -% \def\complexsetupinterlinespace[#1]% \commalistelement ipv #1 -% {\doifassignmentelse{#1}\setupspecifiedinterlinespace\setuprelativeinterlinespace[#1]% -% \the\iflocalinterlinespace\everysetuplocalinterlinespace\else\everysetupglobalinterlinespace\fi} - \def\interlinespaceparameter #1{\csname\dointerlinespaceparameter{\??it\currentinterlinespace}#1\endcsname} \def\dointerlinespaceparameter #1#2{\ifcsname#1#2\endcsname#1#2\else\expandafter\dointerlinespaceparentparameter\csname#1\s!parent\endcsname#2\fi} \def\dointerlinespaceparentparameter#1#2{\ifx#1\relax\s!empty\else\dointerlinespaceparameter#1#2\fi} @@ -236,23 +187,6 @@ \the\everysetuplocalinterlinespace \localinterlinespacefalse} -% \def\dosetupcheckedinterlinespace#1% often a chain -% {\edef\askedinterlinespace{#1}% -% \ifx\askedinterlinespace\empty -% \simplesetupinterlinespace -% \else -% \normalexpanded{\noexpand\doifassignmentelse{\askedinterlinespace}% -% \noexpand\setupspecifiedinterlinespace -% \noexpand\setuprelativeinterlinespace[\askedinterlinespace]}% -% \iflocalinterlinespace -% \the\everysetuplocalinterlinespace -% \else -% \localinterlinespacetrue -% \the\everysetuplocalinterlinespace -% \localinterlinespacefalse -% \fi -% \fi} - \def\dosetupcheckedinterlinespace#1% often a chain {\edef\askedinterlinespace{#1}% \ifx\askedinterlinespace\empty @@ -282,29 +216,6 @@ \fi \fi\fi} -% \unexpanded\def\setuplocalinterlinespace[#1]% -% {\localinterlinespacetrue -% \let\@@saveditheight \@@itheight -% \let\@@saveditdepth \@@itdepth -% \let\@@saveditline \@@itline -% \let\@@saveditminheight\@@itminheight -% \let\@@saveditmindepth \@@itmindepth -% \let\@@saveditdistance \@@itdistance -% \let\@@savedittop \@@ittop -% \let\@@saveditbottom \@@itbottom -% \let\@@saveditstretch \@@itstretch -% \setupinterlinespace[#1]% -% \let\@@itheight \@@saveditheight -% \let\@@itdepth \@@saveditdepth -% \let\@@itline \@@saveditline -% \let\@@itminheight\@@saveditminheight -% \let\@@itmindepth \@@saveditmindepth -% \let\@@itdistance \@@saveditdistance -% \let\@@ittop \@@savedittop -% \let\@@itbottom \@@saveditbottom -% \let\@@itstretch \@@saveditstretch -% \localinterlinespacefalse} - \unexpanded\def\setuplocalinterlinespace[#1]% {\localinterlinespacetrue \pushmacro\currentinterlinespace @@ -468,6 +379,8 @@ \dosetupwhitespace \fi} +\newconstant\baselinegridmode % option in layout / 1=permit_half_lines + \def\dosetupwhitespace % quick test for no list {\ifcsname\??ws\??ws\currentwhitespace\endcsname \csname\??ws\??ws\currentwhitespace\endcsname @@ -495,8 +408,6 @@ \fi \parskip\ctxparskip} -\chardef\baselinegridmode=0 % option in layout / 1=permit_half_lines - \def\dodosetupwhitespace {\ifgridsnapping \setfalse\flexiblewhitespace @@ -537,46 +448,15 @@ \def\dowhitespacemethod#1% {\ifcsname\??ws\??ws#1\endcsname\csname\??ws\??ws#1\endcsname\else\ctxparskip#1\fi\relax} - -% \def\nowhitespace -% {\ifdim\parskip>\zeropoint\relax -% \ifdim\lastskip=-\parskip -% \else -% \vskip-\parskip -% \fi -% \fi} -% -% \def\nowhitespaceunlessskip -% {\ifdim\lastskip>\zeropoint \else -% \nowhitespace -% \fi} -% -% \def\whitespace -% {\par -% \ifdim\parskip>\zeropoint\relax -% %\ifdim\lastskip>\parskip \else -% % \removelastskip interferes with blanko blokkeer en klein -% \vskip\parskip -% %\fi -% \fi} \def\nowhitespace{\vspacing[\v!nowhite]} \def\whitespace {\vspacing[\v!white]} -% obsolete: -% -% \def\savedcurrentwhitespace{\currentwhitespace} -% \def\savecurrentwhitespace {\edef\savedcurrentwhitespace{\currentwhitespace}} -% \def\restorecurrentwhitespace{\edef\currentwhitespace{\savedcurrentwhitespace}} - % De onderstaande macro handelt ook de situatie dat er geen % tekst tussen \start ... \stop is geplaatst. Daartoe wordt de % laatste skip over de lege tekst heen gehaald. Dit komt goed % van pas bij het plaatsen van (mogelijk lege) lijsten. -\newsignal \noparskipsignal % \def\noparskipsignal {0.00001pt} -\def\lastdoneparskip {0pt} - \newconditional\noblankinpacked \newcount\packeddepth @@ -970,7 +850,7 @@ % experiment -\newbox\emptystrutbox \setbox\emptystrutbox\hbox{} +\newbox\emptystrutbox \setbox\emptystrutbox\emptyhbox \def\dosetstruthide {\setbox\strutbox\copy\emptystrutbox @@ -979,7 +859,6 @@ \def\strut{\relax\dontleavehmode\copy\strutbox} % still callbacks for \hbox{\strut} - \let\normalstrut\strut %D Sometimes a capstrut comes in handy @@ -992,20 +871,24 @@ %D \NC \NC a normal strut \NC {\showstruts\setupstrut\strut} \NC \NR %D \stoptabulate +\setvalue{@strut@\v!yes }{\setstrut} +\setvalue{@strut@\v!auto }{\setautostrut} +\setvalue{@strut@\v!no }{\setnostrut} +\setvalue{@strut@\v!cap }{\setcapstrut} +\setvalue{@strut@\v!fit }{\setfontstrut} +\setvalue{@strut@\v!line }{\setstrut} +\setvalue{@strut@\s!default}{\setstrut} +\setvalue{@strut@\s!empty }{\setstrut} + \unexpanded\def\setupstrut {\dosingleempty\dosetupstrut} \def\dosetupstrut[#1]% yet undocumented, todo: fontstrut - {\processaction - [#1] - [ \v!yes=>\setstrut, - \v!auto=>\setautostrut, - \v!no=>\setnostrut, - \v!cap=>\setcapstrut, - \v!fit=>\setfontstrut, - \v!line=>\setstrut, - \s!default=>\setstrut, - \s!unknown=>\setcharstrut\commalistelement]} + {\ifcsname @strut@#1\endcsname + \csname @strut@#1\endcsname + \else + \setcharstrut{#1}% + \fi} \def\showstruts {\setteststrut @@ -1067,7 +950,7 @@ \fi \fi\fi} -\newbox\nostrutbox \setbox\nostrutbox\normalhbox{} % {\normalhbox{}} +\newbox\nostrutbox \setbox\nostrutbox\emptyhbox \def\setnostrut {\setbox\strutbox\copy\nostrutbox @@ -1117,13 +1000,6 @@ %D why|>| this assignment gives troubles in for instance the %D visual debugger. -%D The plain ones: - -% \def\offinterlineskip -% {\baselineskip-\thousandpoint -% \lineskip\zeropoint -% \lineskiplimit\maxdimen} - \def\offinterlineskip {\baselineskip-\thousandpoint \lineskip\zeropoint @@ -1281,7 +1157,7 @@ %D Page spacing -\chardef\bottomraggedness=0 % 0=ragged 1=normal/align 2=baseline +\newconstant\bottomraggednessmode % 0=ragged 1=normal/align 2=baseline \def\bottomalignlimit{3\lineheight} @@ -1294,21 +1170,21 @@ \r@ggedbottomfalse} \def\raggedbottom - {\chardef\bottomraggedness\zerocount + {\bottomraggednessmode\zerocount \n@rmalbottomfalse \r@ggedbottomtrue \b@selinebottomfalse \settopskip} \def\alignbottom - {\chardef\bottomraggedness\plusone + {\bottomraggednessmode\plusone \n@rmalbottomtrue \r@ggedbottomfalse \b@selinebottomfalse \settopskip} \def\baselinebottom - {\chardef\bottomraggedness\plustwo + {\bottomraggednessmode\plustwo \n@rmalbottomfalse \r@ggedbottomfalse \b@selinebottomtrue @@ -1318,27 +1194,26 @@ % so, the new one will be % -% \chardef\bottomraggedness=0 % 0=ragged 1=normal/align 2=baseline +% \bottomraggednessmode=0 % 0=ragged 1=normal/align 2=baseline % % \def\bottomalignlimit{3\lineheight} % will be settable % -% \def\raggedbottom {\chardef\bottomraggedness=0 \settopskip} -% \def\alignbottom {\chardef\bottomraggedness=1 \settopskip} -% \def\baselinebottom{\chardef\bottomraggedness=2 \settopskip} +% \def\raggedbottom {\bottomraggednessmode\zerocount\settopskip} +% \def\alignbottom {\bottomraggednessmode\plusone \settopskip} +% \def\baselinebottom{\bottomraggednessmode\plustwo \settopskip} % % \let\normalbottom =\alignbottom %D Good old blank redone: -\definesystemattribute[kern-chars] -\definesystemattribute[skip-category] \chardef\skipcategoryattribute \dogetattributeid{skip-category} -\definesystemattribute[skip-penalty] \chardef\skippenaltyattribute \dogetattributeid{skip-penalty} -\definesystemattribute[skip-order] \chardef\skiporderattribute \dogetattributeid{skip-order} -\definesystemattribute[display-math] \chardef\displaymathattribute \dogetattributeid{display-math} -\definesystemattribute[snap-method] \chardef\snapmethodattribute \dogetattributeid{snap-method} -\definesystemattribute[snap-done] \chardef\snapdoneattribute \dogetattributeid{snap-done} - -%definesystemattribute[snap-category] \chardef\snapcategoryattribute \dogetattributeid{snap-category} +%definesystemattribute[kernchars] [public] +\definesystemattribute[skipcategory] [public] +\definesystemattribute[skippenalty] [public] +\definesystemattribute[skiporder] [public] +\definesystemattribute[displaymath] [public] +\definesystemattribute[snapmethod] [public] +\definesystemattribute[snapvbox] [public] +%definesystemattribute[snapcategory] [public] % TODO: NAMED SNAPPERS @@ -1350,14 +1225,20 @@ \newdimen \globalbodyfontstrutheight \newdimen \globalbodyfontstrutdepth -% \appendtoks -% \dosetupgridsnapping -% \to \everysetupbodyfont +\def\snappedvboxattribute{\ifgridsnapping attr \snapvboxattribute \attribute\snapmethodattribute\fi} +\def\setlocalgridsnapping{\ifgridsnapping \attribute \snapvboxattribute \attribute\snapmethodattribute\fi} + +\def\dosetlocalgridsnapping#1% + {\ifgridsnapping + \doifsomething{#1}% + {\autosetsnapvalue{#1}% + \attribute \snapvboxattribute \attribute\snapmethodattribute}% + \fi} \def\installsnapvalues#1#2% todo: a proper define {\edef\currentsnapper{#1:#2}% \ifcsname\currentsnapper\endcsname \else - \setevalue\currentsnapper{\ctxlua{vspacing.define_snap_method("#1","#2")}}% + \setevalue\currentsnapper{\ctxlua{builders.vspacing.definesnapmethod("#1","#2")}}% \fi \setevalue{\??gr:#1}{\attribute\snapmethodattribute\csname\currentsnapper\endcsname\space}} @@ -1440,11 +1321,6 @@ \global\globalbodyfontstrutheight\strutheight \global\globalbodyfontstrutdepth \strutdepth} -% \appendtoks -% \synchronizegloballinespecs -% \synchronizelocallinespecs -% \to \everysetupgridsnapping - \appendtoks \synchronizegloballinespecs \synchronizelocallinespecs @@ -1454,10 +1330,6 @@ \synchronizelocallinespecs \to \everysetuplocalinterlinespace -% \appendtoks -% \resetsnapvalues -% \to \everyforgetall - %D Snapping. \newif\ifgridsnapping @@ -1472,7 +1344,7 @@ {} % gone, unless we set an attribute \def\doplaceongrid[#1]% - {\snaptogrid[#1]\vbox} + {\snaptogrid[#1]\vbox} % mark as done \def\dosnaptogrid[#1]% list or predefined {\ifgridsnapping @@ -1489,32 +1361,35 @@ % eventually there will always be a line snap \def\dododosnaptogrid#1% - {\ifvbox\nextbox - \ctxlua{nodes.collapse_vbox(\number\nextbox)}% + {\ifvbox\nextbox % this will go away + \ctxlua{builders.vspacing.collapsevbox(\number\nextbox)}% isn't that already done? \fi \doifelsenothing{#1}{\setsnapvalue\v!normal}{\autosetsnapvalue{#1}}% - \ctxlua{vspacing.snap_box(\number\nextbox,\number\attribute\snapmethodattribute)}% -% \ifzeropt\ht\nextbox -% \ifzeropt\dp\nextbox -% \box\nextbox % here, else empty and zero -% \kern-\bodyfontlineheight -% \else -% \box\nextbox -% \fi -% \else - \box\nextbox -% \fi + \ctxlua{builders.vspacing.snapbox(\number\nextbox,\number\attribute\snapmethodattribute)}% + \ifvbox\nextbox\vbox\else\hbox\fi attr \snapmethodattribute \zerocount {\box\nextbox}% \egroup} +\def\docheckgridsnappingnop + {\gridsnappingfalse + \resetsystemmode\v!grid + \resetsnapvalue} + +\def\docheckgridsnappinyes + {\gridsnappingtrue + \setsystemmode\v!grid + \autosetsnapvalue\askedgridmode} + \def\docheckgridsnapping - {\edef\askedgridmode{\layoutparameter\c!grid}% needs checking by WS - \doifelse\askedgridmode\v!no - {\gridsnappingfalse - \resetsystemmode\v!grid - \resetsnapvalue} - {\gridsnappingtrue - \setsystemmode\v!grid - \autosetsnapvalue\askedgridmode}} + {\edef\askedgridmode{\layoutparameter\c!grid}% + \ifx\askedgridmode\v!no % official + \docheckgridsnappingnop + \else\ifx\askedgridmode\v!off % for taco and luigi + \docheckgridsnappingnop + \else\ifx\askedgridmode\empty % to be sure + \docheckgridsnappingnop + \else + \docheckgridsnappingyes + \fi\fi\fi} %D Visualization: @@ -1534,8 +1409,8 @@ \hss}% \flushnextbox}}} -\chardef\gridboxlinenomode\plusone % 0:nothing 1:all 2:lines 3:frame 4:l/r -\chardef\gridboxlinemode \plusone +\setnewconstant\gridboxlinenomode\plusone % 0:nothing 1:all 2:lines 3:frame 4:l/r +\setnewconstant\gridboxlinemode \plusone \def\gridboxvbox {\ifcase\gridboxlinemode\vbox\or\ruledvbox\or\vbox\or\ruledvbox\else\ruledvbox\fi} \def\gridboxwidth{\ifcase\gridboxlinemode0\or.5\or.5\or0\else.5\fi\testrulewidth} @@ -1548,14 +1423,10 @@ \hsize#2% \baselinerulefalse \ifnum\gridboxlinenomode=\plusthree - \chardef\gridboxlinenomode\ifodd\realpageno\plusone\else\plustwo\fi + \gridboxlinenomode\ifodd\realpageno\plusone\else\plustwo\fi \fi \gridboxvbox % calculated size {\getrawnoflines{#3}% \getnoflines{#3}% -% \ifgridsnapping \else -% \vskip\topskip -% \vskip-\strutht -% \fi \scratchdimen#2\advance\scratchdimen \lineheight \dorecurse\noflines {\strut @@ -1581,10 +1452,6 @@ \def\fuzzysnappedbox#1#2% \box<n> \unvbox<n> {#1#2} -% \def\moveboxontogrid#1#2#3% will become obsolete -% {\doif{#2}\v!top {\setbox#1\hbox{\snaptogrid[\v!first]\box#1}}% -% \doif{#2}\v!bottom{\setbox#1\hbox{\snaptogrid[\v!last ]\box#1}}} - \def\moveboxontogrid#1#2#3% will become obsolete {} @@ -1607,19 +1474,6 @@ % \start \dosetstretch{.25em} \setuptolerance[tolerant,stretch] \input tufte \endgraf \stop % \start \dosetstretch{.5em} effe flink doorfietsen \stop -% \def\dosetupgridsnapping % calls too often, only needed in gridsnapping -% {\ctxlua{nodes.setsnapvalue(1,\number\openstrutheight,\number\openstrutdepth)}} -% -% \def\doenablegridsnapping -% {\attribute\snapcategoryattribute\plusone -% \topskip\strutht -% \offinterlineskip} -% -% \def\dodisablegridsnapping -% {\attribute\snapcategoryattribute\attributeunsetvalue -% % reset topskip -% \oninterlineskip} - % experimental code, not yet interfaced: % category: @@ -1638,7 +1492,7 @@ % % \defineblankmethod [\v!joinedup] {\ifvmode\nointerlineskip\fi} -% todo, in grid mode: vspacing.fixed = false +% todo, in grid mode: builders.vspacing.fixed = false \let\saveouterspacing \relax % for old times sake \let\restoreouterspacing\relax % for old times sake @@ -1738,12 +1592,9 @@ \unexpanded\def\definevspacingamount {\dotripleempty\dodefinevspacingamount} -% \def\dodefinevspacingamount[#1][#2][#3]% -% {\ctxlua{vspacing.setskip("#1",\!!bs\detokenize{#2}\!!es,\!!bs\detokenize{#3}\!!es)}} - \def\dodefinevspacingamount[#1][#2][#3]% can be combined {\setvalue{\??vs:#1}{\ifgridsnapping#3\else#2\fi}% - \ctxlua{vspacing.setskip("#1")}} + \ctxlua{builders.vspacing.setskip("#1")}} \def\addpredefinedblankskip#1#2% {\settrue\someblankdone @@ -1757,7 +1608,7 @@ {\dodoubleempty\dodefinevspacing} \def\dodefinevspacing[#1][#2]% - {\ctxlua{vspacing.setmap("#1","#2")}} + {\ctxlua{builders.vspacing.setmap("#1","#2")}} \unexpanded\def\vspacing {\dosingleempty\dovspacing} @@ -1774,7 +1625,8 @@ \fi\fi} \def\dovspacingyes[#1]% - {\ifmmode\else\ctxlua{vspacing.analyse("\iffirstargument#1\else\s!default\fi")}\fi} + %{\ifmmode\else\ctxlua{builders.vspacing.analyze("\iffirstargument#1\else\s!default\fi")}\fi} + {\ifmmode\else\ctxlua{builders.vspacing.analyze("\iffirstargument#1\else\currentvspacing\fi")}\fi} \def\dovspacingnop[#1]% {\ifmmode\else\par\fi} @@ -1783,7 +1635,7 @@ \definecomplexorsimple\setupvspacing -\let\currentvspacing\empty +\let\currentvspacing\s!default \def\complexsetupvspacing[#1]% {\edef\currentvspacing{#1}} @@ -1799,7 +1651,7 @@ % used both -\def\doinhibitblank{\vspacing[\v!disable]} % can be made faster +\def\doinhibitblank{\vspacing[\v!disable]} % can be made faster (keep this command, used in styles) \def\inhibitblank {\vspacing[\v!disable]} % can be made faster \let\setupblank \setupvspacing @@ -1808,16 +1660,6 @@ % category:4 is default -% \definevspacingamount[\v!big] [\bigskipamount] [\openlineheight] -% \definevspacingamount[\v!medium] [\medskipamount] [0.50\openlineheight] -% \definevspacingamount[\v!small] [\smallskipamount] [0.25\openlineheight] -% \definevspacingamount[\v!line] [\openlineheight] [\openlineheight] -% \definevspacingamount[\v!halfline][0.50\openlineheight][0.50\openlineheight] -% \definevspacingamount[\v!formula] [\medskipamount] [0.50\openlineheight] -% \definevspacingamount[\v!white] [\parskip] [\openlineheight] -% \definevspacingamount[\v!height] [\strutheight] [\strutheight] -% \definevspacingamount[\v!depth] [\strutdepth] [\strutdepth] - \definevspacingamount[\v!none] [\zeropoint] [\zeropoint] \definevspacingamount[\v!big] [\bigskipamount] [\bodyfontlineheight] \definevspacingamount[\v!medium] [\medskipamount] [0.50\bodyfontlineheight] @@ -1851,31 +1693,11 @@ \definevspacing[\v!weak] [order:0] \definevspacing[\v!strong] [order:100] -\definevspacing[\s!default] [\v!white] % was big for a while +\definevspacing[\s!default] [\v!white] % was big for a while \dorecurse{10} % todo: other values < 4000 {\expanded{\definevspacing[\v!samepage-\recurselevel][penalty:\the\numexpr4000+250*\recurselevel\relax]}} -% \setfalse\vspacingenabled -% -% \newtoks\everyenablevspacing -% \newtoks\everydisablevspacing -% -% \def\enablevspacing {\the\everyenablevspacing} -% \def\disablevspacing{\the\everydisablevspacing} -% -% \appendtoks -% \writestatus\m!systems{! ! enabling vspacing ! !}% -% \settrue\vspacingenabled -% \ctxlua{vspacing.enable()}% -% \to \everyenablevspacing -% -% \appendtoks -% \writestatus\m!systems{! ! disabling vspacing ! !}% -% \setfalse\vspacingenabled -% \ctxlua{vspacing.disable()}% -% \to \everydisablevspacing - \let\blank \vspacing \let\defineblank \definevspacing \let\defineblankmethod\definevspacingamount @@ -1944,48 +1766,6 @@ %D \stoplines %D \stoptyping -% \unexpanded\def\setuplines -% {\dodoubleargument\getparameters[\??rg]} -% -% \unexpanded\def\startlines -% {\@@rgbefore -% \pushmacro\checkindentation -% \whitespace -% %\page[\v!preference]} gaat mis na koppen, nieuw: later \nobreak -% \begingroup -% \setupindenting[\@@rgindenting]% -% \typesettinglinestrue -% \setupwhitespace[\v!none]% -% \obeylines -% \ignorespaces -% \gdef\afterfirstobeyedline % tzt two pass, net als opsomming -% {\gdef\afterfirstobeyedline -% {\nobreak -% \doifnot\@@rgoption\v!packed{\global\let\afterfirstobeyedline\relax}}}% -% \def\obeyedline -% {\par -% \futurelet\next\dobetweenthelines}% -% \activatespacehandler\@@rgspace -% \GotoPar} -% -% \unexpanded\def\stoplines -% {\endgroup -% \popmacro\checkindentation -% \@@rgafter} -% -% \def\dobetweenthelines -% {\doifmeaningelse\next\obeyedline -% {\@@rginbetween} -% {\afterfirstobeyedline}} -% -% \setuplines -% [\c!option=, -% \c!before=\blank, -% \c!after=\blank, -% \c!inbetween=\blank, -% \c!indenting=\v!no, -% \c!space=\v!default] - %D Contrary to \MKII\ we can now define classes of lines (generalized by %D Wolfgang). I will probably rewrite bits in \LUA. @@ -2009,6 +1789,7 @@ \getparameters [\??rg] [\c!option=, + \c!command=, \c!before=\blank, \c!after=\blank, \c!inbetween=\blank, @@ -2035,6 +1816,14 @@ \def\dostartlines[#1]% {\bgroup \edef\currentlines{#1}% + \obeylines + \dosingleempty\dodostartlines} + +\def\dodostartlines[#1]% new: optional second argument (WS) + {\iffirstargument + \getparameters[\??rg\currentlines][#1]% + \fi + \edef\linesoption{\linesparameter\c!option}% \linesparameter\c!before \pushmacro\checkindentation \whitespace @@ -2044,12 +1833,13 @@ \setupalign[\linesparameter\c!align]% \typesettinglinestrue \setupwhitespace[\v!none]% - \obeylines + %\obeylines % move upwards to keep spaces in the first line due to optional argument \ignorespaces \gdef\afterfirstobeyedline % tzt two pass, net als opsomming - {\gdef\afterfirstobeyedline - {\nobreak - \doifnot{\linesparameter\c!option}\v!packed{\global\let\afterfirstobeyedline\relax}}}% + {\linesparameter\c!command + \gdef\afterfirstobeyedline + {\ifx\linesoption\v!packed\nobreak\fi + \linesparameter\c!command}}% \def\obeyedline {\par \futurelet\next\dobetweenthelines}% |