diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/cont-new.tex | 2 | ||||
-rw-r--r-- | tex/context/base/context.tex | 2 | ||||
-rw-r--r-- | tex/context/base/font-fbk.lua | 9 | ||||
-rw-r--r-- | tex/context/base/strc-lst.lua | 39 | ||||
-rw-r--r-- | tex/context/base/type-otf.mkiv | 12 | ||||
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 2 |
6 files changed, 45 insertions, 21 deletions
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index db575e475..5a5e36911 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2010.09.29 23:37} +\newcontextversion{2010.10.03 18:07} %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.tex b/tex/context/base/context.tex index cc3a28b77..99e6f2f8c 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2010.09.29 23:37} +\edef\contextversion{2010.10.03 18:07} %D For those who want to use this: diff --git a/tex/context/base/font-fbk.lua b/tex/context/base/font-fbk.lua index d91e1f08b..865e92623 100644 --- a/tex/context/base/font-fbk.lua +++ b/tex/context/base/font-fbk.lua @@ -232,10 +232,11 @@ function vf.aux.compose_characters(g) -- todo: scaling depends on call location end elseif c_ury > a_lly then --~ local dy = cap_ury - a_lly -local X = byte("x") -local xdesc = descs[X] -local x_ury = scale*xdesc.boundingbox[4] -- x height -local dy = c_ury - x_ury +local lower_x = byte("x") +local upper_x = byte("X") +local Xdesc = descs[upper_x] +local xdesc = descs[lower_x] +local dy = scale*(Xdesc.boundingbox[4] - xdesc.boundingbox[4] - 30) -- x height if trace_combining then t.commands = { push, {"right", dx+dd}, {"down", -dy}, green, acc_t, black, pop, chr_t } diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua index 17de279a5..ebdb68bd5 100644 --- a/tex/context/base/strc-lst.lua +++ b/tex/context/base/strc-lst.lua @@ -189,17 +189,40 @@ end -- will be split +-- Historically we had blocks but in the mkiv approach that could as well be a level +-- which would simplify things a bit. + +local splitter = lpeg.splitat(":") + +-- this will become filtercollected(specification) and then we'll also have sectionblock as key + local function filtercollected(names, criterium, number, collected, forced, nested) -- names is hash or string local numbers, depth = documents.data.numbers, documents.data.depth local result, detail = { }, nil + local block = false -- all criterium = gsub(criterium or ""," ","") -- not needed + -- new, will be applied stepwise + local wantedblock, wantedcriterium = lpegmatch(splitter,criterium) -- block:criterium + if not wantedcriterium then + block = documents.data.block + elseif wantedblock == "" or wantedblock == variables.all or wantedblock == variables.text then + criterium = wantedcriterium ~= "" and wantedcriterium or criterium + else + block, criterium = wantedblock, wantedcriterium + end + if block == "" then + block = false + end +--~ print(">>",block,criterium) + -- forced = forced or { } -- todo: also on other branched, for the moment only needed for bookmarks if type(names) == "string" then names = settings_to_hash(names) end local all = not next(names) or names[variables.all] or false if trace_lists then - report_lists("filtering names: %s, criterium: %s, number: %s",simple_hash_to_string(names),criterium,number or "-") + report_lists("filtering names: %s, criterium: %s, block: %s, number: %s", + simple_hash_to_string(names),criterium,block or "*", number or "-") end if criterium == variables.intro then -- special case, no structure yet @@ -232,7 +255,7 @@ local function filtercollected(names, criterium, number, collected, forced, nest for i=1,#collected do local v = collected[i] local r = v.references - if r then + if r and (not block or block == r.block) then local sectionnumber = sections.collected[r.section] if sectionnumber then -- and not sectionnumber.hidenumber then local cnumbers = sectionnumber.numbers @@ -264,8 +287,8 @@ local function filtercollected(names, criterium, number, collected, forced, nest for i=1,#collected do local v = collected[i] local r = v.references - if r then - local sectionnumber = sections.collected[r.section] + if r and (not block or block == r.block) then +ctionnumber = sections.collected[r.section] if sectionnumber then -- and not sectionnumber.hidenumber then local cnumbers = sectionnumber.numbers local metadata = v.metadata @@ -296,7 +319,7 @@ local function filtercollected(names, criterium, number, collected, forced, nest for i=1,#collected do local v = collected[i] local r = v.references - if r then + if r and (not block or block == r.block) then local sectionnumber = sections.collected[r.section] if sectionnumber then -- and not sectionnumber.hidenumber then local cnumbers = sectionnumber.numbers @@ -342,7 +365,7 @@ local function filtercollected(names, criterium, number, collected, forced, nest for i=1,#collected do local v = collected[i] local r = v.references - if r then + if r then -- block ? local sectionnumber = sections.collected[r.section] if sectionnumber then local metadata = v.metadata @@ -359,9 +382,9 @@ local function filtercollected(names, criterium, number, collected, forced, nest end if trace_lists then if detail then - report_lists("criterium: %s, %s, found: %s",criterium,detail,#result) + report_lists("criterium: %s, block: %s, %s, found: %s",criterium,block or "*",detail,#result) else - report_lists("criterium: %s, found: %s",criterium,#result) + report_lists("criterium: %s, block: %s, found: %s",criterium,block or "*",#result) end end return result diff --git a/tex/context/base/type-otf.mkiv b/tex/context/base/type-otf.mkiv index a68379f64..2879fa1bd 100644 --- a/tex/context/base/type-otf.mkiv +++ b/tex/context/base/type-otf.mkiv @@ -1571,12 +1571,12 @@ \definefontsynonym [\s!SansBoldItalic] [\s!file:candaraz] [\s!features=\s!default] \stoptypescript - \starttypescript [sans] [consolas] [name] - \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [\s!file:consola] [\s!features=\s!default] - \definefontsynonym [\s!SansBold] [\s!file:consolab] [\s!features=\s!default] - \definefontsynonym [\s!SansItalic] [\s!file:consolai] [\s!features=\s!default] - \definefontsynonym [\s!SansBoldItalic] [\s!file:consolaz] [\s!features=\s!default] + \starttypescript [mono] [consolas] [name] + \setups[\s!font:\s!fallback:\s!mono] + \definefontsynonym [\s!Mono] [\s!file:consola] [\s!features=\s!none] + \definefontsynonym [\s!MonoBold] [\s!file:consolab] [\s!features=\s!none] + \definefontsynonym [\s!MonoItalic] [\s!file:consolai] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldItalic] [\s!file:consolaz] [\s!features=\s!none] \stoptypescript \starttypescript [serif] [constantia] [name] diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index dfba8c7c5..a54ca0a09 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 09/29/10 23:37:44 +-- merge date : 10/03/10 18:07:20 do -- begin closure to overcome local limits and interference |