From bed521c2be2cfc35e739e13d03ba171417a04453 Mon Sep 17 00:00:00 2001
From: Marius <mariausol@gmail.com>
Date: Thu, 30 Jan 2014 13:20:15 +0200
Subject: beta 2014.01.30 12:15

---
 scripts/context/lua/mtxrun.lua                     |   7 +-
 scripts/context/stubs/mswin/mtxrun.lua             |   7 +-
 scripts/context/stubs/unix/mtxrun                  |   7 +-
 scripts/context/stubs/win64/mtxrun.lua             |   7 +-
 tex/context/base/cont-new.mkiv                     |   2 +-
 tex/context/base/context-version.pdf               | Bin 4091 -> 4091 bytes
 tex/context/base/context.mkiv                      |   2 +-
 tex/context/base/font-ctx.lua                      |   4 +-
 tex/context/base/page-mix.lua                      |  20 +++++-
 tex/context/base/s-inf-03.pdf                      | Bin 0 -> 1975 bytes
 tex/context/base/status-files.pdf                  | Bin 24811 -> 24803 bytes
 tex/context/base/status-lua.log                    |  80 +++++++++++++++++++++
 tex/context/base/status-lua.pdf                    | Bin 233983 -> 0 bytes
 tex/context/base/util-str.lua                      |   1 +
 tex/generic/context/luatex/luatex-fonts-merged.lua |   3 +-
 15 files changed, 121 insertions(+), 19 deletions(-)
 create mode 100644 tex/context/base/s-inf-03.pdf
 create mode 100644 tex/context/base/status-lua.log
 delete mode 100644 tex/context/base/status-lua.pdf

diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 8d5d14502..1a40059de 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -4810,7 +4810,7 @@ do -- create closure to overcome 200 locals limit
 
 package.loaded["util-str"] = package.loaded["util-str"] or true
 
