diff options
author | Karl Berry <karl@freefriends.org> | 2015-04-18 22:52:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-04-18 22:52:45 +0000 |
commit | 16aa5a7c87f18a2483d0d61795899f886781b51c (patch) | |
tree | 1d72f00b2a4185425393598402fe055c61d1de58 /Master/texmf-dist/tex/context/base/strc-not.mkvi | |
parent | e68dc4d5506d46bf72823234f902bc76d1f70352 (diff) |
context, from www.pragma-ade.com/context/beta/cont-tmf.zip (18apr15)
git-svn-id: svn://tug.org/texlive/trunk@36923 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/strc-not.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/strc-not.mkvi | 101 |
1 files changed, 64 insertions, 37 deletions
diff --git a/Master/texmf-dist/tex/context/base/strc-not.mkvi b/Master/texmf-dist/tex/context/base/strc-not.mkvi index 60ab66c980f..25a1072a3e7 100644 --- a/Master/texmf-dist/tex/context/base/strc-not.mkvi +++ b/Master/texmf-dist/tex/context/base/strc-not.mkvi @@ -170,7 +170,7 @@ \ifx\p_counter\empty % \let\p_counter\currentnotation \fi - \doifcounterelse\p_counter\donothing{\strc_notes_define_counter\p_counter}% + \doifelsecounter\p_counter\donothing{\strc_notes_define_counter\p_counter}% \letnotationparameter\s!counter\p_counter %\strc_notes_setup_counter\currentnotation \to \everydefinenotation @@ -181,6 +181,7 @@ \unexpanded\setvalue{\??constructioninitializer\v!notation}% {\let\currentnotation \currentconstruction \let\constructionparameter \notationparameter + \let\constructionnamespace \??notation \let\detokenizedconstructionparameter\detokenizednotationparameter \let\letconstructionparameter \letnotationparameter \let\useconstructionstyleandcolor \usenotationstyleandcolor @@ -231,7 +232,7 @@ \ifnotesenabled \strc_counters_increment_sub\currentconstructionnumber\currentconstructionlevel \fi - \doifnextoptionalcselse\strc_notations_command_yes\strc_notations_command_nop} + \doifelsenextoptionalcs\strc_notations_command_yes\strc_notations_command_nop} \unexpanded\def\strc_notations_command_nop#title% {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#title},\c!bookmark=,\c!list=][]% @@ -240,7 +241,7 @@ \normalexpanded{\endgroup\noteparameter\c!next}} \unexpanded\def\strc_notations_command_yes[#optional]% - {\doifassignmentelse{#optional}\strc_notations_command_assignment\strc_notations_command_argument[#optional]} + {\doifelseassignment{#optional}\strc_notations_command_assignment\strc_notations_command_argument[#optional]} \unexpanded\def\strc_notations_command_assignment[#settings]% {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,#settings][]% @@ -278,7 +279,7 @@ \normalexpanded % not that efficient but also not that frequently used (\normaldef for parser) {\def\noexpand\strc_pickup_yes[#one]#two\csname\e!stop#stoptag\endcsname{\strc_notations_command_yes[#one]{#two}}% \def\noexpand\strc_pickup_nop #one\csname\e!stop#stoptag\endcsname{\strc_notations_command_nop {#one}}}% - \doifnextoptionalcselse\strc_pickup_yes\strc_pickup_nop} + \doifelsenextoptionalcs\strc_pickup_yes\strc_pickup_nop} \unexpanded\def\strc_notations_start_yes[#reference]#title% {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#reference},\c!title={#title},\c!bookmark=,\c!list=][]% @@ -382,7 +383,7 @@ \appendtoks \ifx\currentnoteparent\empty - \doifinsertionelse\currentnote + \doifelseinsertion\currentnote \donothing {\defineinsertion[\currentnote]% could be an option \normalexpanded{\t_strc_notes{\the\t_strc_notes\noexpand\strc_notes_process_list{\currentnote}}}}% @@ -392,7 +393,7 @@ \setexpandednoteparameter\s!insert{\namednoteparameter\currentnoteparent\s!insert}% \definenotation[\currentnote][\currentnoteparent][\c!type=\v!note]% \fi - \ctxcommand{definenote("\currentnote","insert",\number\currentnoteinsertionnumber)}% + \clf_definenote{\currentnote}{insert}\currentnoteinsertionnumber\relax \to \everydefinenote % maybe we will share this at some point: @@ -437,7 +438,7 @@ \strc_notes_inject_dummy \else \begingroup - \edef\currentnotenumber{\ctxcommand{storenote("\currentnote",\currentconstructionlistentry)}}% + \edef\currentnotenumber{\clf_storenote{\currentnote}\currentconstructionlistentry}% \settrue\processingnote \ifconditional\c_strc_notes_skip \globallet\lastnotesymbol\strc_notes_inject_symbol_nop @@ -519,7 +520,7 @@ \endcsname} \setvalue{\??noteinteractioninline\v!yes}% - {\strc_references_get_simple_page_reference{page(\ctxcommand{notenumberpage("\currentnote",\currentnotenumber)})}% + {\strc_references_get_simple_page_reference{page(\clf_notenumberpage{\currentnote}\currentnotenumber)}% \edef\strc_notes_get_reference_attribute_symbol{attr\referenceattribute\currentreferenceattribute}% \let \strc_notes_set_style_color_inline \strc_notes_set_style_color_inline_yes} @@ -539,7 +540,7 @@ % page(...) : we could have a dedicated one \setvalue{\??noteinteractiondisplay\v!yes}% - {\strc_references_get_simple_page_reference{page(\ctxcommand{notesymbolpage("\currentnote",\currentnotenumber)})}% + {\strc_references_get_simple_page_reference{page(\clf_notesymbolpage{\currentnote}\currentnotenumber)}% \edef\strc_notes_set_reference_attribute_number{\attribute\referenceattribute\currentreferenceattribute}% \let \strc_notes_set_reference_attribute_text \donothing \let \strc_notes_set_destination_attribute_text\donothing @@ -552,7 +553,7 @@ \let\strc_notes_set_style_color_display \strc_notes_set_style_color_display_nop} \setvalue{\??noteinteractiondisplay\v!all}% - {\strc_references_get_simple_page_reference{page(\ctxcommand{notesymbolpage("\currentnote",\currentnotenumber)})}% + {\strc_references_get_simple_page_reference{page(\clf_notesymbolpage{\currentnote}\currentnotenumber)}% \edef\strc_notes_set_reference_attribute_text {\attribute\referenceattribute\currentreferenceattribute}% %\strc_references_set_simple_page_reference{note:\cldcontext{structures.notes.internalid("\currentnote",\currentnotenumber)}}% \strc_references_set_simple_page_reference{note:\currentnote:\currentnotenumber}% @@ -561,7 +562,7 @@ \let \strc_notes_set_style_color_display \strc_notes_set_style_color_display_yes} \setvalue{\??noteinteractiondisplay\v!text}% - {\strc_references_get_simple_page_reference{page(\ctxcommand{notesymbolpage("\currentnote",\currentnotenumber)})}% + {\strc_references_get_simple_page_reference{page(\clf_notesymbolpage{\currentnote}\currentnotenumber)}% \edef\strc_notes_set_reference_attribute_text {\attribute\referenceattribute\currentreferenceattribute}% %\strc_references_set_simple_page_reference{note:\cldcontext{structures.notes.internalid("\currentnote",\currentnotenumber)}}% \strc_references_set_simple_page_reference{note:\currentnote:\currentnotenumber}% @@ -586,7 +587,7 @@ {\iftrialtypesetting % keep \else\ifx\currentcolorparameter\empty - \scratchcounter\ctxcommand{notedeltapage("\currentnote",\currentnotenumber)}\relax % todo calculate once + \scratchcounter\clf_notedeltapage{\currentnote}\currentnotenumber\relax % todo calculate once \setlocationcolorspecified\scratchcounter \fi\fi} @@ -605,7 +606,7 @@ % in mkii the pointer only showed up in pagewise notes \unexpanded\def\strc_notes_inject_pointer % todo calculate once - {\ifcase\ctxcommand{notedeltapage("\currentnote",\currentnotenumber)}\relax + {\ifcase\clf_notedeltapage{\currentnote}\currentnotenumber\relax\relax % unknown \or % same page @@ -638,7 +639,7 @@ \unexpanded\def\strc_notes_inject_symbol_indeed#synchronize% {\removeunwantedspaces - \doifitalicelse\/\donothing % Charles IV \footnote{the fourth} + \doifelseitalic\/\donothing % Charles IV \footnote{the fourth} \ifdim\lastkern=\notesignal % \kern\noteparameter\c!distance % yes or no note font? or main text \strc_notes_inject_separator @@ -654,18 +655,18 @@ \hbox \strc_notes_get_reference_attribute_symbol \bgroup \dostarttagged\t!descriptionsymbol\currentnote \dotagsetnotesymbol - \noteparameter\c!textcommand{\ctxcommand{noteprefixednumber("\currentnote",\currentnotenumber)}}% + \noteparameter\c!textcommand{\clf_noteprefixednumber{\currentnote}\currentnotenumber\relax}% % the next one can cycle so we need to make sure it has no advance width \doif{\noteparameter\c!indicator}\v!yes\strc_notes_inject_pointer \dostoptagged \egroup \endgroup - \dostoptagged % check +% \dostoptagged % check \globallet\lastnotesymbol\relax} \unexpanded\def\strc_notes_inject_dummy % temp hack {\removeunwantedspaces - \doifitalicelse\/\donothing % Charles IV \footnote{the fourth} + \doifelseitalic\/\donothing % Charles IV \footnote{the fourth} \ifdim\lastkern=\notesignal % \kern\noteparameter\c!distance % yes or no note font? or main text \strc_notes_inject_separator @@ -1029,7 +1030,7 @@ \def\strc_notes_set_location_text % we don't use inserts anyway (e.g. endnotes) {\settrue\c_strc_notes_delayed - \ctxcommand{setnotestate("\currentnote","store")}% + \clf_setnotestate{\currentnote}{store}% \page_inserts_set_location\currentnoteinsertion\v!text % \setupinsertion[\currentnote][\c!location=\v!text]% \global\count\currentnoteinsertionnumber\zerocount \global\dimen\currentnoteinsertionnumber\maxdimen @@ -1181,6 +1182,7 @@ \insert\currentnoteinsertionnumber\bgroup \the\everyinsidenoteinsert\relax \usesetupsparameter\noteparameter % experimental + \useinterlinespaceparameter\noteparameter \doifelse{\noteparameter\c!paragraph}\v!yes {\nointerlineskip \startvboxtohboxseparator @@ -1203,7 +1205,7 @@ \edef\currentnote{#tag}% \strc_constructions_initialize{#tag}% \strc_notes_synchronize - \edef\currentconstructionlistentry{\ctxcommand{notelistindex("\currentnote",#id)}}% index in list cache + \edef\currentconstructionlistentry{\clf_notelistindex{\currentnote}#id}% index in list cache % as we can have collected notes (e.g. in tables) we need to recover % \currentdescriptionattribute and \currentdescriptionsynchronize % @@ -1217,14 +1219,14 @@ \begstrut \strc_references_flush_destination_nodes \strc_notes_set_destination_attribute_text - \strc_notes_inject_text - \endstrut + \strc_notes_inject_text\relax + \ifvmode\obeydepth\else\endstrut\fi % \obeydepth is new per 2015-01-10 \strc_constructions_stored_stop % \endgroup } \unexpanded\def\strc_notes_inject_text % hm main? - {\ctxcommand{savedlisttitle("\currentconstructionmain",\currentconstructionlistentry)}} + {\clf_savedlisttitle{\currentconstructionmain}\currentconstructionlistentry\relax} \let\startpushnote\relax \let\stoppushnote \relax @@ -1297,7 +1299,7 @@ \noteparameter\c!before \fi % \bgroup - % \setupalign[\noteparameter\c!align]% + % \usealignparameter\noteparameter \placenoterule % alleen in ..mode % \par % \egroup @@ -1353,11 +1355,14 @@ % idea: tag with attr and then just flush them again \def\strc_notes_flush_global - {\doifelse{\noteparameter\c!paragraph}\v!yes + {\begingroup + \useinterlinespaceparameter\noteparameter + \doifelse{\noteparameter\c!paragraph}\v!yes {\vbox\starthboxestohbox \iftrialtypesetting\unvcopy\else\unvbox\fi\currentnoteinsertionnumber \stophboxestohbox} - {\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}} + {\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}% + \endgroup} %D Supporting end notes is surprisingly easy. Even better, we %D can combine this feature with solving the common \TEX\ @@ -1395,7 +1400,7 @@ {\ifconditional\postponingnotes\else \global\settrue\postponingnotes \global\let\flushnotes\doflushnotes - \ctxcommand{postponenotes()}% + \clf_postponenotes \fi} \let\flushnotes\relax @@ -1405,7 +1410,7 @@ \begingroup \let\flushnotes \relax \let\postponenotes\relax - \ctxcommand{flushpostponednotes()}% this also resets the states ! + \clf_flushpostponednotes% this also resets the states ! \global\setfalse\postponednote \global\setfalse\postponingnotes \global\let\flushnotes\relax @@ -1452,20 +1457,20 @@ \strc_counters_save{#tag}% \strc_counters_reset{#tag}% \fi - \ctxcommand{savenote("#tag","store")}} + \clf_savenote{#tag}{store}} \def\strc_notes_local_stop_step#tag% {\p_strc_notes_continue{\noteparameter\c!continue}% \ifx\p_strc_notes_continue\v!yes \else \strc_counters_restore{#tag}% \fi - \ctxcommand{restorenote("#tag")}} + \clf_restorenote{#tag}} \unexpanded\def\placelocalnotes {\dodoubleempty\strc_notes_local_place} \def\strc_notes_local_place[#tag][#settings]% - {\doif{\ctxcommand{getnotestate("#tag")}}{store}{\strc_notes_local_place_indeed{#settings}{#tag}}} + {\doif{\clf_getnotestate{#tag}}{store}{\strc_notes_local_place_indeed{#settings}{#tag}}} \def\strc_notes_local_place_indeed#settings#tag% {\begingroup @@ -1525,7 +1530,7 @@ \def\strc_notes_place_indeed#settings#tag% settings note {\edef\currentnote{#tag}% grouping ? - \doifelse{\ctxcommand{getnotestate("#tag")}}{store} + \doifelse{\clf_getnotestate{#tag}}{store} \strc_notes_local_place_indeed \strc_notes_global_place_indeed {#settings}{#tag}} @@ -1545,7 +1550,7 @@ {\setvalue{\??notealternative#alternative}{#command}} \unexpanded\def\doifnotescollected#tag% - {\ctxcommand{doifnotecontent("#tag")}} + {\clf_doifnotecontent{#tag}} \def\strc_notes_place_local_alternative % will be a setup (wrapper) {\doifnotescollected\currentnote @@ -1572,7 +1577,7 @@ % setups ? -\def\flushlocalnotes#tag{\ctxcommand{flushnotes("#tag","store","\noteparameter\c!criterium")}} +\def\flushlocalnotes#tag{\clf_flushnotes{#tag}{store}{\noteparameter\c!criterium}} \installnotealternative \v!none {\flushlocalnotes\currentnote} @@ -1597,7 +1602,7 @@ \setupcurrentnote[\c!location=]% \inheritednoteframed {\edef\currentnotewidth{\noteparameter\c!width}% - \doifdimensionelse\currentnotewidth\donothing + \doifelsedimension\currentnotewidth\donothing {\edef\currentnotewidth{\the\hsize}}% \startsimplecolumns[\c!distance=\noteparameter\c!columndistance,\c!n=\noteparameter\c!n,\c!width=\currentnotewidth]% \flushlocalnotes\currentnote @@ -1722,8 +1727,8 @@ \def\strc_notes_set_bodyfont {\let\strc_notes_set_bodyfont\relax \restoreglobalbodyfont - \switchtobodyfont[\noteparameter\c!bodyfont]% - \setupalign[\noteparameter\c!align]} + \usebodyfontparameter\noteparameter + \usealignparameter\noteparameter} %D The footnote mechanism defaults to a traditional one %D column way of showing them. By default we precede them by @@ -1764,7 +1769,9 @@ %D } %D \stoptyping -\def\doifnoteonsamepageelse[#tag]{\ctxcommand{doifnoteonsamepageasprevious("#tag")}} +\def\doifelsenoteonsamepage[#tag]{\clf_doifnoteonsamepageasprevious{#tag}} + +\let\doifnoteonsamepageelse\doifelsenoteonsamepage %D New trickery: @@ -1829,4 +1836,24 @@ % [ownnote] % [\ownnotesymbol] +% tricky: +% +% \enabletrackers[nodes.areas] +% \enabletrackers[nodes.references] +% \enabletrackers[nodes.destinations] +% +% \setupnotes[interaction=all,rule=no] +% \setupinteraction[state=start,focus=standard] +% +% \starttext +% \goto{\input tufte\relax}[page(2)] \par +% \ruledhbox{\gotobox{\vtop{\input tufte\relax}}[page(2)]} \par +% \ruledhbox{\gotobox{\vbox{\input tufte\relax}}[page(2)]} \par +% % \completecontent +% % \chapter{Chapter} +% % \dorecurse{5}{\input knuth} +% a\footnote{\input tufte\par\input ward\relax} +% \stoptext + \protect \endinput + |