summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkii/mult-en.mkii1
-rw-r--r--tex/context/base/mkii/mult-nl.mkii1
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/grph-inc.lua1
-rw-r--r--tex/context/base/mkiv/math-ini.mkiv6
-rw-r--r--tex/context/base/mkiv/node-res.lua24
-rw-r--r--tex/context/base/mkiv/node-rul.lua26
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26595 -> 26607 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin268289 -> 268320 bytes
-rw-r--r--tex/context/base/mkiv/trac-inf.lua4
-rw-r--r--tex/context/base/mkiv/util-prs.lua65
-rw-r--r--tex/context/interface/mkii/keys-en.xml1
-rw-r--r--tex/context/interface/mkii/keys-nl.xml1
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin865775 -> 865672 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin61161 -> 61161 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
19 files changed, 72 insertions, 68 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 2ddebe44f..5523e4ef5 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.02.24 17:23}
+\newcontextversion{2019.02.26 20:04}
%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 aa6da686e..0e610cd31 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.02.24 17:23}
+\edef\contextversion{2019.02.26 20:04}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-en.mkii b/tex/context/base/mkii/mult-en.mkii
index faf268576..0f9cc15e1 100644
--- a/tex/context/base/mkii/mult-en.mkii
+++ b/tex/context/base/mkii/mult-en.mkii
@@ -587,6 +587,7 @@
\setinterfacevariable{understrike}{understrike}
\setinterfacevariable{understrikes}{understrikes}
\setinterfacevariable{unframed}{unframed}
+\setinterfacevariable{unicode}{unicode}
\setinterfacevariable{unit}{unit}
\setinterfacevariable{units}{units}
\setinterfacevariable{unknown}{unknown}
diff --git a/tex/context/base/mkii/mult-nl.mkii b/tex/context/base/mkii/mult-nl.mkii
index 884503363..6376b158a 100644
--- a/tex/context/base/mkii/mult-nl.mkii
+++ b/tex/context/base/mkii/mult-nl.mkii
@@ -587,6 +587,7 @@
\setinterfacevariable{understrike}{understrike}
\setinterfacevariable{understrikes}{understrikes}
\setinterfacevariable{unframed}{unframed}
+\setinterfacevariable{unicode}{unicode}
\setinterfacevariable{unit}{eenheid}
\setinterfacevariable{units}{eenheden}
\setinterfacevariable{unknown}{onbekend}
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 0b9988f29..f47b4062f 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{2019.02.24 17:23}
+\newcontextversion{2019.02.26 20:04}
%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 2dc6bc6f9..067af94f6 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -42,7 +42,7 @@
%D has to match \type {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2019.02.24 17:23}
+\edef\contextversion{2019.02.26 20:04}
\edef\contextkind {beta}
%D Kind of special:
diff --git a/tex/context/base/mkiv/grph-inc.lua b/tex/context/base/mkiv/grph-inc.lua
index e0ed8ab75..c740d424d 100644
--- a/tex/context/base/mkiv/grph-inc.lua
+++ b/tex/context/base/mkiv/grph-inc.lua
@@ -1694,6 +1694,7 @@ local ctx_docheckfiguremps = context.docheckfiguremps
local function internal(askedname)
local spec, mprun, mpnum = match(lower(askedname),"mprun([:%.]?)(.-)%.(%d+)")
+ -- mpnum = tonumber(mpnum) or 0 -- can be string or number, fed to context anyway
if spec ~= "" then
return mprun, mpnum
else
diff --git a/tex/context/base/mkiv/math-ini.mkiv b/tex/context/base/mkiv/math-ini.mkiv
index bf956c41c..3c27bbf07 100644
--- a/tex/context/base/mkiv/math-ini.mkiv
+++ b/tex/context/base/mkiv/math-ini.mkiv
@@ -268,8 +268,8 @@
\def\math_m_yes_text_openedup#1%
{\setbox\scratchbox\hbox\bgroup
- \normalstartimath
\the\everyswitchmathematics\relax
+ \normalstartimath
#1%
\normalstopimath
\egroup
@@ -285,8 +285,8 @@
\endgroup}
\def\math_m_yes_text_normal#1%
- {\normalstartimath
- \the\everyswitchmathematics\relax
+ {\the\everyswitchmathematics\relax
+ \normalstartimath
#1%
\normalstopimath
\endgroup}
diff --git a/tex/context/base/mkiv/node-res.lua b/tex/context/base/mkiv/node-res.lua
index d9999968a..5b4961683 100644
--- a/tex/context/base/mkiv/node-res.lua
+++ b/tex/context/base/mkiv/node-res.lua
@@ -364,49 +364,37 @@ function nutpool.direction(dir,swap)
return t
end
-function nutpool.rule(width,height,depth,direction) -- w/h/d == nil will let them adapt
+function nutpool.rule(width,height,depth) -- w/h/d == nil will let them adapt
local n = copy_nut(rule)
if width or height or depth then
setwhd(n,width,height,depth)
end
- if direction then
- setdirection(n,direction)
- end
return n
end
-function nutpool.emptyrule(width,height,depth,direction) -- w/h/d == nil will let them adapt
+function nutpool.emptyrule(width,height,depth) -- w/h/d == nil will let them adapt
local n = copy_nut(emptyrule)
if width or height or depth then
setwhd(n,width,height,depth)
end
- if direction then
- setdirection(n,direction)
- end
return n
end
-function nutpool.userrule(width,height,depth,direction) -- w/h/d == nil will let them adapt
+function nutpool.userrule(width,height,depth) -- w/h/d == nil will let them adapt
local n = copy_nut(userrule)
if width or height or depth then
setwhd(n,width,height,depth)
end
- if direction then
- setdirection(n,direction)
- end
return n
end
-function nutpool.outlinerule(width,height,depth,line,direction) -- w/h/d == nil will let them adapt
+function nutpool.outlinerule(width,height,depth,line) -- w/h/d == nil will let them adapt
local n = copy_nut(outlinerule)
if width or height or depth then
setwhd(n,width,height,depth)
end
if line then
- setfield(n,"transform",line)
- end
- if direction then
- setdirection(n,direction)
+ if CONTEXTLMTXMODE > 1 then setdata(n,line) else setfield(n,"transform",line) end
end
return n
end
@@ -576,7 +564,7 @@ end
local function usage()
local t = { }
for n, tag in gmatch(status.node_mem_usage,"(%d+) ([a-z_]+)") do
- t[tag] = n
+ t[tag] = tonumber(n) or 0
end
return t
end
diff --git a/tex/context/base/mkiv/node-rul.lua b/tex/context/base/mkiv/node-rul.lua
index 1f79a5633..1df5bf32a 100644
--- a/tex/context/base/mkiv/node-rul.lua
+++ b/tex/context/base/mkiv/node-rul.lua
@@ -50,6 +50,7 @@ local getwidth = nuts.getwidth
local setwidth = nuts.setwidth
local setoffsets = nuts.setoffsets
local setfield = nuts.setfield
+local getdata = nuts.getdata
local isglyph = nuts.isglyph
@@ -164,28 +165,23 @@ local ruleactions = { }
rules .ruleactions = ruleactions
nutrules.ruleactions = ruleactions -- convenient
-local function mathradical(n,h,v)
- ----- size = getfield(n,"index")
- local font = getfield(n,"transform")
+local function mathaction(n,h,v,what)
+ local font = CONTEXTLMTXMODE > 1 and getdata(n) or getfield(n,"transform")
local actions = fontresources[font].mathruleactions
if actions then
- local action = actions.radicalaction
+ local action = actions[what]
if action then
action(n,h,v,font)
end
end
end
+local function mathradical(n,h,v)
+ mathaction(n,h,v,"radicalaction")
+end
+
local function mathrule(n,h,v)
- ----- size = getfield(n,"index")
- local font = getfield(n,"transform")
- local actions = fontresources[font].mathruleactions
- if actions then
- local action = actions.hruleaction
- if action then
- action(n,h,v,font)
- end
- end
+ mathaction(n,h,v,"hruleaction")
end
local function useraction(n,h,v)
@@ -746,7 +742,7 @@ implement {
actions = nodes.linefillers.enable
}
--- We add a bonus feature here:
+-- We add a bonus feature here (experiment):
interfaces.implement {
name = "autorule",
@@ -768,7 +764,7 @@ interfaces.implement {
t.depth
)
setattrlist(n,true)
- setoffsets(n,t.xoffset,t.yoffset)
+ setoffsets(n,t.xoffset,t.yoffset) -- ,t.left, t.right
local l = t.left
local r = t.right
if l then
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 044097573..bdc763ec3 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index b14d35490..6fafd9c50 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/trac-inf.lua b/tex/context/base/mkiv/trac-inf.lua
index 7a5c35fd5..a7823c251 100644
--- a/tex/context/base/mkiv/trac-inf.lua
+++ b/tex/context/base/mkiv/trac-inf.lua
@@ -214,13 +214,11 @@ function statistics.show()
-- collectgarbage("collect")
register("lua properties",function()
local hashchar = tonumber(status.luatex_hashchars)
- local hashtype = status.luatex_hashtype
local mask = lua.mask or "ascii"
- return format("engine: %s %s, used memory: %s, hash type: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
+ return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
jit and "luajit" or "lua",
LUAVERSION,
statistics.memused(),
- hashtype or "default",
hashchar and 2^hashchar or "unknown",
mask,
mask == "utf" and "τεχ" or "tex")
diff --git a/tex/context/base/mkiv/util-prs.lua b/tex/context/base/mkiv/util-prs.lua
index 08401f222..ba73a9481 100644
--- a/tex/context/base/mkiv/util-prs.lua
+++ b/tex/context/base/mkiv/util-prs.lua
@@ -24,8 +24,8 @@ local sortedhash = table.sortedhash
local sortedkeys = table.sortedkeys
local tohash = table.tohash
-local hashes = { }
-utilities.parsers.hashes = hashes
+local hashes = { }
+parsers.hashes = hashes
-- we share some patterns
local digit = R("09")
@@ -363,7 +363,7 @@ end
local pattern = Cf(Ct("") * Cg(C((1-S(", "))^1) * S(", ")^0 * Cc(true))^1,rawset)
-function utilities.parsers.settings_to_set(str)
+function parsers.settings_to_set(str)
return str and lpegmatch(pattern,str) or { }
end
@@ -393,13 +393,13 @@ local str = Cs(lpegpatterns.unquoted) + C((1-whitespace-equal)^1)
local setting = Cf( Carg(1) * (whitespace^0 * Cg(str * whitespace^0 * (equal * whitespace^0 * str + Cc(""))))^1,rawset)
local splitter = setting^1
-function utilities.parsers.options_to_hash(str,target)
+function parsers.options_to_hash(str,target)
return str and lpegmatch(splitter,str,1,target or { }) or { }
end
local splitter = lpeg.tsplitat(" ")
-function utilities.parsers.options_to_array(str)
+function parsers.options_to_array(str)
return str and lpegmatch(splitter,str) or { }
end
@@ -561,7 +561,7 @@ end
-- and this is a slightly patched version of a version posted by Philipp Gesang
--- local mycsvsplitter = utilities.parsers.rfc4180splitter()
+-- local mycsvsplitter = parsers.rfc4180splitter()
-- local crap = [[
-- first,second,third,fourth
@@ -601,11 +601,11 @@ function parsers.rfc4180splitter(specification)
end
end
--- utilities.parsers.stepper("1,7-",9,function(i) print(">>>",i) end)
--- utilities.parsers.stepper("1-3,7,8,9")
--- utilities.parsers.stepper("1-3,6,7",function(i) print(">>>",i) end)
--- utilities.parsers.stepper(" 1 : 3, ,7 ")
--- utilities.parsers.stepper("1:4,9:13,24:*",30)
+-- parsers.stepper("1,7-",9,function(i) print(">>>",i) end)
+-- parsers.stepper("1-3,7,8,9")
+-- parsers.stepper("1-3,6,7",function(i) print(">>>",i) end)
+-- parsers.stepper(" 1 : 3, ,7 ")
+-- parsers.stepper("1:4,9:13,24:*",30)
local function ranger(first,last,n,action)
if not first then
@@ -658,7 +658,7 @@ function parsers.unittoxml(str)
return lpegmatch(pattern,str)
end
--- print(utilities.parsers.unittotex("10^-32 %"),utilities.parsers.unittoxml("10^32 %"))
+-- print(parsers.unittotex("10^-32 %"),utilities.parsers.unittoxml("10^32 %"))
local cache = { }
local spaces = lpegpatterns.space^0
@@ -674,7 +674,7 @@ end)
local commalistiterator = cache[","]
-function utilities.parsers.iterator(str,separator)
+function parsers.iterator(str,separator)
local n = #str
if n == 0 then
return dummy
@@ -693,7 +693,7 @@ function utilities.parsers.iterator(str,separator)
end
end
--- for s in utilities.parsers.iterator("a b c,b,c") do
+-- for s in parsers.iterator("a b c,b,c") do
-- print(s)
-- end
@@ -725,7 +725,7 @@ local name = C((1-S(", "))^1)
local parser = (Carg(1) * name / initialize) * (S(", ")^1 * (Carg(1) * name / fetch))^0
local merge = Cf(parser,process)
-function utilities.parsers.mergehashes(hash,list)
+function parsers.mergehashes(hash,list)
return lpegmatch(merge,list,1,hash)
end
@@ -735,9 +735,9 @@ end
-- cc = { epsilon = 3 },
-- }
--
--- inspect(utilities.parsers.mergehashes(t,"aa, bb, cc"))
+-- inspect(parsers.mergehashes(t,"aa, bb, cc"))
-function utilities.parsers.runtime(time)
+function parsers.runtime(time)
if not time then
time = os.runtime()
end
@@ -759,7 +759,7 @@ local token = lbrace * C((1-rbrace)^1) * rbrace + C(anything^1)
local pattern = spacing * (method * spacing * apply + Carg(1)) * spacing * token
-function utilities.parsers.splitmethod(str,default)
+function parsers.splitmethod(str,default)
if str then
return lpegmatch(pattern,str,1,default or false)
else
@@ -767,9 +767,26 @@ function utilities.parsers.splitmethod(str,default)
end
end
--- print(utilities.parsers.splitmethod(" foo -> {bar} "))
--- print(utilities.parsers.splitmethod("foo->{bar}"))
--- print(utilities.parsers.splitmethod("foo->bar"))
--- print(utilities.parsers.splitmethod("foo"))
--- print(utilities.parsers.splitmethod("{foo}"))
--- print(utilities.parsers.splitmethod())
+-- print(parsers.splitmethod(" foo -> {bar} "))
+-- print(parsers.splitmethod("foo->{bar}"))
+-- print(parsers.splitmethod("foo->bar"))
+-- print(parsers.splitmethod("foo"))
+-- print(parsers.splitmethod("{foo}"))
+-- print(parsers.splitmethod())
+
+local pattern = Cf( Ct("") *
+ Cg(Cc("year") * cardinal)
+ * P("-") * Cg(Cc("month") * cardinal)
+ * P("-") * Cg(Cc("day") * cardinal)
+ * P(" ") * Cg(Cc("hour") * cardinal)
+ * P(":") * Cg(Cc("minute") * cardinal)
+ * (P(":") * Cg(Cc("sec") * cardinal))^-1
+, rawset)
+
+lpegpatterns.splittime = pattern
+
+function parsers.totime(str)
+ return lpegmatch(pattern,str)
+end
+
+-- print(os.time(parsers.totime("2019-03-05 12:12:12")))
diff --git a/tex/context/interface/mkii/keys-en.xml b/tex/context/interface/mkii/keys-en.xml
index a3606e38b..686a4dc06 100644
--- a/tex/context/interface/mkii/keys-en.xml
+++ b/tex/context/interface/mkii/keys-en.xml
@@ -590,6 +590,7 @@
<cd:variable name='understrike' value='understrike'/>
<cd:variable name='understrikes' value='understrikes'/>
<cd:variable name='unframed' value='unframed'/>
+ <cd:variable name='unicode' value='unicode'/>
<cd:variable name='unit' value='unit'/>
<cd:variable name='units' value='units'/>
<cd:variable name='unknown' value='unknown'/>
diff --git a/tex/context/interface/mkii/keys-nl.xml b/tex/context/interface/mkii/keys-nl.xml
index 1104e14c1..06df09bc5 100644
--- a/tex/context/interface/mkii/keys-nl.xml
+++ b/tex/context/interface/mkii/keys-nl.xml
@@ -590,6 +590,7 @@
<cd:variable name='understrike' value='understrike'/>
<cd:variable name='understrikes' value='understrikes'/>
<cd:variable name='unframed' value='unframed'/>
+ <cd:variable name='unicode' value='unicode'/>
<cd:variable name='unit' value='eenheid'/>
<cd:variable name='units' value='eenheden'/>
<cd:variable name='unknown' value='onbekend'/>
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 21de7d3fd..975f765a5 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 1fc327222..f0161868a 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 30328251f..5d9477553 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 : 02/24/19 17:23:33
+-- merge date : 02/26/19 20:04:01
do -- begin closure to overcome local limits and interference