diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-09-09 16:27:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-09-09 16:27:00 +0200 |
commit | 60ff6f70b946adf3e44e4885885921ac2ad3dd00 (patch) | |
tree | a5af3bd457b267085f1a28d00e8e039c9db8e04d | |
parent | 8c89de4ca033dd31da308b9a3aadca6abd58ccfa (diff) | |
download | context-60ff6f70b946adf3e44e4885885921ac2ad3dd00.tar.gz |
beta 2013.09.09 16:27
-rw-r--r-- | scripts/context/lua/mtxrun.lua | 21 | ||||
-rw-r--r-- | scripts/context/stubs/mswin/mtxrun.lua | 21 | ||||
-rwxr-xr-x | scripts/context/stubs/unix/mtxrun | 21 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4105 -> 4104 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/l-lpeg.lua | 9 | ||||
-rw-r--r-- | tex/context/base/l-unicode.lua | 7 | ||||
-rw-r--r-- | tex/context/base/pack-com.mkiv | 35 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24761 -> 24756 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.log | 2 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 9 |
12 files changed, 94 insertions, 35 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 791f25d09..5d4ac2c22 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -415,7 +415,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true --- original size: 28471, stripped down to: 15475 +-- original size: 28801, stripped down to: 15770 if not modules then modules={} end modules ['l-lpeg']={ version=1.001, @@ -466,6 +466,13 @@ local utfbom=utfbom_32_be+utfbom_32_le+utfbom_16_be+utfbom_16_le+utfbom_8 local utftype=utfbom_32_be*Cc("utf-32-be")+utfbom_32_le*Cc("utf-32-le")+utfbom_16_be*Cc("utf-16-be")+utfbom_16_le*Cc("utf-16-le")+utfbom_8*Cc("utf-8")+alwaysmatched*Cc("utf-8") local utfoffset=utfbom_32_be*Cc(4)+utfbom_32_le*Cc(4)+utfbom_16_be*Cc(2)+utfbom_16_le*Cc(2)+utfbom_8*Cc(3)+Cc(0) local utf8next=R("\128\191") +patterns.utfbom_32_be=utfbom_32_be +patterns.utfbom_32_le=utfbom_32_le +patterns.utfbom_16_be=utfbom_16_be +patterns.utfbom_16_le=utfbom_16_le +patterns.utfbom_8=utfbom_8 +patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n") +patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000") patterns.utf8one=R("\000\127") patterns.utf8two=R("\194\223")*utf8next patterns.utf8three=R("\224\239")*utf8next*utf8next @@ -4066,7 +4073,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-unicode"] = package.loaded["l-unicode"] or true --- original size: 26964, stripped down to: 12091 +-- original size: 27169, stripped down to: 12287 if not modules then modules={} end modules ['l-unicode']={ version=1.001, @@ -4345,9 +4352,11 @@ function utf.magic(f) end return lpegmatch(p_utftype,str) end +local utf_16_be_linesplitter=patterns.utfbom_16_be^-1*lpeg.tsplitat(patterns.utf_16_be_nl) +local utf_16_le_linesplitter=patterns.utfbom_16_le^-1*lpeg.tsplitat(patterns.utf_16_le_nl) local function utf16_to_utf8_be(t) if type(t)=="string" then - t=lpegmatch(utflinesplitter,t) + t=lpegmatch(utf_16_be_linesplitter,t) end local result={} for i=1,#t do @@ -4374,7 +4383,7 @@ local function utf16_to_utf8_be(t) end local function utf16_to_utf8_le(t) if type(t)=="string" then - t=lpegmatch(utflinesplitter,t) + t=lpegmatch(utf_16_le_linesplitter,t) end local result={} for i=1,#t do @@ -16382,8 +16391,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 : 669359 --- stripped bytes : 235388 +-- original bytes : 669894 +-- stripped bytes : 235432 -- end library merge diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 791f25d09..5d4ac2c22 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -415,7 +415,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true --- original size: 28471, stripped down to: 15475 +-- original size: 28801, stripped down to: 15770 if not modules then modules={} end modules ['l-lpeg']={ version=1.001, @@ -466,6 +466,13 @@ local utfbom=utfbom_32_be+utfbom_32_le+utfbom_16_be+utfbom_16_le+utfbom_8 local utftype=utfbom_32_be*Cc("utf-32-be")+utfbom_32_le*Cc("utf-32-le")+utfbom_16_be*Cc("utf-16-be")+utfbom_16_le*Cc("utf-16-le")+utfbom_8*Cc("utf-8")+alwaysmatched*Cc("utf-8") local utfoffset=utfbom_32_be*Cc(4)+utfbom_32_le*Cc(4)+utfbom_16_be*Cc(2)+utfbom_16_le*Cc(2)+utfbom_8*Cc(3)+Cc(0) local utf8next=R("\128\191") +patterns.utfbom_32_be=utfbom_32_be +patterns.utfbom_32_le=utfbom_32_le +patterns.utfbom_16_be=utfbom_16_be +patterns.utfbom_16_le=utfbom_16_le +patterns.utfbom_8=utfbom_8 +patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n") +patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000") patterns.utf8one=R("\000\127") patterns.utf8two=R("\194\223")*utf8next patterns.utf8three=R("\224\239")*utf8next*utf8next @@ -4066,7 +4073,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-unicode"] = package.loaded["l-unicode"] or true --- original size: 26964, stripped down to: 12091 +-- original size: 27169, stripped down to: 12287 if not modules then modules={} end modules ['l-unicode']={ version=1.001, @@ -4345,9 +4352,11 @@ function utf.magic(f) end return lpegmatch(p_utftype,str) end +local utf_16_be_linesplitter=patterns.utfbom_16_be^-1*lpeg.tsplitat(patterns.utf_16_be_nl) +local utf_16_le_linesplitter=patterns.utfbom_16_le^-1*lpeg.tsplitat(patterns.utf_16_le_nl) local function utf16_to_utf8_be(t) if type(t)=="string" then - t=lpegmatch(utflinesplitter,t) + t=lpegmatch(utf_16_be_linesplitter,t) end local result={} for i=1,#t do @@ -4374,7 +4383,7 @@ local function utf16_to_utf8_be(t) end local function utf16_to_utf8_le(t) if type(t)=="string" then - t=lpegmatch(utflinesplitter,t) + t=lpegmatch(utf_16_le_linesplitter,t) end local result={} for i=1,#t do @@ -16382,8 +16391,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 : 669359 --- stripped bytes : 235388 +-- original bytes : 669894 +-- stripped bytes : 235432 -- end library merge diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 791f25d09..5d4ac2c22 100755 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -415,7 +415,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true --- original size: 28471, stripped down to: 15475 +-- original size: 28801, stripped down to: 15770 if not modules then modules={} end modules ['l-lpeg']={ version=1.001, @@ -466,6 +466,13 @@ local utfbom=utfbom_32_be+utfbom_32_le+utfbom_16_be+utfbom_16_le+utfbom_8 local utftype=utfbom_32_be*Cc("utf-32-be")+utfbom_32_le*Cc("utf-32-le")+utfbom_16_be*Cc("utf-16-be")+utfbom_16_le*Cc("utf-16-le")+utfbom_8*Cc("utf-8")+alwaysmatched*Cc("utf-8") local utfoffset=utfbom_32_be*Cc(4)+utfbom_32_le*Cc(4)+utfbom_16_be*Cc(2)+utfbom_16_le*Cc(2)+utfbom_8*Cc(3)+Cc(0) local utf8next=R("\128\191") +patterns.utfbom_32_be=utfbom_32_be +patterns.utfbom_32_le=utfbom_32_le +patterns.utfbom_16_be=utfbom_16_be +patterns.utfbom_16_le=utfbom_16_le +patterns.utfbom_8=utfbom_8 +patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n") +patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000") patterns.utf8one=R("\000\127") patterns.utf8two=R("\194\223")*utf8next patterns.utf8three=R("\224\239")*utf8next*utf8next @@ -4066,7 +4073,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-unicode"] = package.loaded["l-unicode"] or true --- original size: 26964, stripped down to: 12091 +-- original size: 27169, stripped down to: 12287 if not modules then modules={} end modules ['l-unicode']={ version=1.001, @@ -4345,9 +4352,11 @@ function utf.magic(f) end return lpegmatch(p_utftype,str) end +local utf_16_be_linesplitter=patterns.utfbom_16_be^-1*lpeg.tsplitat(patterns.utf_16_be_nl) +local utf_16_le_linesplitter=patterns.utfbom_16_le^-1*lpeg.tsplitat(patterns.utf_16_le_nl) local function utf16_to_utf8_be(t) if type(t)=="string" then - t=lpegmatch(utflinesplitter,t) + t=lpegmatch(utf_16_be_linesplitter,t) end local result={} for i=1,#t do @@ -4374,7 +4383,7 @@ local function utf16_to_utf8_be(t) end local function utf16_to_utf8_le(t) if type(t)=="string" then - t=lpegmatch(utflinesplitter,t) + t=lpegmatch(utf_16_le_linesplitter,t) end local result={} for i=1,#t do @@ -16382,8 +16391,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 : 669359 --- stripped bytes : 235388 +-- original bytes : 669894 +-- stripped bytes : 235432 -- end library merge diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index c75d01306..cbf769a38 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{2013.09.09 11:46} +\newcontextversion{2013.09.09 16:27} %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 Binary files differindex 8f41405f0..e6c5e2933 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index bf4b1eaef..08e62a146 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{2013.09.09 11:46} +\edef\contextversion{2013.09.09 16:27} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/l-lpeg.lua b/tex/context/base/l-lpeg.lua index 78b503b8e..cafa18a38 100644 --- a/tex/context/base/l-lpeg.lua +++ b/tex/context/base/l-lpeg.lua @@ -126,6 +126,15 @@ local utfoffset = utfbom_32_be * Cc(4) + utfbom_32_le * Cc(4) local utf8next = R("\128\191") +patterns.utfbom_32_be = utfbom_32_be +patterns.utfbom_32_le = utfbom_32_le +patterns.utfbom_16_be = utfbom_16_be +patterns.utfbom_16_le = utfbom_16_le +patterns.utfbom_8 = utfbom_8 + +patterns.utf_16_be_nl = P("\000\r\000\n") + P("\000\r") + P("\000\n") +patterns.utf_16_le_nl = P("\r\000\n\000") + P("\r\000") + P("\n\000") + patterns.utf8one = R("\000\127") patterns.utf8two = R("\194\223") * utf8next patterns.utf8three = R("\224\239") * utf8next * utf8next diff --git a/tex/context/base/l-unicode.lua b/tex/context/base/l-unicode.lua index cf0c93d4f..7c590330b 100644 --- a/tex/context/base/l-unicode.lua +++ b/tex/context/base/l-unicode.lua @@ -621,9 +621,12 @@ function utf.magic(f) -- not used return lpegmatch(p_utftype,str) end +local utf_16_be_linesplitter = patterns.utfbom_16_be^-1 * lpeg.tsplitat(patterns.utf_16_be_nl) +local utf_16_le_linesplitter = patterns.utfbom_16_le^-1 * lpeg.tsplitat(patterns.utf_16_le_nl) + local function utf16_to_utf8_be(t) if type(t) == "string" then - t = lpegmatch(utflinesplitter,t) + t = lpegmatch(utf_16_be_linesplitter,t) end local result = { } -- we reuse result for i=1,#t do @@ -651,7 +654,7 @@ end local function utf16_to_utf8_le(t) if type(t) == "string" then - t = lpegmatch(utflinesplitter,t) + t = lpegmatch(utf_16_le_linesplitter,t) end local result = { } -- we reuse result for i=1,#t do diff --git a/tex/context/base/pack-com.mkiv b/tex/context/base/pack-com.mkiv index 6c1363148..c913b1ca8 100644 --- a/tex/context/base/pack-com.mkiv +++ b/tex/context/base/pack-com.mkiv @@ -782,19 +782,32 @@ \setrigidcolumnhsize\hsize{\pairedboxparameter\c!distance}\p_n \fi} +% \def\pack_pairedboxes_between_horizontal +% {\setlocalhsize +% \hsize\wd\b_pack_pairedboxes_first % trick +% \hsize\pairedboxparameter\c!width % can be \hsize +% \scratchdimen\dimexpr\wd\b_pack_pairedboxes_first+\pairedboxparameter\c!distance\relax +% \ifdim\dimexpr\hsize+\scratchdimen\relax>\pairedboxparameter\c!maxwidth\relax +% \hsize\dimexpr\pairedboxparameter\c!maxwidth-\scratchdimen\relax +% \fi} + \def\pack_pairedboxes_between_horizontal - {\hsize\wd\b_pack_pairedboxes_first % trick - \hsize\pairedboxparameter\c!width % can be \hsize - \scratchdimen\dimexpr\wd\b_pack_pairedboxes_first+\pairedboxparameter\c!distance\relax - \ifdim\dimexpr\hsize+\scratchdimen\relax>\pairedboxparameter\c!maxwidth\relax - \hsize\dimexpr\pairedboxparameter\c!maxwidth-\scratchdimen\relax + {\scratchdistance\pairedboxparameter\c!distance + \scratchwidth\pairedboxparameter\c!maxwidth\relax + \setlocalhsize + \hsize\dimexpr\availablehsize-\wd\b_pack_pairedboxes_first-\scratchdistance\relax + \hsize\pairedboxparameter\c!width\relax % can be \hsize + \scratchdimen\dimexpr\wd\b_pack_pairedboxes_first+\scratchdistance\relax + \ifdim\dimexpr\hsize+\scratchdimen\relax>\scratchwidth + \hsize\dimexpr\scratchwidth-\scratchdimen\relax \fi} \def\pack_pairedboxes_between_vertical - {\hsize\wd\b_pack_pairedboxes_first - \hsize\pairedboxparameter\c!width % can be \hsize - \ifdim\hsize>\pairedboxparameter\c!maxwidth\relax - \hsize\pairedboxparameter\c!maxwidth % can be \hsize + {\scratchwidth\pairedboxparameter\c!maxwidth\relax + \hsize\wd\b_pack_pairedboxes_first + \hsize\pairedboxparameter\c!width\relax % can be \hsize + \ifdim\hsize>\scratchwidth\relax + \hsize\scratchwidth \fi} \def\pack_pairedboxes_after @@ -811,7 +824,7 @@ \fi} \def\pack_pairedboxes_pack_horizontal - {\hbox\bgroup + {\dontleavehmode\hbox\bgroup \forgetall \s_pack_pairedboxes_size\ht \ifdim\ht\b_pack_pairedboxes_first>\ht\b_pack_pairedboxes_second @@ -832,7 +845,7 @@ \egroup} \def\pack_pairedboxes_pack_vertical - {\vbox\bgroup + {\dontleavehmode\vbox\bgroup \forgetall \s_pack_pairedboxes_size\wd \ifdim\wd\b_pack_pairedboxes_first>\wd\b_pack_pairedboxes_second diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 89ec0b148..875ffdd85 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.log b/tex/context/base/status-lua.log index 0e8bfaf28..299fb7f2a 100644 --- a/tex/context/base/status-lua.log +++ b/tex/context/base/status-lua.log @@ -1,6 +1,6 @@ (cont-yes.mkiv -ConTeXt ver: 2013.09.09 11:46 MKIV beta fmt: 2013.9.9 int: english/english +ConTeXt ver: 2013.09.09 16:27 MKIV beta fmt: 2013.9.9 int: english/english system > 'cont-new.mkiv' loaded (cont-new.mkiv) diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 5ac5cbd14..d4a6d9612 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 : 09/09/13 11:46:58 +-- merge date : 09/09/13 16:27:58 do -- begin closure to overcome local limits and interference @@ -136,6 +136,13 @@ local utfbom=utfbom_32_be+utfbom_32_le+utfbom_16_be+utfbom_16_le+utfbom_8 local utftype=utfbom_32_be*Cc("utf-32-be")+utfbom_32_le*Cc("utf-32-le")+utfbom_16_be*Cc("utf-16-be")+utfbom_16_le*Cc("utf-16-le")+utfbom_8*Cc("utf-8")+alwaysmatched*Cc("utf-8") local utfoffset=utfbom_32_be*Cc(4)+utfbom_32_le*Cc(4)+utfbom_16_be*Cc(2)+utfbom_16_le*Cc(2)+utfbom_8*Cc(3)+Cc(0) local utf8next=R("\128\191") +patterns.utfbom_32_be=utfbom_32_be +patterns.utfbom_32_le=utfbom_32_le +patterns.utfbom_16_be=utfbom_16_be +patterns.utfbom_16_le=utfbom_16_le +patterns.utfbom_8=utfbom_8 +patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n") +patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000") patterns.utf8one=R("\000\127") patterns.utf8two=R("\194\223")*utf8next patterns.utf8three=R("\224\239")*utf8next*utf8next |