From 3c93a961f9579bc10a8a6cb0d30065d9791048a3 Mon Sep 17 00:00:00 2001 From: Marius Date: Fri, 25 Nov 2011 13:00:14 +0200 Subject: beta 2011.11.25 11:31 --- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4071 -> 4072 bytes tex/context/base/context-version.png | Bin 106083 -> 106136 bytes tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/file-job.lua | 9 +++++++-- tex/context/base/phys-dim.lua | 3 +++ tex/context/base/status-files.pdf | Bin 24028 -> 24029 bytes tex/context/base/status-lua.pdf | Bin 168821 -> 168855 bytes tex/context/base/strc-lst.lua | 16 +++++++++++++++- tex/context/base/strc-ref.lua | 6 +++--- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 13 files changed, 33 insertions(+), 11 deletions(-) diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 9c10f4dec..449e28a29 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{2011.11.25 10:34} +\newcontextversion{2011.11.25 11:31} %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 af464bf37..f97d3a50e 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{2011.11.25 10:34} +\newcontextversion{2011.11.25 11:31} %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/context-version.pdf b/tex/context/base/context-version.pdf index e46b9b8df..bf90441be 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 fa6beba00..78e0d2ebb 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 b99fa4181..b0e1ab46d 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{2011.11.25 10:34} +\edef\contextversion{2011.11.25 11:31} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 3d01d57bf..fbf188c58 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.11.25 10:34} +\edef\contextversion{2011.11.25 11:31} %D For those who want to use this: diff --git a/tex/context/base/file-job.lua b/tex/context/base/file-job.lua index 56bd1d92d..d43efa232 100644 --- a/tex/context/base/file-job.lua +++ b/tex/context/base/file-job.lua @@ -479,7 +479,7 @@ local function topofstack(what) return stack and stack[#stack] or environment.jobname end -local function currentcomponent() -- only when in product +local function productcomponent() -- only when in product local product = product_stack[#product_stack] if product and product ~= "" then local component = component_stack[1] @@ -499,9 +499,14 @@ local function justacomponent() end end -resolvers.jobs.currentcomponent = currentcomponent +resolvers.jobs.productcomponent = productcomponent resolvers.jobs.justacomponent = justacomponent +function resolvers.jobs.currentproject () return topofstack(v_project ) end +function resolvers.jobs.currentproduct () return topofstack(v_product ) end +function resolvers.jobs.currentcomponent () return topofstack(v_component ) end +function resolvers.jobs.currentenvironment() return topofstack(v_environment) end + local done = { } local tolerant = false -- too messy, mkii user with the wrong sructure should adapt diff --git a/tex/context/base/phys-dim.lua b/tex/context/base/phys-dim.lua index 9d1176b78..0cf878470 100644 --- a/tex/context/base/phys-dim.lua +++ b/tex/context/base/phys-dim.lua @@ -16,6 +16,9 @@ if not modules then modules = { } end modules ['phys-dim'] = { -- todo: collect used units for logging (and list of units, but then we need -- associations too). +-- todo: degrees celsius 0x2103 +-- todo: degrees fahrenheit 0x2109 + local V, P, S, R, C, Cc, Cs, matchlpeg, Carg = lpeg.V, lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.match, lpeg.Carg local format, lower = string.format, string.lower local appendlpeg = lpeg.append diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 4065f2c48..428859ac8 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 022b8f526..9d8e7338c 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 d96a4a9ea..ed0049081 100644 --- a/tex/context/base/strc-lst.lua +++ b/tex/context/base/strc-lst.lua @@ -230,7 +230,7 @@ local sorters = { end, } --- some day soon we will pass a table +-- some day soon we will pass a table .. also split the function local function filtercollected(names, criterium, number, collected, forced, nested, sortorder) -- names is hash or string local numbers, depth = documents.data.numbers, documents.data.depth @@ -393,6 +393,20 @@ local function filtercollected(names, criterium, number, collected, forced, nest else return filtercollected(names,variables.current,number,collected,forced,false,sortorder) end + elseif criterium == variables.component then + -- special case, no structure yet + local component = resolvers.jobs.currentcomponent() or "" + if component ~= "" then + for i=1,#collected do + local v = collected[i] + local r = v.references + local m = v.metadata + if r and r.component == component and (m and names[m.name] or all) then + nofresult = nofresult + 1 + result[nofresult] = v + end + end + end else -- sectionname, number -- not the same as register local depth = sections.getlevel(criterium) diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua index 615832485..93a915bb6 100644 --- a/tex/context/base/strc-ref.lua +++ b/tex/context/base/strc-ref.lua @@ -39,7 +39,7 @@ local context = context local texcount = tex.count local texconditionals = tex.conditionals -local currentcomponent = resolvers.jobs.currentcomponent +local productcomponent = resolvers.jobs.productcomponent local justacomponent = resolvers.jobs.justacomponent local logsnewline = logs.newline @@ -244,7 +244,7 @@ end local function setcomponent(data) -- we might consider doing this at the tex end, just like prefix - local component = currentcomponent() + local component = productcomponent() if component then local references = data and data.references if references then @@ -1446,7 +1446,7 @@ local function identify(prefix,reference) var = identify_arguments(set,var,i) elseif not var.component then var = identify_inner_or_outer(set,var,i) - elseif currentcomponent() then + elseif productcomponent() then var = identify_inner_component(set,var,i) else var = identify_outer_component(set,var,i) diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 4cedab23e..ae62e048a 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/25/11 10:34:08 +-- merge date : 11/25/11 11:31:56 do -- begin closure to overcome local limits and interference -- cgit v1.2.3