From aaa042657b0db7d12dd6bfc38513b39eec676663 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Sat, 8 Nov 2014 16:15:04 +0100 Subject: 2014-11-08 15:09:00 --- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4392 -> 4388 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/publ-ini.lua | 31 ++++++++++ tex/context/base/publ-ini.mkiv | 4 +- tex/context/base/status-files.pdf | Bin 24702 -> 24702 bytes tex/context/base/status-lua.pdf | Bin 333281 -> 333340 bytes tex/context/base/strc-lst.lua | 65 +++++++++++++-------- tex/context/base/strc-lst.mkvi | 59 +++++++++++-------- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 10 files changed, 113 insertions(+), 52 deletions(-) diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 80bdb4c4d..92008447f 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{2014.11.07 11:48} +\newcontextversion{2014.11.08 15:07} %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 2a1cac81e..4e042b2ad 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.mkiv b/tex/context/base/context.mkiv index aff8f8240..33c53cc64 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -28,7 +28,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2014.11.07 11:48} +\edef\contextversion{2014.11.08 15:07} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/publ-ini.lua b/tex/context/base/publ-ini.lua index 367a192f7..0f41275a0 100644 --- a/tex/context/base/publ-ini.lua +++ b/tex/context/base/publ-ini.lua @@ -908,6 +908,7 @@ do if ignoredfields and ignoredfields[field] then return false else + --- just "return true" as it's already in fields local sets = catspec.sets return sets and sets[field] or true end @@ -957,6 +958,36 @@ do end end + local function get(name,tag,field,what) + local dataset = rawget(datasets,name) + if dataset then + local fields = dataset.luadata[tag] + if fields then + local category = fields.category + local catspec = currentspecificationcategories[category] + if not catspec then + return false + end + local fields = catspec.fields + if fields then + local kind = fields[field] + if kind then + return what and kind or field + end + end + end + end + return "" + end + + function commands.btxfieldname(name,tag,field) + return context(get(name,tag,field)) + end + + function commands.btxfieldtype(name,tag,field) + return context(get(name,tag,field,true)) + end + function commands.btxflush(name,tag,field) local dataset = rawget(datasets,name) if dataset then diff --git a/tex/context/base/publ-ini.mkiv b/tex/context/base/publ-ini.mkiv index 7c8676c4b..1d21a83f9 100644 --- a/tex/context/base/publ-ini.mkiv +++ b/tex/context/base/publ-ini.mkiv @@ -400,8 +400,10 @@ \def\btxfield #1{\ctxcommand{btxfield("\currentbtxdataset","\currentbtxtag","#1")}} \def\btxdetail #1{\ctxcommand{btxdetail("\currentbtxdataset","\currentbtxtag","#1")}} -\def\btxauthorfield#1{\ctxcommand{btxauthorfield(\number\currentbtxauthorindex,"#1")}} \def\btxflush #1{\ctxcommand{btxflush("\currentbtxdataset","\currentbtxtag","#1")}} +\def\btxfieldname #1{\ctxcommand{btxfieldname("\currentbtxdataset","\currentbtxtag","#1")}} +\def\btxfieldtype #1{\ctxcommand{btxfieldtype("\currentbtxdataset","\currentbtxtag","#1")}} +\def\btxauthorfield#1{\ctxcommand{btxauthorfield(\number\currentbtxauthorindex,"#1")}} \def\btxdoifelse #1{\ctxcommand{btxdoifelse("\currentbtxdataset","\currentbtxtag","#1")}} \def\btxdoif #1{\ctxcommand{btxdoif("\currentbtxdataset","\currentbtxtag","#1")}} \def\btxdoifnot #1{\ctxcommand{btxdoifnot("\currentbtxdataset","\currentbtxtag","#1")}} diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 7d895512c..8e5bf1a8a 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 8dd64b96e..8b75ed454 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-lst.lua b/tex/context/base/strc-lst.lua index addc7f117..bdbbf9c4f 100644 --- a/tex/context/base/strc-lst.lua +++ b/tex/context/base/strc-lst.lua @@ -407,12 +407,17 @@ filters[v_intro] = function(specification) local collected = specification.collected local result = { } local nofresult = #result + local all = specification.all + local names = specification.names for i=1,#collected do local v = collected[i] - local r = v.references - if r and r.section == 0 then - nofresult = nofresult + 1 - result[nofresult] = v + local metadata = v.metadata + if metadata and (all or names[metadata.name or false]) then + local r = v.references + if r and r.section == 0 then + nofresult = nofresult + 1 + result[nofresult] = v + end end end return result @@ -437,14 +442,12 @@ filters[v_reference] = function(specification) local r = v.references if r and (not block or not r.block or block == r.block) then local metadata = v.metadata - if metadata then - if names[metadata.name or false] then - local sectionnumber = (r.section == 0) or sections[r.section] - if sectionnumber then - if matchingtilldepth(depth,numbers,sectionnumber.numbers) then - nofresult = nofresult + 1 - result[nofresult] = v - end + if metadata and names[metadata.name or false] then + local sectionnumber = (r.section == 0) or sections[r.section] + if sectionnumber then + if matchingtilldepth(depth,numbers,sectionnumber.numbers) then + nofresult = nofresult + 1 + result[nofresult] = v end end end @@ -624,11 +627,34 @@ filters[v_previous] = function(specification) return result end +filters[v_local] = function(specification) + local nested = nesting[#nesting] + local criterium = nested and nested.name + if nested and criterium then + -- nested = nested + -- criterium = nested.name + elseif autosectiondepth(specification.numbers) == 0 then + nested = false + criterium = v_all + else + nested = false + criterium = v_current + end + return filtercollected { + names = specification.names, + criterium = criterium, + reference = nested.number, + collected = specification.collected, + forced = specification.forced, + nested = nested, + sortorder = specification.sortorder, + } +end + filters[v_local] = function(specification) local numbers = specification.numbers local nested = nesting[#nesting] if nested then - -- filtercollected(names,nested.name,nested.number,collected,forced,nested,sortorder) return filtercollected { names = specification.names, criterium = nested.name, @@ -638,21 +664,14 @@ filters[v_local] = function(specification) nested = nested, sortorder = specification.sortorder, } - elseif autosectiondepth(numbers) == 0 then - specification.nested = false - specification.criterium = v_all - -- return filtercollected(specification) -- rechecks, so better - specification.all = true - specification.block = false - return filters[v_all](specification) else + specification.criterium = autosectiondepth(numbers) == 0 and v_all or v_current specification.nested = false - specification.criterium = v_current - -- return filtercollected(specification) -- rechecks, so better - return filters[v_current](specification) + return filtercollected(specification) -- rechecks, so better (for determining all) end end + filters[v_component] = function(specification) -- special case, no structure yet local collected = specification.collected diff --git a/tex/context/base/strc-lst.mkvi b/tex/context/base/strc-lst.mkvi index d617721b5..ef3a3dbb1 100644 --- a/tex/context/base/strc-lst.mkvi +++ b/tex/context/base/strc-lst.mkvi @@ -850,7 +850,7 @@ % \stopsetups \startsetups[\??listrenderings:generic] -\typo_injectors_check_list + \typo_injectors_check_list \listparameter\c!before % can be \hskip \edef\p_command{\listalternativeparameter\c!command} \ifx\p_command\empty @@ -858,7 +858,7 @@ \vbox { \forgetall \noindent % otherwise annotations are mirrored up -\typo_injectors_mark_list + \typo_injectors_mark_list \hbox \strc_lists_get_reference_attribute\v!all { \ifconditional\c_lists_show_number % \ifconditional\c_lists_has_page @@ -899,8 +899,8 @@ \startsetups[\??listrenderings:abc] \endgraf % are we grouped? -% \advance % yes or no ... \rightskip is also honored -\typo_injectors_check_list + \typo_injectors_check_list + % \advance % yes or no ... \rightskip is also honored \leftskip\listparameter\c!margin % after \endgraf ! \listparameter\c!before \endgraf @@ -920,7 +920,7 @@ \fi \fi\fi \noindent % otherwise annotations are mirrored up -\typo_injectors_mark_list + \typo_injectors_mark_list \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute { \setlocalhsize \hsize\localhsize @@ -1101,9 +1101,9 @@ \stopsetups \startsetups[\??listrenderings:e] -\typo_injectors_check_list + \typo_injectors_check_list \noindent % otherwise annotations are mirrored up -\typo_injectors_mark_list + \typo_injectors_mark_list \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute { \letlistparameter\c!depth\zeropoint \letlistparameter\c!color\empty @@ -1123,9 +1123,9 @@ \stopsetups \startsetups[\??listrenderings:f] -\typo_injectors_check_list + \typo_injectors_check_list \noindent % otherwise annotations are mirrored up -\typo_injectors_mark_list + \typo_injectors_mark_list \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute { \dosetraggedhbox{\listparameter\c!align}% \raggedbox { @@ -1143,9 +1143,9 @@ \stopsetups \startsetups[\??listrenderings:g] -\typo_injectors_check_list + \typo_injectors_check_list \noindent % otherwise annotations are mirrored up -\typo_injectors_mark_list + \typo_injectors_mark_list \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute { \midaligned { \strc_lists_set_style_color\c!style\c!color\v!all @@ -1166,22 +1166,31 @@ \definelistalternative [\v!interactive] - [\c!renderingsetup=\??listrenderings:interactive] + [\c!renderingsetup=\??listrenderings:interactive, + \c!before=\endgraf, % new per 2014-11-08 + \c!after=\endgraf] % new per 2014-11-08 \startsetups[\??listrenderings:interactive] - \edef\p_command{\listalternativeparameter\c!command}% - \ifx\p_command\empty - [\currentlist: \currentlistentrynumber\space -- \currentlistentrytitle\space -- \currentlistentrypagenumber]% - \else -\typo_injectors_check_list - \listparameter\c!before - \noindent % otherwise annotations are mirrored up -\typo_injectors_mark_list - \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute { - \p_command\currentlistentrynumber\currentlistentrytitle\currentlistentrypagenumber - } - \listparameter\c!after - \fi + \edef\p_command{\listalternativeparameter\c!command}% + \typo_injectors_check_list + \listparameter\c!before + \noindent % otherwise annotations are mirrored up + \typo_injectors_mark_list + \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute { + \ifx\p_command\empty + [ + \currentlist:\space + \currentlistentrynumber + \space\emdash\space + \currentlistentrytitle + \space\emdash\space + \currentlistentrypagenumber + ] + \else + \p_command\currentlistentrynumber\currentlistentrytitle\currentlistentrypagenumber + \fi + } + \listparameter\c!after \stopsetups %D List elements are packaged in such a way that we can click on them diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index c69c70e14..2472cb5f0 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 : 11/07/14 11:48:29 +-- merge date : 11/08/14 15:07:31 do -- begin closure to overcome local limits and interference -- cgit v1.2.3