summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-02-06 20:42:35 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-02-06 20:42:35 +0100
commit1687077b0a63417ad4dce58f6c869a6e115d9b72 (patch)
treeec1d4ac5ea55b732c13c12c0c0e67739afa93ef8 /tex/context/modules/mkiv
parent7ce2f30f31421eb46d07ff65cbf9fcbda1d6612a (diff)
downloadcontext-1687077b0a63417ad4dce58f6c869a6e115d9b72.tar.gz
2018-02-06 18:19:00
Diffstat (limited to 'tex/context/modules/mkiv')
-rw-r--r--tex/context/modules/mkiv/s-evohome.mkiv12
-rw-r--r--tex/context/modules/mkiv/s-fonts-coverage.lua52
-rw-r--r--tex/context/modules/mkiv/s-fonts-coverage.mkiv1
-rw-r--r--tex/context/modules/mkiv/s-present-original.mkiv2
-rw-r--r--tex/context/modules/mkiv/x-asciimath.lua5
5 files changed, 56 insertions, 16 deletions
diff --git a/tex/context/modules/mkiv/s-evohome.mkiv b/tex/context/modules/mkiv/s-evohome.mkiv
index 26abcfb59..1577517e5 100644
--- a/tex/context/modules/mkiv/s-evohome.mkiv
+++ b/tex/context/modules/mkiv/s-evohome.mkiv
@@ -272,14 +272,14 @@ end
-- os.execute([[mtxrun --script evohome --collect --presets=c:/data/develop/domotica/code/evohome-presets.lua]])
- local specification = {
- year = 2017,
- -- month = 11,
- presets = "c:/data/develop/domotica/evohome/evohome-presets.lua",
- }
+ -- local specification = {
+ -- year = 2017,
+ -- -- month = 11,
+ -- presets = "c:/data/develop/domotica/evohome/evohome-presets.lua",
+ -- }
-- moduledata.evohome.status (specification)
- moduledata.evohome.history(specification)
+ -- moduledata.evohome.history(specification)
local specification = {
year = 2018,
diff --git a/tex/context/modules/mkiv/s-fonts-coverage.lua b/tex/context/modules/mkiv/s-fonts-coverage.lua
index dd772d5f0..2408fc9a3 100644
--- a/tex/context/modules/mkiv/s-fonts-coverage.lua
+++ b/tex/context/modules/mkiv/s-fonts-coverage.lua
@@ -19,19 +19,37 @@ local char, bold, getvalue = context.char, context.bold, context.getvalue
local chardata = characters.data
-function moduledata.fonts.coverage.showcomparison(specification)
+function moduledata.fonts.coverage.showdifference(specification)
+ moduledata.fonts.coverage.showcomparison(specification,true)
+end
+
+function moduledata.fonts.coverage.showcomparison(specification,difference)
specification = interfaces.checkedspecification(specification)
local fontfiles = utilities.parsers.settings_to_array(specification.list or "")
local pattern = upper(specification.pattern or "")
+ local slot = specification.slot or ""
local present = { }
local names = { }
local files = { }
local chars = { }
+ local slots = false
- if not pattern then
+ if slot ~= "" then
+ slot = utilities.parsers.settings_to_array(slot)
+ for i=1,#slot do
+ local s = tonumber(slot[i])
+ if not s then
+ -- next one
+ elseif slots then
+ slots[s] = true
+ else
+ slots = { [s] = true }
+ end
+ end
+ elseif not pattern then
-- skip
elseif pattern == "" then
pattern = nil
@@ -80,11 +98,13 @@ function moduledata.fonts.coverage.showcomparison(specification)
table.concat(t," ")
}
- context.starttabulate { "|Tl" .. string.rep("|c",#names) .. "|Tl|" }
+ local nofnames = #names
+
+ context.starttabulate { "|Tl" .. string.rep("|c",nofnames) .. "|Tl|" }
NC()
bold("unicode")
NC()
- for i=1,#names do
+ for i=1,nofnames do
bold(i)
NC()
end
@@ -93,17 +113,35 @@ function moduledata.fonts.coverage.showcomparison(specification)
NR()
HL()
for k, v in table.sortedpairs(present) do
- if k <= 0 then
+ local skip = false
+ if difference then
+ local n = 0
+ for i=1,nofnames do
+ if chars[i][k] then
+ n= n + 1
+ end
+ end
+ skip = n == nofnames
+ end
+ if skip then
+ -- ignore
+ elseif k <= 0 then
-- ignore
elseif k >= 0x110000 then
logs.report("warning","weird character %U",k)
else
local description = chardata[k].description
- if not pattern or (pattern == k) or (description and lpegmatch(pattern,description)) then
+ local wantedslot = true
+ if slots then
+ wantedslot = slots[k]
+ elseif pattern then
+ wantedslot = pattern == k or (description and lpegmatch(pattern,description))
+ end
+ if wantedslot then
NC()
context("%05X",k)
NC()
- for i=1,#names do
+ for i=1,nofnames do
getvalue(names[i])
if chars[i][k] then
char(k)
diff --git a/tex/context/modules/mkiv/s-fonts-coverage.mkiv b/tex/context/modules/mkiv/s-fonts-coverage.mkiv
index 305bb9b7b..98a5c00a4 100644
--- a/tex/context/modules/mkiv/s-fonts-coverage.mkiv
+++ b/tex/context/modules/mkiv/s-fonts-coverage.mkiv
@@ -25,6 +25,7 @@
\registerctxluafile{s-fonts-coverage}{}
\installmodulecommandluasingle \showfontcomparison {moduledata.fonts.coverage.showcomparison}
+\installmodulecommandluasingle \showfontdifference {moduledata.fonts.coverage.showdifference}
\stopmodule
diff --git a/tex/context/modules/mkiv/s-present-original.mkiv b/tex/context/modules/mkiv/s-present-original.mkiv
index 809f7b2cb..1c5e94c85 100644
--- a/tex/context/modules/mkiv/s-present-original.mkiv
+++ b/tex/context/modules/mkiv/s-present-original.mkiv
@@ -57,7 +57,7 @@
% \definecolor [InteractionColor] [r=.1, g=.5, b=.8]
% \definecolor [ContrastColor] [r=.9, g=.5, b=.2]
-\definecolor [BackgroundColor] [r=.7, g=.7, b=.3]
+\definecolor [BackgroundColor] [r=.7, g=.7, b=.3]
\definecolor [InteractionColor] [r=.1, g=.5, b=.8]
\definecolor [ContrastColor] [r=.9, g=.5, b=.2]
diff --git a/tex/context/modules/mkiv/x-asciimath.lua b/tex/context/modules/mkiv/x-asciimath.lua
index 794cddbd1..02c2375d4 100644
--- a/tex/context/modules/mkiv/x-asciimath.lua
+++ b/tex/context/modules/mkiv/x-asciimath.lua
@@ -125,8 +125,9 @@ local reserved = {
["frac"] = { false, "\\frac", "binary" },
["stackrel"] = { false, "\\asciimathstackrel", "binary" },
["hat"] = { false, "\\widehat", "unary" },
- ["bar"] = { false, "\\overbar", "unary" },
- ["overbar"] = { false, "\\overbar", "unary" },
+ ["bar"] = { false, "\\overline", "unary" },
+ ["overbar"] = { false, "\\overline", "unary" },
+ ["overline"] = { false, "\\overline", "unary" },
["underline"] = { false, "\\underline", "unary" },
["ul"] = { false, "\\underline", "unary" },
["vec"] = { false, "\\overrightarrow", "unary" },