summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-04-18 19:27:46 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-04-18 19:27:46 +0200
commit4831ec8b98dbd0b637271f601c288960f9259bfc (patch)
tree9163b423a7b6f23b0249e923cab8e4a1f2ca18b0 /tex/context/base/mkiv
parent113a26a2838ace27514f6348ed0d41bf87724472 (diff)
downloadcontext-4831ec8b98dbd0b637271f601c288960f9259bfc.tar.gz
2021-04-18 18:07: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.lua105
-rw-r--r--tex/context/base/mkiv/luat-mac.lua2
-rw-r--r--tex/context/base/mkiv/mult-low.lua1
-rw-r--r--tex/context/base/mkiv/mult-prm.lua3
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24897 -> 24876 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin240711 -> 240761 bytes
8 files changed, 113 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 7bb390194..3fdf4202b 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{2021.04.14 22:55}
+\newcontextversion{2021.04.18 18:04}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 6fa606a95..2ce45e779 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{2021.04.14 22:55}
+\edef\contextversion{2021.04.18 18:04}
%D Kind of special:
diff --git a/tex/context/base/mkiv/core-con.lua b/tex/context/base/mkiv/core-con.lua
index 4bf1424bc..f1aa37a7c 100644
--- a/tex/context/base/mkiv/core-con.lua
+++ b/tex/context/base/mkiv/core-con.lua
@@ -1415,6 +1415,111 @@ data.es = data.spanish
-- print(translate(101))
-- print(translate(199))
+-- verbose swedish by Peter Kvillegard
+
+do
+
+ local words = {
+ [0] = "noll",
+ [1] = "ett",
+ [2] = "två",
+ [3] = "tre",
+ [4] = "fyra",
+ [5] = "fem",
+ [6] = "sex",
+ [7] = "sju",
+ [8] = "åtta",
+ [9] = "nio",
+ [10] = "tio",
+ [11] = "elva",
+ [12] = "tolv",
+ [13] = "tretton",
+ [14] = "fjorton",
+ [15] = "femton",
+ [16] = "sexton",
+ [17] = "sjutton",
+ [18] = "arton",
+ [19] = "nitton",
+ [20] = "tjugo",
+ [30] = "trettio",
+ [40] = "fyrtio",
+ [50] = "femtio",
+ [60] = "sextio",
+ [70] = "sjuttio",
+ [80] = "åttio",
+ [90] = "nittio",
+ [100] = "hundra",
+ [10^3] = "tusen",
+ [10^6] = "miljon",
+ [10^9] = "miljard",
+ [10^12] = "biljon",
+ [10^15] = "biljard",
+ }
+
+ local function translate(n,connector)
+ local w = words[n]
+ if w then
+ return w
+ else
+ local t = { }
+ local l = 0
+ -- group of three digits to words, e.g. 123 -> etthundratjugotre
+ local function triplets(n)
+ if floor(n/100) > 0 then
+ l = l + 1 ; t[l] = words[floor(n/100)]
+ l = l + 1 ; t[l] = words[100]
+ end
+ if n%100 > 20 then
+ l = l + 1 ; t[l] = words[n%100-n%10]
+ if n%10 > 0 then
+ l = l + 1 ; t[l] = words[n%10]
+ end
+ elseif n%100 > 0 then
+ l = l + 1 ; t[l] = words[n%100]
+ end
+ end
+ -- loops through 10^15,10^12,...10^3, extracting groups of three digits
+ -- to make words from, then adding names for order of magnitude
+ for i=15,3,-3 do
+ local triplet = floor(n/10^i)%10^3
+ if triplet > 0 then
+ -- grammar: "en" instead of "ett"
+ if i > 3 and triplet == 1 then
+ l = l + 1 ; t[l] = "en"
+ else
+ triplets(triplet)
+ end
+ -- grammar: plural form of "millions" etc
+ l = l + 1 ; t[l] = words[10^i]
+ if i > 3 and triplet > 1 then
+ l = l + 1 ; t[l] = "er"
+ end
+ end
+ end
+ -- add last group of three numbers (no word for magnitude)
+ n = n%1000
+ if n > 0 then
+ triplets(n)
+ end
+ t = concat(t," ")
+ -- grammar: spacing for numbers < 10^6 and repeated letters
+ if n < 10^6 then
+ t = gsub(t,"%stusen%s","tusen")
+ t = gsub(t,"etttusen","ettusen")
+ end
+ return t
+ end
+ end
+
+ data.swedish = {
+ words = words,
+ translate = translate,
+ }
+
+ data.sv = data.swedish
+
+end
+
-- verbose handler:
function converters.verbose.translate(n,language,connector)
diff --git a/tex/context/base/mkiv/luat-mac.lua b/tex/context/base/mkiv/luat-mac.lua
index 01857511c..fca59c993 100644
--- a/tex/context/base/mkiv/luat-mac.lua
+++ b/tex/context/base/mkiv/luat-mac.lua
@@ -85,6 +85,8 @@ local set = CONTEXTLMTXMODE > 0 and
return h .. "-"
elseif s == "spacer" then
return h .. "*"
+ elseif s == "keepspacer" then
+ return h .. ","
elseif s == "pickup" then
return h .. ":"
else
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index 05e5f28e5..78f864307 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -164,6 +164,7 @@ return {
"automaticpenaltyhyphenationmodecode", "explicitpenaltyhyphenationmodecode",
"permitgluehyphenationmodecode", "permitallhyphenationmodecode", "permitmathreplacehyphenationmodecode",
"forcecheckhyphenationmodecode", "lazyligatureshyphenationmodecode", "forcehandlerhyphenationmodecode",
+ "feedbackcompoundhyphenationmodecode", "ignoreboundshyphenationmodecode",
--
"normalizelinecode", "parindentskipcode", "swaphangindentcode", "swapparsshapecode", "breakafterdircode", "removemarginkernscode",
"clipwidthcode", "flattendiscretionariescode",
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index c2b11df3d..855b4bc1f 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -315,6 +315,7 @@ return {
"glyphyscale",
"gtoksapp",
"gtokspre",
+ "hccode",
"hjcode",
"hpack",
"hyphenationmin",
@@ -593,6 +594,7 @@ return {
"baselineskip",
"batchmode",
"begingroup",
+ "beginsimplegroup",
"belowdisplayshortskip",
"belowdisplayskip",
"binoppenalty",
@@ -640,6 +642,7 @@ return {
"endgroup",
"endinput",
"endlinechar",
+ "endsimplegroup",
"eqno",
"errhelp",
"errmessage",
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 69556e09e..9d4db8781 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 615e7d326..5963b5c89 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