From e6e3ff321b035d7d3ed512871d0cbd802c4b7368 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 24 May 2012 16:40:17 +0300 Subject: beta 2012.05.24 15:18 --- tex/context/base/bibl-tra.lua | 73 +++++++++++++-------- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4125 -> 4129 bytes tex/context/base/context-version.png | Bin 104636 -> 106041 bytes tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/data-res.lua | 2 +- tex/context/base/lpdf-ano.lua | 7 +- tex/context/base/status-files.pdf | Bin 24421 -> 24442 bytes tex/context/base/status-lua.pdf | Bin 180121 -> 180035 bytes tex/context/base/strc-con.mkvi | 2 + tex/context/base/strc-ini.lua | 8 +-- tex/context/base/strc-ref.lua | 9 ++- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 15 files changed, 72 insertions(+), 39 deletions(-) (limited to 'tex') diff --git a/tex/context/base/bibl-tra.lua b/tex/context/base/bibl-tra.lua index d66446645..6341898ee 100644 --- a/tex/context/base/bibl-tra.lua +++ b/tex/context/base/bibl-tra.lua @@ -129,37 +129,58 @@ end function hacks.resolve(prefix,block,reference) -- maybe already feed it split -- needs checking (the prefix in relation to components) - local subset = references.collected[prefix or ""] or references.collected[""] - if subset then + local subsets + local collected = references.collected + if prefix and prefix ~= "" then + subsets = { collected[prefix] or collected[""] } + else + local components = references.productdata.components + local subset = collected[""] + if subset then + subsets = { subset } + else + subsets = { } + end + for i=1,#components do + local subset = collected[components[i]] + if subset then + subsets[#subsets+1] = subset + end + end + end + if #subsets > 0 then local result, nofresult, done = { }, 0, { } block = tonumber(block) - for rest in gmatch(reference,"[^, ]+") do - local blk, tag, found = block, nil, nil - if block then - tag = blk .. ":" .. rest - found = subset[tag] - if not found then - for i=block-1,1,-1 do - tag = i .. ":" .. rest - found = subset[tag] - if found then - blk = i - break + for i=1,#subsets do + local subset = subsets[i] + for rest in gmatch(reference,"[^, ]+") do + local blk, tag, found = block, nil, nil + if block then + tag = blk .. ":" .. rest + found = subset[tag] + if not found then + for i=block-1,1,-1 do + tag = i .. ":" .. rest + found = subset[tag] + if found then + blk = i + break + end end end end - end - if not found then - blk = "*" - tag = blk .. ":" .. rest - found = subset[tag] - end - if found then - local current = tonumber(found.entries and found.entries.text) -- tonumber needed - if current and not done[current] then - nofresult = nofresult + 1 - result[nofresult] = { blk, rest, current } - done[current] = true + if not found then + blk = "*" + tag = blk .. ":" .. rest + found = subset[tag] + end + if found then + local current = tonumber(found.entries and found.entries.text) -- tonumber needed + if current and not done[current] then + nofresult = nofresult + 1 + result[nofresult] = { blk, rest, current } + done[current] = true + end end end end diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index ac124665b..497259303 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.05.24 11:02} +\newcontextversion{2012.05.24 15:18} %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 8233e370b..f30631d62 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.05.24 11:02} +\newcontextversion{2012.05.24 15:18} %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 f3d7742ca..2b5c3d73d 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 6fe15b1ce..5c335a204 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 91329b50f..9fa94f013 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.05.24 11:02} +\edef\contextversion{2012.05.24 15:18} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 298368e65..e31f12327 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -23,7 +23,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2012.05.24 11:02} +\edef\contextversion{2012.05.24 15:18} %D For those who want to use this: diff --git a/tex/context/base/data-res.lua b/tex/context/base/data-res.lua index eb642020d..01b5f2525 100644 --- a/tex/context/base/data-res.lua +++ b/tex/context/base/data-res.lua @@ -440,7 +440,7 @@ local function load_configuration_files() instance.loaderror = true end elseif trace_locating then - report_resolving("skipping configuration file '%s' (no file)",filename) + report_resolving("skipping configuration file '%s' (no valid format)",filename) end instance.order[#instance.order+1] = instance.setups[pathname] if instance.loaderror then diff --git a/tex/context/base/lpdf-ano.lua b/tex/context/base/lpdf-ano.lua index 4d0a55f80..4618b6d32 100644 --- a/tex/context/base/lpdf-ano.lua +++ b/tex/context/base/lpdf-ano.lua @@ -341,7 +341,12 @@ runners["inner"] = function(var,actions) else var.inner = nil end - return link(nil,nil,var.inner,var.r,actions) + local prefix = var.p + local inner = var.inner + if inner and prefix and prefix ~= "" then + inner = prefix .. ":" .. inner -- might not always be ok + end + return link(nil,nil,inner,var.r,actions) end runners["inner with arguments"] = function(var,actions) diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index c224af0f8..e1e9c64e6 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 3bbab9a34..64a2e0f3b 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-con.mkvi b/tex/context/base/strc-con.mkvi index 220de809a..956acaae5 100644 --- a/tex/context/base/strc-con.mkvi +++ b/tex/context/base/strc-con.mkvi @@ -400,6 +400,7 @@ \fi \advance\ifx#1\v!flushleft\rightskip\else\leftskip\fi\constructionsheaddistance % only difference and wrong anyway \ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox}% +\setbox\constructionheadbox\hbox{\box\constructionheadbox}% needed in case of e.g. a real big head font, see descriptions-006.tex \ht\constructionheadbox\strutht \dp\constructionheadbox\strutdp} @@ -415,6 +416,7 @@ \setupalign[\p_headalign]% use fast one \fi \ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox}% +\setbox\constructionheadbox\hbox{\box\constructionheadbox}% needed in case of e.g. a real big head font, see descriptions-006.tex \ht\constructionheadbox\strutht \dp\constructionheadbox\strutdp} diff --git a/tex/context/base/strc-ini.lua b/tex/context/base/strc-ini.lua index c246ccd27..78efcad81 100644 --- a/tex/context/base/strc-ini.lua +++ b/tex/context/base/strc-ini.lua @@ -287,11 +287,9 @@ local splitter = lpeg.splitat("::") function sets.get(namespace,block,name,level,default) -- check if name is passed --fixed::R:a: ... local kind, rest = lpegmatch(splitter,name) - if kind and rest then - if kind == "fixed" then - local s = settings_to_array(rest) - return s[level] or default - end + if rest and kind == "fixed" then -- fixed::n,a,i + local s = settings_to_array(rest) + return s[level] or s[#s] or default end -- local ds = setlist[namespace] diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua index 8a478a4e6..14e74891b 100644 --- a/tex/context/base/strc-ref.lua +++ b/tex/context/base/strc-ref.lua @@ -768,12 +768,14 @@ table.setmetatableindex(externals,function(t,k) -- either or not automatically return false end) -local productdata = { +local productdata = allocate { productreferences = { }, componentreferences = { }, components = { }, } +references.productdata = productdata + local function loadproductreferences(productname,componentname,utilitydata) local struc = utilitydata.structures if struc then @@ -923,6 +925,11 @@ local function loadproductcomponents(product,component,utilitydata) productdata.components = componentlist(job and job.structure and job.structure.collected) or { } end +references.registerinitializer(function(tobesaved,collected) + -- not that much related to tobesaved or collected + productdata.components = componentlist(job.structure.collected) or { } +end) + function structures.references.loadpresets(product,component) -- we can consider a special components hash if product and component and product~= "" and component ~= "" and not productdata.product then -- maybe: productdata.filename ~= filename productdata.product = product diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index ae5f553f7..999143401 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 : 05/24/12 11:02:35 +-- merge date : 05/24/12 15:18:22 do -- begin closure to overcome local limits and interference -- cgit v1.2.3