texlive[48965] Master/texmf-dist: lualibs (21oct18)

commits+karl at tug.org commits+karl at tug.org
Sun Oct 21 22:36:09 CEST 2018


Revision: 48965
          http://tug.org/svn/texlive?view=revision&revision=48965
Author:   karl
Date:     2018-10-21 22:36:09 +0200 (Sun, 21 Oct 2018)
Log Message:
-----------
lualibs (21oct18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/luatex/lualibs/NEWS
    trunk/Master/texmf-dist/doc/luatex/lualibs/README
    trunk/Master/texmf-dist/doc/luatex/lualibs/lualibs.pdf
    trunk/Master/texmf-dist/source/luatex/lualibs/lualibs.dtx
    trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua
    trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic.lua
    trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended-merged.lua
    trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended.lua
    trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-lpeg.lua
    trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-number.lua
    trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-trac-inf.lua
    trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-str.lua
    trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs.lua

Modified: trunk/Master/texmf-dist/doc/luatex/lualibs/NEWS
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/lualibs/NEWS	2018-10-21 20:35:45 UTC (rev 48964)
+++ trunk/Master/texmf-dist/doc/luatex/lualibs/NEWS	2018-10-21 20:36:09 UTC (rev 48965)
@@ -1,4 +1,7 @@
                         History of the lualibs package
+2018/10/18 v2.61/
+    * sync with Context beta as of 2018-10-18
+
 2018/09/20 v2.6/
     * sync with Context beta as of 2018-09-20
 

Modified: trunk/Master/texmf-dist/doc/luatex/lualibs/README
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/lualibs/README	2018-10-21 20:35:45 UTC (rev 48964)
+++ trunk/Master/texmf-dist/doc/luatex/lualibs/README	2018-10-21 20:36:09 UTC (rev 48965)
@@ -11,7 +11,7 @@
 This package has been developed by the LuaLaTeX development team on
 <http://github.com/lualatex/lualibs>. 
 
-The current verson 2.6. has been build by Ulrike Fischer on
+The current verson 2.61 has been build by Ulrike Fischer on
 <https://github.com/u-fischer/lualibs>. 
 
 See the 'NEWS' file for version history.

Modified: trunk/Master/texmf-dist/doc/luatex/lualibs/lualibs.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/luatex/lualibs/lualibs.dtx
===================================================================
--- trunk/Master/texmf-dist/source/luatex/lualibs/lualibs.dtx	2018-10-21 20:35:45 UTC (rev 48964)
+++ trunk/Master/texmf-dist/source/luatex/lualibs/lualibs.dtx	2018-10-21 20:36:09 UTC (rev 48965)
@@ -37,7 +37,7 @@
 \input docstrip.tex
 \Msg{************************************************************************}
 \Msg{* Installation}
-\Msg{* Package: lualibs 2018-09-21 v2.6 Lua additional functions.}
+\Msg{* Package: lualibs 2018-10-18 v2.61 Lua additional functions.}
 \Msg{************************************************************************}
 
 \keepsilent
@@ -107,7 +107,7 @@
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{lualibs.drv}
-  [2018/09/21 v2.6 Lua Libraries.]
+  [2018/10/18 v2.61 Lua Libraries.]
 \documentclass{ltxdoc}
 \usepackage{fancyvrb,xspace}
 \usepackage[x11names]{xcolor}
@@ -208,7 +208,7 @@
 % \GetFileInfo{lualibs.drv}
 %
 % \title{The \identifier{lualibs} package}
-% \date{2018/09/21 v2.6}
+% \date{2018/10/18 v2.61}
 % \author{Élie Roux      · \email{elie.roux at telecom-bretagne.eu}\\
 %         Philipp Gesang · \email{phg at phi-gamma.net}\\
 %         Ulrike Fischer · \email{fischer at troubleshooting-tex.de}\\
@@ -429,8 +429,8 @@
 
 lualibs.module_info = {
   name          = "lualibs",
-  version       = 2.6,
-  date          = "2018-09-21",
+  version       = 2.61,
+  date          = "2018-10-18",
   description   = "ConTeXt Lua standard libraries.",
   author        = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
   copyright     = "PRAGMA ADE / ConTeXt Development Team",
@@ -584,8 +584,8 @@
 
 local lualibs_basic_module = {
   name          = "lualibs-basic",
-  version       = 2.6,
-  date          = "2018-09-21",
+  version       = 2.61,
+  date          = "2018-10-18",
   description   = "ConTeXt Lua libraries -- basic collection.",
   author        = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
   copyright     = "PRAGMA ADE / ConTeXt Development Team",
@@ -666,8 +666,8 @@
 
 local lualibs_extended_module = {
   name          = "lualibs-extended",
-  version       = 2.6,
-  date          = "2018-09-21",
+  version       = 2.61,
+  date          = "2018-10-18",
   description   = "ConTeXt Lua libraries -- extended collection.",
   author        = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
   copyright     = "PRAGMA ADE / ConTeXt Development Team",

Modified: trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua	2018-10-21 20:35:45 UTC (rev 48964)
+++ trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua	2018-10-21 20:36:09 UTC (rev 48965)
@@ -1,6 +1,6 @@
 -- merged file : lualibs-basic-merged.lua
 -- parent file : lualibs-basic.lua
--- merge date  : Fri Sep 21 15:12:31 2018
+-- merge date  : Thu Oct 18 23:57:42 2018
 
 do -- begin closure to overcome local limits and interference
 
@@ -623,10 +623,18 @@
   end
 end
 function lpeg.splitter(pattern,action)
-  return (((1-P(pattern))^1)/action+1)^0
+  if action then
+    return (((1-P(pattern))^1)/action+1)^0
+  else
+    return (Cs((1-P(pattern))^1)+1)^0
+  end
 end
 function lpeg.tsplitter(pattern,action)
-  return Ct((((1-P(pattern))^1)/action+1)^0)
+  if action then
+    return Ct((((1-P(pattern))^1)/action+1)^0)
+  else
+    return Ct((Cs((1-P(pattern))^1)+1)^0)
+  end
 end
 local splitters_s,splitters_m,splitters_t={},{},{}
 local function splitat(separator,single)
@@ -2669,6 +2677,9 @@
     return b
   end
 end
+function number.idiv(i,d)
+  return floor(i/d) 
+end
 
 end -- closure
 

Modified: trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic.lua	2018-10-21 20:35:45 UTC (rev 48964)
+++ trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic.lua	2018-10-21 20:36:09 UTC (rev 48965)
@@ -29,8 +29,8 @@
 
 local lualibs_basic_module = {
   name          = "lualibs-basic",
-  version       = 2.6,
-  date          = "2018-09-21",
+  version       = 2.61,
+  date          = "2018-10-18",
   description   = "ConTeXt Lua libraries -- basic collection.",
   author        = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
   copyright     = "PRAGMA ADE / ConTeXt Development Team",

Modified: trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended-merged.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended-merged.lua	2018-10-21 20:35:45 UTC (rev 48964)
+++ trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended-merged.lua	2018-10-21 20:36:09 UTC (rev 48965)
@@ -1,6 +1,6 @@
 -- merged file : lualibs-extended-merged.lua
 -- parent file : lualibs-extended.lua
--- merge date  : Fri Sep 21 15:12:38 2018
+-- merge date  : Thu Oct 18 23:57:30 2018
 
 do -- begin closure to overcome local limits and interference
 
@@ -2859,9 +2859,13 @@
 end
 local ticks=clock
 local seconds=function(n) return n or 0 end
-local function starttiming(instance)
+local function starttiming(instance,reset)
   local timer=timers[instance or "notimer"]
   local it=timer.timing
+  if reset then
+    it=0
+    timer.loadtime=0
+  end
   if it==0 then
     timer.starttime=ticks()
     if not timer.loadtime then

Modified: trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended.lua	2018-10-21 20:35:45 UTC (rev 48964)
+++ trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended.lua	2018-10-21 20:36:09 UTC (rev 48965)
@@ -30,8 +30,8 @@
 
 local lualibs_extended_module = {
   name          = "lualibs-extended",
-  version       = 2.6,
-  date          = "2018-09-21",
+  version       = 2.61,
+  date          = "2018-10-18",
   description   = "ConTeXt Lua libraries -- extended collection.",
   author        = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
   copyright     = "PRAGMA ADE / ConTeXt Development Team",

Modified: trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-lpeg.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-lpeg.lua	2018-10-21 20:35:45 UTC (rev 48964)
+++ trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-lpeg.lua	2018-10-21 20:36:09 UTC (rev 48965)
@@ -308,12 +308,28 @@
     end
 end
 
+-- function lpeg.splitter(pattern, action)
+--     return (((1-P(pattern))^1)/action+1)^0
+-- end
+
+-- function lpeg.tsplitter(pattern, action)
+--     return Ct((((1-P(pattern))^1)/action+1)^0)
+-- end
+
 function lpeg.splitter(pattern, action)
-    return (((1-P(pattern))^1)/action+1)^0
+    if action then
+        return (((1-P(pattern))^1)/action+1)^0
+    else
+        return (Cs((1-P(pattern))^1)+1)^0
+    end
 end
 
 function lpeg.tsplitter(pattern, action)
-    return Ct((((1-P(pattern))^1)/action+1)^0)
+    if action then
+        return Ct((((1-P(pattern))^1)/action+1)^0)
+    else
+        return Ct((Cs((1-P(pattern))^1)+1)^0)
+    end
 end
 
 -- probleem: separator can be lpeg and that does not hash too well, but

Modified: trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-number.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-number.lua	2018-10-21 20:35:45 UTC (rev 48964)
+++ trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-number.lua	2018-10-21 20:36:09 UTC (rev 48965)
@@ -232,3 +232,7 @@
         return b
     end
 end
+
+function number.idiv(i,d)
+    return floor(i/d) -- i//d in 5.3
+end

Modified: trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-trac-inf.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-trac-inf.lua	2018-10-21 20:35:45 UTC (rev 48964)
+++ trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-trac-inf.lua	2018-10-21 20:36:09 UTC (rev 48965)
@@ -82,9 +82,13 @@
 --
 -- end
 
-local function starttiming(instance)
+local function starttiming(instance,reset)
     local timer = timers[instance or "notimer"]
     local it = timer.timing
+    if reset then
+        it = 0
+        timer.loadtime = 0
+    end
     if it == 0 then
         timer.starttime = ticks()
         if not timer.loadtime then

Modified: trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-str.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-str.lua	2018-10-21 20:35:45 UTC (rev 48964)
+++ trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-str.lua	2018-10-21 20:36:09 UTC (rev 48965)
@@ -1022,6 +1022,22 @@
 
 --
 
+-- local strip
+--
+-- local format_Z = function(f)
+--     n = n + 1
+--     if not f or f == "" then
+--         f = ".9"
+--     end
+--     return format("(((a%s %% 1 == 0) and format('%%i',a%s)) or (strip and lpegmatch(stripzero,format('%%%sf',a%s))) or format('%%%sf',a%s))",n,n,f,n,f,n)
+-- end
+--
+-- function strings.stripformatterzeros()
+--     strip = true
+-- end
+
+--
+
 local format_rest = function(s)
     return format("%q",s) -- catches " and \n and such
 end
@@ -1155,6 +1171,7 @@
     ["M"] = (prefix_any * P("M")) / format_M, -- %M => xxx,xxx,xxx.xx (optional prefix instead of ,)
     --
     ["z"] = (prefix_any * P("z")) / format_z, -- %z => skip n arguments
+ -- ["Z"] = (prefix_any * P("Z")) / format_Z, -- %Z => optionally strip zeros
     --
     ["a"] = (prefix_any * P("a")) / format_a, -- %a => '...' (forces tostring)
     ["A"] = (prefix_any * P("A")) / format_A, -- %A => "..." (forces tostring)

Modified: trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs.lua	2018-10-21 20:35:45 UTC (rev 48964)
+++ trunk/Master/texmf-dist/tex/luatex/lualibs/lualibs.lua	2018-10-21 20:36:09 UTC (rev 48965)
@@ -25,8 +25,8 @@
 
 lualibs.module_info = {
   name          = "lualibs",
-  version       = 2.6,
-  date          = "2018-09-21",
+  version       = 2.61,
+  date          = "2018-10-18",
   description   = "ConTeXt Lua standard libraries.",
   author        = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
   copyright     = "PRAGMA ADE / ConTeXt Development Team",



More information about the tex-live-commits mailing list