From d7ccb42582f85acf30568913610ccf4d602023fb Mon Sep 17 00:00:00 2001 From: Taco Hoekwater Date: Wed, 1 Jun 2011 08:54:21 +0000 Subject: commit context 2011.05.18 git-svn-id: svn://tug.org/texlive/trunk@22719 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/context/base/strc-not.mkiv | 306 +++++++++++++++-------- 1 file changed, 202 insertions(+), 104 deletions(-) (limited to 'Master/texmf-dist/tex/context/base/strc-not.mkiv') diff --git a/Master/texmf-dist/tex/context/base/strc-not.mkiv b/Master/texmf-dist/tex/context/base/strc-not.mkiv index 45e37b276f5..bf815c7281f 100644 --- a/Master/texmf-dist/tex/context/base/strc-not.mkiv +++ b/Master/texmf-dist/tex/context/base/strc-not.mkiv @@ -19,14 +19,10 @@ % this needs a further cleanup ... % -% -- set breakpoin in descriptions +% -- set breakpoint in descriptions % -- reset after trialtypesetting % -- that way we can trick the symbol space -% obsolete - -\let\autopostponenotes\relax - % removed: % % \pushsomestates @@ -38,17 +34,12 @@ % saveinsertionbox % eraseinsertionbackup % restoreinsertionbackup -% -% \def\doprocessnotescs#1#2% #1 == \cs that takes arg -% {\def\currentnote{#2}\@EA#1\csname\??vn:\currentnote\endcsname} -% \def\processnotescs#1{\processcommacommand[\noteinsertions]{\doprocessnotescs#1}} -% \def\noteinsertion #1{\csname\??vn:#1\endcsname} -\def\savenotedata {\writestatus{todo}{save note data}} -\def\restorenotedata {\writestatus{todo}{restore note data}} -\def\savenotecontent {\writestatus{todo}{save note content}} -\def\restorenotecontent{\writestatus{todo}{restore note content}} -\def\erasenotebackup {\writestatus{todo}{erase note backup}} +\def\savenotedata {} % \writestatus{todo}{save note data}} +\def\restorenotedata {} % \writestatus{todo}{restore note data}} +\def\savenotecontent {} % \writestatus{todo}{save note content}} +\def\restorenotecontent{} % \writestatus{todo}{restore note content}} +\def\erasenotebackup {} % \writestatus{todo}{erase note backup}} % page-set: @@ -183,7 +174,7 @@ \c!width=\defaultnotewidth, \c!height=\textheight, \c!numbercommand=\high, - \c!command=\noteparameter\c!numbercommand, % downward compatible + \c!command=, % \noteparameter\c!numbercommand, % (command in enumeration) too messy, called twice \c!separator=,% \@@koseparator, \c!textcommand=\high, \c!textstyle=\tx, @@ -192,9 +183,11 @@ %\c!factor=, %\c!scope=, % \v!text \v!page \c!prefixconnector=., - %\c!next=\autoinsertnextspace + %\c!next=\autoinsertnextspace, \c!prefix=\v!no, %\c!continue=\v!no, + \c!paragraph=\v!no, + \c!inbetween=\hskip1em, \c!n=1] \setupnotes @@ -214,40 +207,85 @@ \newtoks \everysetupnote \unexpanded\def\definenote - {\dodoubleempty\dodefinenote} + {\dotripleempty\dodefinenote} -\def\dodefinenote[#1][#2]% +\def\dodefinenote[#1][#2][#3]% note [parent] [settings] {\edef\currentnote{#1}% \ifcsname\??vn:\currentnote\endcsname\else \@EA\installinsertion\csname\??vn:\currentnote\endcsname\relax \appendtoks\doprocesssomenote{#1}\to\tobeprocessednotes \fi - \defineenumeration % description + \ifsecondargument + \doifassignmentelse{#2}{\dodefinenotewithsettings{#2}}{\dodefinenotewithparent{#2}{#3}}% + \else + \dodefinenotesimple + \fi + \ctxlua{structures.notes.define("\currentnote","insert",\number\csname\??vn:\currentnote\endcsname)}% + \the\everysetupnote + \dochecknote} + +\def\dodefinenotesimple + {\defineenumeration [\currentnote] - [\c!location=\@@defaultnotedefloc, + [\s!handler=\v!note, + \c!text=, + \c!location=\@@defaultnotedefloc, \c!distance=\@@defaultnotedefdis, \c!width=\v!fit, - \c!headstyle=\noteparameter\c!style, % hm - \c!headcolor=\noteparameter\c!color, % hm - \s!handler=\v!note, + \c!headstyle=\noteparameter\c!style, + \c!headcolor=\noteparameter\c!color, + \c!before=, + \c!after=]% + \doredefinenotecommands + \presetlocalframed + [\??vn\currentnote]% + \setupenumerations + [\currentnote] + [\s!parent=\??vn\currentnote, + \c!number=\v!yes]% no inheritance from decriptions which is okay + \getparameters + [\??vn\currentnote] + [\s!parent=\??vn]} + +\def\dodefinenotewithsettings#1% + {\defineenumeration % description + [\currentnote] + [\s!handler=\v!note, \c!text=, + \c!location=\@@defaultnotedefloc, + \c!distance=\@@defaultnotedefdis, + \c!width=\v!fit, + \c!headstyle=\noteparameter\c!style, + \c!headcolor=\noteparameter\c!color, \c!before=, \c!after=]% - \doredefinenotecommands\currentnote + \doredefinenotecommands + \presetlocalframed + [\??vn\currentnote]% \setupenumerations [\currentnote] [\s!parent=\??vn\currentnote, - \c!number=\v!yes] % no inheritance from decriptions which is okay + \c!number=\v!yes]% + \getparameters + [\??vn\currentnote] + [\s!parent=\??vn,#1]} + +\def\dodefinenotewithparent#1#2% + {%setevalue{\??vn:#2:kids}{\ifcsname\??vn:#2:kids\endcsname\csname\??vn:#2:kids\endcsname,\fi#1}% + \defineenumeration + [\currentnote] + [\s!handler=\v!note, + \c!text=]% + \doredefinenotecommands \presetlocalframed [\??vn\currentnote]% + \setupenumerations + [\currentnote] + [\s!parent=\??dd#1, + \c!number=\v!yes]% \getparameters [\??vn\currentnote] - [\s!parent=\??vn,#2]% -% \definestructurecounter -% [\currentnote]% - \ctxlua{structure.notes.define("\currentnote","insert",\number\csname\??vn:\currentnote\endcsname)}% - \the\everysetupnote - \dochecknote} + [\s!parent=\??vn#1,#2]} % \starttext % text \startfootnote Test.\stopfootnote @@ -263,25 +301,27 @@ {\begingroup \doenumerationinit{#1}{#2}{#3}% \@@notemakedescription[##1]{}{##2}% - \endgroup}} + \expandafter\endgroup\noteparameter\c!next}} % WS: added \noteparameter\c!next -\def\doredefinenotecommands#1% - {\normalexpanded{\noexpand\dodoredefinenotecommands{#1}{1}{}}% +\def\doredefinenotecommands + {\normalexpanded{\noexpand\dodoredefinenotecommands{\currentnote}{1}{}}% \let\@@subslevel\empty \dostepwiserecurse{2}{\descriptionparameter\c!levels}{1} - {\normalexpanded{\noexpand\dodoredefinenotecommands{#1}{\recurselevel}{\@@subslevel\v!sub}}% + {\normalexpanded{\noexpand\dodoredefinenotecommands{\currentnote}{\recurselevel}{\@@subslevel\v!sub}}% \edef\@@subslevel{\@@subslevel\v!sub}}} \let\setupnotedefinition\setupenumerations +% \def\dodowithcurrentnoteandkids#1#2% action kid +% {\pushmacro\currentnote +% \def\currentnote{#2}% +% \dowithcurrentnoteandkids{#1}% recursive +% \popmacro\currentnote}% + \appendtoks \setupenumerations[\currentnote][]% \to \everysetupnote -% \appendtoks -% \dochecknote -% \to \everysetupnote - \unexpanded\def\setupnote {\dodoubleempty\dosetupnote} @@ -338,8 +378,8 @@ % compatibility (will go away) -\newif\ifendnotes -\newif\ifbottomnotes +\newif\ifbottomnotes % still used in page-one.mkiv +%newif\endnotes % no longer used % locations: @@ -351,10 +391,9 @@ \def\clevernotes % compatibility hack, will be redone {\numexpr\ifcase\namednoteparameter\v!footnote\s!noteloc\or0\or2\or2\or1\else0\fi\relax} -\def\setnotelocation #1{\expandafter\chardef\csname\??vn\currentnote\s!noteloc\endcsname#1\relax} -\def\setnoteposition #1{\expandafter\chardef\csname\??vn\currentnote\s!notepos\endcsname#1\relax} -\def\setnoteformatting#1{\expandafter\chardef\csname\??vn\currentnote\s!notefmt\endcsname#1\relax} -\def\setnotecolumns #1{\expandafter\chardef\csname\??vn\currentnote\s!notecol\endcsname#1\relax} +\def\setnotelocation #1{\expandafter\let\csname\??vn\currentnote\s!noteloc\endcsname#1\relax} +\def\setnoteposition #1{\expandafter\let\csname\??vn\currentnote\s!notepos\endcsname#1\relax} +\def\setnoteformatting#1{\expandafter\let\csname\??vn\currentnote\s!notefmt\endcsname#1\relax} \def\currentnofcolumns{\@@kln} @@ -369,20 +408,25 @@ \def\dosetcheckednote#1{\csname\??vn @#1\endcsname} +\newtoks\everychecknote + \def\dochecknote {% node states - \setnotelocation\plusone - \setnoteposition\plustwo - \normalexpanded{\noexpand\rawprocesscommalist[\noteparameter\c!location]}\dosetcheckednote + \setnotelocation\plusone % page + \setnoteposition\plustwo % high + \normalexpanded{\rawprocesscommalist[\noteparameter\c!location]}\dosetcheckednote % compatibility hack - \ifnum\noteparameter\s!noteloc=\plusfive \endnotestrue \else \endnotesfalse \fi + %ifnum\noteparameter\s!noteloc=\plusfive \endnotestrue \else \endnotesfalse \fi \ifnum\noteparameter\s!notepos=\plustwo \bottomnotestrue \else \bottomnotesfalse \fi % set column multiplier \edef\currentnotenofcolumns{\noteparameter\c!n}% \ifx\currentnotenofcolumns\empty \let\currentnotenofcolumns\!!plusone \fi - \ifcase\noteparameter\s!noteloc\or + \ifcase\noteparameter\s!noteloc + % can't happen + \scratchcounter\plusone + \or % page \scratchcounter \currentnotenofcolumns \or @@ -399,6 +443,9 @@ \scratchcounter\currentnotenofcolumns \fi % column factor + \ifcase\scratchcounter + \scratchcounter\plusone + \fi \global\count\currentnoteins\plusthousand \global\count\currentnoteins\numexpr\plusthousand/\scratchcounter\relax % maximize height @@ -409,17 +456,19 @@ \dosetnotedistance % play safe \ifnum\noteparameter\s!noteloc=\plusfive - \ctxlua{structure.notes.setstate("\currentnote","store")}% + \ctxlua{structures.notes.setstate("\currentnote","store")}% % text notes (e.g. end notes) but we don't use inserts anyway \global\dimen\currentnoteins\maxdimen \global\count\currentnoteins\zerocount \global\skip \currentnoteins\zeropoint - \fi} + \fi + \the\everychecknote} \def\dosetnotedistance {\begingroup \setbox\scratchbox\vbox {\forgetall +% \setnotebodyfont \dontcomplain \noteparameter\c!before \placenoterule @@ -580,7 +629,7 @@ \unexpanded\def\setnotetext[#1]{\global\settrue\skipnoteplacement\getvalue{#1}} \def\domovednote#1#2#3#4% - {\ifcase\ctxlua{structure.notes.deltapage("#1",#2)}\or\symbol[#3]\or\symbol[#4]\fi} + {\ifcase\ctxlua{structures.notes.deltapage("#1",#2)}\or\symbol[#3]\or\symbol[#4]\fi} \setvalue{\??dd:\v!note:\s!handler:\s!text }{\@@donotetext} \setvalue{\??dd:\v!note:\s!handler:\s!number}{\@@donotenumber} @@ -605,7 +654,7 @@ \doenumerationcheckconditions \let\currentnote\currentdescriptionmain \dodescriptioncomponent[\c!reference=#1,\c!label={\descriptionparameter\c!text},\c!title={#3},\c!list=,\c!bookmark=,][]% - \xdef\currentnotenumber{\ctxlua{structure.notes.store("\currentnote",\currentdescriptionnumberentry)}}% + \xdef\currentnotenumber{\ctxlua{structures.notes.store("\currentnote",\currentdescriptionnumberentry)}}% \settrue\processingnote \ifconditional\skipnoteplacement \globallet\lastnotesymbol\dolastnotesymbol @@ -637,15 +686,21 @@ \fi} \def\dolastnotesymbol - {\typesetsomenotesymbol\currentnote\currentnotenumber} + {\typesetsomenotesymbol\currentnote\currentnotenumber\currentdescriptionnumberentry} + +\let\dotagsetnotesymbol\relax -\def\dotypesetsomenotesymbol#1#2% running text +\def\dotypesetsomenotesymbol#1#2#3% running text (messy: #1 and current mixed) {\dodonotesymbol - {\synchronizesomenotesymbol{#1}{#2}% - \ctxlua{structure.notes.number("\currentnote",\currentnotenumber)}% \currentdescriptionnumberentry + {\synchronizesomenotesymbol{#1}{#2}{#3}% +% \ctxlua{structures.notes.number("\currentnote",\currentnotenumber)}% \currentdescriptionnumberentry + \dostarttagged\t!descriptionsymbol\currentnote + \dotagsetnotesymbol + \ctxlua{structures.notes.number("#1",#2)}% + \dostoptagged \domovednote{#1}{#2}\v!previouspage\v!nextpage}} -\unexpanded\def\typesetsomenotesymbol#1#2% running text +\unexpanded\def\typesetsomenotesymbol#1#2#3% running text {\removeunwantedspaces \doifitalicelse\/\donothing % Charles IV \footnote{the fourth} \ifdim\lastkern=\notesignal @@ -653,8 +708,8 @@ \fi \nobreak \doifelse{\noteparameter\c!interaction}\v!no - {\dotypesetsomenotesymbol{#1}{#2}} - {\directgotobox{\dotypesetsomenotesymbol{#1}{#2}}[page(\ctxlua{structure.notes.getnumberpage("#1",\number#2)})]}% f: + {\dotypesetsomenotesymbol{#1}{#2}{#3}} + {\directgotobox{\dotypesetsomenotesymbol{#1}{#2}{#3}}[page(\ctxlua{structures.notes.getnumberpage("#1",\number#2)})]}% f: \globallet\lastnotesymbol\relax} \unexpanded\def\typesetdummynotesymbol % temp hack @@ -668,7 +723,7 @@ \globallet\lastnotesymbol\relax} \def\currentnotedescriptiontext % todo: can be other number - {\ctxlua{structure.notes.title("\currentnote",\currentdescriptionnumberentry)}} + {\ctxlua{structures.notes.title("\currentnote",\currentdescriptionnumberentry)}} \def\@@donotetext {\ifconditional\enumerationnumberenabled @@ -690,34 +745,46 @@ {\docurrentnoteenumerationfullnumber}% {\directgotobox {\docurrentnoteenumerationfullnumber}% - [page(\ctxlua{structure.notes.getsymbolpage("\currentnote",\currentdescriptionnumberentry)})]}} + [page(\ctxlua{structures.notes.getsymbolpage("\currentnote",\currentdescriptionnumberentry)})]}} \def\docurrentnoteenumerationfullnumber {\noteparameter\c!numbercommand {\dosetnoteattributes\c!numberstyle\c!numbercolor - \ctxlua{structure.notes.number("\currentnote",\currentdescriptionnumberentry)}% + \ctxlua{structures.notes.number("\currentnote",\currentdescriptionnumberentry)}% \domovednote\currentdescription\currentdescriptionnumberentry\v!nextpage\v!previouspage}} -\def\synchronizesomenotesymbol#1#2% called more often than needed - {\expanded{\noexpand\ctxlatelua{structure.notes.setsymbolpage("#1",#2)}}} +\def\synchronizesomenotesymbol#1#2#3% called more often than needed + {\iftrialtypesetting\else + \normalexpanded{\noexpand\ctxlatelua{structures.notes.setsymbolpage("#1",#2,#3)}}% + \fi} -\def\handlenoteinsert#1#2% +\def\handlenoteinsert#1#2% tg, id {\begingroup \edef\currentnote{#1}% \the\everybeforenoteinsert \insert\currentnoteins\bgroup \the\everyinsidenoteinsert \doprocesslocalsetups{\noteparameter\c!setups}% experimental - \handlenoteitself{#1}{#2}% + \doifelse{\noteparameter\c!paragraph}\v!yes + {\nointerlineskip + \startvboxtohbox + \handlenoteitself{#1}{#2}% + % add some slack + \stopvboxtohbox} + {\handlenoteitself{#1}{#2}}% \egroup \the\everyafternoteinsert \endgroup} +\def\betweennoteitself#1% tg + {\edef\currentnote{#1}% + \doif{\noteparameter\c!paragraph}\v!yes\dobetweenparagraphnotes} + \def\handlenoteitself#1#2% tg, id {\edef\currentdescription{#1}% \edef\currentnote{#1}% \edef\currentdescriptionnumberentry{#2}% - \edef\currentdescriptionlistentry{\ctxlua{tex.write(structure.notes.listindex("#1",#2))}}% + \edef\currentdescriptionlistentry{\ctxlua{tex.write(structures.notes.listindex("#1",#2))}}% % as we can have collected notes (e.g. in tables) we need to recover % \currentdescriptionattribute and \currentdescriptionsynchronize \reinstatedescriptionnumberentry\currentdescriptionlistentry % we could store the number in the entry @@ -737,7 +804,6 @@ %D footnotes can be handled by a straight insert, but we do so %D by using an indirect call to the \type{\insert} primitive. -%D Making footnote numbers active is not always that logical, %D Making footnote numbers active is not always that logical, %D especially when we keep the reference and text at one page. %D On the other hand we need interactivity when we refer to @@ -747,10 +813,8 @@ %D mainly because endnotes had to be supported.} that is, %D automatically (vise versa) and by user supplied reference. -\newcount\internalnotereference - -\let\startpushnote=\relax -\let\stoppushnote =\relax +\let\startpushnote\relax +\let\stoppushnote \relax \newsignal\notesignal \newcount \notepenalty @@ -768,6 +832,7 @@ \let\flushnotes\relax \let\postponenotes\relax \forgetall + \resetallattributes % new, we don't want color bleed into notes \to \everybeforenoteinsert \appendtoks @@ -780,9 +845,9 @@ \splitmaxdepth\strutdp % not actually needed here \leftmargindistance\noteparameter\c!margindistance \rightmargindistance\leftmargindistance - \ifnum\noteparameter\c!n=\zerocount % no ifcase new 31-07-99 ; always ? - \doifnotinset{\noteparameter\c!width}{\v!fit,\v!broad}\setnotehsize % ? - \fi +% \ifnum\noteparameter\c!n=\zerocount % no ifcase new 31-07-99 ; always ? +% \doifnotinset{\noteparameter\c!width}{\v!fit,\v!broad}\setnotehsize % ? +% \fi \to \everyinsidenoteinsert % not: \appendtoks \setnotehsize \to \everyinsidenoteinsert (spoils columns) @@ -833,6 +898,47 @@ \unexpanded\def\unvboxed {\ifvmode\unvbox \else\box \fi} \unexpanded\def\unvcopied{\ifvmode\unvcopy\else\copy\fi} +% idea: tag with attr and then just flush them again + +\def\dobetweenparagraphnotes % should not be too much + {\noteparameter\c!inbetween} + +\def\doflushgobalnotes + {\doifelse{\noteparameter\c!paragraph}\v!yes + {\vbox + {\beginofshapebox + \iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteins + \endofshapebox + %\doreshapebox{\box\shapebox}{}{}{}% get rid of penalties etc + \gdef\dodobetweenparagraphnotes{\glet\dodobetweenparagraphnotes\dobetweenparagraphnotes}% shape works reverse + \doreshapebox{\hbox{\unhbox\shapebox\dodobetweenparagraphnotes}}{}{}{}% get rid of penalties etc + \innerflushshapebox + \convertvboxtohbox}} + {\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteins}} + +\def\dodoplacenoteinserts + {\ifcase\noteparameter\c!n\relax + % should not happen + \or + \doglobalflushnotesnormal + \else + \doglobalflushnotescolums + \fi} + +\def\doglobalflushnotesnormal + {%\iftrialtypesetting\copy\else\box\fi\currentnoteins + \doflushgobalnotes + \obeydepth} % (a) added , since split footnotes will not align properly + +\def\doglobalflushnotescolums + {\edef\currentnotewidth{\noteparameter\c!width}% + \doifdimensionelse\currentnotewidth\donothing + {\edef\currentnotewidth{\the\hsize}}% + \startsimplecolumns[\c!distance=\noteparameter\c!columndistance,\c!n=\noteparameter\c!n,\c!width=\currentnotewidth]% + %\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteins % compare with local + \doflushgobalnotes + \stopsimplecolumns} + \def\doplacenoteinserts {\relax\ifdim\ht\currentnoteins>\zeropoint\relax \ifnum\noteparameter\s!noteloc=\plusfive @@ -842,24 +948,15 @@ \whitespace \noteparameter\c!before \fi -% \bgroup -% \setupalign[\noteparameter\c!align]% + % \bgroup + % \setupalign[\noteparameter\c!align]% \placenoterule % alleen in ..mode -% \par -% \egroup + % \par + % \egroup \bgroup \setnotebodyfont \setbox\scratchbox\hbox - {% this should be checked, smells like a mix-up - % does not split: \ifcase\noteparameter\c!n\unvbox\else\box\fi\currentnoteins - \ifcase\noteparameter\c!n\relax - \iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteins % is this needed? - \or - \iftrialtypesetting\copy\else\box\fi\currentnoteins - \obeydepth % (a) added , since split footnotes will not align properly - \else - \iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteins - \fi}% + {\dodoplacenoteinserts}% \setbox\scratchbox\hbox {\localframed [\??vn\currentnote] @@ -919,7 +1016,7 @@ {\ifconditional\postponingnotes\else \global\settrue\postponingnotes \global\let\flushnotes\doflushnotes - \ctxlua{structure.notes.postpone()}% + \ctxlua{structures.notes.postpone()}% \fi} \let\flushnotes\relax @@ -929,7 +1026,7 @@ \begingroup \let\flushnotes \relax \let\postponenotes\relax - \ctxlua{structure.notes.flushpostponed()}% this also resets the states ! + \ctxlua{structures.notes.flushpostponed()}% this also resets the states ! \global\setfalse\postponednote \global\setfalse\postponingnotes \global\let\flushnotes\relax @@ -974,25 +1071,25 @@ {\doifnot{\noteparameter\c!continue}\v!yes {\savestructurecounter[#1]% \resetstructurecounter[#1]}% - \ctxlua{structure.notes.save("#1","store")}} + \ctxlua{structures.notes.save("#1","store")}} \def\dodostoplocalnotes#1% {\doifnot{\noteparameter\c!continue}\v!yes {\restorestructurecounter[#1]}% - \ctxlua{structure.notes.restore("#1")}} + \ctxlua{structures.notes.restore("#1")}} \unexpanded\def\placelocalnotes {\dodoubleempty\doplacelocalnotes} \def\doplacelocalnotes[#1][#2]% - {\doif{\ctxlua{structure.notes.getstate("#1")}}{store}{\dodoplacelocalnotes{#2}{#1}}} + {\doif{\ctxlua{structures.notes.getstate("#1")}}{store}{\dodoplacelocalnotes{#2}{#1}}} \def\dodoplacelocalnotes#1#2% settings note {\begingroup \the\everyplacelocalnotes % beware, we cannot trust setting \currentnote here \getparameters[\??vn#2][\c!width=\v!fit,\c!height=\v!fit,\c!strut=\v!no,\c!offset=\v!overlay,#1]% we only need a selective one - \donotealternative{#2}% + \dolocalnotealternative{#2}% \endgroup \dochecknote} % we need to restore the old state @@ -1042,7 +1139,7 @@ \def\dodoplacenotes#1#2% settings note {\edef\currentnote{#2}% - \doifelse{\ctxlua{structure.notes.getstate("#2")}}{store} + \doifelse{\ctxlua{structures.notes.getstate("#2")}}{store} \dodoplacelocalnotes \dodoplaceglobalnotes {#1}{#2}} @@ -1060,9 +1157,9 @@ {\setvalue{\??vn:\c!alternative:#1}{#2}} \def\doifnotescollected#1% - {\ctxlua{structure.notes.doifcontent("#1")}} + {\ctxlua{structures.notes.doifcontent("#1")}} -\def\donotealternative#1% +\def\dolocalnotealternative#1% {\edef\currentnote{#1}% \doifnotescollected\currentnote {\endgraf @@ -1086,7 +1183,8 @@ %D \setupfootnotes[location=text,alternative=none] %D \stoptyping -\def\flushlocalnotes#1{\ctxlua{structure.notes.flush("#1","store")}} +% \def\flushlocalnotes#1{\ctxlua{structures.notes.flush("#1","store")}} +\def\flushlocalnotes#1{\ctxlua{structures.notes.flush("#1","store","\noteparameter\c!criterium")}} \installnotealternative \v!none {\flushlocalnotes\currentnote} @@ -1235,7 +1333,7 @@ \unexpanded\def\setupfootnotedefinition{\setupnotedefinition [\v!footnote]} \unexpanded\def\setupfootnotes {\setupnote [\v!footnote]} %unexpanded\def\footnote {\setnote [\v!footnote]} -\def\footnotetext {\setnotetext [\v!footnote]} +\def\footnotetext {\setnotetext [\v!footnote]} %unexpanded\def\note {\dodoubleempty\notesymbol [\v!footnote]} % alleen footnote \unexpanded\def\placefootnotes {\dodoubleempty\doplacefootnotes [\v!footnote]} \unexpanded\def\placelocalfootnotes {\dodoubleempty\doplacelocalfootnotes[\v!footnote]} @@ -1257,7 +1355,7 @@ %D } %D \stoptyping -\def\doifnoteonsamepageelse[#1]{\ctxlua{structure.notes.doifonsamepageasprevious("#1")}} +\def\doifnoteonsamepageelse[#1]{\ctxlua{structures.notes.doifonsamepageasprevious("#1")}} %D New trickery: -- cgit v1.2.3