From 9e5d856640578c54b0f69ee918365a1218b2e162 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sun, 16 Aug 2009 18:21:00 +0200 Subject: beta 2009.08.16 18:21 --- tex/context/base/cont-new.tex | 2 +- tex/context/base/context.tex | 2 +- tex/context/base/core-mis.mkiv | 5 +- tex/context/base/font-def.lua | 8 ++- tex/context/base/node-ref.lua | 76 +++++------------------------ tex/generic/context/luatex-fonts-merged.lua | 10 ++-- 6 files changed, 29 insertions(+), 74 deletions(-) diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index 26860f811..dd9610bef 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{2009.08.14 10:48} +\newcontextversion{2009.08.16 18:21} %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 f3c5cdcc5..408a28944 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{2009.08.14 10:48} +\edef\contextversion{2009.08.16 18:21} %D For those who want to use this: diff --git a/tex/context/base/core-mis.mkiv b/tex/context/base/core-mis.mkiv index efea8694c..65cf273c6 100644 --- a/tex/context/base/core-mis.mkiv +++ b/tex/context/base/core-mis.mkiv @@ -953,8 +953,9 @@ {\global\advance\delimitedtextlevel\minusone \globalpopmacro\currentdelimitedtext} -\def\delimitedtext[#1]% - {\pushdelimitedtext{#1}% +\unexpanded\def\delimitedtext[#1]% + {\dontleavehmode % following ones can be omited + \pushdelimitedtext{#1}% \doifelse{\delimitedtextparameter\c!method}\s!font {\dofontdrivendelimited} {\doifinsetelse{\delimitedtextparameter\c!location}{\v!paragraph,\v!margin}% diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua index 3301c39f2..28afe670b 100644 --- a/tex/context/base/font-def.lua +++ b/tex/context/base/font-def.lua @@ -271,10 +271,14 @@ function tfm.read(specification) local reader = sequence[s] if readers[reader] then -- not really needed if trace_defining then - logs.report("define font","trying type %s for %s with file %s",reader,specification.name,specification.filename or "unknown") + logs.report("define font","trying (sequence driven) type %s for %s with file %s",reader,specification.name,specification.filename or "unknown") end tfmtable = readers[reader](specification) - if tfmtable then break end + if tfmtable then + break + else + specification.filename = nil + end end end end diff --git a/tex/context/base/node-ref.lua b/tex/context/base/node-ref.lua index 85d7e869e..045980823 100644 --- a/tex/context/base/node-ref.lua +++ b/tex/context/base/node-ref.lua @@ -58,14 +58,14 @@ local function dimensions(parent,start,stop) end --~ more compact ---~ ---~ local function dimensions(parent,start,stop) ---~ if parent then ---~ return list_dimensions(parent.glue_set,parent.glue_sign,parent.glue_order,start,stop and stop.next) ---~ else ---~ return list_dimensions(start,stop and stop.next) ---~ end ---~ end + +local function dimensions(parent,start,stop) + if parent then + return list_dimensions(parent.glue_set,parent.glue_sign,parent.glue_order,start,stop and stop.next) + else + return list_dimensions(start,stop and stop.next) + end +end local function inject_range(head,first,last,reference,make,stack,parent,pardir,txtdir) local width, height, depth = dimensions(parent,first,last) @@ -169,58 +169,6 @@ end -- skip is somewhat messy -local function inject_areas(head,attribute,make,stack,done,skip,parent,pardir,txtdir) -- main - if head then - local current, first, last, firstdir, reference = head, nil, nil, nil, nil - pardir = pardir or "===" - txtdir = txtdir or "===" - while current do - local id = current.id - local r = has_attribute(current,attribute) - if id == whatsit then - local subtype = current.subtype - if subtype == 6 then - pardir = current.dir - elseif subtype == 7 then - txtdir = current.dir - end - elseif id == hlist or id == vlist then - if r and (not skip or r > skip) then - inject_list(id,current,r,make,stack,pardir,txtdir) - done[r] = true - end ---~ if r then done[r] = (done[r] or 0) + 1 end - local list = current.list - if list then - local _ - current.list, _, pardir, txtdir = inject_areas(list,attribute,make,stack,done,r or skip or 0,current,pardir,txtdir) - end ---~ if r then done[r] = done[r] - 1 end - elseif not r then - -- just go on, can be kerns - elseif not reference then - reference, first, last, firstdir = r, current, current, txtdir - elseif r == reference then - last = current - elseif not done[reference] then ---~ elseif (done[reference] or 0) == 0 then - if not skip or r > skip then - head, current = inject_range(head,first,last,reference,make,stack,parent,pardir,firstdir) - reference, first, last, firstdir = nil, nil, nil, nil - end - else - reference, first, last, firstdir = r, current, current, txtdir - end - current = current.next - end - if reference and not done[reference] then ---~ if reference and (done[reference] or 0) == 0 then - head = inject_range(head,first,last,reference,make,stack,parent,pardir,firstdir) - end - end - return head, true, pardir, txtdir -end - local function inject_areas(head,attribute,make,stack,done,skip,parent,pardir,txtdir) -- main if head then local current, first, last, firstdir, reference = head, nil, nil, nil, nil @@ -274,9 +222,7 @@ elseif (done[reference] or 0) == 0 then return head, true, pardir, txtdir end - - -local function inject_area(head,attribute,make,stack,done,pardir,txtdir) -- singular ! +local function inject_area(head,attribute,make,stack,done,parent,pardir,txtdir) -- singular ! if head then pardir = pardir or "===" txtdir = txtdir or "===" @@ -296,10 +242,10 @@ local function inject_area(head,attribute,make,stack,done,pardir,txtdir) -- sing done[r] = true inject_list(id,current,r,make,stack,pardir,txtdir) end - current.list = inject_area(current.list,attribute,make,stack,done,pardir,txtdir) + current.list = inject_area(current.list,attribute,make,stack,done,current,pardir,txtdir) elseif r and not done[r] then done[r] = true - head, current = inject_range(head,current,current,r,make,stack,pardir,txtdir) + head, current = inject_range(head,current,current,r,make,stack,parent,pardir,txtdir) end current = current.next end diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 6e2436369..84371481e 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua --- merge date : 08/14/09 10:50:13 +-- merge date : 08/16/09 18:24:09 do -- begin closure to overcome local limits and interference @@ -10449,10 +10449,14 @@ function tfm.read(specification) local reader = sequence[s] if readers[reader] then -- not really needed if trace_defining then - logs.report("define font","trying type %s for %s with file %s",reader,specification.name,specification.filename or "unknown") + logs.report("define font","trying (sequence driven) type %s for %s with file %s",reader,specification.name,specification.filename or "unknown") end tfmtable = readers[reader](specification) - if tfmtable then break end + if tfmtable then + break + else + specification.filename = nil + end end end end -- cgit v1.2.3