From 4833d4fc12d57cde9d0b70ff60ff6417b722b38d Mon Sep 17 00:00:00 2001
From: Hans Hagen
We also provide an efficient variant for page states.
+--ldx]]-- + +local collected = allocate() +local tobesaved = allocate() + +local pagestates = { + collected = collected, + tobesaved = tobesaved, +} + +job.pagestates = pagestates + +local function initializer() + collected = pagestates.collected + tobesaved = pagestates.tobesaved +end + +job.register('job.pagestates.collected', tobesaved, initializer, nil) + +table.setmetatableindex(tobesaved, function(t,k) + local v = { } + t[k] = v + return v +end) + +local function setstate(settings) + local name = settings.name + local tag = settings.tag + local list = tobesaved[name] + if not tag then + tag = #list + 1 + else + tag = tonumber(tag) or tag -- autonumber saves keys + end + local data = texcount.realpageno + list[tag] = data + return name, tag, data +end + +pagestates.setstate = setstate + +function pagestates.extend(name,tag) + tobesaved[name][tag] = texcount.realpageno +end + +function pagestates.realpage(name,tag,default) + local t = collected[name] + t = t and (t[tag] or t[tonumber(tag)]) + return tonumber(t or default) +end + +function commands.setpagestate(settings) + local name, tag, data = setstate(settings) + if type(tag) == "number" then + context(new_latelua(format("job.pagestates.extend(%q,%i)",name,tag))) + else + context(new_latelua(format("job.pagestates.extend(%q,%q)",name,tag))) + end +end + +function commands.pagestaterealpage(name,tag) + local t = collected[name] + t = t and (t[tag] or t[tonumber(tag)]) + if t then + context(t) + end +end diff --git a/tex/context/base/core-dat.mkiv b/tex/context/base/core-dat.mkiv new file mode 100644 index 000000000..f1d2a52cb --- /dev/null +++ b/tex/context/base/core-dat.mkiv @@ -0,0 +1,98 @@ +%D \module +%D [ file=core-dat, +%D version=20122.04.17, % replaces core-two from 1997.03.31, +%D title=\CONTEXT\ Core Macros, +%D subtitle=Multipass Datasets, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Core Macros / Multipass Datasets} + +%D \starttyping +%D \definedataset[test-1] +%D \definedataset[test-2][delay=yes] +%D +%D \startlines +%D set 1: \setdataset[test-1][whatever=this-or-that-1] +%D set 2: \setdataset[test-2][whatever=this-or-that-2] +%D set 3: \setdataset[test-2][whatever=this-or-that-3] +%D \stoplines +%D +%D \startlines +%D get 1: \datasetvariable{test-1}{1}{whatever} / \datasetvariable{test-1}{1}{realpage} +%D get 2: \datasetvariable{test-2}{1}{whatever} / \datasetvariable{test-2}{1}{realpage} +%D get 3: \datasetvariable{test-2}{2}{whatever} / \datasetvariable{test-2}{2}{realpage} +%D \stoplines +%D \stoptyping + +\unprotect + +\registerctxluafile{core-dat}{1.001} + +\installcorenamespace{dataset} + +\installcommandhandler \??dataset {dataset} \??dataset + +\unexpanded\def\setdataset + {\dotripleempty\syst_datasets_set} + +\def\syst_datasets_set + {\ifthirdargument + \expandafter\syst_datasets_set_named + \else + \expandafter\syst_datasets_set_indexed + \fi} + +\def\syst_datasets_set_named[#1][#2][#3]% + {\begingroup + \edef\currentdataset{#1}% + \ctxcommand{setdataset{ + name = "\currentdataset", + tag = \!!bs#2\!!es, + delay = "\datasetparameter\c!delay", + data = \!!bs#3\!!es + }}% + \endgroup} + +\def\syst_datasets_set_indexed[#1][#2][#3]% + {\begingroup + \edef\currentdataset{#1}% + \ctxcommand{setdataset{ + name = "\currentdataset", + delay = "\datasetparameter\c!delay", + data = \!!bs#2\!!es + }}% + \endgroup} + +\def\datasetvariable#1#2#3% + {\ctxcommand{datasetvariable("#1","#2","#3")}} + +\installcorenamespace{pagestate} + +\installcommandhandler \??pagestate {pagestate} \??pagestate + +\setuppagestate + [\c!delay=\v!yes] + +\unexpanded\def\setpagestate + {\dodoubleempty\syst_pagestates_set} + +\def\syst_pagestates_set[#1][#2]% + {\begingroup + \edef\currentpagestate{#1}% + \ctxcommand{setpagestate{ + name = "\currentpagestate", + tag = \!!bs#2\!!es, + delay = "\pagestateparameter\c!delay", + }}% + \endgroup} + +\def\pagestaterealpage#1#2% + {\ctxcommand{pagestaterealpage("#1","#2")}} + +\protect diff --git a/tex/context/base/core-uti.lua b/tex/context/base/core-uti.lua index cfe95a6bb..1657a75e2 100644 --- a/tex/context/base/core-uti.lua +++ b/tex/context/base/core-uti.lua @@ -34,7 +34,7 @@ local report_jobcontrol = logs.reporter("jobcontrol") job = job or { } local job = job -job.version = 1.18 +job.version = 1.19 -- some day we will implement loading of other jobs and then we need -- job.jobs diff --git a/tex/context/base/lpdf-ini.lua b/tex/context/base/lpdf-ini.lua index 88999358c..8e54666be 100644 --- a/tex/context/base/lpdf-ini.lua +++ b/tex/context/base/lpdf-ini.lua @@ -806,3 +806,17 @@ if not pdfreferenceobject then end end + +-- -- Maybe this will be an option (suggested on the mailing list by Peter Rolf): +-- +-- function backends.codeinjections.rgbtransparencygroup() +-- local d = lpdf.dictionary { +-- S = lpdf.constant("Transparency"), +-- CS = lpdf.constant("DeviceRGB"), +-- I = true +-- } +-- lpdf.registerpagefinalizer(function() +-- lpdf.addtopageattributes("Group",d) end) +-- end +-- +-- backends.codeinjections.rgbtransparencygroup() diff --git a/tex/context/base/m-steps.mkvi b/tex/context/base/m-steps.mkvi index de861e619..a07ece3ae 100644 --- a/tex/context/base/m-steps.mkvi +++ b/tex/context/base/m-steps.mkvi @@ -17,11 +17,11 @@ \unprotect -\definecorenamespace {stepcharts} -\definecorenamespace {steptables} -\definecorenamespace {stepcells} -\definecorenamespace {steptexts} -\definecorenamespace {steplines} +\installcorenamespace {stepcharts} +\installcorenamespace {steptables} +\installcorenamespace {stepcells} +\installcorenamespace {steptexts} +\installcorenamespace {steplines} \installsimplecommandhandler \??stepcharts {STEPchart} \??stepcharts \installsimplecommandhandler \??steptables {STEPtable} \??steptables diff --git a/tex/context/base/spac-pag.mkiv b/tex/context/base/spac-pag.mkiv index e44411fba..10b5d1acd 100644 --- a/tex/context/base/spac-pag.mkiv +++ b/tex/context/base/spac-pag.mkiv @@ -18,6 +18,8 @@ %D The code here has evolved over time and might not be the best %D around. Maybe much will be gone a some point. +%D The pagestate code will be redone. + \installcorenamespace {alignswitch} \letvalue{\??alignswitch\v!left }\zerocount @@ -27,7 +29,6 @@ \def\setalignmentswitch#1% {\chardef\alignmentswitch\csname\??alignswitch\ifcsname\??alignswitch#1\endcsname#1\else\v!left\fi\endcsname} -\newcount \noftrackedpagestates \newif \ifpagestatemismatch \newcount \realpagestateno \newconstant\frozenpagestate @@ -37,14 +38,106 @@ \doforcedtrackpagestate{#1}{#2}% \fi \fi} +% \def\doforcedtrackpagestate#1#2% +% {\ifcase\frozenpagestate +% \global\advance#2\plusone +% \lazysavetaggedtwopassdata{#1}{0}{\number#2}{\noexpand\realfolio}% +% \fi} + \def\doforcedtrackpagestate#1#2% {\ifcase\frozenpagestate - \global\advance\noftrackedpagestates\plusone \global\advance#2\plusone - \lazysavetaggedtwopassdata{#1}{\number\noftrackedpagestates}{\number#2}{\noexpand\realfolio}% - %\llap{\infofont\number\noftrackedpagestates/\number#2}% tracing + \setpagestate[#1][\number#2]% \fi} +% \def\doifrightpagestateelse#1#2% not expandable ! +% {\ifcase\frozenpagestate +% \pagestatemismatchfalse +% \realpagestateno\realfolio +% \ifinpagebody +% \ifdoublesided +% \ifodd\realpageno\relax +% \syst_twopass_set_found +% \else +% \syst_twopass_set_not_found +% \fi +% \else +% \syst_twopass_set_found +% \fi +% \else\ifdoublesided +% \findtwopassdata{#1}{\number#2}% +% \ifconditional\twopassdatafound +% \realpagestateno\twopassdata\relax +% \ifnum\twopassdata=\realpageno \else +% \pagestatemismatchtrue +% \fi +% \ifodd\twopassdata\relax +% \syst_twopass_set_found +% \else +% \syst_twopass_set_not_found +% \fi +% \else +% \ifodd\realpageno\relax +% \syst_twopass_set_found +% \else +% \syst_twopass_set_not_found +% \fi +% \fi +% \else +% \syst_twopass_set_found +% \fi\fi +% \else +% \ifodd\realpagestateno\relax +% \syst_twopass_set_found +% \else +% \syst_twopass_set_not_found +% \fi +% \fi +% \ifconditional\twopassdatafound +% \expandafter\firstoftwoarguments +% \else +% \expandafter\secondoftwoarguments +% \fi} + +% \def\doifforcedrightpagestateelse#1#2% +% {\ifcase\frozenpagestate +% \pagestatemismatchfalse +% \realpagestateno\realfolio +% \findtwopassdata{#1}{\number#2}% +% \ifconditional\twopassdatafound +% \realpagestateno\twopassdata\relax +% \ifnum\twopassdata=\realpageno \else +% \pagestatemismatchtrue +% \fi +% \ifodd\twopassdata\relax +% \syst_twopass_set_found +% \else +% \syst_twopass_set_not_found +% \fi +% \else +% \ifodd\realpageno\relax +% \syst_twopass_set_found +% \else +% \syst_twopass_set_not_found +% \fi +% \fi +% \else +% \ifodd\realpagestateno\relax +% \syst_twopass_set_found +% \else +% \syst_twopass_set_not_found +% \fi +% \fi +% \ifconditional\twopassdatafound +% \expandafter\firstoftwoarguments +% \else +% \expandafter\secondoftwoarguments +% \fi} + +\let\m_spac_pagestates_realpage\empty + +\newconditional\c_spac_pagestates_found + \def\doifrightpagestateelse#1#2% not expandable ! {\ifcase\frozenpagestate \pagestatemismatchfalse @@ -52,43 +145,43 @@ \ifinpagebody \ifdoublesided \ifodd\realpageno\relax - \syst_twopass_set_found + \settrue\c_spac_pagestates_found \else - \syst_twopass_set_not_found + \setfalse\c_spac_pagestates_found \fi \else - \syst_twopass_set_found + \settrue\c_spac_pagestates_found \fi \else\ifdoublesided - \findtwopassdata{#1}{\number#2}% - \ifconditional\twopassdatafound - \realpagestateno\twopassdata\relax - \ifnum\twopassdata=\realpageno \else - \pagestatemismatchtrue - \fi - \ifodd\twopassdata\relax - \syst_twopass_set_found + \edef\m_spac_pagestates_realpage{\pagestaterealpage{#1}{\number#2}}% + \ifx\m_spac_pagestates_realpage\empty + \ifodd\realpageno\relax + \settrue\c_spac_pagestates_found \else - \syst_twopass_set_not_found + \setfalse\c_spac_pagestates_found \fi \else - \ifodd\realpageno\relax - \syst_twopass_set_found + \realpagestateno\m_spac_pagestates_realpage\relax + \ifnum\realpagestateno=\realpageno \else + \pagestatemismatchtrue + \fi + \ifodd\realpagestateno\relax + \settrue\c_spac_pagestates_found \else - \syst_twopass_set_not_found + \setfalse\c_spac_pagestates_found \fi \fi \else - \syst_twopass_set_found + \settrue\c_spac_pagestates_found \fi\fi \else \ifodd\realpagestateno\relax - \syst_twopass_set_found + \settrue\c_spac_pagestates_found \else - \syst_twopass_set_not_found + \setfalse\c_spac_pagestates_found \fi \fi - \ifconditional\twopassdatafound + \ifconditional\c_spac_pagestates_found \expandafter\firstoftwoarguments \else \expandafter\secondoftwoarguments @@ -98,32 +191,32 @@ {\ifcase\frozenpagestate \pagestatemismatchfalse \realpagestateno\realfolio - \findtwopassdata{#1}{\number#2}% - \ifconditional\twopassdatafound - \realpagestateno\twopassdata\relax - \ifnum\twopassdata=\realpageno \else - \pagestatemismatchtrue - \fi - \ifodd\twopassdata\relax - \syst_twopass_set_found + \edef\m_spac_pagestates_realpage{\pagestaterealpage{#1}{\number#2}}% + \ifx\m_spac_pagestates_realpage\empty + \ifodd\realpageno\relax + \settrue\c_spac_pagestates_found \else - \syst_twopass_set_not_found + \setfalse\c_spac_pagestates_found \fi \else - \ifodd\realpageno\relax - \syst_twopass_set_found + \realpagestateno\m_spac_pagestates_realpage\relax + \ifnum\realpagestateno=\realpageno \else + \pagestatemismatchtrue + \fi + \ifodd\realpagestateno\relax + \settrue\c_spac_pagestates_found \else - \syst_twopass_set_not_found + \setfalse\c_spac_pagestates_found \fi \fi \else \ifodd\realpagestateno\relax - \syst_twopass_set_found + \settrue\c_spac_pagestates_found \else - \syst_twopass_set_not_found + \setfalse\c_spac_pagestates_found \fi \fi - \ifconditional\twopassdatafound + \ifconditional\c_spac_pagestates_found \expandafter\firstoftwoarguments \else \expandafter\secondoftwoarguments @@ -134,73 +227,49 @@ % we can make more of these on top, but how to deal with mixed frozen states -\definetwopasslist\s!paragraph \newcount\nofraggedparagraphs +% \dorecurse{500}{\dontleavehmode\signalrightpage\doifrightpageelse{right}{left}\par} % given doublesided -\def\signalrightpage {\dotrackpagestate \s!paragraph\nofraggedparagraphs} -\def\doifrightpageelse{\doifrightpagestateelse\s!paragraph\nofraggedparagraphs} +% \definetwopasslist\s!paragraph + +\newcount\nofraggedparagraphs -% no longer used -% -% \newcount\pagesignallevel -% -% \unexpanded\def\startsignalrightpage % one may do a \postsignalrightplace -% {\advance\pagesignallevel\plusone -% \presignalrightpage -% \let\signalrightpage\relax -% \let\presignalrightpage\relax -% \let\startsignalrightpage\relax -% \doifrightpageelse\donothing\donothing -% \freezepagestate} -% -% \unexpanded\def\stopsignalrightpage -% {\ifcase\pagesignallevel\or\postsignalrightpage\fi -% \advance\pagesignallevel\minusone} -% -% \ifx\swapmargins\undefined \let\swapmargins\undefined \fi % todo -% -% \def\doifswappedrightpageelse#1#2% alleen in box construction ! -% {\doifrightpageelse -% {#1} -% {\scratchcounter\realpageno -% \realpageno\realpagestateno\relax -% \swapmargins -% \realpageno\scratchcounter -% #2}} -% -% \newbox\signaledrightpage % this way we can avoid interference, i.e. postpone placement -% -% \def\presignalrightpage {\global\setbox\signaledrightpage\hbox{\signalrightpage}} -% \def\postsignalrightpage{\ifvoid\signaledrightpage\else\box\signaledrightpage\fi} -% -% % The next feature is is used in: -% % -% % \definenumber[test][way=bypage] -% % -% % \def\Test -% % {\incrementnumber[test]\rawnumber[test]/% -% % \incrementnumber[test]\rawnumber[test]/% -% % \incrementnumber[test]\rawnumber[test]\space -% % \checkpagechange{oeps}\changedpage{oeps}\space -% % \ifpagechanged TRUE\else FALSE\fi} -% % -% % \Test\page \Test\par \Test\page \Test\par \Test\page \Test\page +\definepagestate[\s!paragraph] + +\def\signalrightpage {\dotrackpagestate \s!paragraph\nofraggedparagraphs} % use \dontleavehmode if needed +\def\doifrightpageelse{\doifrightpagestateelse\s!paragraph\nofraggedparagraphs} \installcorenamespace{pagechanges} \newif\ifpagechanged \let\lastchangedpage\empty +% \def\spac_pagechanges_check#1#2#3% +% {\pagechangedfalse +% \doforcedtrackpagestate{#2}{#3}% +% \findtwopassdata{#2}{\number#3}% +% \ifconditional\twopassdatafound +% \ifnum\twopassdata>0\getvalue{\??pagechanges#2:#1}\relax +% \pagechangedtrue +% \fi +% \fi +% \ifpagechanged +% \letgvalue{\??pagechanges#2:#1}\twopassdata +% \globallet\lastchangedpage\twopassdata +% \else +% \globallet\lastchangedpage\realfolio +% \fi} + \def\spac_pagechanges_check#1#2#3% {\pagechangedfalse \doforcedtrackpagestate{#2}{#3}% - \findtwopassdata{#2}{\number#3}% - \ifconditional\twopassdatafound - \ifnum\twopassdata>0\getvalue{\??pagechanges#2:#1}\relax + \edef\m_spac_pagestates_realpage{\pagestaterealpage{#2}{\number#3}}% + \ifx\m_spac_pagestates_realpage\empty \else + \ifnum\m_spac_pagestates_realpage>0\getvalue{\??pagechanges#2:#1}\relax \pagechangedtrue \fi \fi \ifpagechanged - \letgvalue{\??pagechanges#2:#1}\twopassdata - \globallet\lastchangedpage\twopassdata + \letgvalue{\??pagechanges#2:#1}\m_spac_pagestates_realpage + \globallet\lastchangedpage\m_spac_pagestates_realpage \else \globallet\lastchangedpage\realfolio \fi} diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index ff117e85e..c022049d5 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 e15816a17..850e11e23 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/status-mkiv.lua b/tex/context/base/status-mkiv.lua index 86af98fbd..5c54b079f 100644 --- a/tex/context/base/status-mkiv.lua +++ b/tex/context/base/status-mkiv.lua @@ -384,6 +384,11 @@ return { status = "okay", comment = "maybe rename to core-two", }, + { + filename = "core-dat", + marktype = "mkiv", + status = "okay", + }, { filename = "colo-ini", marktype = "mkiv", diff --git a/tex/context/base/strc-flt.mkvi b/tex/context/base/strc-flt.mkvi index ba1f4e29c..05cfa40e3 100644 --- a/tex/context/base/strc-flt.mkvi +++ b/tex/context/base/strc-flt.mkvi @@ -355,26 +355,66 @@ \fi \fi} -% the tricky part of getting float related two pass data is +% The tricky part of getting float related two pass data is % that we should fetch is early but can only save it with % the composed float box; this determines the order: get it -% before saving it +% before saving it. -\definetwopasslist{\s!float\s!data} \newcounter\noffloatdata +% We had this: +% +% \definetwopasslist{\s!float\s!data} \newcounter\noffloatdata +% +% \let\strc_float_realpage\realpageno % used for odd/even determination, can be combined with nodelocation +% +% \def\strc_float_save_data % \expanded ... will change in mkiv +% {\doglobal\increment\noffloatdata +% \lazysavetaggedtwopassdata{\s!float\s!data}{\noffloatdata}{\noffloatpages}{\noexpand\realfolio}}% later {}{}{}{} and \getfirst... +% +% \def\strc_float_load_data % precedes save ! +% {\doglobal\increment\noffloatpages +% \findtwopassdata{\s!float\s!data}{\noffloatpages}% +% \ifconditional\twopassdatafound +% \globallet\strc_float_realpage\twopassdata +% \else +% \globallet\strc_float_realpage\realpageno % \realfolio +% \fi} + +%D We can do this ... +%D +%D \starttyping +%D \newcount\c_strc_floats_n +%D +%D \definedataset[\s!float][\c!delay=\v!yes] +%D +%D \let\strc_float_realpage\realpageno +%D +%D \def\strc_float_save_data +%D {\setdataset[\s!float][\number\c_strc_floats_n][]} +%D +%D \def\strc_float_load_data % precedes save ! +%D {\global\advance\c_strc_floats_n\plusone +%D \xdef\strc_float_realpage{\datasetvariable\s!float{\number\c_strc_floats_n}\s!page}% +%D \ifx\strc_float_realpage\empty +%D \globallet\strc_float_realpage\realpageno % \realfolio +%D \fi} +%D \stoptyping +%D +%D ... but this is more efficient: -\let\twopassfloatdata\realpageno % used for odd/even determination, can be combined with nodelocation +\definepagestate[\s!float][\c!delay=\v!yes] -\def\dosavefloatdata % \expanded ... will change in mkiv - {\doglobal\increment\noffloatdata - \lazysavetaggedtwopassdata{\s!float\s!data}{\noffloatdata}{\noffloatpages}{\noexpand\realfolio}}% later {}{}{}{} and \getfirst... +\newcount\c_strc_floats_n -\def\dogetfloatdata % precedes save ! - {\doglobal\increment\noffloatpages - \findtwopassdata{\s!float\s!data}{\noffloatpages}% - \ifconditional\twopassdatafound - \globallet\twopassfloatdata\twopassdata - \else - \globallet\twopassfloatdata\realpageno % \realfolio +\let\strc_float_realpage\realpageno + +\def\strc_float_save_data + {\setpagestate[\s!float][\number\c_strc_floats_n]} + +\def\strc_float_load_data % precedes save ! + {\global\advance\c_strc_floats_n\plusone + \xdef\strc_float_realpage{\pagestaterealpage\s!float{\number\c_strc_floats_n}}% + \ifx\strc_float_realpage\empty + \globallet\strc_float_realpage\realpageno % \realfolio \fi} %D test case: @@ -807,7 +847,7 @@ \appendtoks \everyinsidefloat\emptytoks % in case it's called earlier - \dogetfloatdata + \strc_float_load_data \to \everyinsidefloat \def\doifrightpagefloatelse @@ -822,7 +862,7 @@ \fi} \def\doifoddfloatpageelse - {\ifodd\purenumber\twopassfloatdata\space + {\ifodd\purenumber\strc_float_realpage\space \expandafter\firstoftwoarguments \else \expandafter\secondoftwoarguments @@ -1816,7 +1856,7 @@ \fi \strc_floats_set_local_dimensions \global\advance\totalnoffloats\plusone - \setbox\floatbox\hbox{\dosavefloatdata\box\floatbox}% still needed? we will do renumbering differently + \setbox\floatbox\hbox{\strc_float_save_data\box\floatbox}% still needed? we will do renumbering differently \global\floatheight\htdp\floatbox \global\floatwidth\wd\floatbox \doifnotinset\v!margin\floatlocation % gaat namelijk nog fout diff --git a/tex/context/base/strc-not.mkvi b/tex/context/base/strc-not.mkvi index f8f25900f..5f1f041e3 100644 --- a/tex/context/base/strc-not.mkvi +++ b/tex/context/base/strc-not.mkvi @@ -332,8 +332,9 @@ \c!rulethickness=\linewidth, \c!frame=\v!off, \c!distance=.125em, % in the text between symbols + % \c!textseparator={,}, % optional separator \c!columndistance=1em, -% \c!margindistance=.5em, + % \c!margindistance=.5em, \c!align=, % also use instead of \c!tolerance \c!split=\v!tolerant, \c!width=\makeupwidth, % \ifdim\hsize<\makeupwidth\hsize\else\makeupwidth\fi @@ -608,7 +609,8 @@ {\removeunwantedspaces \doifitalicelse\/\donothing % Charles IV \footnote{the fourth} \ifdim\lastkern=\notesignal - \kern\noteparameter\c!distance % yes or no note font? or main text + % \kern\noteparameter\c!distance % yes or no note font? or main text + \strc_notes_inject_separator \fi \nobreak \begingroup @@ -632,12 +634,29 @@ {\removeunwantedspaces \doifitalicelse\/\donothing % Charles IV \footnote{the fourth} \ifdim\lastkern=\notesignal - \kern\noteparameter\c!distance % yes or no note font? or main text + % \kern\noteparameter\c!distance % yes or no note font? or main text + \strc_notes_inject_separator \fi \nobreak \hbox to .5em{}% \globallet\lastnotesymbol\relax} +\unexpanded\def\strc_notes_inject_separator % patch by WS due to request on list + {\edef\p_textseparator{\noteparameter\c!textseparator}% + \ifx\p_textseparator\empty + \kern\noteparameter\c!distance + \else + % skip or kern + \nobreak + \hbox\bgroup + \strc_notes_interaction_check_inline + \strc_notes_set_style_color_inline\c!textstyle\c!textcolor + \noteparameter\c!textcommand{\p_textseparator}% + \kern\noteparameter\c!distance + \egroup + \nobreak + \fi} + % this needs a further cleanup ... soon as it's a slow mechanism % % -- set breakpoint in descriptions diff --git a/tex/context/base/trac-log.lua b/tex/context/base/trac-log.lua index c1d890276..44de8ebe6 100644 --- a/tex/context/base/trac-log.lua +++ b/tex/context/base/trac-log.lua @@ -536,6 +536,13 @@ local function reportbanner(t) end end +local function reportversion(t) + local banner = t.banner + if banner then + t.report(banner) + end +end + local function reporthelp(t,...) local helpinfo = t.helpinfo if type(helpinfo) == "string" then @@ -562,6 +569,7 @@ function logs.application(t) t.report = logs.reporter(t.name) t.help = function(...) reportbanner(t) ; reporthelp(t,...) ; reportinfo(t) end t.identify = function() reportbanner(t) end + t.version = function() reportversion(t) end return t end diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index df477dd17..7808e2cea 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 : 04/14/12 00:10:51 +-- merge date : 04/17/12 22:37:22 do -- begin closure to overcome local limits and interference -- cgit v1.2.3