diff options
author | Marius <mariausol@gmail.com> | 2012-05-24 21:20:13 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-05-24 21:20:13 +0300 |
commit | 7f26897aecc7d4bc71486a4cb658cb6b4843aa5d (patch) | |
tree | 75e2cf8d2c8a2078fc71341bb6032697227078ce | |
parent | e6e3ff321b035d7d3ed512871d0cbd802c4b7368 (diff) | |
download | context-7f26897aecc7d4bc71486a4cb658cb6b4843aa5d.tar.gz |
beta 2012.05.24 19:36
-rw-r--r-- | scripts/context/lua/mtx-watch.lua | 35 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4129 -> 4133 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 106041 -> 106192 bytes | |||
-rw-r--r-- | tex/context/base/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/font-ota.lua | 10 | ||||
-rw-r--r-- | tex/context/base/font-otn.lua | 8 | ||||
-rw-r--r-- | tex/context/base/lpdf-ano.lua | 11 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24442 -> 24428 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 180035 -> 180037 bytes | |||
-rw-r--r-- | tex/context/base/strc-ref.lua | 39 | ||||
-rw-r--r-- | tex/context/base/strc-ref.mkvi | 2 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 20 |
15 files changed, 98 insertions, 35 deletions
diff --git a/scripts/context/lua/mtx-watch.lua b/scripts/context/lua/mtx-watch.lua index 118d1a815..36a3176c4 100644 --- a/scripts/context/lua/mtx-watch.lua +++ b/scripts/context/lua/mtx-watch.lua @@ -70,7 +70,6 @@ local function noset(t) end end - -- todo: split order (o-name.luj) and combine with atime to determine sort order. local function glob(files,path) -- some day: sort by name (order prefix) and atime @@ -89,8 +88,10 @@ local function glob(files,path) -- some day: sort by name (order prefix) and ati glob(files,name) end elseif name:find(".%luj$") then - -- files[name] = a.change or a.ctime or a.modification or a.mtime - files[#files+1] = { dirname(name), basename(name) } + local bname = basename(name) + local dname = dirname(name) + local order = tonumber(bname:match("^(%d+)")) or 0 + files[#files+1] = { dname, bname, order } end end end @@ -98,13 +99,31 @@ end local clock = os.gettimeofday or os.time -- we cannot trust os.clock on linux +-- local function filenamesort(a,b) +-- local fa, da = a[1], a[2] +-- local fb, db = b[1], b[2] +-- if da == db then +-- return fa < fb +-- else +-- return da < db +-- end +-- end + local function filenamesort(a,b) - local fa, da = a[1], a[2] - local fb, db = b[1], b[2] - if da == db then - return fa < fb + local fa, oa = a[2], a[3] + local fb, ob = b[2], b[3] + if fa == fb then + if oa == ob then + return a[1] < b[1] -- order file dir + else + return oa < ob -- order file + end else - return da < db + if oa == ob then + return fa < fb -- order file + else + return oa < ob -- order file + end end end diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 497259303..94e836e1d 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 15:18} +\newcontextversion{2012.05.24 19:36} %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 f30631d62..d13423741 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 15:18} +\newcontextversion{2012.05.24 19:36} %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 Binary files differindex 2b5c3d73d..dc456136f 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex 5c335a204..bc31e8a30 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 9fa94f013..1e8d73c4c 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 15:18} +\edef\contextversion{2012.05.24 19:36} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index e31f12327..98898765f 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 15:18} +\edef\contextversion{2012.05.24 19:36} %D For those who want to use this: diff --git a/tex/context/base/font-ota.lua b/tex/context/base/font-ota.lua index c4663e1f4..edf5996b3 100644 --- a/tex/context/base/font-ota.lua +++ b/tex/context/base/font-ota.lua @@ -235,15 +235,19 @@ local isol_fina_medi_init = { [0x076D] = true, [0x076E] = true, [0x076F] = true, [0x0770] = true, [0x0772] = true, [0x0775] = true, [0x0776] = true, [0x0777] = true, [0x077A] = true, [0x077B] = true, [0x077C] = true, [0x077D] = true, - [0x077E] = true, [0x077F] = true, [zwj] = true, + [0x077E] = true, [0x077F] = true, -- syriac [0x0712] = true, [0x0713] = true, [0x0714] = true, [0x071A] = true, [0x071B] = true, [0x071C] = true, [0x071D] = true, [0x071F] = true, [0x0720] = true, [0x0721] = true, [0x0722] = true, [0x0723] = true, - [0x0725] = true, [0x0726] = true, [0x0727] = true, [0x0729] = true, - [0x072B] = true, [0x0724] = true, [0x0706] = true, [0x0707] = true, + [0x0724] = true, [0x0725] = true, [0x0726] = true, [0x0727] = true, + [0x0729] = true, [0x072B] = true, + + -- also + + [zwj] = true, } local arab_warned = { } diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua index 7a5708583..d97ef7363 100644 --- a/tex/context/base/font-otn.lua +++ b/tex/context/base/font-otn.lua @@ -1167,7 +1167,11 @@ function chainprocs.gsub_ligature(start,stop,kind,chainname,currentcontext,looku logwarning("%s: no ligatures starting with %s",cref(kind,chainname,chainlookupname,lookupname,chainindex),gref(startchar)) end else - local s, discfound, last, nofreplacements = start.next, false, stop, 0 + local s = start.next + local discfound = false + local last = stop + local nofreplacements = 0 + local skipmark = currentlookup.flags[1] while s do local id = s.id if id == disc_code then @@ -1175,7 +1179,7 @@ function chainprocs.gsub_ligature(start,stop,kind,chainname,currentcontext,looku discfound = true else local schar = s.char - if marks[schar] then -- marks + if skipmark and marks[schar] then -- marks s = s.next else local lg = ligatures[schar] diff --git a/tex/context/base/lpdf-ano.lua b/tex/context/base/lpdf-ano.lua index 4618b6d32..154296e9b 100644 --- a/tex/context/base/lpdf-ano.lua +++ b/tex/context/base/lpdf-ano.lua @@ -317,11 +317,16 @@ end node.free(lln) -- -- -- -- -- -- -- -- +local done = { } -- prevent messages + function nodeinjections.destination(width,height,depth,name,view) - if trace_destinations then - report_destination("w=%s, h=%s, d=%s, n=%s, v=%s",width,height,depth,name,view or "no view") + if not done[name] then + done[name] = true + if trace_destinations then + report_destination("w=%s, h=%s, d=%s, n=%s, v=%s",width,height,depth,name,view or "no view") + end + return pdfdestination_node(width,height,depth,name,view) end - return pdfdestination_node(width,height,depth,name,view) end -- runners and specials diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex e1e9c64e6..a1fb1c9c8 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 64a2e0f3b..dcdf423f2 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua index 14e74891b..092babfae 100644 --- a/tex/context/base/strc-ref.lua +++ b/tex/context/base/strc-ref.lua @@ -261,17 +261,28 @@ references.setcomponent = setcomponent function references.set(kind,prefix,tag,data) -- setcomponent(data) - local pd = tobesaved[prefix] + local pd = tobesaved[prefix] -- nicer is a metatable if not pd then pd = { } tobesaved[prefix] = pd end + local n = 0 for ref in gmatch(tag,"[^,]+") do if ref ~= "" then - pd[ref] = data - context.dofinishsomereference(kind,prefix,ref) + if pd[ref] then + if prefix and prefix ~= "" then + report_references("redundant reference: %q in namespace %q",ref,prefix) + else + report_references("redundant reference %q",ref) + end + else + n = n + 1 + pd[ref] = data + context.dofinishsomereference(kind,prefix,ref) + end end end + return n > 0 end function references.enhance(prefix,tag) @@ -348,14 +359,22 @@ local function register_from_lists(collected,derived,pages,sections) if reference ~= "" then local kind, realpage = m.kind, r.realpage if kind and realpage then - local d = derived[prefix] if not d then d = { } derived[prefix] = d end -local c = derived[component] if not c then c = { } derived[component] = c end + local d = derived[prefix] + if not d then + d = { } + derived[prefix] = d + end + local c = derived[component] + if not c then + c = { } + derived[component] = c + end local t = { kind, i, entry } for s in gmatch(reference,"%s*([^,]+)") do if trace_referencing then report_references("list entry %s provides %s reference '%s' on realpage %s",i,kind,s,realpage) end -c[s] = c[s] or t -- share them + c[s] = c[s] or t -- share them d[s] = d[s] or t -- share them g[s] = g[s] or t -- first wins end @@ -1301,6 +1320,7 @@ local function identify_inner_or_outer(set,var,i) end local components = job.structure.components + if components then for i=1,#components do local component = components[i] @@ -1592,8 +1612,11 @@ function references.setinternalreference(prefix,tag,internal,view) -- needs chec end function references.setandgetattribute(kind,prefix,tag,data,view) -- maybe do internal automatically here - references.set(kind,prefix,tag,data) - texcount.lastdestinationattribute = references.setinternalreference(prefix,tag,nil,view) or -0x7FFFFFFF + if references.set(kind,prefix,tag,data) then + texcount.lastdestinationattribute = references.setinternalreference(prefix,tag,nil,view) or unsetvalue + else + texcount.lastdestinationattribute = unsetvalue + end end function references.getinternalreference(n) -- n points into list (todo: registers) diff --git a/tex/context/base/strc-ref.mkvi b/tex/context/base/strc-ref.mkvi index 161502c9b..ee45d76fa 100644 --- a/tex/context/base/strc-ref.mkvi +++ b/tex/context/base/strc-ref.mkvi @@ -685,7 +685,7 @@ \ifx\@@rfprefix\empty \let\referenceprefix\empty \else\ifx\@@rfprefix\incrementreferenceprefix - \advance\prefixcounter \plusone % should be global + \global\advance\prefixcounter \plusone \edef\referenceprefix{\the\prefixcounter}% \let\@@rfprefix\s!unknown \else\ifx\@@rfprefix\decrementreferenceprefix diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 999143401..32f7365f0 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 15:18:22 +-- merge date : 05/24/12 19:36:52 do -- begin closure to overcome local limits and interference @@ -9741,7 +9741,11 @@ function chainprocs.gsub_ligature(start,stop,kind,chainname,currentcontext,looku logwarning("%s: no ligatures starting with %s",cref(kind,chainname,chainlookupname,lookupname,chainindex),gref(startchar)) end else - local s, discfound, last, nofreplacements = start.next, false, stop, 0 + local s = start.next + local discfound = false + local last = stop + local nofreplacements = 0 + local skipmark = currentlookup.flags[1] while s do local id = s.id if id == disc_code then @@ -9749,7 +9753,7 @@ function chainprocs.gsub_ligature(start,stop,kind,chainname,currentcontext,looku discfound = true else local schar = s.char - if marks[schar] then -- marks + if skipmark and marks[schar] then -- marks s = s.next else local lg = ligatures[schar] @@ -11983,15 +11987,19 @@ local isol_fina_medi_init = { [0x076D] = true, [0x076E] = true, [0x076F] = true, [0x0770] = true, [0x0772] = true, [0x0775] = true, [0x0776] = true, [0x0777] = true, [0x077A] = true, [0x077B] = true, [0x077C] = true, [0x077D] = true, - [0x077E] = true, [0x077F] = true, [zwj] = true, + [0x077E] = true, [0x077F] = true, -- syriac [0x0712] = true, [0x0713] = true, [0x0714] = true, [0x071A] = true, [0x071B] = true, [0x071C] = true, [0x071D] = true, [0x071F] = true, [0x0720] = true, [0x0721] = true, [0x0722] = true, [0x0723] = true, - [0x0725] = true, [0x0726] = true, [0x0727] = true, [0x0729] = true, - [0x072B] = true, [0x0724] = true, [0x0706] = true, [0x0707] = true, + [0x0724] = true, [0x0725] = true, [0x0726] = true, [0x0727] = true, + [0x0729] = true, [0x072B] = true, + + -- also + + [zwj] = true, } local arab_warned = { } |