From ccc1d99185ace53707748383dcae8d1fa1ad9dcb Mon Sep 17 00:00:00 2001 From: Marius Date: Sun, 5 Aug 2012 13:40:13 +0300 Subject: beta 2012.08.05 12:20 --- scripts/context/lua/mtxrun.lua | 6 +++++- scripts/context/stubs/mswin/mtxrun.lua | 6 +++++- scripts/context/stubs/unix/mtxrun | 6 +++++- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4084 -> 4082 bytes tex/context/base/context-version.png | Bin 105760 -> 105633 bytes tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/l-number.lua | 6 +++++- tex/context/base/status-files.pdf | Bin 24438 -> 24444 bytes tex/context/base/status-lua.pdf | Bin 190114 -> 190129 bytes tex/context/base/strc-ini.lua | 15 ++++++++++++++- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 14 files changed, 39 insertions(+), 10 deletions(-) diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index b4df0521b..413fc9f32 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -2159,7 +2159,7 @@ if not modules then modules = { } end modules ['l-number'] = { -- this module will be replaced when we have the bit library -local tostring = tostring +local tostring, tonumber = tostring, tonumber local format, floor, match, rep = string.format, math.floor, string.match, string.rep local concat, insert = table.concat, table.insert local lpegmatch = lpeg.match @@ -2260,6 +2260,10 @@ function number.tobitstring(n,m) end +function number.valid(str,default) + return tonumber(str) or default or nil +end + end -- of closure diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index b4df0521b..413fc9f32 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -2159,7 +2159,7 @@ if not modules then modules = { } end modules ['l-number'] = { -- this module will be replaced when we have the bit library -local tostring = tostring +local tostring, tonumber = tostring, tonumber local format, floor, match, rep = string.format, math.floor, string.match, string.rep local concat, insert = table.concat, table.insert local lpegmatch = lpeg.match @@ -2260,6 +2260,10 @@ function number.tobitstring(n,m) end +function number.valid(str,default) + return tonumber(str) or default or nil +end + end -- of closure diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index b4df0521b..413fc9f32 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -2159,7 +2159,7 @@ if not modules then modules = { } end modules ['l-number'] = { -- this module will be replaced when we have the bit library -local tostring = tostring +local tostring, tonumber = tostring, tonumber local format, floor, match, rep = string.format, math.floor, string.match, string.rep local concat, insert = table.concat, table.insert local lpegmatch = lpeg.match @@ -2260,6 +2260,10 @@ function number.tobitstring(n,m) end +function number.valid(str,default) + return tonumber(str) or default or nil +end + end -- of closure diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 67855e8f2..26ef2c5c5 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.08.04 14:00} +\newcontextversion{2012.08.05 12:20} %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 445946693..0887f7ff3 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.08.04 14:00} +\newcontextversion{2012.08.05 12:20} %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 index 5eb1c6d96..5c4b8fc8f 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-version.png b/tex/context/base/context-version.png index 8d1f97043..9dbd2fb6e 100644 Binary files a/tex/context/base/context-version.png and b/tex/context/base/context-version.png differ diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index bb18ea3da..dd44c37a9 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.08.04 14:00} +\edef\contextversion{2012.08.05 12:20} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 6fcbd07fa..93a9ca0c5 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -25,7 +25,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2012.08.04 14:00} +\edef\contextversion{2012.08.05 12:20} %D For those who want to use this: diff --git a/tex/context/base/l-number.lua b/tex/context/base/l-number.lua index 301380eee..a4dbe3bdf 100644 --- a/tex/context/base/l-number.lua +++ b/tex/context/base/l-number.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['l-number'] = { -- this module will be replaced when we have the bit library -local tostring = tostring +local tostring, tonumber = tostring, tonumber local format, floor, match, rep = string.format, math.floor, string.match, string.rep local concat, insert = table.concat, table.insert local lpegmatch = lpeg.match @@ -128,3 +128,7 @@ end --~ print(number.tobitstring(0xFF)) --~ print(number.tobitstring(46260767936,8)) --~ print(#number.tobitstring(46260767936,6)) + +function number.valid(str,default) + return tonumber(str) or default or nil +end diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index a80effa46..ea4cb61a8 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 4d5a4589e..d0c88238e 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-ini.lua b/tex/context/base/strc-ini.lua index 0973c8db7..3f0a8768f 100644 --- a/tex/context/base/strc-ini.lua +++ b/tex/context/base/strc-ini.lua @@ -34,6 +34,11 @@ local xmlcatcodes = catcodenumbers.xmlcatcodes local notcatcodes = catcodenumbers.notcatcodes local txtcatcodes = catcodenumbers.txtcatcodes +local context, commands = context, commands + +local pushcatcodes = context.pushcatcodes +local popcatcodes = context.popcatcodes + local trace_processors = false local report_processors = logs.reporter("processors","structure") @@ -228,7 +233,15 @@ end if trace_processors then report_processors("cct: %s, txt: %s",catcodes,title) end - context.sprint(catcodes,title) -- was: texsprint(catcodes,title) + -- + -- context.sprint(catcodes,title) + -- + -- doesn't work when a newline is in there \section{Test\ A} so we do + -- it this way: + -- + pushcatcodes(catcodes) + context(title) + popcatcodes() end end else diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index fe64d5078..fc0bf5ded 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 : 08/04/12 14:00:20 +-- merge date : 08/05/12 12:20:24 do -- begin closure to overcome local limits and interference -- cgit v1.2.3