From c18f7cbe51449a611ea1819fedd9a4ff18529b7d Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 18 Oct 2012 00:40:16 +0300 Subject: beta 2012.10.17 22:49 --- tex/context/base/back-pdf.mkiv | 6 +- tex/context/base/chem-str.mkiv | 2 +- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4144 -> 4141 bytes tex/context/base/context-version.png | Bin 105290 -> 106781 bytes tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/status-files.pdf | Bin 24605 -> 24604 bytes tex/context/base/status-lua.pdf | Bin 195624 -> 195628 bytes tex/context/base/strc-not.mkvi | 360 +++++++++++---------- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 12 files changed, 195 insertions(+), 183 deletions(-) diff --git a/tex/context/base/back-pdf.mkiv b/tex/context/base/back-pdf.mkiv index f537b3936..7e910f07f 100644 --- a/tex/context/base/back-pdf.mkiv +++ b/tex/context/base/back-pdf.mkiv @@ -306,14 +306,14 @@ % \edef\dostroke{\number#6}% \edef\dofill{\number#7}% - \edef\mode{\number#8 \space}% + \edef\mode{\number#8}% % no \ifcase, else \relax in pdfcode \setbox\scratchbox\hbox {\ifnum\dostroke\dofill>\zerocount \pdfliteral {q \stroke\space w - \ifcase\mode + \ifcase\mode\space \xxmin\space \ymin \space m \xxmax\space \ymin \space l \xmax \space \ymin \space \xmax \space \yymin\space y @@ -493,7 +493,7 @@ \xmin \space \ymin \space \xmin \space \yymin\space y \or % 28 \fi - \ifnum\mode>8 + \ifnum\mode>8\space S \else \ifnum\dostroke=\plusone S \fi diff --git a/tex/context/base/chem-str.mkiv b/tex/context/base/chem-str.mkiv index 64e2679dc..c4b03dd1e 100644 --- a/tex/context/base/chem-str.mkiv +++ b/tex/context/base/chem-str.mkiv @@ -453,7 +453,7 @@ \definechemicalsymbol[i:plus] [\enspace\mathematics{+}\enspace] \definechemicalsymbol[i:minus] [\enspace\mathematics{-}\enspace] \definechemicalsymbol[i:gives] [\enspace\mathematics{\xrightarrow{}{}}\enspace] -\definechemicalsymbol[i:equilibrium] [\enspace\mathematics{\xrightpverleftarrow{}{}}\enspace] +\definechemicalsymbol[i:equilibrium] [\enspace\mathematics{\xrightoverleftarrow{}{}}\enspace] \definechemicalsymbol[i:mesomeric] [\enspace\mathematics{\xleftrightarrow{}{}}\enspace] \definechemicalsymbol[i:single] [\chemicalbondrule] \definechemicalsymbol[i:double] [\hbox{\lower.5ex\chemicalbondrule\hskip-1em\raise.5ex\chemicalbondrule}] diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 955d1ef04..2a2e12ba8 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.10.17 19:02} +\newcontextversion{2012.10.17 22:49} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 1f85ab6d5..9f3d8cbc2 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.10.17 19:02} +\newcontextversion{2012.10.17 22:49} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf index c9c7b91bd..2ed6a9aa0 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png index 4243de3c8..57b5947fe 100644 Binary files a/tex/context/base/context-version.png and b/tex/context/base/context-version.png differ diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index a98905678..3840c2dab 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2012.10.17 19:02} +\edef\contextversion{2012.10.17 22:49} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 5718eefdb..6c3701e68 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -25,7 +25,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2012.10.17 19:02} +\edef\contextversion{2012.10.17 22:49} %D For those who want to use this: diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index e59c01282..554b33464 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index aa27720eb..e588fc460 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/context/base/strc-not.mkvi b/tex/context/base/strc-not.mkvi index 18289cc96..5c23d5310 100644 --- a/tex/context/base/strc-not.mkvi +++ b/tex/context/base/strc-not.mkvi @@ -69,8 +69,6 @@ \let\setupnotations\setupnotation -% \unexpanded\def\lowllap#1{\low{\llap{#1}}} - \definesymbol[\v!note:\v!previouspage][\llap{\low{\symbol[\v!previouspage]}}] \definesymbol[\v!note:\v!nextpage ][\llap{\low{\symbol[\v!nextpage ]}}] @@ -124,21 +122,21 @@ % \installcorenamespace{noteclass} -\unexpanded\def\strc_define_commands_notation#1#2#3% current level parent - {\doifelsenothing{#3} - {\normalexpanded{\defineconstruction[#1][\s!handler=\v!notation,\c!level=#2]}% - \setevalue{\??notation#1:\s!parent}{\??notation}}% - {\normalexpanded{\defineconstruction[#1][#3][\s!handler=\v!notation,\c!level=#2]}% - \setevalue{\??note#1:\s!parent}{\??note#3}% see later for \s!note - \setevalue{\??notation#1:\s!parent}{\??notation#3}}% - \setuevalue{\e!next #1}{\strc_notations_next }% - \setuevalue{\c!reset#1}{\strc_notations_reset }% - %setuevalue{\c!set #1}{\strc_notations_set }% - %setuevalue {#1}{\strc_notations_command{\currentnotation}}% - %setuevalue{\e!start#1}{\strc_notations_start {\currentnotation}{#1}}% - \setuevalue {#1}{\strc_notations_command{#1}}% - \setuevalue{\e!start#1}{\strc_notations_start {#1}{#1}}% okay? - \setuevalue{\e!stop #1}{\strc_notations_stop }} +\unexpanded\def\strc_define_commands_notation#tag#level#parent% + {\doifelsenothing{#parent} + {\normalexpanded{\defineconstruction[#tag][\s!handler=\v!notation,\c!level=#level]}% + \setevalue{\??notation#tag:\s!parent}{\??notation}}% + {\normalexpanded{\defineconstruction[#tag][#parent][\s!handler=\v!notation,\c!level=#level]}% + \setevalue{\??note#tag:\s!parent}{\??note#parent}% see later for \s!note + \setevalue{\??notation#tag:\s!parent}{\??notation#parent}}% + \setuevalue{\e!next #tag}{\strc_notations_next }% + \setuevalue{\c!reset#tag}{\strc_notations_reset }% + %setuevalue{\c!set #tag}{\strc_notations_set }% + %setuevalue {#tag}{\strc_notations_command{\currentnotation}}% + %setuevalue{\e!start#tag}{\strc_notations_start {\currentnotation}{#tag}}% + \setuevalue {#tag}{\strc_notations_command{#tag}}% + \setuevalue{\e!start#tag}{\strc_notations_start {#tag}{#tag}}% okay? + \setuevalue{\e!stop #tag}{\strc_notations_stop }} \appendtoks \ifx\currentnotationparent\empty @@ -225,58 +223,58 @@ \let\strc_notations_reset\strc_enumerations_reset %let\strc_notations_set \strc_enumerations_set -\unexpanded\def\strc_notations_command#1% +\unexpanded\def\strc_notations_command#tag% {\begingroup - \edef\currentnote{#1}% - \strc_constructions_initialize{#1}% + \edef\currentnote{#tag}% + \strc_constructions_initialize{#tag}% \strc_notes_synchronize \ifnotesenabled \strc_counters_increment_sub\currentconstructionnumber\currentconstructionlevel \fi \doifnextoptionalelse\strc_notations_command_yes\strc_notations_command_nop} -\unexpanded\def\strc_notations_command_nop#1% - {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#1},\c!bookmark=,\c!list=][]% +\unexpanded\def\strc_notations_command_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}} -\unexpanded\def\strc_notations_command_yes[#1]% - {\doifassignmentelse{#1}\strc_notations_command_assignment\strc_notations_command_argument[#1]} +\unexpanded\def\strc_notations_command_yes[#optional]% + {\doifassignmentelse{#optional}\strc_notations_command_assignment\strc_notations_command_argument[#optional]} -\unexpanded\def\strc_notations_command_assignment[#1]% - {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,#1][]% +\unexpanded\def\strc_notations_command_assignment[#settings]% + {\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}} -\unexpanded\def\strc_notations_command_argument[#1]#2% - {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=][]% +\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}} -\unexpanded\def\strc_notations_start#1#2% +\unexpanded\def\strc_notations_start#tag#stoptag% {\begingroup - \edef\currentnote{#1}% - \strc_constructions_initialize{#1}% + \edef\currentnote{#tag}% + \strc_constructions_initialize{#tag}% \strc_notes_synchronize \ifnotesenabled \strc_counters_increment_sub\currentconstructionnumber\currentconstructionlevel \fi \normalexpanded % not that efficient but also not that frequently used - {\def\noexpand\strc_pickup_yes[##1]##2\csname\e!stop#2\endcsname{\strc_notations_command_yes[##1]{##2}}% - \def\noexpand\strc_pickup_nop ##1\csname\e!stop#2\endcsname{\strc_notations_command_nop {##1}}}% + {\def\noexpand\strc_pickup_yes[##1]##2\csname\e!stop#stoptag\endcsname{\strc_notations_command_yes[##1]{##2}}% + \def\noexpand\strc_pickup_nop ##1\csname\e!stop#stoptag\endcsname{\strc_notations_command_nop {##1}}}% \doifnextoptionalelse\strc_pickup_yes\strc_pickup_nop} -\unexpanded\def\strc_notations_start_yes[#1]#2% - {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=][]% +\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=][]% \csname\??constructionnotehandler\currentconstructionhandler\endcsname \strc_constructions_finalize \normalexpanded{\endgroup\noteparameter\c!next}} -\unexpanded\def\strc_notations_start_nop#1% - {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#1},\c!bookmark=,\c!list=][]% +\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}} @@ -404,13 +402,13 @@ \let\v_strc_note_counter_name\empty -\def\strc_notes_setup_counter#1% - {\edef\v_strc_note_counter_name{#1}% only used in the token list +\def\strc_notes_setup_counter#tag% + {\edef\v_strc_note_counter_name{#tag}% only used in the token list \the\everysetupnotecounter} -\def\strc_notes_define_counter#1% todo: fast inheritance (was mainparameter - {\definecounter[#1]% - \strc_notes_setup_counter{#1}} +\def\strc_notes_define_counter#tag% todo: fast inheritance (was mainparameter + {\definecounter[#tag]% + \strc_notes_setup_counter{#tag}} \appendtoks \strc_counter_setup_using_parameter\v_strc_note_counter_name\notationparameter @@ -428,14 +426,14 @@ \expandafter\let\csname\??constructioncommandhandler\v!notation\expandafter\endcsname\csname\??constructioncommandhandler\v!enumeration \endcsname \expandafter\let\csname\??constructiontexthandler \v!notation\expandafter\endcsname\csname\??constructiontexthandler \v!enumeration \endcsname -\unexpanded\setvalue{\??constructionmainhandler\v!notation}#1% +\unexpanded\setvalue{\??constructionmainhandler\v!notation}#following% {\iftrialtypesetting \else \begingroup \currentconstructionsynchronize \attribute\destinationattribute\currentconstructionattribute\relax % todo, whole text \signalcharacter \endgroup - \fi#1} + \fi#following} \unexpanded\setvalue{\??constructionnotehandler\v!notation:\v!note}% in the running text {\ifnotesenabled @@ -451,16 +449,19 @@ \edef\currentnotenumber{\ctxcommand{storenote("\currentnote",\currentconstructionlistentry)}}% \settrue\processingnote \ifconditional\c_strc_notes_skip - \globallet\lastnotesymbol\strc_notes_inject_symbol + \globallet\lastnotesymbol\strc_notes_inject_symbol_nop + \ifconditional\c_strc_notes_delayed + \strc_notes_inject_symbol_snc + \fi \else \iftypesettinglines % otherwise problems with \type {xxx} \ignorelines % makes footnotes work in \startlines ... \stoplines \fi \ifconditional\c_strc_notes_symbol - \strc_notes_inject_symbol + \strc_notes_inject_symbol_yes \else \unskip\unskip - \globallet\lastnotesymbol\strc_notes_inject_symbol + \globallet\lastnotesymbol\strc_notes_inject_symbol_yes \fi \fi \ifconditional\postponingnotes % todo: per note class @@ -578,12 +579,12 @@ \let\strc_notes_set_style_color_inline_nop \usenotestyleandcolor \let\strc_notes_set_style_color_display_nop\usenotationstyleandcolor -\unexpanded\def\strc_notes_set_style_color_inline_yes#1#2% - {\usenotestyleandcolor#1#2% +\unexpanded\def\strc_notes_set_style_color_inline_yes#style#color% + {\usenotestyleandcolor#style#color% \iflocation\strc_notes_set_style_color_special\fi} -\unexpanded\def\strc_notes_set_style_color_display_yes#1#2% - {\usenotationstyleandcolor#1#2% +\unexpanded\def\strc_notes_set_style_color_display_yes#style#color% + {\usenotationstyleandcolor#style#color% \iflocation\strc_notes_set_style_color_special\fi} \def\strc_notes_set_style_color_special @@ -624,7 +625,16 @@ \normalexpanded{\noexpand\ctxlatecommand{setnotesymbolpage("\currentnote",\currentnotenumber)}}% \fi} -\unexpanded\def\strc_notes_inject_symbol +\unexpanded\def\strc_notes_inject_symbol_yes + {\strc_notes_inject_symbol_indeed\conditionaltrue} + +\unexpanded\def\strc_notes_inject_symbol_nop + {\strc_notes_inject_symbol_indeed\conditionalfalse} + +\unexpanded\def\strc_notes_inject_symbol_snc + {\currentconstructionsynchronize} % this flushes the data to the list + +\unexpanded\def\strc_notes_inject_symbol_indeed#synchronize% {\removeunwantedspaces \doifitalicelse\/\donothing % Charles IV \footnote{the fourth} \ifdim\lastkern=\notesignal @@ -633,7 +643,9 @@ \fi \nobreak \begingroup - \currentconstructionsynchronize % this flushes the data to the list + \ifconditional#synchronize\relax + \strc_notes_inject_symbol_snc % this flushes the data to the list + \fi \strc_notes_register_note_page % this registers the symbol page number (late) \strc_notes_interaction_check_inline \strc_notes_set_style_color_inline\c!textstyle\c!textcolor @@ -762,8 +774,8 @@ \let\strc_notes_process_list\gobbleoneargument -\unexpanded\def\strc_notes_process#1% argument is a \macro that uses \currentnote - {\def\strc_notes_process_list##1{\edef\currentnote{##1}\let\currentdescription\currentnote#1}% +\unexpanded\def\strc_notes_process#action% argument is a \macro that uses \currentnote + {\def\strc_notes_process_list##1{\edef\currentnote{##1}\let\currentdescription\currentnote#action}% \the\t_strc_notes} \newtoks\everychecknote % just before a note is typeset @@ -816,8 +828,8 @@ {\letcurrentnoterulecommand\relax % so we default to nothing \processcommacommand[\noteparameter\c!rule]\strc_notes_set_rule_step} -\def\strc_notes_set_rule_step#1% - {\csname\??noterule\ifcsname\??noterule#1\endcsname#1\else\s!unknown\fi\endcsname} +\def\strc_notes_set_rule_step#alternative% + {\csname\??noterule\ifcsname\??noterule#alternative\endcsname#alternative\else\s!unknown\fi\endcsname} \setvalue{\??noterule\v!command}{\letcurrentnoterulecommand\currentnoterulecommandcommand} \setvalue{\??noterule \v!on}{\letcurrentnoterulecommand\currentnoterulecommandnormal} @@ -949,10 +961,8 @@ \unexpanded\def\strc_notes_set_variants {\normalexpanded{\rawprocesscommalist[\noteparameter\c!location]\strc_notes_set_location_step}} -\unexpanded\def\strc_notes_set_location_step#1% the insert related one - {\ifcsname\??notelocation#1\endcsname - \csname\??notelocation#1\endcsname - \fi} +\unexpanded\def\strc_notes_set_location_step#alternative% the insert related one + {\ifcsname\??notelocation#alternative\endcsname\csname\??notelocation#alternative\endcsname\fi} \appendtoks \strc_notes_set_variants @@ -1155,13 +1165,13 @@ \newconditional\c_strc_notes_symbol \settrue\c_strc_notes_symbol % not used \newconditional\c_strc_notes_skip - \unexpanded\def\setnote [#1]{\getvalue{#1}} - \unexpanded\def\setnotetext[#1]{\global\settrue\c_strc_notes_skip\getvalue{#1}} +\unexpanded\def\setnote [#tag]{\getvalue{#tag}} +\unexpanded\def\setnotetext[#tag]{\global\settrue\c_strc_notes_skip\getvalue{#tag}} -\unexpanded\def\handlenoteinsert#1#2% tg, id +\unexpanded\def\handlenoteinsert#tag#id% {\begingroup - \edef\currentnote{#1}% - \strc_constructions_initialize{#1}% + \edef\currentnote{#tag}% + \strc_constructions_initialize{#tag}% \strc_notes_synchronize \the\everybeforenoteinsert \insert\currentnoteinsertionnumber\bgroup @@ -1170,24 +1180,24 @@ \doifelse{\noteparameter\c!paragraph}\v!yes {\nointerlineskip \startvboxtohbox - \handlenoteitself{#1}{#2}% + \handlenoteitself{#tag}{#id}% % add some slack \stopvboxtohbox} - {\handlenoteitself{#1}{#2}}% + {\handlenoteitself{#tag}{#id}}% \egroup \the\everyafternoteinsert \endgroup} -\unexpanded\def\betweennoteitself#1% tg - {\edef\currentnote{#1}% +\unexpanded\def\betweennoteitself#tag% + {\edef\currentnote{#tag}% \doif{\noteparameter\c!paragraph}\v!yes\strc_notes_between_paragraphs} -\unexpanded\def\handlenoteitself#1#2% tg, id - {\edef\currentnotenumber{#2}% - \edef\currentnote{#1}% - \strc_constructions_initialize{#1}% +\unexpanded\def\handlenoteitself#tag#id% + {\edef\currentnotenumber{#id}% + \edef\currentnote{#tag}% + \strc_constructions_initialize{#tag}% \strc_notes_synchronize - \edef\currentconstructionlistentry{\ctxcommand{notelistindex("\currentnote",#2)}}% index in list cache + \edef\currentconstructionlistentry{\ctxcommand{notelistindex("\currentnote",#id)}}% index in list cache % as we can have collected notes (e.g. in tables) we need to recover % \currentdescriptionattribute and \currentdescriptionsynchronize % @@ -1427,8 +1437,8 @@ \unexpanded\def\startlocalnotes {\dosingleempty\strc_notes_local_start} -\def\strc_notes_local_start[#1]% grouping ? (we used to have a second argument ... settings) - {\def\localnoteslist{#1}% +\def\strc_notes_local_start[#list]% grouping ? (we used to have a second argument ... settings) + {\def\localnoteslist{#list}% \settrue\inlocalnotes \processcommacommand[\localnoteslist]\strc_notes_local_start_step} @@ -1438,33 +1448,33 @@ \let\p_strc_notes_continue\empty -\def\strc_notes_local_start_step#1% +\def\strc_notes_local_start_step#tag% {\p_strc_notes_continue{\noteparameter\c!continue}% \ifx\p_strc_notes_continue\v!yes \else - \strc_counters_save{#1}% - \strc_counters_reset{#1}% + \strc_counters_save{#tag}% + \strc_counters_reset{#tag}% \fi - \ctxcommand{savenote("#1","store")}} + \ctxcommand{savenote("#tag","store")}} -\def\strc_notes_local_stop_step#1% +\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{#1}% + \strc_counters_restore{#tag}% \fi - \ctxcommand{restorenote("#1")}} + \ctxcommand{restorenote("#tag")}} \unexpanded\def\placelocalnotes {\dodoubleempty\strc_notes_local_place} -\def\strc_notes_local_place[#1][#2]% - {\doif{\ctxcommand{getnotestate("#1")}}{store}{\strc_notes_local_place_indeed{#2}{#1}}} +\def\strc_notes_local_place[#tag][#settings]% + {\doif{\ctxcommand{getnotestate("#tag")}}{store}{\strc_notes_local_place_indeed{#settings}{#tag}}} -\def\strc_notes_local_place_indeed#1#2% settings note +\def\strc_notes_local_place_indeed#settings#tag% {\begingroup - \edef\currentnote{#2}% is already set? + \edef\currentnote{#tag}% is already set? \the\everyplacelocalnotes % beware, we cannot trust setting \currentnote here - \setupcurrentnote[#1]% later we set height etc for framed + \setupcurrentnote[#settings]% later we set height etc for framed \strc_notes_place_local_alternative \strc_notes_set_properties % restore globals (if needed) \endgroup @@ -1511,19 +1521,19 @@ \unexpanded\def\placenotes {\dodoubleempty\strc_notes_place} -\def\strc_notes_place[#1][#2]% - {\processcommalist[#1]{\strc_notes_place_indeed{#2}}} +\def\strc_notes_place[#list][#settings]% + {\processcommalist[#list]{\strc_notes_place_indeed{#settings}}} -\def\strc_notes_place_indeed#1#2% settings note - {\edef\currentnote{#2}% grouping ? - \doifelse{\ctxcommand{getnotestate("#2")}}{store} +\def\strc_notes_place_indeed#settings#tag% settings note + {\edef\currentnote{#tag}% grouping ? + \doifelse{\ctxcommand{getnotestate("#tag")}}{store} \strc_notes_local_place_indeed \strc_notes_global_place_indeed - {#1}{#2}} + {#settings}{#tag}} -\def\strc_notes_global_place_indeed#1#2% +\def\strc_notes_global_place_indeed#settings#tag% {\begingroup - \setupnote[#2][#1]% + \setupnote[#tag][#settings]% \strc_notes_place_inserts \endgroup \the\everysetupnote} % to be checked .. synchronize @@ -1532,11 +1542,11 @@ \installcorenamespace{notealternative} -\unexpanded\def\installnotealternative#1#2% - {\setvalue{\??notealternative#1}{#2}} +\unexpanded\def\installnotealternative#alternative#command% + {\setvalue{\??notealternative#alternative}{#command}} -\unexpanded\def\doifnotescollected#1% - {\ctxcommand{doifnotecontent("#1")}} +\unexpanded\def\doifnotescollected#tag% + {\ctxcommand{doifnotecontent("#tag")}} \def\strc_notes_place_local_alternative % will be a setup (wrapper) {\doifnotescollected\currentnote @@ -1563,7 +1573,7 @@ % setups ? -\def\flushlocalnotes#1{\ctxcommand{flushnotes("#1","store","\noteparameter\c!criterium")}} +\def\flushlocalnotes#tag{\ctxcommand{flushnotes("#tag","store","\noteparameter\c!criterium")}} \installnotealternative \v!none {\flushlocalnotes\currentnote} @@ -1626,53 +1636,55 @@ %D \macros %D {fakenotes} - % used in page-mul - - \ifdefined\currentnofcolumns\else \def\currentnofcolumns{\nofcolumns} \fi - - \unexpanded\def\fakenotes - {\ifhmode\endgraf\fi\ifvmode - \calculatetotalclevernoteheight - \ifdim\totalnoteheight>\zeropoint \kern\totalnoteheight \fi - \fi} - - \unexpanded\def\fakepagenotes - {\ifhmode\endgraf\fi\ifvmode - \calculatetotalpagenoteheight - \ifdim\totalnoteheight>\zeropoint \kern\totalnoteheight \fi - \fi} - - \newdimen\totalnoteheight - - \unexpanded\def\additionaltotalnoteheight#1% temp hacks anyway - {\dimexpr - \ifdim\ht#1>\zeropoint - \ifcase\count#1 - \zeropoint - \else % todo: divide by count - \ht#1+\skip#1% hm, no stretch but a dimen anyway - \fi - \else - \zeropoint - \fi - \relax} - - \def\docalculatetotalnoteheight - {\ifcase\c_strc_notes_page_location % tricky here ! ! ! to be sorted out ! ! ! - \advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\currentnoteinsertionnumber}% - \fi} - - \def\docalculatetotalclevernoteheight - {\ifcase\c_strc_notes_page_location \else % tricky here ! ! ! to be sorted out ! ! ! - \advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\currentnoteinsertionnumber}% - \fi} - - \def\docalculatetotalpagenoteheight - {\advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\currentnoteinsertionnumber}} - - \def\calculatetotalnoteheight {\totalnoteheight\zeropoint\strc_notes_process\docalculatetotalnoteheight} - \def\calculatetotalclevernoteheight{\totalnoteheight\zeropoint\strc_notes_process\docalculatetotalclevernoteheight} - \def\calculatetotalpagenoteheight {\totalnoteheight\zeropoint\strc_notes_process\docalculatetotalpagenoteheight} + % used in page-mul + + \ifdefined\currentnofcolumns\else \def\currentnofcolumns{\nofcolumns} \fi + + \unexpanded\def\fakenotes + {\ifhmode\endgraf\fi\ifvmode + \calculatetotalclevernoteheight + \ifdim\totalnoteheight>\zeropoint \kern\totalnoteheight \fi + \fi} + + \unexpanded\def\fakepagenotes + {\ifhmode\endgraf\fi\ifvmode + \calculatetotalpagenoteheight + \ifdim\totalnoteheight>\zeropoint \kern\totalnoteheight \fi + \fi} + + % used in page-not but not yet ok + + \newdimen\totalnoteheight + + \unexpanded\def\additionaltotalnoteheight#insert% temp hacks anyway + {\dimexpr + \ifdim\ht#insert>\zeropoint + \ifcase\count#insert % + \zeropoint + \else % todo: divide by count + \ht#insert+\skip#insert% hm, no stretch but a dimen anyway + \fi + \else + \zeropoint + \fi + \relax} + + \def\docalculatetotalnoteheight + {\ifcase\c_strc_notes_page_location % tricky here ! ! ! to be sorted out ! ! ! + \advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\currentnoteinsertionnumber}% + \fi} + + \def\docalculatetotalclevernoteheight + {\ifcase\c_strc_notes_page_location \else % tricky here ! ! ! to be sorted out ! ! ! + \advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\currentnoteinsertionnumber}% + \fi} + + \def\docalculatetotalpagenoteheight + {\advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\currentnoteinsertionnumber}} + + \def\calculatetotalnoteheight {\totalnoteheight\zeropoint\strc_notes_process\docalculatetotalnoteheight} + \def\calculatetotalclevernoteheight{\totalnoteheight\zeropoint\strc_notes_process\docalculatetotalclevernoteheight} + \def\calculatetotalpagenoteheight {\totalnoteheight\zeropoint\strc_notes_process\docalculatetotalpagenoteheight} %D Now how can this mechanism be hooked into \CONTEXT\ without %D explictly postponing footnotes? The solution turned out to @@ -1731,18 +1743,18 @@ \unexpanded\def\startlocalfootnotes {\startlocalnotes [\v!footnote]} % alleen footnote \unexpanded\def\stoplocalfootnotes {\stoplocalnotes } -\def\strc_notes_place_footnotes[#1][#2]% +\def\strc_notes_place_footnotes[#list][#settings]% {\ifsecondargument - \placenotes[#1][#2,\c!height=\textheight]% + \placenotes[#list][#settings,\c!height=\textheight]% \else - \placenotes[#1][\c!height=\textheight]% + \placenotes[#list][\c!height=\textheight]% \fi} -\def\strc_notes_place_local_footnotes[#1][#2]% +\def\strc_notes_place_local_footnotes[#list][#settings]% {\ifsecondargument - \placelocalnotes[#1][#2,\c!height=\textheight]% + \placelocalnotes[#list][#settings,\c!height=\textheight]% \else - \placelocalnotes[#1][\c!height=\textheight]% + \placelocalnotes[#list][\c!height=\textheight]% \fi} %D Goodies: @@ -1753,7 +1765,7 @@ %D } %D \stoptyping -\def\doifnoteonsamepageelse[#1]{\ctxcommand{doifnoteonsamepageasprevious("#1")}} +\def\doifnoteonsamepageelse[#tag]{\ctxcommand{doifnoteonsamepageasprevious("#tag")}} %D New trickery: @@ -1774,15 +1786,15 @@ \unexpanded\def\notesymbol {\dodoubleempty\strc_notes_symbol} -\def\strc_notes_symbol[#1][#2]% +\def\strc_notes_symbol[#tag][#reference]% {\dontleavehmode \begingroup - \edef\currentnote{#1}% + \edef\currentnote{#tag}% \usenotestyleandcolor\c!textstyle\c!textcolor \ifnotesenabled \ifsecondargument \unskip - \noteparameter\c!textcommand{\in[#2]}% command here? + \noteparameter\c!textcommand{\in[#reference]}% command here? \else \noteparameter\c!textcommand\lastnotesymbol % check if command double \fi @@ -1792,30 +1804,30 @@ \unexpanded\def\note {\dodoubleempty\strc_notes_note} -\def\strc_notes_note[#1][#2]% +\def\strc_notes_note[#tag][#reference]% {\ifsecondargument - \strc_notes_symbol[#1][#2]% + \strc_notes_symbol[#tag][#reference]% \else \secondargumenttrue - \strc_notes_symbol[\v!footnote][#1]% + \strc_notes_symbol[\v!footnote][#tag]% \fi} % will be redone if needed % -% \def\ownnotesymbol#1% #1 gets number passed -% {\executeifdefined{\??notesymbol\currentnote}\empty} +% \def\ownnotesymbol#1% #1 gets number passed +% {\executeifdefined{\??notesymbol\currentnote}\empty} % -% \unexpanded\def\setnotesymbol[#1]#2#3% -% {\prewordbreak % prevent lookback -% \setgvalue{\??notesymbol#1}{#3} -% \strc_notes_inject_symbol} +% \unexpanded\def\setnotesymbol[#1]#2#3% +% {\prewordbreak % prevent lookback +% \setgvalue{\??notesymbol#1}{#3} +% \strc_notes_inject_symbol} % -% \unexpanded\def\ownnote[#1]#2#3#4% -% {\setnotesymbol[#1]{#2}{#3}% -% \setnotetext [#1]{#4}} +% \unexpanded\def\ownnote[#1]#2#3#4% +% {\setnotesymbol[#1]{#2}{#3}% +% \setnotetext [#1]{#4}} % -% \defineconversion -% [ownnote] -% [\ownnotesymbol] +% \defineconversion +% [ownnote] +% [\ownnotesymbol] \protect \endinput diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index cd36a3e5b..1d14a9990 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 10/17/12 19:02:50 +-- merge date : 10/17/12 22:49:16 do -- begin closure to overcome local limits and interference -- cgit v1.2.3