From 5c195236a1a69b23762df71a791e6b4e2c671892 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 29 Oct 2019 16:18:49 +0100 Subject: 2019-10-29 15:08:00 --- tex/context/base/mkii/cont-new.mkii | 2 +- tex/context/base/mkii/context.mkii | 2 +- tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/context.mkxl | 2 +- tex/context/base/mkiv/l-lua.lua | 6 ++ tex/context/base/mkiv/l-sandbox.lua | 24 +++--- tex/context/base/mkiv/status-files.pdf | Bin 26686 -> 26708 bytes tex/context/base/mkiv/status-lua.pdf | Bin 268844 -> 268844 bytes tex/context/base/mkiv/strc-itm.mkvi | 81 +++++++++++---------- tex/context/interface/mkiv/i-context.pdf | Bin 893544 -> 893373 bytes tex/context/interface/mkiv/i-readme.pdf | Bin 61165 -> 61165 bytes tex/generic/context/luatex/luatex-fonts-merged.lua | 5 +- 13 files changed, 70 insertions(+), 56 deletions(-) (limited to 'tex') diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 42dac33ab..e4a4633e3 100644 --- a/tex/context/base/mkii/cont-new.mkii +++ b/tex/context/base/mkii/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2019.10.28 18:12} +\newcontextversion{2019.10.29 15:00} %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/mkii/context.mkii b/tex/context/base/mkii/context.mkii index d3691a6e7..bc5f2b94f 100644 --- a/tex/context/base/mkii/context.mkii +++ b/tex/context/base/mkii/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2019.10.28 18:12} +\edef\contextversion{2019.10.29 15:00} %D For those who want to use this: diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index f06aeab01..80f15c587 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2019.10.28 18:12} +\newcontextversion{2019.10.29 15:00} %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 b367c0c44..880ae7fa3 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -45,7 +45,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2019.10.28 18:12} +\edef\contextversion{2019.10.29 15:00} \edef\contextkind {beta} %D Kind of special: diff --git a/tex/context/base/mkiv/context.mkxl b/tex/context/base/mkiv/context.mkxl index 77678596c..23cebe57e 100644 --- a/tex/context/base/mkiv/context.mkxl +++ b/tex/context/base/mkiv/context.mkxl @@ -29,7 +29,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2019.10.28 18:12} +\edef\contextversion{2019.10.29 15:00} \edef\contextkind {beta} %D Kind of special: diff --git a/tex/context/base/mkiv/l-lua.lua b/tex/context/base/mkiv/l-lua.lua index 6e9606e84..51399216c 100644 --- a/tex/context/base/mkiv/l-lua.lua +++ b/tex/context/base/mkiv/l-lua.lua @@ -35,6 +35,12 @@ if LUAVERSION < 5.2 and jit then LUAVERSION = 5.2 end +-- this is lmtx only: + +if lua and lua.openfile then + io.open = lua.openfile +end + -- lpeg if not lpeg then diff --git a/tex/context/base/mkiv/l-sandbox.lua b/tex/context/base/mkiv/l-sandbox.lua index c2e1753d3..276e54937 100644 --- a/tex/context/base/mkiv/l-sandbox.lua +++ b/tex/context/base/mkiv/l-sandbox.lua @@ -281,20 +281,24 @@ end loadfile = register(loadfile,"loadfile") +if supported("lua") then + lua.openfile = register(lua.openfile,"lua.openfile") +end + if supported("io") then - io.open = register(io.open, "io.open") - io.popen = register(io.popen, "io.popen") -- needs checking - io.lines = register(io.lines, "io.lines") - io.output = register(io.output, "io.output") - io.input = register(io.input, "io.input") + io.open = register(io.open, "io.open") + io.popen = register(io.popen, "io.popen") -- needs checking + io.lines = register(io.lines, "io.lines") + io.output = register(io.output,"io.output") + io.input = register(io.input, "io.input") end if supported("os") then - os.execute = register(os.execute, "os.execute") - os.spawn = register(os.spawn, "os.spawn") - os.exec = register(os.exec, "os.exec") - os.rename = register(os.rename, "os.rename") - os.remove = register(os.remove, "os.remove") + os.execute = register(os.execute,"os.execute") + os.spawn = register(os.spawn, "os.spawn") + os.exec = register(os.exec, "os.exec") + os.rename = register(os.rename, "os.rename") + os.remove = register(os.remove, "os.remove") end if supported("lfs") then diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index f337a1e15..2d27af210 100644 Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf index 4825b13c7..15622145c 100644 Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ diff --git a/tex/context/base/mkiv/strc-itm.mkvi b/tex/context/base/mkiv/strc-itm.mkvi index f09b24cdf..f835aa352 100644 --- a/tex/context/base/mkiv/strc-itm.mkvi +++ b/tex/context/base/mkiv/strc-itm.mkvi @@ -204,9 +204,9 @@ % 1 = between unless before % 2 = between -\newconstant \c_strc_itemgroups_spacing_mode \c_strc_itemgroups_spacing_mode\plustwo -\newconditional\c_strc_itemgroups_optimize \settrue\c_strc_itemgroups_optimize -\newconditional\c_strc_itemgroups_auto_concat \settrue\c_strc_itemgroups_auto_concat +\newconstant \c_strc_itemgroups_spacing_mode \c_strc_itemgroups_spacing_mode\plustwo +\newconditional\c_strc_itemgroups_optimize \settrue\c_strc_itemgroups_optimize +\newconditional\c_strc_itemgroups_auto_concat \settrue\c_strc_itemgroups_auto_concat \newsignal \d_strc_itemgroups_signal @@ -215,30 +215,28 @@ \newdimen \d_strc_itemgroups_list_width \newdimen \d_strc_itemgroups_asked_width -\newdimen \d_strc_itemgroups_max_width % multipass -\newcount \c_strc_itemgroups_max_items % multipass +\newdimen \d_strc_itemgroups_max_width % multipass +\newcount \c_strc_itemgroups_max_items % multipass \newcount \c_strc_itemgroups_n_of_items \newcount \c_strc_itemgroups_nesting \newcount \c_strc_itemgroups_column_depth -\def \v_strc_itemgroups_counter {itemgroup:\currentparentitemgroup} +\def \v_strc_itemgroups_counter {itemgroup:\currentparentitemgroup} +\let \m_strc_itemgroups_repeat_start \empty +\def \v_strc_itemgroups_unknown_symbol {?} +\let \m_strc_itemgroups_indenting \empty +\let \m_strc_itemgroups_destination \empty -\let \m_strc_itemgroups_repeat_start \empty -\def \v_strc_itemgroups_unknown_symbol {?} +\let \currentitemlevel \!!zerocount % public +\def \currentnofitems {\the\c_strc_itemgroups_max_items} +\def \currentitemnumber {\strc_counters_raw_sub\v_strc_itemgroups_counter\currentitemlevel} % public -\let \m_strc_itemgroups_indenting \empty -\let \m_strc_itemgroups_destination \empty +\newtoks \itemgroupcommands % maybe public -\let \currentitemlevel \!!zerocount % public -\def \currentnofitems {\the\c_strc_itemgroups_max_items} -\def \currentitemnumber {\strc_counters_raw_sub\v_strc_itemgroups_counter\currentitemlevel} % public - -\newtoks \itemgroupcommands % maybe public - -\def \currentitemgroupsymbol {n} % here we cannot use a _ in the name -\let \currentitemgroupconversionset \empty % here we cannot use a _ in the name -\let \currentitemgroupsegments \empty +\def \currentitemgroupsymbol {n} % here we cannot use a _ in the name +\let \currentitemgroupconversionset \empty % here we cannot use a _ in the name +\let \currentitemgroupsegments \empty \def\strc_itemgroups_register_status {\clf_registeritemgroup{\currentparentitemgroup}\c_strc_itemgroups_nesting\c_strc_itemgroups_n_of_items\dimexpr\itemgroupparameter\c!maxwidth\relax} @@ -513,9 +511,9 @@ \setfalse\c_strc_itemgroups_columns % to be checked \let\m_strc_itemgroups_destination\empty - \let\strc_itemgroups_used_symbol\empty % ** start value + \let\strc_itemgroups_used_symbol \empty % ** start value \let\strc_itemgroups_margin_symbol\empty - \let\strc_itemgroups_extra_symbol\empty + \let\strc_itemgroups_extra_symbol \empty % \global\letitemgroupparameter\c!maxwidth\!!zeropoint } @@ -800,25 +798,6 @@ \unexpanded\def\startitemgroup {\dotripleempty\strc_itemgroups_start} -% \def\strc_itemgroups_start[#category][#options][#settings]% -% {\begingroup % (1) -% \def\currentitemgroup{#category}% no nested mixing of itemgroups -% \let\currentparentitemgroup\currentitemgroup -% \global\advance\c_strc_itemgroups_nesting\plusone -% \def\currentitemlevel{\number\c_strc_itemgroups_nesting}% -% \normalexpanded{\chaintocurrentitemgroup{\currentparentitemgroup:\currentitemlevel}}% -% \edef\currentitemgroup{\currentparentitemgroup:\currentitemlevel}% -% % -% \ifthirdargument -% \strc_itemgroups_start_indeed[#options][#settings]% -% \else\ifsecondargument -% \doifelseassignment{#options} -% {\strc_itemgroups_start_indeed[][#options]} -% {\strc_itemgroups_start_indeed[#options][]}% -% \else -% \strc_itemgroups_start_indeed[][]% -% \fi\fi} - \def\strc_itemgroups_start[#category][#options][#settings]% {\begingroup % (1) \def\currentitemgroup{#category}% no nested mixing of itemgroups @@ -1879,4 +1858,26 @@ \defineitemgroup [\v!itemize] +%D This is really ugly I should get rid of the global mess, whuch is a side +%D effect of the simple \type {\item} interface that we're stuck with for +%D compatibility reasons. See footnotes for usage. It's probablynot robust +%D for mixed itemgroups so in the end I need to get rid of the globals. One +%D problem is that counters are set. + +\defineitemgroup + [\v!itemize:\v!note] + +\def\strc_itemgroups_push + {\edef\strc_itemgroups_pop + {\xdef\noexpand\currentitemlevel{\currentitemlevel}% + \global\c_strc_itemgroups_nesting \the\c_strc_itemgroups_nesting \relax + \global\c_strc_itemgroups_column_depth\the\c_strc_itemgroups_column_depth\relax}% + \global\c_strc_itemgroups_column_depth\zerocount + \global\c_strc_itemgroups_nesting \zerocount + \glet\currentitemlevel\!!zerocount + \unexpanded\def\startitemize{\startitemgroup[\v!itemize:\v!note]}% + \unexpanded\def\stopitemize {\stopitemgroup}} + +\let\strc_itemgroups_pop\relax + \protect \endinput diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf index 966b2ae73..d78131958 100644 Binary files a/tex/context/interface/mkiv/i-context.pdf and b/tex/context/interface/mkiv/i-context.pdf differ diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf index f65eb65f8..ca4115bc9 100644 Binary files a/tex/context/interface/mkiv/i-readme.pdf and b/tex/context/interface/mkiv/i-readme.pdf differ diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index e856248cb..b8a21fc93 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 : 10/28/19 18:12:38 +-- merge date : 10/29/19 15:00:00 do -- begin closure to overcome local limits and interference @@ -20,6 +20,9 @@ if LUAVERSION<5.2 and jit then MINORVERSION=2 LUAVERSION=5.2 end +if lua and lua.openfile then + io.open=lua.openfile +end if not lpeg then lpeg=require("lpeg") end -- cgit v1.2.3