diff options
author | Hans Hagen <pragma@wxs.nl> | 2004-08-30 00:00:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2004-08-30 00:00:00 +0200 |
commit | 334f3edd2304915fc8b50a722a56765f41b1a7d5 (patch) | |
tree | 0d62c2871118f4971fa7b0b6bb1e87b12f647bff /tex/context/base/core-buf.tex | |
parent | 08a4bcc9bff26007ca9b5d14d6beaacab74c9ce4 (diff) | |
download | context-334f3edd2304915fc8b50a722a56765f41b1a7d5.tar.gz |
stable 2004.08.30
Diffstat (limited to 'tex/context/base/core-buf.tex')
-rw-r--r-- | tex/context/base/core-buf.tex | 178 |
1 files changed, 89 insertions, 89 deletions
diff --git a/tex/context/base/core-buf.tex b/tex/context/base/core-buf.tex index 9a998a201..51e1cd27c 100644 --- a/tex/context/base/core-buf.tex +++ b/tex/context/base/core-buf.tex @@ -1,5 +1,5 @@ %D \module -%D [ file=core-buf, +%D [ filefile=core-buf, %D version=2000.01.05, %D title=\CONTEXT\ Core Macros, %D subtitle=Buffers and Blockmoves, @@ -188,7 +188,7 @@ \def\dostartbuffer {\bgroup - \obeylines % nodig, anders gaat 't fout als direct \starttabel (bv) + \obeylines % nodig, anders gaat 't fout als direct \starttable (bv) \doquadrupleempty\dodostartbuffer} \def\dodostartbuffer[#1][#2][#3][#4]% upward compatible @@ -201,9 +201,9 @@ \def\dododostartbuffer[#1][#2][#3][#4]% {%\showmessage\m!systems{15}{#2}% - \doifelsevalue{\??bu#1\c!alinea}\v!ja + \doifelsevalue{\??bu#1\c!paragraph}\v!yes {\segmentatebuffertrue} - {\doifnumberelse{\getvalue{\??bu#1\c!alinea}}\segmentatebuffertrue\segmentatebufferfalse}% + {\doifnumberelse{\getvalue{\??bu#1\c!paragraph}}\segmentatebuffertrue\segmentatebufferfalse}% \doifelsenothing{#4} {\letbeundefined{\e!stop\v!buffer}% % \let\stopbuffer=\relax % \undefined \@EA\@EA\@EA\convertargument\@EA\e!start\v!buffer\to\beginofblock % else a space @@ -246,10 +246,10 @@ \def\dodobuffer#1#2% {\beginrestorecatcodes - \ifundefined{\??bu#2\c!nummer}% + \ifundefined{\??bu#2\c!number}% \edef\bufferfilename{\TEXbufferfile{#2}}% \else - \edef\bufferfilename{\TEXbufferfile{def-\getvalue{\??bu#2\c!nummer}}}% + \edef\bufferfilename{\TEXbufferfile{def-\getvalue{\??bu#2\c!number}}}% \fi #1\bufferfilename\donothing\donothing \endrestorecatcodes} @@ -270,12 +270,12 @@ \fi} \def\dodoprocessTEXbuffer[#1][#2]% - {\getvalue{\??bu#1\c!voor}% + {\getvalue{\??bu#1\c!before}% \dobuffer{16}[#2]\readjobfile - \getvalue{\??bu#1\c!na}} + \getvalue{\??bu#1\c!after}} \let\getbuffer \processTEXbuffer % handy -\let\haalbuffer\processTEXbuffer % will move to mult-com.tex +\let\getbuffer\processTEXbuffer % will move to mult-com.tex \def\typebuffer {\dodoubleempty\dotypebuffer} @@ -287,31 +287,31 @@ \dobuffer{17}[#2]\typefile \fi} -\def\stelbufferin - {\dodoubleempty\dostelbufferin} +\def\setupbuffer + {\dodoubleempty\dosetupbuffer} -\def\dostelbufferin[#1][#2]% +\def\dosetupbuffer[#1][#2]% {\ifsecondargument \getparameters[\??bu#1][#2]% \else \getparameters[\??bu][#1]% \fi} -\def\dodefinieerbuffer[#1]% +\def\dodefinebuffer[#1]% {\iffirstargument % else problems \doglobal\increment\nofdefinedbuffers - \letvalue{\??bu#1\c!nummer}\nofdefinedbuffers - \letvalue{\??bu#1\c!alinea}\v!nee + \letvalue{\??bu#1\c!number}\nofdefinedbuffers + \letvalue{\??bu#1\c!paragraph}\v!no \setevalue{\e!start#1}% {\noexpand\dostartbuffer[#1][def-\nofdefinedbuffers][\e!start#1][\e!stop#1]}% - \setevalue{\e!haal#1}% + \setevalue{\e!get#1}% {\noexpand\dodoprocessTEXbuffer[#1][def-\nofdefinedbuffers]}% \setevalue{\e!type#1}% {\noexpand\dodotypebuffer[#1][def-\nofdefinedbuffers]}% \fi} -\def\definieerbuffer - {\dosingleargument\dodefinieerbuffer} +\def\definebuffer + {\dosingleargument\dodefinebuffer} % yet another undocumented feature, but who cares: @@ -354,8 +354,8 @@ {\dodoubleempty\dogetbufferparagraphs} \def\dosetbufferoffset#1% - {\doifnumberelse{\getvalue{\??bu#1\c!alinea}} - {\currentbufferparagraph-\getvalue{\??bu#1\c!alinea}} + {\doifnumberelse{\getvalue{\??bu#1\c!paragraph}} + {\currentbufferparagraph-\getvalue{\??bu#1\c!paragraph}} {\currentbufferparagraph \zerocount}% \relax} @@ -363,7 +363,7 @@ {\iffirstargument \ifsecondargument \dosetbufferoffset{#1}% - \doifelse{#2}\v!alles + \doifelse{#2}\v!all {\def\startbufferparagraph{\normalbufferparagraph{#1}}} {\def\startbufferparagraph{\filterbufferparagraph{#1}{#2}}}% \def\stopbufferparagraph{\dostopbufferparagraph{#1}}% @@ -386,10 +386,10 @@ {\dobuffer{16}[#1]\readjobfile} \def\dostopbufferparagraph#1% - {\getvalue{\??bu#1\c!na}\par} + {\getvalue{\??bu#1\c!after}\par} \def\dostartbufferparagraph#1% - {\par\getvalue{\??bu#1\c!voor}} + {\par\getvalue{\??bu#1\c!before}} \def\normalbufferparagraph {\advance\currentbufferparagraph \plusone @@ -451,7 +451,7 @@ {\expanded{\setvalue{\??se\s!old#2}{\@@filterheadpart[#1]}}% \doifnot{#2}\lastsection {\expanded{\dodosetblockcounters[\@@filtertailpart[#1]]}% - {\getvalue{\??se#2\c!na}}}} % ???? + {\getvalue{\??se#2\c!after}}}} % ???? \def\dosetblockcounters[#1]% {\ifblockpermitted @@ -563,7 +563,7 @@ \global\copyingblocksfalse \fi} -\def\geenblokkenmeer +\def\nomoreblocks {\stopcopyingblocks} \def\copyblockfile @@ -693,8 +693,8 @@ \def\saveblock#1#2% {\checkcopyingblocks \obeylines - \@EA\@EA\@EA\convertargument\@EA\string\csname\e!eindvan#1\endcsname\to\endofblockA - %testen: \expanded{\convertargument\string\csname\e!eindvan#1\endcsname\to\endofblockA}% + \@EA\@EA\@EA\convertargument\@EA\string\csname\e!end#1\endcsname\to\endofblockA + %testen: \expanded{\convertargument\string\csname\e!end#1\endcsname\to\endofblockA}% \@EA\convertargument\string\eindvanblok[#1]\to\endofblockB % MULTI LINGUAL MAKEN \def\openblock {\dobeforeblock{#1}{#2}% @@ -726,25 +726,25 @@ \readjobfile\blockfilename\donothing\donothing \setblocklevel-}% -\def\dodefinieerblok[#1]% +\def\dodefineblock[#1]% {\passeerblok[#1]% - \handhaafblokken[#1]% - \stelblokin + \keepblocks[#1]% + \setupblock [#1] - [\c!voor=\blanko, - \c!na=\blanko, - \c!binnen=, - \c!letter=, + [\c!before=\blank, + \c!after=\blank, + \c!inner=, + \c!style=, \c!file=\jobname]} -\def\definieerblok - {\dosingleargumentwithset\dodefinieerblok} +\def\defineblock + {\dosingleargumentwithset\dodefineblock} -\def\dostelblokin[#1][#2]% +\def\dosetupblock[#1][#2]% {\getparameters[\??tb#1][#2]} -\def\stelblokin - {\dodoubleargumentwithset\dostelblokin} +\def\setupblock + {\dodoubleargumentwithset\dosetupblock} \def\passeerblok[#1]% {\setvalue{\s!thisisblock#1}##1[##2]% @@ -801,28 +801,28 @@ \fi \next} -\def\doverbergblokken[#1][#2]% +\def\dohideblocks[#1][#2]% {\def\docommando##1% - {\setvalue{\e!beginvan##1}% + {\setvalue{\e!begin##1}% {\bgroup\obeylines\dotripleempty\doverbergblok[##1][#2]}}% \processcommalist[#1]\docommando} -\def\verbergblokken - {\dodoubleempty\doverbergblokken} +\def\hideblocks + {\dodoubleempty\dohideblocks} \def\doexecuteloadedblock#1#2% {\blockpermittedtrue % ? - \bgroup % before \c!voor (think of: \c!voor=\startitemize) + \bgroup % before \c!before (think of: \c!before=\startitemize) \dosetupblockparameters[#1][#2]% voor 'voor'? - \getvalue{\??tb#1\c!voor}% - \dostartattributes{\??tb#1}\c!letter\c!kleur\empty + \getvalue{\??tb#1\c!before}% + \dostartattributes{\??tb#1}\c!style\c!color\empty \visibletrue \catcode`\^^M=\@@endofline\relax - \getvalue{\??tb#1\c!binnen}% + \getvalue{\??tb#1\c!inner}% \loadoneblock \par \dostopattributes - \getvalue{\??tb#1\c!na}% + \getvalue{\??tb#1\c!after}% \egroup} \def\dohandhaafblok[#1][#2][#3]% @@ -837,7 +837,7 @@ {\doifcommonelse{#2}{#3} {\global\blockpermittedtrue \edef\bloktitel{#1:#2}} - {\doifinsetelse\v!alles{#2} + {\doifinsetelse\v!all{#2} {\doifelsenothing{#3} {\global\blockpermittedtrue \edef\bloktitel{#1}} @@ -859,14 +859,14 @@ \fi \saveblock{#1}{#3#4}} -\def\dohandhaafblokken[#1][#2]% +\def\dokeepblocks[#1][#2]% {\def\docommando##1% - {\setvalue{\e!beginvan##1}% + {\setvalue{\e!begin##1}% {\bgroup\obeylines\dotripleempty\dohandhaafblok[##1][#2]}}% \processcommalist[#1]\docommando} -\def\handhaafblokken - {\dodoubleempty\dohandhaafblokken} +\def\keepblocks + {\dodoubleempty\dokeepblocks} \newconditional\processblockstatus \newconditional\dummyblockstatus @@ -916,7 +916,7 @@ \setvalue{\s!thiswasblock#1}% {\par \dostopattributes - \getvalue{\??tb#1\c!na}% + \getvalue{\??tb#1\c!after}% \egroup \setblocklevel-}% \def\next @@ -924,10 +924,10 @@ \ifconditional\blockassignmentstatus \dosetupblockparameters[#1][#3]% \fi - \getvalue{\??tb#1\c!voor}% - \dostartattributes{\??tb#1}\c!letter\c!kleur\empty + \getvalue{\??tb#1\c!before}% + \dostartattributes{\??tb#1}\c!style\c!color\empty \visibletrue - \getvalue{\??tb#1\c!binnen}}% + \getvalue{\??tb#1\c!inner}}% \fi \else \def\next @@ -940,7 +940,7 @@ {\setvalue{\s!thisisblock#1}##1[##2]% {\dodogebruikblok{#1}{##1}{##2}{#2}}} -\def\dodogebruikblokken[#1][#2]% +\def\dodouseblocks[#1][#2]% {\def\docommando##1% {\dogebruikblok[##1][#2]}% \processcommalist[#1]\docommando @@ -949,40 +949,40 @@ {\loadallblocks{\getvalue{\??tb\commalistelement\c!file}}}% \endgroup} -\def\dogebruikblokken +\def\douseblocks {\begingroup - \doassign[\??bs][\c!criterium=\v!alles]% - \dodoubleempty\dodogebruikblokken} + \doassign[\??bs][\c!criterium=\v!all]% + \dodoubleempty\dodouseblocks} -\def\gebruikblokken - {\setfalse\processblockstatus\dogebruikblokken} +\def\useblocks + {\setfalse\processblockstatus\douseblocks} -\def\verwerkblokken - {\settrue \processblockstatus\dogebruikblokken} +\def\processblocks + {\settrue \processblockstatus\douseblocks} -\def\doselecteerblokken[#1][#2][#3]% +\def\doselectblocks[#1][#2][#3]% {\doifelsenothing{#3} {\getparameters[\??bs][#2]% - \dogebruikblokken[#1][]} + \douseblocks[#1][]} {\getparameters[\??bs][#3]% - \dogebruikblokken[#1][#2]}}% + \douseblocks[#1][#2]}}% -\def\selecteerblokken +\def\selectblocks {\begingroup - \doassign[\??bs][\c!criterium=\v!alles]% - \dotripleempty\doselecteerblokken} + \doassign[\??bs][\c!criterium=\v!all]% + \dotripleempty\doselectblocks} \def\beginvanblok[#1]% % er wordt ook gechecked op \eindvanblok[..] - {\getvalue{\e!beginvan#1}} + {\getvalue{\e!begin#1}} \def\forceerblokken[#1]% {\def\docommando##1% - {\setvalue{\e!beginvan##1}% + {\setvalue{\e!begin##1}% {\setblocklevel+\bgroup \dodoubleempty\doforceerblok[##1]}% - \setvalue{\e!eindvan##1}% + \setvalue{\e!end##1}% {\dostopattributes - \getvalue{\??tb##1\c!na}% + \getvalue{\??tb##1\c!after}% \egroup\setblocklevel-}}% \processcommalist[#1]\docommando} @@ -993,17 +993,17 @@ \ifconditional\blockassignmentstatus \dosetupblockparameters[#1][#2]% \fi - \getvalue{\??tb#1\c!voor}% - \dostartattributes{\??tb#1}\c!letter\c!kleur\empty - \getvalue{\??tb#1\c!binnen}} + \getvalue{\??tb#1\c!before}% + \dostartattributes{\??tb#1}\c!style\c!color\empty + \getvalue{\??tb#1\c!inner}} -\def\passeerblokken[#1]% +\def\bypassblocks[#1]% {\def\docommando##1% - {\setvalue{\e!beginvan##1}% + {\setvalue{\e!begin##1}% {\setblocklevel+\bgroup \obeylines % here, since we look ahead \dodoubleempty\dopasseerblok[##1]}%}% - \setvalue{\e!eindvan##1}% + \setvalue{\e!end##1}% {}}% \processcommalist[#1]\docommando} @@ -1012,20 +1012,20 @@ {\egroup\setblocklevel-}% \checkcopyingblocks \obeylines - \@EA\@EA\@EA\convertargument\@EA\string\csname\e!eindvan#1\endcsname\to\endofblockA + \@EA\@EA\@EA\convertargument\@EA\string\csname\e!end#1\endcsname\to\endofblockA \@EA\convertargument\string\eindvanblok[#1]\to\endofblockB % MULTI LINGUAL MAKEN \setupcopyblock \skipblocklineAB} % the buffer mechanism handles nesting, add some switch -\setvalue{\e!start\v!verbergen}% +\setvalue{\e!start\v!hiding}% {\dostartbuffer[buf-\nofpostponedblocks] - [\e!start\v!verbergen][\e!stop\v!verbergen]} + [\e!start\v!hiding][\e!stop\v!hiding]} -\stelbufferin - [\c!alinea=\v!nee, - \c!voor=, - \c!na=] +\setupbuffer + [\c!paragraph=\v!no, + \c!before=, + \c!after=] -\protect \endinput
\ No newline at end of file +\protect \endinput |