summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-02-20 15:15:08 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-02-20 15:15:08 +0100
commit93dce457ab8769ef45a56b2e0f7ad447d7a47a83 (patch)
tree2374ca50eceb2aab1a5d0af0ba26dc129eb19ab6 /tex/context/base/mkiv
parentb13dd166ce8563c60c10affc97ab28940d6a7776 (diff)
downloadcontext-93dce457ab8769ef45a56b2e0f7ad447d7a47a83.tar.gz
2016-02-20 14:58:00
Diffstat (limited to 'tex/context/base/mkiv')
-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/core-con.lua38
-rw-r--r--tex/context/base/mkiv/core-con.mkiv17
-rw-r--r--tex/context/base/mkiv/enco-ini.mkiv4
-rw-r--r--tex/context/base/mkiv/grph-rul.lua48
-rw-r--r--tex/context/base/mkiv/lang-def.mkiv2
-rw-r--r--tex/context/base/mkiv/lang-frq-de.lua12
-rw-r--r--tex/context/base/mkiv/lang-frq-en.lua24
-rw-r--r--tex/context/base/mkiv/lang-frq-nl.lua12
-rw-r--r--tex/context/base/mkiv/lang-lab.mkiv10
-rw-r--r--tex/context/base/mkiv/math-fen.mkiv2
-rw-r--r--tex/context/base/mkiv/mult-def.lua9
-rw-r--r--tex/context/base/mkiv/mult-low.lua1
-rw-r--r--tex/context/base/mkiv/page-mix.mkiv31
-rw-r--r--tex/context/base/mkiv/spac-hor.mkiv19
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin9030 -> 8952 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin266584 -> 266570 bytes
-rw-r--r--tex/context/base/mkiv/syst-fnt.mkiv6
-rw-r--r--tex/context/base/mkiv/syst-ini.mkiv3
-rw-r--r--tex/context/base/mkiv/typo-del.mkiv7
-rw-r--r--tex/context/base/mkiv/typo-lan.mkiv3
22 files changed, 188 insertions, 64 deletions
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index d4446f1ea..c3398f101 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.02.17 11:11}
+\newcontextversion{2016.02.20 14:55}
%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 f042da7c5..a69210b70 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.02.17 11:11}
+\edef\contextversion{2016.02.20 14:55}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/core-con.lua b/tex/context/base/mkiv/core-con.lua
index 416e7f630..53f9734dc 100644
--- a/tex/context/base/mkiv/core-con.lua
+++ b/tex/context/base/mkiv/core-con.lua
@@ -17,7 +17,7 @@ slower but look nicer this way.</p>
--ldx]]--
local floor, date, time, concat = math.floor, os.date, os.time, table.concat
-local lower, rep, match, gsub = string.lower, string.rep, string.match, string.gsub
+local lower, upper, rep, match, gsub = string.lower, string.upper, string.rep, string.match, string.gsub
local utfchar, utfbyte = utf.char, utf.byte
local tonumber, tostring = tonumber, tostring
local P, C, Cs, lpegmatch = lpeg.P, lpeg.C, lpeg.Cs, lpeg.match
@@ -1132,6 +1132,9 @@ local v_weekday = variables.weekday
local v_referral = variables.referral
local v_space = variables.space
+local v_MONTH = upper(v_month)
+local v_WEEKDAY = upper(v_weekday)
+
local convert = converters.convert
local days = { -- not variables.sunday
@@ -1205,6 +1208,16 @@ implement {
-- day:ord month:mmem
-- j and jj obsolete
+local spaced = {
+ [v_year] = true,
+ [v_month] = true,
+ [v_MONTH] = true,
+ [v_day] = true,
+ [v_weekday] = true,
+ [v_WEEKDAY] = true,
+ [v_day] = true,
+}
+
local function currentdate(str,currentlanguage) -- second argument false : no label
local list = utilities.parsers.settings_to_array(str)
local splitlabel = languages.labels.split or string.itself -- we need to get the loading order right
@@ -1229,16 +1242,14 @@ local function currentdate(str,currentlanguage) -- second argument false : no la
elseif plus == "mnem" then
mnemonic = true
end
- if not auto and (tag == v_year or tag == v_month or tag == v_day or tag == v_weekday) then
+ if not auto and spaced[tag] then
context.space()
end
auto = false
- if tag == v_year or tag == "y" then
+ if tag == v_year or tag == "y" or tag == "Y" then
context(year)
- elseif tag == "yy" then
+ elseif tag == "yy" or tag == "YY" then
context("%02i",year % 100)
- elseif tag == "Y" then
- context(year)
elseif tag == v_month or tag == "m" then
if currentlanguage == false then
context(months[month] or "unknown")
@@ -1247,6 +1258,14 @@ local function currentdate(str,currentlanguage) -- second argument false : no la
else
context.labeltext(monthname(month))
end
+ elseif tag == v_MONTH then
+ if currentlanguage == false then
+ context.WORD(months[month] or "unknown")
+ elseif mnemonic then
+ context.LABELTEXT(monthmnem(month))
+ else
+ context.LABELTEXT(monthname(month))
+ end
elseif tag == "mm" then
context("%02i",month)
elseif tag == "M" then
@@ -1271,6 +1290,13 @@ local function currentdate(str,currentlanguage) -- second argument false : no la
else
context.labeltext(days[wd] or "unknown")
end
+ elseif tag == v_WEEKDAY then
+ local wd = weekday(day,month,year)
+ if currentlanguage == false then
+ context.WORD(days[wd] or "unknown")
+ else
+ context.LABELTEXT(days[wd] or "unknown")
+ end
elseif tag == "W" then
context(weekday(day,month,year))
elseif tag == v_referral then
diff --git a/tex/context/base/mkiv/core-con.mkiv b/tex/context/base/mkiv/core-con.mkiv
index afd3f34c4..b440672bb 100644
--- a/tex/context/base/mkiv/core-con.mkiv
+++ b/tex/context/base/mkiv/core-con.mkiv
@@ -242,8 +242,8 @@
%D \showsetup{weekday}
%D \showsetup{WEEKDAY}
-\unexpanded\def\weekday#1{\clf_day\numexpr#1\relax}
-\unexpanded\def\WEEKDAY#1{\WORD{\clf_day\numexpr#1\relax}}
+\unexpanded\def\weekday#1{\clf_dayname\numexpr#1\relax}
+\unexpanded\def\WEEKDAY#1{\WORD{\clf_dayname\numexpr#1\relax}}
%D \macros
%D {getdayoftheweek, dayoftheweek}
@@ -325,8 +325,8 @@
%D This macro takes care of proper spacing and delivers for instance:
%D
%D \startbuffer
-%D \currentdate[weekday,day,month,year] % still dutch example
-%D \currentdate[WEEKDAY,day,MONTH,year] % still dutch example
+%D \currentdate[weekday,day,month,year]
+%D \currentdate[WEEKDAY,day,MONTH,year]
%D \stopbuffer
%D
%D \startlines
@@ -467,7 +467,6 @@
\unexpanded\def\syst_converters_current_time_nop
{\normalexpanded{\syst_converters_current_time_yes[\currenttimespecification]}}
-
%D Because we're dealing with dates, we also introduce a few day loops:
%D
%D \starttyping
@@ -607,14 +606,15 @@
% \doloop{\doifelseconversionnumber{ctx}{\recurselevel}{[\recurselevel]}{\exitloop}}
%D \macros
-%D {ordinaldaynumber, highordinalstr, ordinalstr}
+%D {ordinalnumber, highordinalstr, ordinalstr}
%D
%D Efficient general ordinal number converters are sometimes difficult to
%D implement. Fortunately dates never exceed the number~31.
\def\highordinalstr #1{\high{\notsmallcapped{#1}}}
\def\ordinalstr #1{\notsmallcapped{#1}}
-\def\ordinaldaynumber #1{\clf_ordinal\numexpr#1\relax{\currentlanguage}}
+\def\ordinalnumber #1{\clf_ordinal\numexpr#1\relax{\currentlanguage}}
+\def\Ordinalnumber #1{\Words{\clf_ordinal\numexpr#1\relax{\currentlanguage}}}
\def\verbosenumber #1{\clf_verbose\numexpr#1\relax{\currentlanguage}}
\def\VerboseNumber #1{\Words{\clf_verbose\numexpr#1\relax{\currentlanguage}}}
@@ -660,6 +660,9 @@
\defineconversion [\v!Word] [\VerboseNumber]
\defineconversion [\v!Words] [\VerboseNumber]
+\defineconversion[\v!ordinal] [\ordinalnumber]
+\defineconversion[\v!Ordinal] [\Ordinalnumber]
+
\defineconversion [n] [\numbers]
\defineconversion [N] [\Numbers]
\defineconversion [m] [\mediaeval]
diff --git a/tex/context/base/mkiv/enco-ini.mkiv b/tex/context/base/mkiv/enco-ini.mkiv
index f15fd1616..835ee61f5 100644
--- a/tex/context/base/mkiv/enco-ini.mkiv
+++ b/tex/context/base/mkiv/enco-ini.mkiv
@@ -281,6 +281,10 @@
% some more
+\ifdefined\softhyphen \else
+ \let\softhyphen\-
+\fi
+
\def\hyphen {\softhyphen}
\def\compoundwordmark {\hyphen}
\def\cwm {\hyphen}
diff --git a/tex/context/base/mkiv/grph-rul.lua b/tex/context/base/mkiv/grph-rul.lua
index c0ba5f9d8..4ca36b677 100644
--- a/tex/context/base/mkiv/grph-rul.lua
+++ b/tex/context/base/mkiv/grph-rul.lua
@@ -21,6 +21,11 @@ local a_color = attributes.private('color')
local a_transparency = attributes.private('transparency')
local a_colorspace = attributes.private('colormodel')
+local mpcolor = attributes.colors.mpcolor
+
+local floor = math.floor
+local random = math.random
+
do
local simplemetapost = metapost.simple
@@ -63,16 +68,27 @@ do
endfig ;
]]
+ local predefined = {
+ ["fake:word"] = [[
+fill unitsquare xscaled RuleWidth yscaled RuleHeight withcolor RuleColor ;
+draw (0,RuleDepth+RuleThickness/2) -- (RuleWidth,RuleDepth+RuleThickness/2) withpen pencircle scaled RuleThickness withcolor white ;
+ ]],
+ ["fake:rule"] = [[
+fill unitsquare xscaled RuleWidth yscaled RuleHeight withcolor RuleColor ;
+ ]],
+ }
+
ruleactions.mp = function(p,h,v,i,n)
+ local name = p.name
local code = makecode {
- data = p.data,
+ data = name and predefined[name] or p.data or "",
width = p.width * bpfactor,
height = p.height * bpfactor,
depth = p.depth * bpfactor,
factor = (p.factor or 0) * bpfactor, -- needs checking
offset = p.offset or 0,
line = (p.line or 65536) * bpfactor,
- color = attributes.colors.mpcolor(p.ma,p.ca,p.ta),
+ color = mpcolor(p.ma,p.ca,p.ta),
}
local m = cache[code]
if m and m ~= "" then
@@ -129,6 +145,7 @@ interfaces.implement {
{ "line", "dimension" },
{ "type", "string" },
{ "data", "string" },
+ { "name", "string" },
} } ,
actions = function(t)
if t.type == "mp" then
@@ -141,3 +158,30 @@ interfaces.implement {
end
}
+interfaces.implement {
+ name = "fakeword",
+ arguments = { {
+ { "factor", "dimension" },
+ { "name", "string" }, -- can be type
+ { "min", "dimension" },
+ { "max", "dimension" },
+ { "n", "integer" },
+ } } ,
+ actions = function(t)
+ local factor = t.factor or 0
+ local rule = userrule {
+ height = 1.25*factor,
+ depth = 0.25*factor,
+ width = floor(random(t.min,t.max)/10000) * 10000,
+ line = 0.10*factor,
+ ma = getattribute(a_colorspace) or 1,
+ ca = getattribute(a_color),
+ ta = getattribute(a_transparency),
+ type = "mp",
+ name = t.name,
+ }
+ context(rule)
+ end
+}
+
+
diff --git a/tex/context/base/mkiv/lang-def.mkiv b/tex/context/base/mkiv/lang-def.mkiv
index 895aa27e5..e4906096e 100644
--- a/tex/context/base/mkiv/lang-def.mkiv
+++ b/tex/context/base/mkiv/lang-def.mkiv
@@ -640,8 +640,6 @@
\installlanguage [\s!portuguese] [\s!pt]
\installlanguage [\s!romanian] [\s!ro]
-\defineconversion [\s!fr] [\v!day:mnem] [\frordinaldaynumber]
-
% Vietnamese Language
\installlanguage
diff --git a/tex/context/base/mkiv/lang-frq-de.lua b/tex/context/base/mkiv/lang-frq-de.lua
index 3733f39f9..5f5794258 100644
--- a/tex/context/base/mkiv/lang-frq-de.lua
+++ b/tex/context/base/mkiv/lang-frq-de.lua
@@ -2,11 +2,11 @@ return {
language = "de",
source = "http://www.blankenburg.de/gat/pages/fach/info/analyse2.htm",
frequencies = {
- [0x0061] = 6.47, [0x0062] = 1.93, [0x0063] = 2.68, [0x0064] = 4.83, [0x0065] = 17.48,
- [0x0066] = 1.65, [0x0067] = 3.06, [0x0068] = 4.23, [0x0069] = 7.73, [0x006A] = 0.27,
- [0x006B] = 1.46, [0x006C] = 3.49, [0x006D] = 2.58, [0x006E] = 9.84, [0x006F] = 2.98,
- [0x0070] = 0.96, [0x0071] = 0.02, [0x0072] = 7.54, [0x0073] = 6.83, [0x0074] = 6.13,
- [0x0075] = 4.17, [0x0076] = 0.94, [0x0077] = 1.48, [0x0078] = 0.04, [0x0079] = 0.08,
- [0x007A] = 1.14,
+ [0x61] = 6.47, [0x62] = 1.93, [0x63] = 2.68, [0x64] = 4.83, [0x65] = 17.48,
+ [0x66] = 1.65, [0x67] = 3.06, [0x68] = 4.23, [0x69] = 7.73, [0x6A] = 0.27,
+ [0x6B] = 1.46, [0x6C] = 3.49, [0x6D] = 2.58, [0x6E] = 9.84, [0x6F] = 2.98,
+ [0x70] = 0.96, [0x71] = 0.02, [0x72] = 7.54, [0x73] = 6.83, [0x74] = 6.13,
+ [0x75] = 4.17, [0x76] = 0.94, [0x77] = 1.48, [0x78] = 0.04, [0x79] = 0.08,
+ [0x7A] = 1.14,
}
}
diff --git a/tex/context/base/mkiv/lang-frq-en.lua b/tex/context/base/mkiv/lang-frq-en.lua
index 9e18d7166..5d2cfed4f 100644
--- a/tex/context/base/mkiv/lang-frq-en.lua
+++ b/tex/context/base/mkiv/lang-frq-en.lua
@@ -2,12 +2,12 @@
-- language = "en",
-- source = "http://caislab.icu.ac.kr/course/2001/spring/ice605/down/010306.pdf",
-- frequencies = {
--- [0x0061] = 8.2, [0x0062] = 1.5, [0x0063] = 2.8, [0x0064] = 4.3, [0x0065] = 12.7,
--- [0x0066] = 2.2, [0x0067] = 2.0, [0x0068] = 6.1, [0x0069] = 7.0, [0x006A] = 0.2,
--- [0x006B] = 0.8, [0x006C] = 4.0, [0x006D] = 2.4, [0x006E] = 6.7, [0x006F] = 7.5,
--- [0x0070] = 1.9, [0x0071] = 0.1, [0x0072] = 6.0, [0x0073] = 6.3, [0x0074] = 9.1,
--- [0x0075] = 2.8, [0x0076] = 1.0, [0x0077] = 2.3, [0x0078] = 0.1, [0x0079] = 2.0,
--- [0x007A] = 0.1,
+-- [0x61] = 8.2, [0x62] = 1.5, [0x63] = 2.8, [0x64] = 4.3, [0x65] = 12.7,
+-- [0x66] = 2.2, [0x67] = 2.0, [0x68] = 6.1, [0x69] = 7.0, [0x6A] = 0.2,
+-- [0x6B] = 0.8, [0x6C] = 4.0, [0x6D] = 2.4, [0x6E] = 6.7, [0x6F] = 7.5,
+-- [0x70] = 1.9, [0x71] = 0.1, [0x72] = 6.0, [0x73] = 6.3, [0x74] = 9.1,
+-- [0x75] = 2.8, [0x76] = 1.0, [0x77] = 2.3, [0x78] = 0.1, [0x79] = 2.0,
+-- [0x7A] = 0.1,
-- }
-- }
@@ -15,12 +15,12 @@ return {
language = "en",
source = "http://www.blankenburg.de/gat/pages/fach/info/analyse2.htm",
frequencies = {
- [0x0061] = 8.04, [0x0062] = 1.54, [0x0063] = 3.06, [0x0064] = 3.99, [0x0065] = 12.51,
- [0x0066] = 2.30, [0x0067] = 1.96, [0x0068] = 5.49, [0x0069] = 7.26, [0x006A] = 0.16,
- [0x006B] = 0.67, [0x006C] = 4.14, [0x006D] = 2.53, [0x006E] = 7.09, [0x006F] = 7.60,
- [0x0070] = 2.00, [0x0071] = 0.11, [0x0072] = 6.12, [0x0073] = 6.54, [0x0074] = 9.25,
- [0x0075] = 2.71, [0x0076] = 0.99, [0x0077] = 1.92, [0x0078] = 0.19, [0x0079] = 1.73,
- [0x007A] = 0.09,
+ [0x61] = 8.04, [0x62] = 1.54, [0x63] = 3.06, [0x64] = 3.99, [0x65] = 12.51,
+ [0x66] = 2.30, [0x67] = 1.96, [0x68] = 5.49, [0x69] = 7.26, [0x6A] = 0.16,
+ [0x6B] = 0.67, [0x6C] = 4.14, [0x6D] = 2.53, [0x6E] = 7.09, [0x6F] = 7.60,
+ [0x70] = 2.00, [0x71] = 0.11, [0x72] = 6.12, [0x73] = 6.54, [0x74] = 9.25,
+ [0x75] = 2.71, [0x76] = 0.99, [0x77] = 1.92, [0x78] = 0.19, [0x79] = 1.73,
+ [0x7A] = 0.09,
}
}
diff --git a/tex/context/base/mkiv/lang-frq-nl.lua b/tex/context/base/mkiv/lang-frq-nl.lua
index 7b640b779..a7ba75376 100644
--- a/tex/context/base/mkiv/lang-frq-nl.lua
+++ b/tex/context/base/mkiv/lang-frq-nl.lua
@@ -2,11 +2,11 @@ return {
language = "nl",
source = "http://www.onzetaal.nl/advies/letterfreq.html",
frequencies = {
- [0x0061] = 7.47, [0x0062] = 1.58, [0x0063] = 1.24, [0x0064] = 5.93, [0x0065] = 18.91,
- [0x0066] = 0.81, [0x0067] = 3.40, [0x0068] = 2.38, [0x0069] = 6.50, [0x006A] = 1.46,
- [0x006B] = 2.25, [0x006C] = 3.57, [0x006D] = 2.21, [0x006E] = 10.03, [0x006F] = 6.06,
- [0x0070] = 1.57, [0x0071] = 0.009, [0x0072] = 6.41, [0x0073] = 3.73, [0x0074] = 6.79,
- [0x0075] = 1.99, [0x0076] = 2.85, [0x0077] = 1.52, [0x0078] = 0.04, [0x0079] = 0.035,
- [0x007A] = 1.39,
+ [0x61] = 7.47, [0x62] = 1.58, [0x63] = 1.24, [0x64] = 5.93, [0x65] = 18.91,
+ [0x66] = 0.81, [0x67] = 3.40, [0x68] = 2.38, [0x69] = 6.50, [0x6A] = 1.46,
+ [0x6B] = 2.25, [0x6C] = 3.57, [0x6D] = 2.21, [0x6E] = 10.03, [0x6F] = 6.06,
+ [0x70] = 1.57, [0x71] = 0.009, [0x72] = 6.41, [0x73] = 3.73, [0x74] = 6.79,
+ [0x75] = 1.99, [0x76] = 2.85, [0x77] = 1.52, [0x78] = 0.04, [0x79] = 0.035,
+ [0x7A] = 1.39,
}
}
diff --git a/tex/context/base/mkiv/lang-lab.mkiv b/tex/context/base/mkiv/lang-lab.mkiv
index 17d583b0e..26c10086f 100644
--- a/tex/context/base/mkiv/lang-lab.mkiv
+++ b/tex/context/base/mkiv/lang-lab.mkiv
@@ -151,17 +151,13 @@
\def\dummytextprefix {\empty\empty}
%D \macros
-%D {headtext,
-%D labeltext, leftlabeltext, rightlabeltext, labeltexts,
-%D LABELTEXT, LEFTLABELTEXT, RIGHTLABELTEXT, LABELTEXTS}
+%D {headtext, labeltext, leftlabeltext, rightlabeltext, labeltexts}
%D
%D Once defined, head and label texts can be called upon using:
%D
%D \showsetup{headtext}
%D \showsetup{labeltext}
%D
-%D The latter one has an upcased alternative \type{\LABELTEXT}.
-%D
%D \macros
%D {presetheadtext,presetlabeltext}
%D
@@ -382,4 +378,8 @@
\setuplabeltext [\s!de] [and-1={{, }}, and-2={{ und }}] % 1, 2 und 3
\setuplabeltext [\s!hr] [and-1={{, }}, and-2={{ i }}] % 1, 2 i 3
+%D Goodie (handy at \LUA\ end):
+
+\unexpanded\def\LABELTEXT#1{\WORD{\labeltext{#1}}} % only for simple cases!
+
\protect \endinput
diff --git a/tex/context/base/mkiv/math-fen.mkiv b/tex/context/base/mkiv/math-fen.mkiv
index cff95db62..f4994479c 100644
--- a/tex/context/base/mkiv/math-fen.mkiv
+++ b/tex/context/base/mkiv/math-fen.mkiv
@@ -330,6 +330,8 @@
\installmathfencepair \bgroup \Lbrace \egroup \Rbrace
\installmathfencepair \egroup \Rbracemirrored \bgroup \Lbracemirrored
+\installmathfencepair \letteropenbrace \Lbrace \letterclosebrace \Rbrace % as we escape in mp textexts
+
\installmathfencepair . \Lnothing . \Rnothing
\installmathfencepair . \Rnothingmirrored . \Lnothingmirrored
diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua
index b82375d0a..a8f19c567 100644
--- a/tex/context/base/mkiv/mult-def.lua
+++ b/tex/context/base/mkiv/mult-def.lua
@@ -11640,6 +11640,15 @@ return {
},
},
["variables"]={
+ ["aside"]={
+ ["en"]="aside",
+ },
+ ["ordinal"]={
+ ["en"]="ordinal",
+ },
+ ["Ordinal"]={
+ ["en"]="Ordinal",
+ },
["Addition"]={
["cs"]="Pridavek",
["de"]="Zusatz",
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index f71a8d50f..b39d48e47 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -230,6 +230,7 @@ return {
"scratchboxone", "scratchboxtwo", "scratchboxthree",
"scratchnx", "scratchny", "scratchmx", "scratchmy",
"scratchunicode",
+ "scratchmin", "scratchmax",
--
"scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip",
--
diff --git a/tex/context/base/mkiv/page-mix.mkiv b/tex/context/base/mkiv/page-mix.mkiv
index ba397e5ed..77bc6ea6c 100644
--- a/tex/context/base/mkiv/page-mix.mkiv
+++ b/tex/context/base/mkiv/page-mix.mkiv
@@ -72,6 +72,7 @@
\c!internalgrid=\v!line,
\c!step=.25\lineheight, % needs some experimenting
%\c!splitmethod=\v!fixed, % will be default
+ \c!direction=\v!normal, % new (also todo in the new columnsets)
\c!method=\ifinner\s!box\else\s!otr\fi] % automatic as suggested by WS
\let\startmixedcolumns\relax % defined later
@@ -604,14 +605,13 @@
% the framed needs a reset of strut, align, setups etc
\mixedcolumnseparatorheight\ht\scratchbox
\mixedcolumnseparatordepth \dp\scratchbox
- \inheritedmixedcolumnsframedbox\currentmixedcolumns\scratchbox
- % optional
- \ifnum\recurselevel<\c_page_mix_n_of_columns
- \ifcsname\??mixedcolumnsseparator\p_separator\endcsname
- \page_mix_command_inject_separator
- \else
- \hss
- \fi
+ \inheritedmixedcolumnsframedbox\currentmixedcolumns\scratchbox}
+
+\def\page_mix_routine_package_separate
+ {\ifcsname\??mixedcolumnsseparator\p_separator\endcsname
+ \page_mix_command_inject_separator
+ \else
+ \hss
\fi}
\unexpanded\def\page_mix_routine_package
@@ -631,7 +631,20 @@
\page_mix_hbox to \d_page_mix_max_width \bgroup
\edef\p_separator{\mixedcolumnsparameter\c!separator}%
\mixedcolumnseparatorwidth\d_page_mix_distance % \mixedcolumnsparameter\c!rulethickness\relax
- \dorecurse\c_page_mix_n_of_columns\page_mix_routine_package_step
+ \edef\p_direction{\mixedcolumnsparameter\c!direction}%
+ \ifx\p_direction\v!reverse
+ \dostepwiserecurse\c_page_mix_n_of_columns\plusone\minusone
+ {\page_mix_routine_package_step
+ \ifnum\recurselevel>\plusone
+ \page_mix_routine_package_separate
+ \fi}%
+ \else
+ \dorecurse\c_page_mix_n_of_columns
+ {\page_mix_routine_package_step
+ \ifnum\recurselevel>\c_page_mix_n_of_columns
+ \page_mix_routine_package_separate
+ \fi}%
+ \fi
\egroup
\egroup}
diff --git a/tex/context/base/mkiv/spac-hor.mkiv b/tex/context/base/mkiv/spac-hor.mkiv
index 94e45f47a..1ccd5ac9f 100644
--- a/tex/context/base/mkiv/spac-hor.mkiv
+++ b/tex/context/base/mkiv/spac-hor.mkiv
@@ -415,7 +415,7 @@
{\doifelsenextoptionalcs\spac_spacecodes_setup_yes\spac_spacecodes_setup_nop}
\def\spac_spacecodes_setup_yes[#1]%
- {\csname\??spacecodemethod#1\endcsname
+ {\begincsname\??spacecodemethod#1\endcsname
\updateraggedskips}
\def\spac_spacecodes_setup_nop
@@ -452,16 +452,25 @@
\let\normalspaceprimitive=\ % space-comment is really needed
-% hm ...
+%D As the \type{\ } is convenient in:
+%D
+%D \starttyping
+%D \TEX\space x\crlf
+%D \TEX\ x\crlf
+%D \TEX{} x\crlf
+%D \stoptyping
+%D
+%D from now on we treat it as anormal space and not as a space with \type
+%D {sfcode} 1000.
-% \unexpanded\def\normalnotobeyedspace{\mathortext\normalspaceprimitive\space} % no \dontleavehmode\space (else no frenchspacing)
-% \let\ =\normalnotobeyedspace
+\unexpanded\def\normalnotobeyedspace{\mathortext\normalspaceprimitive\space} % no \dontleavehmode\space (else no frenchspacing)
+\let\ =\normalnotobeyedspace
% Because I strip spaces at the end of lines (in the editor) we need a bit of
% a trick to define slash+newline, so \space and \<newline> are the same
% We need to be careful with \ and \space and the definition of ~ which uses \ as
-% we need to associate unicode spacing with it. There is some messy thing that that
+% we need to associate unicode spacing with it. There is some messy aspect that
% I forgot to note down so I will revision the \ once I ran into it again.
% \ruledhbox spread 10pt {\frenchspacing xx xx\ X}
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 1ec0e8310..f889b0ba7 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 7670ca93c..9b8900816 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/syst-fnt.mkiv b/tex/context/base/mkiv/syst-fnt.mkiv
index 625b952b7..cacc5f517 100644
--- a/tex/context/base/mkiv/syst-fnt.mkiv
+++ b/tex/context/base/mkiv/syst-fnt.mkiv
@@ -40,6 +40,12 @@
\def\currentspaceskip {\interwordspace\s!plus\interwordstretch\s!minus\interwordshrink\relax}
+\def\currentspacevalue {\the\interwordspace
+ \ifzeropt\interwordstretch\else{ plus }\the\interwordstretch\fi
+ \ifzeropt\interwordshrink \else{ minus }\the\interwordshrink \fi}
+
+\def\usedspacevalue {\ifzeropt\spaceskip\the\spaceskip\else\currentspacevalue\fi}
+
\def\mathstacktotal {\dimexpr\Umathstacknumup\scriptstyle+\Umathstackdenomdown\scriptstyle\relax}
\def\mathstackvgap {\Umathstackvgap\scriptstyle}
diff --git a/tex/context/base/mkiv/syst-ini.mkiv b/tex/context/base/mkiv/syst-ini.mkiv
index 710ba13f9..ffaada966 100644
--- a/tex/context/base/mkiv/syst-ini.mkiv
+++ b/tex/context/base/mkiv/syst-ini.mkiv
@@ -361,6 +361,9 @@
\newcount\scratchmx
\newcount\scratchmy
+\newcount\scratchmin
+\newcount\scratchmax
+
\newcount\scratchunicode
\newdimen\scratchleftskip
diff --git a/tex/context/base/mkiv/typo-del.mkiv b/tex/context/base/mkiv/typo-del.mkiv
index c27b54f84..eb51a06e1 100644
--- a/tex/context/base/mkiv/typo-del.mkiv
+++ b/tex/context/base/mkiv/typo-del.mkiv
@@ -341,7 +341,7 @@
\def\typo_delimited_start_other
{\edef\p_delimited_repeat{\delimitedtextparameter\c!repeat}%
\ifx\p_delimited_repeat\v!yes
- \let\typo_delimited_repeat\typo_delimited_repeat_ideed
+ \let\typo_delimited_repeat\typo_delimited_repeat_indeed
\else
\let\typo_delimited_repeat\relax
\fi
@@ -757,6 +757,11 @@
\c!middle={\symbol[\c!middlespeech]},
\c!right={\symbol[\c!rightspeech]}]
+\definedelimitedtext
+ [\v!aside]
+ [\c!left={\symbol[\c!leftsentence]},
+ \c!right={\symbol[\c!rightsentence]}]
+
% how do we call an tight quote
%
% \definedelimitedtext
diff --git a/tex/context/base/mkiv/typo-lan.mkiv b/tex/context/base/mkiv/typo-lan.mkiv
index 8b633957b..6bc052b99 100644
--- a/tex/context/base/mkiv/typo-lan.mkiv
+++ b/tex/context/base/mkiv/typo-lan.mkiv
@@ -30,7 +30,8 @@
\def\charwidthlanguage{\currentmainlanguage}
-\def\averagecharwidth{\dimexpr\clf_averagecharwidth{\charwidthlanguage}\scaledpoint\relax}
+\def\averagecharwidth {\dimexpr\clf_averagecharwidth{\charwidthlanguage}\scaledpoint\relax}
+\def\languagecharwidth#1{\dimexpr\clf_averagecharwidth{#1}\scaledpoint\relax}
\protect