diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4261 -> 4268 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/font-osd.lua | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/l-table.lua | 15 | ||||
-rw-r--r-- | tex/context/base/mkiv/page-mix.mkiv | 97 | ||||
-rw-r--r-- | tex/context/base/mkiv/status-files.pdf | bin | 9263 -> 9220 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/status-lua.pdf | bin | 369099 -> 369107 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/tabl-xtb.lua | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/util-tab.lua | 23 | ||||
-rw-r--r-- | tex/context/interface/mkiv/i-context.pdf | bin | 774596 -> 774580 bytes | |||
-rw-r--r-- | tex/context/interface/mkiv/i-readme.pdf | bin | 60792 -> 60796 bytes | |||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 14 |
13 files changed, 102 insertions, 55 deletions
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex 797385b92..bdb7d6f74 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index a96d4ff24..3eae6e337 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2016.08.23 11:14} +\newcontextversion{2016.08.24 15:36} %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/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index d88a97a6e..6c0256a1a 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2016.08.23 11:14} +\edef\contextversion{2016.08.24 15:36} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/font-osd.lua b/tex/context/base/mkiv/font-osd.lua index 8ddd9a272..6f715a11f 100644 --- a/tex/context/base/mkiv/font-osd.lua +++ b/tex/context/base/mkiv/font-osd.lua @@ -675,7 +675,7 @@ local function initializedevanagi(tfmdata) end end if kind == "pref" then - local sequence = dataset[3] -- was [5] +-- local sequence = dataset[3] -- was [5] local steps = sequence.steps local nofsteps = sequence.nofsteps for i=1,nofsteps do diff --git a/tex/context/base/mkiv/l-table.lua b/tex/context/base/mkiv/l-table.lua index d1e05928f..498f51833 100644 --- a/tex/context/base/mkiv/l-table.lua +++ b/tex/context/base/mkiv/l-table.lua @@ -478,7 +478,7 @@ function table.fromhash(t) return hsh end -local noquotes, hexify, handle, compact, inline, functions +local noquotes, hexify, handle, compact, inline, functions, metacheck local reserved = table.tohash { -- intercept a language inconvenience: no reserved words as key 'and', 'break', 'do', 'else', 'elseif', 'end', 'false', 'for', 'function', 'if', @@ -608,7 +608,8 @@ local function do_serialize(root,name,depth,level,indexed) if compact then last = #root for k=1,last do - if root[k] == nil then + -- if root[k] == nil then + if rawget(root,k) == nil then last = k - 1 break end @@ -817,6 +818,7 @@ local function serialize(_handle,root,name,specification) -- handle wins functions = specification.functions compact = specification.compact inline = specification.inline and compact + metacheck = specification.metacheck if functions == nil then functions = true end @@ -826,6 +828,9 @@ local function serialize(_handle,root,name,specification) -- handle wins if inline == nil then inline = compact end + if metacheck == nil then + metacheck = true + end else noquotes = false hexify = false @@ -833,6 +838,7 @@ local function serialize(_handle,root,name,specification) -- handle wins compact = true inline = true functions = true + metacheck = true end if tname == "string" then if name == "return" then @@ -857,8 +863,9 @@ local function serialize(_handle,root,name,specification) -- handle wins end if root then -- The dummy access will initialize a table that has a delayed initialization - -- using a metatable. (maybe explicitly test for metatable) - if getmetatable(root) then -- todo: make this an option, maybe even per subtable + -- using a metatable. (maybe explicitly test for metatable). This can crash on + -- metatables that check the index against a number. + if metacheck and getmetatable(root) then local dummy = root._w_h_a_t_e_v_e_r_ root._w_h_a_t_e_v_e_r_ = nil end diff --git a/tex/context/base/mkiv/page-mix.mkiv b/tex/context/base/mkiv/page-mix.mkiv index 83ce22058..5b3afc575 100644 --- a/tex/context/base/mkiv/page-mix.mkiv +++ b/tex/context/base/mkiv/page-mix.mkiv @@ -359,6 +359,16 @@ \unexpanded\def\startmixedcolumns {\dodoubleempty\page_mix_start_columns} +\def\page_mix_start_columns_checked#1#2% + {\edef\currentmixedcolumnsmethod{\mixedcolumnsparameter\c!method}% + \ifx\currentmixedcolumnsmethod\v!box + \singleexpandafter#1% + \else\ifinsidecolumns + \doubleexpandafter#2% + \else + \doubleexpandafter#1% + \fi\fi} + \unexpanded\def\page_mix_start_columns {\pushmacro\currentmixedcolumns \pushmacro\currentmixedcolumnsmethod @@ -370,15 +380,24 @@ \doubleexpandafter\page_mix_start_columns_c \fi\fi} -\def\page_mix_start_columns_a[#1][#2]% +\def\page_mix_start_columns_a[#1]% [#2]% {\edef\currentmixedcolumns{#1}% - \edef\currentmixedcolumnsmethod{\mixedcolumnsparameter\c!method}% - \mixedcolumnsparameter\c!before\relax + \page_mix_start_columns_checked + \page_mix_start_columns_a_yes + \page_mix_start_columns_a_nop} + +\def\page_mix_start_columns_a_yes[#1]% + {\mixedcolumnsparameter\c!before\relax \begincsname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax \begingroup - \setupcurrentmixedcolumns[#2]% + \setupcurrentmixedcolumns[#1]% \page_mix_initialize_columns - \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname} + \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname + \let\stopmixedcolumns\page_mix_columns_stop_yes} + +\def\page_mix_start_columns_a_nop[#1]% + {\begingroup + \let\stopmixedcolumns\page_mix_columns_stop_nop} \def\page_mix_start_columns_b[#1][#2]% {\doifelseassignment{#1}% @@ -386,44 +405,65 @@ \page_mix_error_b} {\edef\currentmixedcolumns{#1}% \firstargumentfalse}% - \edef\currentmixedcolumnsmethod{\mixedcolumnsparameter\c!method}% - \mixedcolumnsparameter\c!before\relax % so, it doesn't listen to local settings ! + \page_mix_start_columns_checked + \page_mix_start_columns_b_yes + \page_mix_start_columns_b_nop + [#1]} + +\def\page_mix_start_columns_b_yes[#1]% + {\mixedcolumnsparameter\c!before\relax % so, it doesn't listen to local settings ! \begincsname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax \begingroup \iffirstargument \setupcurrentmixedcolumns[#1]% \fi \page_mix_initialize_columns - \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname} % no \relax + \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname % no \relax + \let\stopmixedcolumns\page_mix_columns_stop_yes} + +\def\page_mix_start_columns_b_nop[#1]% + {\begingroup + \let\stopmixedcolumns\page_mix_columns_stop_nop} \def\page_mix_error_b {\writestatus\m!columns{best use an instance of mixed columns}} \def\page_mix_start_columns_c[#1][#2]% {\let\currentmixedcolumns\empty - \edef\currentmixedcolumnsmethod{\mixedcolumnsparameter\c!method}% - \mixedcolumnsparameter\c!before\relax + \page_mix_start_columns_checked + \page_mix_start_columns_c_yes + \page_mix_start_columns_c_nop} + +\def\page_mix_start_columns_c_yes + {\mixedcolumnsparameter\c!before\relax \begincsname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax \begingroup \page_mix_initialize_columns \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname} +\def\page_mix_start_columns_c_nop + {\begingroup + \let\stopmixedcolumns\page_mix_columns_stop_nop} + \unexpanded\def\page_mix_fast_columns_start#1% {\pushmacro\currentmixedcolumns \pushmacro\currentmixedcolumnsmethod \edef\currentmixedcolumns{#1}% \edef\currentmixedcolumnsmethod{\mixedcolumnsparameter\c!method}% - \mixedcolumnsparameter\c!before\relax % so, it doesn't list to local settings ! + \mixedcolumnsparameter\c!before\relax % so, it doesn't listen to local settings ! \begincsname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax \begingroup \page_mix_initialize_columns - \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname} % no \relax + \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname % no \relax + \let\page_mix_fast_columns_stop\page_mix_columns_stop_yes} %D When we stop, we switch over to the balancing routine. After we're done we %D make sure to set the sizes are set, a somewhat redundant action when we %D already have flushed but better be safe. -\unexpanded\def\stopmixedcolumns +\let\page_mix_fast_columns_stop\relax + +\unexpanded\def\page_mix_columns_stop_yes {\begincsname\??mixedcolumnsstop \currentmixedcolumnsmethod\endcsname % no \relax \endgroup \begincsname\??mixedcolumnsafter\currentmixedcolumnsmethod\endcsname\relax @@ -431,7 +471,12 @@ \popmacro\currentmixedcolumnsmethod \popmacro\currentmixedcolumns} -% \unexpanded\def\stopmixedcolumns +\unexpanded\def\page_mix_columns_stop_nop + {\endgroup + \popmacro\currentmixedcolumnsmethod + \popmacro\currentmixedcolumns} + +% \unexpanded\def\page_mix_columns_stop_yes % {\begincsname\??mixedcolumnsstop \currentmixedcolumnsmethod\endcsname % no \relax % \endgroup % \begincsname\??mixedcolumnsafter\currentmixedcolumnsmethod\endcsname\relax @@ -446,14 +491,13 @@ % \fi % } -\let\page_mix_fast_columns_stop\stopmixedcolumns - %D This is how the fast one is used: \unexpanded\def\strc_itemgroups_start_columns {\page_mix_fast_columns_start\s!itemgroupcolumns} -\let\strc_itemgroups_stop_columns\page_mix_fast_columns_stop +\unexpanded\def\strc_itemgroups_stop_columns + {\page_mix_fast_columns_stop} % set by start \setupmixedcolumns [\s!itemgroupcolumns] @@ -789,25 +833,6 @@ \letvalue{\??mixedcolumnsbefore\s!box}\donothing \letvalue{\??mixedcolumnsafter \s!box}\donothing -% \setvalue{\??mixedcolumnsstart\s!box}% -% {\edef\p_page_mix_strut{\mixedcolumnsparameter\c!strut}% -% \setbox\b_page_mix_collected\vbox\bgroup -% \let\currentoutputroutine\s!mixedcolumn % makes \column work -% \forgetall -% \page_mix_command_set_hsize -% \ifx\p_page_mix_strut\v!yes -% \begstrut -% \ignorespaces -% \fi} -% -% \setvalue{\??mixedcolumnsstop\s!box}% -% {\ifx\p_page_mix_strut\v!yes -% \removeunwantedspaces -% \endstrut -% \fi -% \egroup -% \page_mix_box_balance} - \setvalue{\??mixedcolumnsstart\s!box}% {\edef\p_page_mix_strut{\mixedcolumnsparameter\c!strut}% \setbox\b_page_mix_collected\vbox \bgroup diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex ae89dcfeb..8819b504d 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex f85658e66..c1e4be45c 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/tabl-xtb.lua b/tex/context/base/mkiv/tabl-xtb.lua index 674a0bf5a..afcdc5855 100644 --- a/tex/context/base/mkiv/tabl-xtb.lua +++ b/tex/context/base/mkiv/tabl-xtb.lua @@ -520,6 +520,7 @@ function xtables.reflow_width() local nofrows = data.nofrows local nofcolumns = data.nofcolumns local rows = data.rows +-- inspect(rows) for r=1,nofrows do local row = rows[r] for c=1,nofcolumns do @@ -551,6 +552,7 @@ function xtables.reflow_width() showwidths("stage 1",widths,autowidths) end local noffrozen = 0 +-- here we can also check spans -- inspect(data.fixedcspans) if options[v_max] then for c=1,nofcolumns do diff --git a/tex/context/base/mkiv/util-tab.lua b/tex/context/base/mkiv/util-tab.lua index d50205892..b8b9091b0 100644 --- a/tex/context/base/mkiv/util-tab.lua +++ b/tex/context/base/mkiv/util-tab.lua @@ -12,7 +12,7 @@ local tables = utilities.tables local format, gmatch, gsub, sub = string.format, string.gmatch, string.gsub, string.sub local concat, insert, remove, sort = table.concat, table.insert, table.remove, table.sort -local setmetatable, getmetatable, tonumber, tostring = setmetatable, getmetatable, tonumber, tostring +local setmetatable, getmetatable, tonumber, tostring, rawget = setmetatable, getmetatable, tonumber, tostring, rawget local type, next, rawset, tonumber, tostring, load, select = type, next, rawset, tonumber, tostring, load, select local lpegmatch, P, Cs, Cc = lpeg.match, lpeg.P, lpeg.Cs, lpeg.Cc local sortedkeys, sortedpairs = table.sortedkeys, table.sortedpairs @@ -489,7 +489,8 @@ function table.twowaymapper(t) if not t then t = { } else - for i=0,#t do + local zero = rawget(t,0) + for i=zero or 1,#t do local ti = t[i] -- t[1] = "one" if ti then local i = tostring(i) @@ -497,7 +498,7 @@ function table.twowaymapper(t) t[ti] = i -- t["one"] = "1" end end - t[""] = t[0] or "" + t[""] = zero or "" end -- setmetatableindex(t,"key") setmetatable(t,selfmapper) @@ -616,7 +617,8 @@ local function serialize(root,name,specification) return nil end end - local haszero = t[0] + -- local haszero = t[0] + local haszero = rawget(t,0) -- don't trigger meta if n == nt then local tt = { } for i=1,nt do @@ -680,7 +682,8 @@ local function serialize(root,name,specification) local last = 0 last = #root for k=1,last do - if root[k] == nil then + if rawget(root,k) == nil then + -- if root[k] == nil then last = k - 1 break end @@ -810,7 +813,8 @@ local function serialize(root,name,specification) if root then -- The dummy access will initialize a table that has a delayed initialization - -- using a metatable. (maybe explicitly test for metatable) + -- using a metatable. (maybe explicitly test for metatable). This can crash on + -- metatables that check the index against a number. if getmetatable(root) then -- todo: make this an option, maybe even per subtable local dummy = root._w_h_a_t_e_v_e_r_ -- needed root._w_h_a_t_e_v_e_r_ = nil @@ -833,5 +837,10 @@ end table.serialize = serialize if setinspector then - setinspector("table",function(v) if type(v) == "table" then print(serialize(v,"table",{})) return true end end) + setinspector("table",function(v) + if type(v) == "table" then + print(serialize(v,"table",{ metacheck = false })) + return true + end + end) end diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf Binary files differindex 2a0ec1548..a7d0dfa91 100644 --- a/tex/context/interface/mkiv/i-context.pdf +++ b/tex/context/interface/mkiv/i-context.pdf diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf Binary files differindex cf81b5ce8..2c37bae5a 100644 --- a/tex/context/interface/mkiv/i-readme.pdf +++ b/tex/context/interface/mkiv/i-readme.pdf diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 7b594b03b..62c427592 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 08/23/16 11:14:05 +-- merge date : 08/24/16 15:36:43 do -- begin closure to overcome local limits and interference @@ -1352,7 +1352,7 @@ function table.fromhash(t) end return hsh end -local noquotes,hexify,handle,compact,inline,functions +local noquotes,hexify,handle,compact,inline,functions,metacheck local reserved=table.tohash { 'and','break','do','else','elseif','end','false','for','function','if', 'in','local','nil','not','or','repeat','return','then','true','until','while', @@ -1422,7 +1422,7 @@ local function do_serialize(root,name,depth,level,indexed) if compact then last=#root for k=1,last do - if root[k]==nil then + if rawget(root,k)==nil then last=k-1 break end @@ -1619,6 +1619,7 @@ local function serialize(_handle,root,name,specification) functions=specification.functions compact=specification.compact inline=specification.inline and compact + metacheck=specification.metacheck if functions==nil then functions=true end @@ -1628,6 +1629,9 @@ local function serialize(_handle,root,name,specification) if inline==nil then inline=compact end + if metacheck==nil then + metacheck=true + end else noquotes=false hexify=false @@ -1635,6 +1639,7 @@ local function serialize(_handle,root,name,specification) compact=true inline=true functions=true + metacheck=true end if tname=="string" then if name=="return" then @@ -1658,7 +1663,7 @@ local function serialize(_handle,root,name,specification) handle("t={") end if root then - if getmetatable(root) then + if metacheck and getmetatable(root) then local dummy=root._w_h_a_t_e_v_e_r_ root._w_h_a_t_e_v_e_r_=nil end @@ -21664,7 +21669,6 @@ local function initializedevanagi(tfmdata) end end if kind=="pref" then - local sequence=dataset[3] local steps=sequence.steps local nofsteps=sequence.nofsteps for i=1,nofsteps do |