diff options
author | Hans Hagen <pragma@wxs.nl> | 2001-07-02 00:00:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2001-07-02 00:00:00 +0200 |
commit | ab399f7f60b937f771dd33f9b826d83dab3e84e2 (patch) | |
tree | dfb3b001d6c0ee78967f6849168d41614b06fc2c /tex/context/base/core-reg.tex | |
parent | 661f9f4a789474b20056f6bd4855c66d9791b301 (diff) | |
download | context-ab399f7f60b937f771dd33f9b826d83dab3e84e2.tar.gz |
stable 2001.07.02
Diffstat (limited to 'tex/context/base/core-reg.tex')
-rw-r--r-- | tex/context/base/core-reg.tex | 210 |
1 files changed, 152 insertions, 58 deletions
diff --git a/tex/context/base/core-reg.tex b/tex/context/base/core-reg.tex index 841df4e46..d1149426e 100644 --- a/tex/context/base/core-reg.tex +++ b/tex/context/base/core-reg.tex @@ -15,6 +15,7 @@ \newif \ifautoregisterhack % for the moment a private hack +% new: eigennummer=ja => eerste {} ipv pag nummer \unprotect %D Isolated but still indocumented. @@ -308,60 +309,61 @@ {\limitatetext{#2}{\getvalue{\??id#1\c!maxbreedte}}{\unknown}}}} \def\dosetpageregisterpage#1#2#3#4#5#6% - {\doifreglevelelse[#5] - {\global\utilitydonetrue - \c!entryletter - \setregisterhowto[#3]% - \def\dohandleregisterentry##1% + {\doifreglevelelse[#5]{\dodosetpageregisterpage{#1}{#2}{#3}{#4}{#5}{#6}}{}} + +\def\dodosetpageregisterpage#1#2#3#4#5#6% + {\global\utilitydonetrue + \c!entryletter + \setregisterhowto[#3]% + \def\dohandleregisterentry##1% + {\bgroup + \if!!donea % \strut nieuw + \setbox0=\hbox{\showlocation{\doregistertexthowto{#2} + {\strut\limitedregisterentry{#2}{##1}}}}% + \gotonextinternal{\s!ind}{#4}{#6}{\box0}% + \else + \doregistertexthowto{#2}{##1}% + \fi + \egroup + \!!doneafalse}% + \!!doneafalse + \doifelsevalue{\??id#2\c!interactie}{\v!tekst} + {\ifcase\currententrylevel \or + \!!doneatrue\c!entrya\c!entryb\c!entryc \or + \c!entrya\!!doneatrue\c!entryb\c!entryc \or + \c!entrya\c!entryb\!!doneatrue\c!entryc \fi} + {\c!entrya\c!entryb\c!entryc}% + \global\let\c!entrya=\relax + \global\let\c!entryb=\relax + \global\let\c!entryc=\relax + \global\let\c!entryletter=\relax + \global\let\c!entryreference=\relax + \iffirstregisterpage + \global\chardef\lastregisterpagestatus=0 + \expandafter\hskip\getvalue{\??id#2\c!afstand}\relax + \donetrue + \else\ifnum#1=3 + |--|\relax % -- ! + \donetrue + \else\ifnum\lastregisterpagestatus=2 + \donefalse % waiting for "to" pagenumber + \else + \registerpageseparator + |\spatie|\relax % \relax needed because | looks ahead + \donetrue + \fi\fi\fi + \ifdone + \doifelsevalue{\??id#2\c!interactie}{\v!paginanummer} {\bgroup - \if!!donea % \strut nieuw - \setbox0=\hbox{\showlocation{\doregistertexthowto{#2} - {\strut\limitedregisterentry{#2}{##1}}}}% - \gotonextinternal{\s!ind}{#4}{#6}{\box0}% - \else - \doregistertexthowto{#2}{##1}% - \fi - \egroup - \!!doneafalse}% - \!!doneafalse - \doifelsevalue{\??id#2\c!interactie}{\v!tekst} - {\ifcase\currententrylevel \or - \!!doneatrue\c!entrya\c!entryb\c!entryc \or - \c!entrya\!!doneatrue\c!entryb\c!entryc \or - \c!entrya\c!entryb\!!doneatrue\c!entryc \fi} - {\c!entrya\c!entryb\c!entryc}% - \global\let\c!entrya=\relax - \global\let\c!entryb=\relax - \global\let\c!entryc=\relax - \global\let\c!entryletter=\relax - \global\let\c!entryreference=\relax - \iffirstregisterpage - \global\chardef\lastregisterpagestatus=0 - \expandafter\hskip\getvalue{\??id#2\c!afstand}\relax - \donetrue - \else\ifnum#1=3 - |--|\relax % -- ! - \donetrue - \else\ifnum\lastregisterpagestatus=2 - \donefalse % waiting for "to" pagenumber - \else - \registerpageseparator - |\spatie|\relax % \relax needed because | looks ahead - \donetrue - \fi\fi\fi - \ifdone - \doifelsevalue{\??id#2\c!interactie}{\v!paginanummer} - {\bgroup - \setbox0=\hbox - {\showlocation{\doregisterpage{#2}[#5]\ifnum#1=2\/\fi}}% - \gotonextinternal{\s!ind}{#4}{#6}{\box0}%{\copy0}% - \egroup} - {\hbox{\doregisterpage{#2}[#5]\ifnum#1=2\/\fi}}% - \ignorespaces - \global\chardef\lastregisterpagestatus=#1\relax - \fi - \global\firstregisterpagefalse} - {}} + \setbox0=\hbox + {\showlocation{\doregisterpage{#2}[#5]\ifnum#1=2\/\fi}}% + \gotonextinternal{\s!ind}{#4}{#6}{\box0}%{\copy0}% + \egroup} + {\hbox{\doregisterpage{#2}[#5]\ifnum#1=2\/\fi}}% + \ignorespaces + \global\chardef\lastregisterpagestatus=#1\relax + \fi + \global\firstregisterpagefalse} \def\dosetpageregistersee#1#2#3#4% {\doifreglevelelse[#4::0] @@ -619,9 +621,74 @@ \def\koppelregister% {\dodoubleempty\dokoppelregister} +% \def\doprocesslinkregister[#1][#2]#3% +% {\hbox +% {\doprocesspageregister[#2]{#3}% +% \let\firstlistreference=\empty +% \let\lastlistreference=\empty +% \let\selflistreference=\empty +% \let\prevlistreference=\empty +% \let\nextlistreference=\empty +% \getalllistreferences{#1}{#3}% +% \doifnot{\alllistreferences}{} +% {\def\dodocommando[##1-##2]% +% {\ifx\firstlistreference\empty +% \def\firstlistreference{##1-##2}% +% \fi +% \def\lastlistreference{##1-##2}% +% \ifnum##1<\nextinternalreference\relax +% \def\prevlistreference{##1-##2}% +% \else\ifnum##1>\nextinternalreference\relax +% \def\nextlistreference{##1-##2}% +% \def\dodocommando[####1-####2]% +% {\def\lastlistreference{####1-####2}}% +% \else +% \def\selflistreference{##1-##2}% +% \fi\fi}% +% \def\docommando##1% +% {\dodocommando[##1]}% +% \processcommacommand[\alllistreferences]\docommando}% +% \ifx\prevlistreference\empty +% \let\prevlistreference=\lastlistreference +% \fi +% \ifx\nextlistreference\empty +% \let\nextlistreference=\firstlistreference +% \fi +% \ifx\prevlistreference\selflistreference +% \let\prevlistreference=\empty +% \let\nextlistreference=\empty +% \fi +% \def\dodocommando[##1-##2]% +% {\gotonextinternal{\s!ind}{##1}{##2}{\box0}}%{\copy0}}% +% \def\docommando##1##2% +% {\bgroup +% \ifx##1\empty +% \doifvalue{\??id#1\c!onbekendeverwijzing}{\v!leeg} +% {\hskip1em}% +% \else +% \setbox0=\hbox to 1em{\hss\showlocation{\symbol[##2]}\hss}% +% \expandafter\dodocommando\expandafter[##1]% +% \fi +% \egroup}% +% \processaction +% [\getvalue{\??id#1\c!plaats}] +% [\v!midden=>\docommando\prevlistreference\v!vorige, +% \v!links=>\docommando\prevlistreference\v!vorige +% \docommando\nextlistreference\v!volgende]% +% \doifreferencefoundelse{\s!lin:\internallistreference} +% {\gotosomeinternal +% {\s!lin}{\internallistreference}{\currentrealreference} +% {\showlocation{\limitedregisterentry{#1}{#3}}}} +% {\hbox{\limitedregisterentry{#1}{#3}}}% +% \processaction +% [\getvalue{\??id#1\c!plaats}] +% [ \v!midden=>\docommando\nextlistreference\v!volgende, +% \v!rechts=>\docommando\prevlistreference\v!vorige +% \docommando\nextlistreference\v!volgende]}} + \def\doprocesslinkregister[#1][#2]#3% {\hbox - {\doprocesspageregister[#2]{#3}% + {\doprocesspageregister[#2]{}{#3}% \let\firstlistreference=\empty \let\lastlistreference=\empty \let\selflistreference=\empty @@ -684,6 +751,24 @@ \v!rechts=>\docommando\prevlistreference\v!vorige \docommando\nextlistreference\v!volgende]}} +% \def\dodolinkedregister[#1][#2]#3% page auto link +% {\bgroup +% \chardef\registerpagestatus=1 +% \def\currentregister{#1}% +% \iflocation +% \ifautoregisterhack +% \def\next{\doprocessautoregister[#1][#2]{#3}}% +% \else +% \def\next{\doprocesslinkregister[#1][#2]{#3}}% +% \fi +% \else +% \def\next{\doprocesspageregister[#2]{#3}}% +% \fi +% \next +% \egroup +% \ifvmode\nobreak\fi +% \GotoPar} + \def\dodolinkedregister[#1][#2]#3% page auto link {\bgroup \chardef\registerpagestatus=1 @@ -695,7 +780,7 @@ \def\next{\doprocesslinkregister[#1][#2]{#3}}% \fi \else - \def\next{\doprocesspageregister[#2]{#3}}% + \def\next{\doprocesspageregister[#2]{}{#3}}% \fi \next \egroup @@ -736,9 +821,18 @@ \limitedregisterentry{#1}{#2}% \fi} +% \def\doprocessautoregister[#1][#2]#3% +% {\hbox +% {\doprocesspageregister[#2]{#3}% +% \doifreferencefoundelse{\s!lin:\internallistreference} +% {\gotosomeinternal +% {\s!lin}{\internallistreference}{\currentrealreference} +% {\showlocation{\limitedregisterentry{#1}{#3}}}} +% {\hbox{\limitedregisterentry{#1}{#3}}}}} + \def\doprocessautoregister[#1][#2]#3% {\hbox - {\doprocesspageregister[#2]{#3}% + {\doprocesspageregister[#2]{}{#3}% \doifreferencefoundelse{\s!lin:\internallistreference} {\gotosomeinternal {\s!lin}{\internallistreference}{\currentrealreference} @@ -749,8 +843,8 @@ %D The first implementation used one main field with clones. %D In a 2500 page document this resulted in a rather (anoying) -%D long start||up time. This \quote {every page its own field} -%D solution, combined with a \quote {page open action}, works +%D long start||up time. This \citeer {every page its own field} +%D solution, combined with a \citeer {page open action}, works %D much faster, but is conceptually pretty weak. \def\complexregisterfield[#1]% |