From 37d12a607f099cb9fa3fd6189414080d048f287a Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 29 May 2014 23:35:00 +0200 Subject: beta 2014.05.29 23:35 --- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4274 -> 4280 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/lxml-aux.lua | 21 +++++++++++++++++---- tex/context/base/pack-mis.mkvi | 1 + tex/context/base/publ-ini.lua | 4 ++-- tex/context/base/sort-ini.lua | 8 +++++--- tex/context/base/status-files.pdf | Bin 24627 -> 24642 bytes tex/context/base/status-lua.pdf | Bin 244758 -> 244897 bytes tex/context/base/strc-syn.lua | 2 +- 10 files changed, 28 insertions(+), 12 deletions(-) (limited to 'tex/context/base') diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 00ae3dc21..323002aeb 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{2014.05.29 12:47} +\newcontextversion{2014.05.29 23:35} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf index 90237aa1a..bb2ed684d 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.mkiv b/tex/context/base/context.mkiv index ab7701fb7..92ba1b9a7 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -28,7 +28,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2014.05.29 12:47} +\edef\contextversion{2014.05.29 23:35} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/lxml-aux.lua b/tex/context/base/lxml-aux.lua index 0fffe261a..963873bc9 100644 --- a/tex/context/base/lxml-aux.lua +++ b/tex/context/base/lxml-aux.lua @@ -221,8 +221,18 @@ function xml.delete(root,pattern) report('deleting',pattern,c,e) end local d = p.dt - remove(d,e.ni) - redo_ni(d) -- can be made faster and inlined + local ni = e.ni + if ni <= #d then + if false then + p.dt[ni] = "" + else + -- what if multiple deleted in one set + remove(d,ni) + redo_ni(d) -- can be made faster and inlined + end + else + -- disturbing + end end end end @@ -365,7 +375,8 @@ local function include(xmldata,pattern,attribute,recursive,loaddata) local name = nil local ekdt = ek.dt local ekat = ek.at - local epdt = ek.__p__.dt + local ekrt = ek.__p__ + local epdt = ekrt.dt if not attribute or attribute == "" then name = (type(ekdt) == "table" and ekdt[1]) or ekdt -- check, probably always tab or str end @@ -392,7 +403,9 @@ local function include(xmldata,pattern,attribute,recursive,loaddata) if recursive then include(xi,pattern,attribute,recursive,loaddata) end - epdt[ek.ni] = xml.body(xi) -- xml.assign(d,k,xi) + local child = xml.body(xi) -- xml.assign(d,k,xi) + child.__p__ = ekrt + epdt[ek.ni] = child end end end diff --git a/tex/context/base/pack-mis.mkvi b/tex/context/base/pack-mis.mkvi index 38fcc18e4..c5b218599 100644 --- a/tex/context/base/pack-mis.mkvi +++ b/tex/context/base/pack-mis.mkvi @@ -67,6 +67,7 @@ %\ifinsidefloat \else % \page_backgrounds_add_local_to_box\nextbox %\fi +\flushnotes % new per 2014-05-29 : todo: move them up in the mvl \ifgridsnapping \pack_placement_flush_grid_yes \else diff --git a/tex/context/base/publ-ini.lua b/tex/context/base/publ-ini.lua index 00e82f23f..319d161ae 100644 --- a/tex/context/base/publ-ini.lua +++ b/tex/context/base/publ-ini.lua @@ -716,7 +716,7 @@ function publications.singularorplural(singular,plural) end end -local patterns = { "publ-imp-%s.mkiv", "publ-imp-%s.tex" } +local patterns = { "publ-imp-%s.mkvi", "publ-imp-%s.mkiv", "publ-imp-%s.tex" } local function failure(name) report("unknown library %a",name) @@ -732,7 +732,7 @@ function commands.loadbtxdefinitionfile(name) -- a more specific name patterns = patterns, action = action, failure = failure, - onlyonce = false, + onlyonce = true, } end diff --git a/tex/context/base/sort-ini.lua b/tex/context/base/sort-ini.lua index 9ac020166..47fe3da69 100644 --- a/tex/context/base/sort-ini.lua +++ b/tex/context/base/sort-ini.lua @@ -113,6 +113,7 @@ sorters = { defaultlanguage = v_default, defaultmethod = v_default, defaultdigits = v_numbers, + validmethods = validmethods, } } @@ -300,9 +301,9 @@ end local function setlanguage(l,m,d,u) language = (l ~= "" and l) or constants.defaultlanguage - data = definitions[language or constants.defaultlanguage] or definitions[constants.defaultlanguage] - method = (m ~= "" and m) or data.method or constants.defaultmethod - digits = (d ~= "" and d) or data.digits or constants.defaultdigits + data = definitions[language or constants.defaultlanguage] or definitions[constants.defaultlanguage] + method = (m ~= "" and m) or data.method or constants.defaultmethod + digits = (d ~= "" and d) or data.digits or constants.defaultdigits if trace_tests then report_sorters("setting language %a, method %a, digits %a",language,method,digits) end @@ -386,6 +387,7 @@ local function basic(a,b) -- trace ea and eb for j=1,#sequence do local m = sequence[j] result = basicsort(ea[m],eb[m]) +-- print(m,result) if result ~= 0 then return result end diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index fbbe2b35d..6e357a658 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 ac0e796aa..198a3f81f 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-syn.lua b/tex/context/base/strc-syn.lua index 604365b2d..e27974eb2 100644 --- a/tex/context/base/strc-syn.lua +++ b/tex/context/base/strc-syn.lua @@ -186,7 +186,7 @@ function synonyms.analyzed(class,options) local data = synonyms.collected[class] if data and data.entries then options = options or { } - sorters.setlanguage(options.language) + sorters.setlanguage(options.language,options.method) synonyms.filter(data,options) -- filters entries to result synonyms.prepare(data,options) -- adds split table parallel to list table synonyms.sort(data,options) -- sorts entries in result -- cgit v1.2.3