diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-03-26 14:38:26 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-03-26 14:38:26 +0100 |
commit | f025339d0770904176dd9b32a405b23f809772ae (patch) | |
tree | 5037ac101db3aa154ea7f5bc5e189d03aa58dfd3 /tex/context/base/mkiv/strc-not.mkvi | |
parent | 788487819ccf38a8478cc2afd88e0c0b088d0ec1 (diff) | |
download | context-f025339d0770904176dd9b32a405b23f809772ae.tar.gz |
2016-03-26 13:53:00
Diffstat (limited to 'tex/context/base/mkiv/strc-not.mkvi')
-rw-r--r-- | tex/context/base/mkiv/strc-not.mkvi | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/strc-not.mkvi b/tex/context/base/mkiv/strc-not.mkvi index 20bff7683..edbbf92b3 100644 --- a/tex/context/base/mkiv/strc-not.mkvi +++ b/tex/context/base/mkiv/strc-not.mkvi @@ -225,11 +225,32 @@ \unexpanded\def\strc_notations_reset{\strc_constructions_reset_indeed\namednotationparameter} % #1#2 %unexpanded\def\strc_notations_set {\strc_constructions_set_indeed \namednotationparameter} % #1#2 +\newconditional\c_strc_notations_anchored_next + +\def\strc_notations_finalize + {\ifconditional\c_strc_notations_anchored_next + \expandafter\strc_notations_finalize_next + \else + \expandafter\strc_notations_finalize_previous + \fi} + +\def\strc_notations_finalize_previous + {\normalexpanded{\endgroup\noteparameter\c!next}} + +\def\strc_notations_finalize_next + {\endgroup\ignorespaces} + \unexpanded\def\strc_notations_command#tag% {\begingroup \edef\currentnote{#tag}% \strc_constructions_initialize{#tag}% \strc_notes_synchronize + \edef\p_next{\noteparameter\c!anchor}% + \ifx\p_next\v!next % for now only two states + \settrue \c_strc_notations_anchored_next + \else + \setfalse\c_strc_notations_anchored_next + \fi \ifnotesenabled \strc_counters_increment_sub\currentconstructionnumber\currentconstructionlevel \fi @@ -239,7 +260,7 @@ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#title},\c!bookmark=,\c!list=]% \csname\??constructionnotehandler\currentconstructionhandler\endcsname \strc_constructions_finalize - \normalexpanded{\endgroup\noteparameter\c!next}} + \strc_notations_finalize} \unexpanded\def\strc_notations_command_yes[#optional]% {\doifelseassignment{#optional}\strc_notations_command_assignment\strc_notations_command_argument[#optional]} @@ -248,13 +269,13 @@ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,#settings]% \csname\??constructionnotehandler\currentconstructionhandler\endcsname \strc_constructions_finalize - \normalexpanded{\endgroup\noteparameter\c!next}} + \strc_notations_finalize} \unexpanded\def\strc_notations_command_argument[#reference]#title% {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#reference},\c!title={#title},\c!bookmark=,\c!list=]% \csname\??constructionnotehandler\currentconstructionhandler\endcsname \strc_constructions_finalize - \normalexpanded{\endgroup\noteparameter\c!next}} + \strc_notations_finalize} \unexpanded\def\strc_notations_start#tag#stoptag% {\begingroup @@ -273,13 +294,13 @@ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#reference},\c!title={#title},\c!bookmark=,\c!list=]% \csname\??constructionnotehandler\currentconstructionhandler\endcsname \strc_constructions_finalize - \normalexpanded{\endgroup\noteparameter\c!next}} + \strc_notations_finalize} \unexpanded\def\strc_notations_start_nop#title% {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#title},\c!bookmark=,\c!list=]% \csname\??constructionnotehandler\currentconstructionhandler\endcsname \strc_constructions_finalize - \normalexpanded{\endgroup\noteparameter\c!next}} + \strc_notations_finalize} \unexpanded\def\strc_notations_stop {} @@ -326,6 +347,7 @@ \c!rule=\v!on, \c!before=\blank, \c!bodyfont=\v!small, + \c!anchor=, % can also be v!next %\c!style=, %\c!color=, %\c!after=, @@ -685,8 +707,10 @@ % \hpack to \zeropoint{\box\scratchbox\hss}}} \unexpanded\def\strc_notes_inject_symbol_indeed#synchronize% - {\removeunwantedspaces - \doifelseitalic\/\donothing % Charles IV \footnote{the fourth} + {\ifconditional\c_strc_notations_anchored_next\else + \removeunwantedspaces + \doifelseitalic\/\donothing % Charles IV \footnote{the fourth} + \fi \ifdim\lastkern=\notesignal % \kern\noteparameter\c!distance % yes or no note font? or main text \strc_notes_inject_separator |