--- original size: 29070, stripped down to: 15259
+-- original size: 29106, stripped down to: 15282
 
 if not modules then modules={} end modules ['util-str']={
   version=1.001,
@@ -4990,6 +4990,7 @@ local template=[[
 return function(%s) return %s end
 ]]
 local environment={
+  global=global or _G,
   lpeg=lpeg,
   type=type,
   tostring=tostring,
@@ -16705,8 +16706,8 @@ end -- of closure
 
 -- used libraries    : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
 -- skipped libraries : -
--- original bytes    : 688165
--- stripped bytes    : 245086
+-- original bytes    : 688201
+-- stripped bytes    : 245099
 
 -- end library merge
 
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 8d5d14502..1a40059de 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -4810,7 +4810,7 @@ do -- create closure to overcome 200 locals limit
 
 package.loaded["util-str"] = package.loaded["util-str"] or true
 
--- original size: 29070, stripped down to: 15259
+-- original size: 29106, stripped down to: 15282
 
 if not modules then modules={} end modules ['util-str']={
   version=1.001,
@@ -4990,6 +4990,7 @@ local template=[[
 return function(%s) return %s end
 ]]
 local environment={
+  global=global or _G,
   lpeg=lpeg,
   type=type,
   tostring=tostring,
@@ -16705,8 +16706,8 @@ end -- of closure
 
 -- used libraries    : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
 -- skipped libraries : -
--- original bytes    : 688165
--- stripped bytes    : 245086
+-- original bytes    : 688201
+-- stripped bytes    : 245099
 
 -- end library merge
 
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 8d5d14502..1a40059de 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -4810,7 +4810,7 @@ do -- create closure to overcome 200 locals limit
 
 package.loaded["util-str"] = package.loaded["util-str"] or true
 
--- original size: 29070, stripped down to: 15259
+-- original size: 29106, stripped down to: 15282
 
 if not modules then modules={} end modules ['util-str']={
   version=1.001,
@@ -4990,6 +4990,7 @@ local template=[[
 return function(%s) return %s end
 ]]
 local environment={
+  global=global or _G,
   lpeg=lpeg,
   type=type,
   tostring=tostring,
@@ -16705,8 +16706,8 @@ end -- of closure
 
 -- used libraries    : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
 -- skipped libraries : -
--- original bytes    : 688165
--- stripped bytes    : 245086
+-- original bytes    : 688201
+-- stripped bytes    : 245099
 
 -- end library merge
 
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index 8d5d14502..1a40059de 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -4810,7 +4810,7 @@ do -- create closure to overcome 200 locals limit
 
 package.loaded["util-str"] = package.loaded["util-str"] or true
 
--- original size: 29070, stripped down to: 15259
+-- original size: 29106, stripped down to: 15282
 
 if not modules then modules={} end modules ['util-str']={
   version=1.001,
@@ -4990,6 +4990,7 @@ local template=[[
 return function(%s) return %s end
 ]]
 local environment={
+  global=global or _G,
   lpeg=lpeg,
   type=type,
   tostring=tostring,
@@ -16705,8 +16706,8 @@ end -- of closure
 
 -- used libraries    : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
 -- skipped libraries : -
--- original bytes    : 688165
--- stripped bytes    : 245086
+-- original bytes    : 688201
+-- stripped bytes    : 245099
 
 -- end library merge
 
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index bb5c6c3fe..d20324a2b 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.01.29 23:48}
+\newcontextversion{2014.01.30 12:15}
 
 %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 1c546e7c1..79cb94d0e 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 9c3074395..888d78583 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.01.29 23:48}
+\edef\contextversion{2014.01.30 12:15}
 \edef\contextkind   {beta}
 
 %D For those who want to use this:
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua
index 8c4992d0c..e251cc9c1 100644
--- a/tex/context/base/font-ctx.lua
+++ b/tex/context/base/font-ctx.lua
@@ -137,8 +137,8 @@ function fonts.helpers.name(tfmdata)
     return file.basename(type(tfmdata) == "number" and properties[tfmdata].name or tfmdata.properties.name)
 end
 
-utilities.strings.formatters.add(formatters,"font:name",    [["'"..fonts.helpers.name(%s).."'"]])
-utilities.strings.formatters.add(formatters,"font:features",[["'"..table.sequenced(%s," ",true).."'"]])
+utilities.strings.formatters.add(formatters,"font:name",    [["'"..fontname(%s).."'"]], { fontname = fonts.helpers.name })
+utilities.strings.formatters.add(formatters,"font:features",[["'"..sequenced(%s," ",true).."'"]], { sequenced = table.sequenced })
 
 -- ... like font-sfm or so
 
diff --git a/tex/context/base/page-mix.lua b/tex/context/base/page-mix.lua
index dd182dd69..5b6ff2b74 100644
--- a/tex/context/base/page-mix.lua
+++ b/tex/context/base/page-mix.lua
@@ -46,6 +46,8 @@ local hpack               = nuts.hpack
 local vpack               = nuts.vpack
 local freenode            = nuts.free
 local concatnodes         = nuts.concat
+local slidenodes          = nuts.slide
+local traversenodes       = nuts.traverse
 
 local getfield            = nuts.getfield
 local setfield            = nuts.setfield
@@ -87,6 +89,19 @@ local mixedcolumns        = pagebuilders.mixedcolumns
 local a_checkedbreak      = attributes.private("checkedbreak")
 local forcedbreak         = -123
 
+-- local function slidenodes(head)
+--     local last = nil
+--     for current in traversenodes(head) do
+--         local prev = getprev(current)
+--         if not prev and last then
+--             logs.report("slide","setting prev of %a",nodecodes[getid(current)])
+--             setfield(current,"prev",last)
+--         end
+--         last = current
+--     end
+--     return last or head
+-- end
+
 -- initializesplitter(specification)
 -- cleanupsplitter()
 
@@ -236,6 +251,7 @@ local function setsplit(specification) -- a rather large function
         report_state("fatal error, no head")
         return
     end
+    slidenodes(head) -- we can have set prev's to nil to prevent backtracking
     local discarded = { }
     local originalhead = head
     local originalwidth = specification.originalwidth or getfield(list,"width")
@@ -394,7 +410,7 @@ local function setsplit(specification) -- a rather large function
             end
         end
         if trace_detail then
-            report_state("%-7s > column %s, delta %p, threshold %p, advance %p, total %p, target %p, discarded %p => %a (height %p, depth %p, skip %p)",
+            report_state("%-7s > column %s, delta %p, threshold %p, advance %p, total %p, target %p => %a (height %p, depth %p, skip %p)",
                 where,curcol,delta,threshold,advance,total,target,state,skipped,height,depth,skip)
         end
         return state, skipped
@@ -465,7 +481,7 @@ local function setsplit(specification) -- a rather large function
         local advance = getfield(current,"height") -- + getfield(current,"depth")
         local state, skipped = checked(advance+currentskips,"rule")
         if trace_state then
-            report_state("%-7s > column %s, state %a, rule, advance %p, height %p","line",column,state,advance,inserttotal,height)
+            report_state("%-7s > column %s, state %a, rule, advance %p, height %p","rule",column,state,advance,inserttotal,height)
             if skipped ~= 0 then
                 report_state("%-7s > column %s, discarded %p","rule",column,skipped)
             end
diff --git a/tex/context/base/s-inf-03.pdf b/tex/context/base/s-inf-03.pdf
new file mode 100644
index 000000000..56e5500ef
Binary files /dev/null and b/tex/context/base/s-inf-03.pdf differ
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 2bb18b6a8..31e92ca46 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.log b/tex/context/base/status-lua.log
new file mode 100644
index 000000000..3739a8ad0
--- /dev/null
+++ b/tex/context/base/status-lua.log
@@ -0,0 +1,80 @@
+(cont-yes.mkiv
+
+ConTeXt  ver: 2014.01.30 12:15 MKIV beta  fmt: 2014.1.30  int: english/english
+
+system          > 'cont-new.mkiv' loaded
+(cont-new.mkiv)
+system          > 'cont-loc.mkiv' loaded
+(c:/data/develop/context/sources/cont-loc.mkiv
+!!!!            > testing prevdepth across page
+)
+system          > 'cont-exp.mkiv' loaded
+interface       > macros > processed mkvi file 'c:/data/develop/context/sources/cont-exp.mkiv', delta 0
+interface       > macros > processed mkvi file 'c:/data/develop/context/sources/cont-exp.mkiv', delta 0
+(c:/data/develop/context/sources/cont-exp.mkiv)
+system          > files > jobname 's-inf-03', input './s-inf-03.mkiv', result 'status-lua.pdf'
+fonts           > latin modern fonts are not preloaded
+languages       > language 'en' is active
+(c:/data/develop/context/texmf/tex/context/base/s-inf-03.mkiv (type-imp-dejavu.mkiv) (type-imp-xits.mkiv (type-imp-texgyre.mkiv)){c:/data/develop/tex-context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} (virtual://buffer.noname.1
+references      > unknown reference '[][attributes]'
+references      > unknown reference '[][backends]'
+references      > unknown reference '[][bit]'
+references      > unknown reference '[][bit32]'
+references      > unknown reference '[][blobs]'
+references      > unknown reference '[][boolean]'
+references      > unknown reference '[][buffers]'
+references      > unknown reference '[][builders]'
+references      > unknown reference '[][caches]'
+references      > unknown reference '[][callback]'
+references      > unknown reference '[][callbacks]'
+references      > unknown reference '[][catcodes]'
+references      > unknown reference '[][characters]'
+references      > unknown reference '[][chemistry]'
+references      > unknown reference '[][commands]'
+references      > unknown reference '[][containers]'
+references      > unknown reference '[][context]'
+references      > unknown reference '[][converters]'
+references      > unknown reference '[][coroutine]'
+references      > unknown reference '[][ctxrunner]'
+references      > unknown reference '[][debug]'
+references      > unknown reference '[][dir]'
+references      > unknown reference '[][directives]'
+references      > unknown reference '[][document]'
+references      > unknown reference '[][documentdata]'
+references      > unknown reference '[][environment]'
+references      > unknown reference '[][epdf]'
+references      > unknown reference '[][experiments]'
+references      > unknown reference '[][figures]'
+references      > unknown reference '[][file]'
+references      > unknown reference '[][floats]'
+references      > unknown reference '[][font]'
+references      > unknown reference '[][fontloader]'
+references      > unknown reference '[][fonts]'
+references      > unknown reference '[][functions]'
+references      > unknown reference '[][graphics]'
+references      > unknown reference '[][gzip]'
+references      > unknown reference '[][img]'
+references      > unknown reference '[][interactions]'
+references      > unknown reference '[][interfaces]'
+references      > unknown reference '[][io]'
+references      > unknown reference '[][jit]'
+references      > unknown reference '[][job]'
+references      > unknown reference '[][lang]'
+references      > unknown reference '[][languages]'
+references      > unknown reference '[][layouts]'
+references      > unknown reference '[][lfs]'
+references      > unknown reference '[][libraries]'
+references      > unknown reference '[][lmx]'
+references      > unknown reference '[][logs]'
+references      > unknown reference '[][lpdf]'
+references      > unknown reference '[][lpeg]'
+references      > unknown reference '[][ltn12]'
+references      > unknown reference '[][lua]'
+references      > unknown reference '[][luatex]'
+references      > unknown reference '[][lxml]'
+references      > unknown reference '[][math]'
+references      > unknown reference '[][mathematics]'
+references      > unknown reference '[][mbox]'
+references      > unknown reference '[][md5]'
+references      > unknown reference '[][metapost]'
+references      > unknown reference '[][mime]
\ No newline at end of file
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
deleted file mode 100644
index 85982c483..000000000
Binary files a/tex/context/base/status-lua.pdf and /dev/null differ
diff --git a/tex/context/base/util-str.lua b/tex/context/base/util-str.lua
index 421eefdf3..f04f0e573 100644
--- a/tex/context/base/util-str.lua
+++ b/tex/context/base/util-str.lua
@@ -336,6 +336,7 @@ return function(%s) return %s end
 -- ]]
 
 local environment = {
+    global          = global or _G,
     lpeg            = lpeg,
     type            = type,
     tostring        = tostring,
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index b8f2ede2a..46b528289 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  : 01/29/14 23:48:33
+-- merge date  : 01/30/14 12:15:34
 
 do -- begin closure to overcome local limits and interference
 
@@ -2677,6 +2677,7 @@ local template=[[
 return function(%s) return %s end
 ]]
 local environment={
+  global=global or _G,
   lpeg=lpeg,
   type=type,
   tostring=tostring,
-- 
cgit v1.2.3