summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2010-05-12 18:43:00 +0200
committerHans Hagen <pragma@wxs.nl>2010-05-12 18:43:00 +0200
commit8c0bb98e13632d6caf24fd08261ff4bca4fdd4eb (patch)
tree79c561dbc438a8e8089e289aa89710ee4783cee1
parent8ad1a9bed2cf3271f1922759060c2ba1c8e3ced1 (diff)
downloadcontext-8c0bb98e13632d6caf24fd08261ff4bca4fdd4eb.tar.gz
beta 2010.05.12 18:43
-rw-r--r--scripts/context/lua/luatools.lua27
-rw-r--r--scripts/context/lua/mtx-mptopdf.lua2
-rw-r--r--scripts/context/lua/mtx-update.lua1
-rw-r--r--scripts/context/lua/mtxrun.lua27
-rw-r--r--scripts/context/stubs/mswin/luatools.lua27
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua27
-rwxr-xr-xscripts/context/stubs/unix/luatools27
-rwxr-xr-xscripts/context/stubs/unix/mtxrun27
-rw-r--r--tex/context/base/back-pdf.lua1
-rw-r--r--tex/context/base/bibl-tra.mkiv1
-rw-r--r--tex/context/base/buff-ini.lua15
-rw-r--r--tex/context/base/buff-ver.mkiv75
-rw-r--r--tex/context/base/colo-ini.lua6
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context-characters.lmx2
-rw-r--r--tex/context/base/context-debug.lmx2
-rw-r--r--tex/context/base/context-error.lmx2
-rw-r--r--tex/context/base/context-fonttest.lmx2
-rw-r--r--tex/context/base/context-help.lmx2
-rw-r--r--tex/context/base/context-timing.lmx2
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/core-def.mkiv2
-rw-r--r--tex/context/base/core-uti.lua1
-rw-r--r--tex/context/base/data-res.lua10
-rw-r--r--tex/context/base/enco-ini.mkiv19
-rw-r--r--tex/context/base/font-col.mkiv2
-rw-r--r--tex/context/base/font-ini.mkiv193
-rw-r--r--tex/context/base/l-lpeg.lua20
-rw-r--r--tex/context/base/lang-ini.lua226
-rw-r--r--tex/context/base/lang-ini.mkiv31
-rw-r--r--tex/context/base/lang-wrd.lua185
-rw-r--r--tex/context/base/lang-wrd.mkiv47
-rw-r--r--tex/context/base/lpdf-ini.lua35
-rw-r--r--tex/context/base/luat-ini.lua6
-rw-r--r--tex/context/base/luat-ini.mkiv10
-rw-r--r--tex/context/base/m-database.tex25
-rw-r--r--tex/context/base/math-ini.mkiv10
-rw-r--r--tex/context/base/mtx-context-arrange.tex10
-rw-r--r--tex/context/base/mtx-context-combine.tex70
-rw-r--r--tex/context/base/mtx-context-common.tex43
-rw-r--r--tex/context/base/mtx-context-ideas.tex2
-rw-r--r--tex/context/base/mtx-context-listing.tex74
-rw-r--r--tex/context/base/mtx-context-timing.tex2
-rw-r--r--tex/context/base/mult-cld.lua40
-rw-r--r--tex/context/base/mult-de.tex2
-rw-r--r--tex/context/base/mult-def.lua8
-rw-r--r--tex/context/base/mult-en.tex2
-rw-r--r--tex/context/base/mult-fr.tex2
-rw-r--r--tex/context/base/mult-ini.mkiv5
-rw-r--r--tex/context/base/mult-it.tex2
-rw-r--r--tex/context/base/mult-nl.tex2
-rw-r--r--tex/context/base/mult-ro.tex2
-rw-r--r--tex/context/base/pack-rul.mkiv8
-rw-r--r--tex/context/base/page-lin.lua20
-rw-r--r--tex/context/base/page-lin.mkiv159
-rw-r--r--tex/context/base/page-mar.mkiv3
-rw-r--r--tex/context/base/pret-lua.lua4
-rw-r--r--tex/context/base/s-abr-01.tex7
-rw-r--r--tex/context/base/s-map-10.tex3
-rw-r--r--tex/context/base/scrn-fld.mkiv4
-rw-r--r--tex/context/base/spac-hor.mkiv2
-rw-r--r--tex/context/base/spac-ver.lua2
-rw-r--r--tex/context/base/strc-mat.mkiv20
-rw-r--r--tex/context/base/supp-dir.mkiv20
-rw-r--r--tex/context/base/supp-mat.mkii (renamed from tex/context/base/supp-mat.tex)0
-rw-r--r--tex/context/base/supp-mat.mkiv293
-rw-r--r--tex/context/base/type-ini.mkiv102
-rw-r--r--tex/context/base/type-otf.mkiv223
-rw-r--r--tex/context/interface/cont-cs.xml12
-rw-r--r--tex/context/interface/cont-de.xml12
-rw-r--r--tex/context/interface/cont-en.xml12
-rw-r--r--tex/context/interface/cont-fr.xml12
-rw-r--r--tex/context/interface/cont-it.xml12
-rw-r--r--tex/context/interface/cont-nl.xml12
-rw-r--r--tex/context/interface/cont-pe.xml12
-rw-r--r--tex/context/interface/cont-ro.xml12
-rw-r--r--tex/context/interface/keys-cs.xml2
-rw-r--r--tex/context/interface/keys-de.xml2
-rw-r--r--tex/context/interface/keys-en.xml2
-rw-r--r--tex/context/interface/keys-fr.xml2
-rw-r--r--tex/context/interface/keys-it.xml2
-rw-r--r--tex/context/interface/keys-nl.xml2
-rw-r--r--tex/context/interface/keys-pe.xml2
-rw-r--r--tex/context/interface/keys-ro.xml2
-rw-r--r--tex/context/test/chem-str-test.tex560
-rw-r--r--tex/context/test/sort-lan-test.tex38
-rw-r--r--tex/context/test/x-cml-test.tex9
-rw-r--r--tex/context/test/x-cml-test.xml210
-rw-r--r--tex/context/test/x-ct-test.tex7
-rw-r--r--tex/context/test/x-ct-test.xml149
-rw-r--r--tex/context/test/x-mmp-test.tex12
-rw-r--r--tex/context/test/x-mmp-test.xml1270
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua22
95 files changed, 1462 insertions, 3168 deletions
diff --git a/scripts/context/lua/luatools.lua b/scripts/context/lua/luatools.lua
index ccedd97cd..e6fdd50d5 100644
--- a/scripts/context/lua/luatools.lua
+++ b/scripts/context/lua/luatools.lua
@@ -428,6 +428,15 @@ lpeg.splitat = splitat
local cache = { }
+function lpeg.split(separator,str)
+ local c = cache[separator]
+ if not c then
+ c = Ct(splitat(separator))
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:split(separator)
local c = cache[separator]
if not c then
@@ -439,6 +448,17 @@ end
local cache = { }
+function lpeg.checkedsplit(separator,str)
+ local c = cache[separator]
+ if not c then
+ separator = P(separator)
+ local other = C((1 - separator)^0)
+ c = Ct(separator^0 * other * (separator^1 * other)^0)
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:checkedsplit(separator)
local c = cache[separator]
if not c then
@@ -5710,6 +5730,8 @@ local normalsplit = string.split
local cache = { }
+local splitter = lpeg.Ct(lpeg.splitat(lpeg.S(os.type == "windows" and ";" or ":;")))
+
local function split_kpse_path(str) -- beware, this can be either a path or a {specification}
local found = cache[str]
if not found then
@@ -5717,7 +5739,8 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s
found = { }
else
str = gsub(str,"\\","/")
- local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+--~ local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+local split = lpegmatch(splitter,str)
found = { }
for i=1,#split do
local s = split[i]
@@ -6180,7 +6203,7 @@ end
function resolvers.expanded_path_list(str)
if not str then
- return ep or { }
+ return ep or { } -- ep ?
elseif instance.savelists then
-- engine+progname hash
str = gsub(str,"%$","")
diff --git a/scripts/context/lua/mtx-mptopdf.lua b/scripts/context/lua/mtx-mptopdf.lua
index 6fa5bbcb8..c3d5b50dc 100644
--- a/scripts/context/lua/mtx-mptopdf.lua
+++ b/scripts/context/lua/mtx-mptopdf.lua
@@ -99,7 +99,7 @@ function scripts.mptopdf.convertall()
logs.simple("%s => %s", r[1], r[2])
end
else
- logs.simple("no input files match %s", table.concat(files,' '))
+ logs.simple("no files are converted")
end
else
logs.simple("no files match %s", table.concat(environment.files,' '))
diff --git a/scripts/context/lua/mtx-update.lua b/scripts/context/lua/mtx-update.lua
index 8affaf01b..b63be6475 100644
--- a/scripts/context/lua/mtx-update.lua
+++ b/scripts/context/lua/mtx-update.lua
@@ -196,6 +196,7 @@ function scripts.update.synchronize()
if force then
dir.mkdirs(format("%s/%s", texroot, "texmf-cache"))
dir.mkdirs(format("%s/%s", texroot, "texmf-local"))
+ dir.mkdirs(format("%s/%s", texroot, "texmf-project"))
end
if ok or not force then
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index cefa3192b..727099027 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -437,6 +437,15 @@ lpeg.splitat = splitat
local cache = { }
+function lpeg.split(separator,str)
+ local c = cache[separator]
+ if not c then
+ c = Ct(splitat(separator))
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:split(separator)
local c = cache[separator]
if not c then
@@ -448,6 +457,17 @@ end
local cache = { }
+function lpeg.checkedsplit(separator,str)
+ local c = cache[separator]
+ if not c then
+ separator = P(separator)
+ local other = C((1 - separator)^0)
+ c = Ct(separator^0 * other * (separator^1 * other)^0)
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:checkedsplit(separator)
local c = cache[separator]
if not c then
@@ -8911,6 +8931,8 @@ local normalsplit = string.split
local cache = { }
+local splitter = lpeg.Ct(lpeg.splitat(lpeg.S(os.type == "windows" and ";" or ":;")))
+
local function split_kpse_path(str) -- beware, this can be either a path or a {specification}
local found = cache[str]
if not found then
@@ -8918,7 +8940,8 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s
found = { }
else
str = gsub(str,"\\","/")
- local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+--~ local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+local split = lpegmatch(splitter,str)
found = { }
for i=1,#split do
local s = split[i]
@@ -9381,7 +9404,7 @@ end
function resolvers.expanded_path_list(str)
if not str then
- return ep or { }
+ return ep or { } -- ep ?
elseif instance.savelists then
-- engine+progname hash
str = gsub(str,"%$","")
diff --git a/scripts/context/stubs/mswin/luatools.lua b/scripts/context/stubs/mswin/luatools.lua
index ccedd97cd..e6fdd50d5 100644
--- a/scripts/context/stubs/mswin/luatools.lua
+++ b/scripts/context/stubs/mswin/luatools.lua
@@ -428,6 +428,15 @@ lpeg.splitat = splitat
local cache = { }
+function lpeg.split(separator,str)
+ local c = cache[separator]
+ if not c then
+ c = Ct(splitat(separator))
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:split(separator)
local c = cache[separator]
if not c then
@@ -439,6 +448,17 @@ end
local cache = { }
+function lpeg.checkedsplit(separator,str)
+ local c = cache[separator]
+ if not c then
+ separator = P(separator)
+ local other = C((1 - separator)^0)
+ c = Ct(separator^0 * other * (separator^1 * other)^0)
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:checkedsplit(separator)
local c = cache[separator]
if not c then
@@ -5710,6 +5730,8 @@ local normalsplit = string.split
local cache = { }
+local splitter = lpeg.Ct(lpeg.splitat(lpeg.S(os.type == "windows" and ";" or ":;")))
+
local function split_kpse_path(str) -- beware, this can be either a path or a {specification}
local found = cache[str]
if not found then
@@ -5717,7 +5739,8 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s
found = { }
else
str = gsub(str,"\\","/")
- local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+--~ local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+local split = lpegmatch(splitter,str)
found = { }
for i=1,#split do
local s = split[i]
@@ -6180,7 +6203,7 @@ end
function resolvers.expanded_path_list(str)
if not str then
- return ep or { }
+ return ep or { } -- ep ?
elseif instance.savelists then
-- engine+progname hash
str = gsub(str,"%$","")
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index cefa3192b..727099027 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -437,6 +437,15 @@ lpeg.splitat = splitat
local cache = { }
+function lpeg.split(separator,str)
+ local c = cache[separator]
+ if not c then
+ c = Ct(splitat(separator))
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:split(separator)
local c = cache[separator]
if not c then
@@ -448,6 +457,17 @@ end
local cache = { }
+function lpeg.checkedsplit(separator,str)
+ local c = cache[separator]
+ if not c then
+ separator = P(separator)
+ local other = C((1 - separator)^0)
+ c = Ct(separator^0 * other * (separator^1 * other)^0)
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:checkedsplit(separator)
local c = cache[separator]
if not c then
@@ -8911,6 +8931,8 @@ local normalsplit = string.split
local cache = { }
+local splitter = lpeg.Ct(lpeg.splitat(lpeg.S(os.type == "windows" and ";" or ":;")))
+
local function split_kpse_path(str) -- beware, this can be either a path or a {specification}
local found = cache[str]
if not found then
@@ -8918,7 +8940,8 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s
found = { }
else
str = gsub(str,"\\","/")
- local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+--~ local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+local split = lpegmatch(splitter,str)
found = { }
for i=1,#split do
local s = split[i]
@@ -9381,7 +9404,7 @@ end
function resolvers.expanded_path_list(str)
if not str then
- return ep or { }
+ return ep or { } -- ep ?
elseif instance.savelists then
-- engine+progname hash
str = gsub(str,"%$","")
diff --git a/scripts/context/stubs/unix/luatools b/scripts/context/stubs/unix/luatools
index ccedd97cd..e6fdd50d5 100755
--- a/scripts/context/stubs/unix/luatools
+++ b/scripts/context/stubs/unix/luatools
@@ -428,6 +428,15 @@ lpeg.splitat = splitat
local cache = { }
+function lpeg.split(separator,str)
+ local c = cache[separator]
+ if not c then
+ c = Ct(splitat(separator))
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:split(separator)
local c = cache[separator]
if not c then
@@ -439,6 +448,17 @@ end
local cache = { }
+function lpeg.checkedsplit(separator,str)
+ local c = cache[separator]
+ if not c then
+ separator = P(separator)
+ local other = C((1 - separator)^0)
+ c = Ct(separator^0 * other * (separator^1 * other)^0)
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:checkedsplit(separator)
local c = cache[separator]
if not c then
@@ -5710,6 +5730,8 @@ local normalsplit = string.split
local cache = { }
+local splitter = lpeg.Ct(lpeg.splitat(lpeg.S(os.type == "windows" and ";" or ":;")))
+
local function split_kpse_path(str) -- beware, this can be either a path or a {specification}
local found = cache[str]
if not found then
@@ -5717,7 +5739,8 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s
found = { }
else
str = gsub(str,"\\","/")
- local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+--~ local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+local split = lpegmatch(splitter,str)
found = { }
for i=1,#split do
local s = split[i]
@@ -6180,7 +6203,7 @@ end
function resolvers.expanded_path_list(str)
if not str then
- return ep or { }
+ return ep or { } -- ep ?
elseif instance.savelists then
-- engine+progname hash
str = gsub(str,"%$","")
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index cefa3192b..727099027 100755
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -437,6 +437,15 @@ lpeg.splitat = splitat
local cache = { }
+function lpeg.split(separator,str)
+ local c = cache[separator]
+ if not c then
+ c = Ct(splitat(separator))
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:split(separator)
local c = cache[separator]
if not c then
@@ -448,6 +457,17 @@ end
local cache = { }
+function lpeg.checkedsplit(separator,str)
+ local c = cache[separator]
+ if not c then
+ separator = P(separator)
+ local other = C((1 - separator)^0)
+ c = Ct(separator^0 * other * (separator^1 * other)^0)
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:checkedsplit(separator)
local c = cache[separator]
if not c then
@@ -8911,6 +8931,8 @@ local normalsplit = string.split
local cache = { }
+local splitter = lpeg.Ct(lpeg.splitat(lpeg.S(os.type == "windows" and ";" or ":;")))
+
local function split_kpse_path(str) -- beware, this can be either a path or a {specification}
local found = cache[str]
if not found then
@@ -8918,7 +8940,8 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s
found = { }
else
str = gsub(str,"\\","/")
- local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+--~ local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+local split = lpegmatch(splitter,str)
found = { }
for i=1,#split do
local s = split[i]
@@ -9381,7 +9404,7 @@ end
function resolvers.expanded_path_list(str)
if not str then
- return ep or { }
+ return ep or { } -- ep ?
elseif instance.savelists then
-- engine+progname hash
str = gsub(str,"%$","")
diff --git a/tex/context/base/back-pdf.lua b/tex/context/base/back-pdf.lua
index 3d21a5961..54e22f1a2 100644
--- a/tex/context/base/back-pdf.lua
+++ b/tex/context/base/back-pdf.lua
@@ -32,6 +32,7 @@ local registrations = backends.pdf.registrations
local pdfliteral, register = nodes.pdfliteral, nodes.register
local pdfconstant = lpdf.constant
+local pdfstring = lpdf.string
local pdfdictionary = lpdf.dictionary
local pdfarray = lpdf.array
local pdfreference = lpdf.reference
diff --git a/tex/context/base/bibl-tra.mkiv b/tex/context/base/bibl-tra.mkiv
index 7b6fc84cb..1fc9089e7 100644
--- a/tex/context/base/bibl-tra.mkiv
+++ b/tex/context/base/bibl-tra.mkiv
@@ -366,7 +366,6 @@
\ifhmode\removeunwantedspaces\fi
\let\par\@@savedpar}
-
%D \macros{setuppublicationlist}
%D
%D This will be the first command in (\BIBTEX-generated) \type{bbl}
diff --git a/tex/context/base/buff-ini.lua b/tex/context/base/buff-ini.lua
index a075bcbf5..6786f9b58 100644
--- a/tex/context/base/buff-ini.lua
+++ b/tex/context/base/buff-ini.lua
@@ -122,14 +122,16 @@ end
function buffers.strip(lines,first,last)
local first, last = first or 1, last or #lines
for i=first,last do
- if #lines[i] == 0 then
+ local li = lines[i]
+ if #li == 0 or find(li,"^%s*$") then
first = first + 1
else
break
end
end
for i=last,first,-1 do
- if #lines[i] == 0 then
+ local li = lines[i]
+ if #li == 0 or find(li,"^%s*$") then
last = last - 1
else
break
@@ -380,11 +382,16 @@ end
-- maybe just line(n,str) empty(n,str)
-visualizers.handlers = visualizers.handlers or { }
visualizers.tablength = 7
visualizers.enabletab = true -- false
visualizers.obeyspace = true
+function buffers.settablength(tablength)
+ visualizers.tablength = tablength and tonumber(tablength) or 7
+end
+
+visualizers.handlers = visualizers.handlers or { }
+
local handlers = visualizers.handlers
function buffers.newvisualizer(name)
@@ -427,6 +434,8 @@ local default = buffers.newvisualizer(visualizers.defaultname)
--~ print(variables.typing) os.exit()
+-- will become cleaner
+
local currentvisualizer, currenthandler
function buffers.setvisualizer(str)
diff --git a/tex/context/base/buff-ver.mkiv b/tex/context/base/buff-ver.mkiv
index 15b40e9b9..3e34bc22b 100644
--- a/tex/context/base/buff-ver.mkiv
+++ b/tex/context/base/buff-ver.mkiv
@@ -85,7 +85,7 @@
\spaceskip\wd\scratchbox
\xspaceskip\spaceskip}
-\let\obeycharacters\relax
+\let\obeycharacters\relax % tab mess can go
\setvalue{\??tp:\c!lines:\v!yes }{\obeybreakpoints}
\setvalue{\??tp:\c!lines:\v!hyphenated}{\obeyhyphens}
@@ -96,17 +96,12 @@
\setvalue{\??tp:\c!option:\v!none }{\let\obeycharacters\relax}
\setvalue{\??tp:\c!option:\empty }{\let\obeycharacters\relax}
\setvalue{\??tp:\c!option:\v!color }{\setupprettiesintype{\typingparameter\c!option}%
- \let\obeycharacters\setupprettytype
- \let\obeytabs\ignoretabs}
+ \let\obeycharacters\setupprettytype}
\setvalue{\??tp:\c!option:\v!normal }{\let\obeycharacters\setupgroupedtype}
-\setvalue{\??tp:\c!option:\v!slanted }{\let\obeycharacters\setupslantedtype
- \let\obeytabs\ignoretabs}
+\setvalue{\??tp:\c!option:\v!slanted }{\let\obeycharacters\setupslantedtype}
\setvalue{\??tp:\c!option:\s!unknown }{\setupprettiesintype{\typingparameter\c!option}%
- \let\obeycharacters\setupprettytype
- \let\obeytabs\ignoretabs}
-
-%setvalue{\??tp:\c!option:\v!commands }{\def\obeycharacters{\setupcommandsintype}%
-% \let\obeytabs\ignoretabs}
+ \let\obeycharacters\setupprettytype}
+%setvalue{\??tp:\c!option:\v!commands }{\def\obeycharacters{\setupcommandsintype}}
\def\dosetverbatimfont
{\redoconvertfont\dosetfontattribute{\currenttypingclass\currenttyping}\c!style
@@ -123,9 +118,6 @@
\getvalue{\??tp:\c!lines:\typingparameter\c!lines}%
\getvalue{\??tp:\c!empty:\typingparameter\c!empty}%
\getvalue{\??tp:\c!option:\ifcsname\??tp:\c!option:\typingparameter\c!option\endcsname\typingparameter\c!option\else\s!unknown\fi}%
- \doifnumberelse{\typingparameter\c!tab}
- {\def\obeytabs{\setfixedtabskips{\typingparameter\c!tab}}}%
- \donothing
\setupverbatimcolor}
\newtoks \everyinitializeverbatim
@@ -141,11 +133,17 @@
\let\noverbatimeop\ignoreendofpretty
\let\noverbatimsop\ignorebeginofpretty
-\def\doinitializeverbatim
+\def\doinitializeverbatim % todo: combine all in one call is faster
{\ctxlua{buffers.visualizers.reset()}%
\doifelse{\typingparameter\c!space}\v!on
{\let\obs\fastcontrolspace}%
{\let\obs\specialobeyedspace}%
+ \edef\askedverbatimtab{\typingparameter\c!tab}%
+ \doifelse\askedverbatimtab\v!no
+ {\ctxlua{buffers.settablength(1)}}
+ {\doifnumberelse{\askedverbatimtab}
+ {\ctxlua{buffers.settablength(\askedverbatimtab)}}
+ {\ctxlua{buffers.settablength()}}}%
\ctxlua{buffers.doifelsevisualizer("\prettyidentifier")}
{\ctxlua{buffers.setvisualizer("\prettyidentifier")}%
\let\bop\doverbatimbop
@@ -321,15 +319,6 @@
\catcode`\>=\@@other
\futurelet\next\dodotype}
-% \def\dodotype
-% {\ifx\next\bgroup
-% \@EA\dodotypeA
-% \else\if\next<%
-% \doifelse{\typingparameter\c!option}\v!none{\@EAEAEA\dodotypeB}{\@EAEAEA\dodotypeC}%
-% \else
-% \@EAEAEA\dodotypeD
-% \fi\fi}
-
\def\dodotype
{\ifx\next\bgroup
\@EA\dodotypeA
@@ -411,12 +400,8 @@
\setupcommonverbatim
%\dosetverbatimfont
%\setverbatimspaceskip
- %\let\obeytabs \ignoretabs % probably not needed
- %\let\obeylines\ignorelines % probably not needed
- %\let\obeypages\ignorepages % probably not needed
%\setupcopyverbatim % not needed
- \setcatcodetable\vrbcatcodes
- }
+ \setcatcodetable\vrbcatcodes}
%D \macros
%D {setuptype}
@@ -593,6 +578,7 @@
\else
\edef\verbatimbaselineskip{\the\scratchskip}%
\fi
+\doifsomething{\typingparameter\c!align}{\setupalign[\typingparameter\c!align]}%
\setupcommonverbatim}
%D The basic display verbatim commands are defined in an
@@ -674,8 +660,7 @@
{\stopverbatimcolor
\stoppacked % includes \egroup
\typingparameter\c!after
- \egroup
- \dochecknextindentation{\??tp#1}%
+ \normalexpanded{\egroup\checknextindentation[\typingparameter\c!indentnext]}%
\dorechecknextindentation}
%D Line numbering for files is combined with filtering, while
@@ -771,6 +756,8 @@
%D
%D The definitions default to the standard typing values.
+% TODO: parent etc !
+
\def\presettyping[#1][#2]% brrr also use parent here
{\copyparameters[\??tp#1][\??tp][\c!color,\c!style]%
\getparameters [\??tp#1][#2]}
@@ -878,34 +865,6 @@
\dodotypefile[\v!file][]{#3}%
\fi\fi}
-% \def\dosetuptypelinenumbering#1% fuzzy
-% {\ifcsname\currenttypingclass\currenttyping\c!start\endcsname \else
-% \setuptyping[\currenttyping][\c!start=1,\c!stop=,\c!step=1,\c!nlines=]%
-% \fi
-% \setuptyping[\currenttyping][#1]%
-% \doifelse{\typingparameter\c!numbering}\v!file
-% {% kind of special: filters lines !
-% \setuplinenumbering[\c!method=\v!file]%
-% \donetrue}
-% {\doifelse{\typingparameter\c!numbering}\v!line
-% {% \setuplinenumbering defaults start/step to 1/1, so we need
-% \doifinsetelse\v!continue{#1,\typingparameter\c!start}
-% {\scratchcounter0\typingparameter\c!n
-% \setxtypingparameter\c!start{\ifnum\scratchcounter=0 1\else\number\scratchcounter\fi}}%
-% {\doifnothing{\typingparameter\c!start}{\settypingparameter\c!start{1}}}%
-% \doifnothing{\typingparameter\c!step}{\settypingparameter\c!step{1}}%
-% \setuplinenumbering
-% [\c!method=\v!type,
-% \c!start=\typingparameter\c!start,
-% \c!stop=\typingparameter\c!stop,
-% \c!step=\typingparameter\c!step]%
-% \donetrue}
-% {\donefalse}}%
-% \ifdone
-% \def\beginofverbatimlines{\startlinenumbering}%
-% \def\endofverbatimlines {\stoplinenumbering\setxtypingparameter\c!n{\number\linenumber}}%
-% \fi}
-
\def\dosetuptypelinenumbering#1% fuzzy
{%\ifcsname\currenttypingclass\currenttyping\c!start\endcsname \else
% \setuptyping[\currenttyping][\c!start=1,\c!stop=,\c!step=1,\c!continue=\v!no,\c!nlines=]%
diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua
index 0298f91ca..363850928 100644
--- a/tex/context/base/colo-ini.lua
+++ b/tex/context/base/colo-ini.lua
@@ -151,6 +151,9 @@ local function do_registerspotcolor(parent,name,parentnumber,e,f,d,p)
if v then
local kind = colors.default -- else problems with shading etc
if kind == 1 then kind = v[1] end
+ if e and e ~= "" then
+ registrations.spotcolorname(parent,e) -- before registration of the color
+ end
if kind == 2 then -- name noffractions names p's r g b
registrations.grayspotcolor(parent,f,d,p,v[2])
elseif kind == 3 then
@@ -158,9 +161,6 @@ local function do_registerspotcolor(parent,name,parentnumber,e,f,d,p)
elseif kind == 4 then
registrations.cmykspotcolor(parent,f,d,p,v[6],v[7],v[8],v[9])
end
- if e and e ~= "" then
- registrations.spotcolorname(parent,e)
- end
end
registered[parentnumber] = true
end
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index f15d6f259..9b8a555c1 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2010.05.08 13:33}
+\newcontextversion{2010.05.12 18:43}
%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/context-characters.lmx b/tex/context/base/context-characters.lmx
index b2ddee64e..f018e412b 100644
--- a/tex/context/base/context-characters.lmx
+++ b/tex/context/base/context-characters.lmx
@@ -12,7 +12,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
- <script language="JavaScript">
+ <script type='text/javascript'>
<!--
window.focus();
-->
diff --git a/tex/context/base/context-debug.lmx b/tex/context/base/context-debug.lmx
index 8ca2573a9..51b18c837 100644
--- a/tex/context/base/context-debug.lmx
+++ b/tex/context/base/context-debug.lmx
@@ -12,7 +12,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
- <script language="JavaScript">
+ <script type='text/javascript'>
<!--
window.focus();
-->
diff --git a/tex/context/base/context-error.lmx b/tex/context/base/context-error.lmx
index 015d74c9f..b82b552f8 100644
--- a/tex/context/base/context-error.lmx
+++ b/tex/context/base/context-error.lmx
@@ -12,7 +12,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
- <script language="JavaScript">
+ <script type='text/javascript'>
<!--
window.focus();
-->
diff --git a/tex/context/base/context-fonttest.lmx b/tex/context/base/context-fonttest.lmx
index b90af179d..fddb8196b 100644
--- a/tex/context/base/context-fonttest.lmx
+++ b/tex/context/base/context-fonttest.lmx
@@ -12,7 +12,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
- <script type="text/javascript">
+ <script type='text/javascript'>
<!--
window.focus() ;
<?lua pv('javascripts')?> ;
diff --git a/tex/context/base/context-help.lmx b/tex/context/base/context-help.lmx
index 3c663b0ac..5401fb65d 100644
--- a/tex/context/base/context-help.lmx
+++ b/tex/context/base/context-help.lmx
@@ -12,7 +12,7 @@
<html>
<head>
- <script language="JavaScript">
+ <script type='text/javascript'>
<!--
window.focus();
-->
diff --git a/tex/context/base/context-timing.lmx b/tex/context/base/context-timing.lmx
index eea9db822..57b5879ba 100644
--- a/tex/context/base/context-timing.lmx
+++ b/tex/context/base/context-timing.lmx
@@ -16,7 +16,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
- <script language="JavaScript">
+ <script type='text/javascript'>
<!--
window.focus();
-->
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index 2f65224e0..4be60cbfc 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -82,7 +82,7 @@
\loadmarkfile{supp-ran}
\loadmarkfile{supp-mps}
\loadmarkfile{supp-tpi}
-\loadcorefile{supp-mat}
+\loadmarkfile{supp-mat}
\loadcorefile{supp-ali}
\loadcorefile{supp-num}
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 13fe9f2cc..0395f1103 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -97,7 +97,7 @@
\loadcorefile{supp-fun}
\loadmarkfile{supp-ran}
-\loadcorefile{supp-mat}
+\loadmarkfile{supp-mat}
\loadcorefile{supp-ali}
\loadcorefile{supp-num}
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 79768a78b..952a8637c 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2010.05.08 13:33}
+\edef\contextversion{2010.05.12 18:43}
%D For those who want to use this:
diff --git a/tex/context/base/core-def.mkiv b/tex/context/base/core-def.mkiv
index 64b63e58d..59451a914 100644
--- a/tex/context/base/core-def.mkiv
+++ b/tex/context/base/core-def.mkiv
@@ -82,7 +82,7 @@
\def\synctexwarning
{\ifdefined\synctex \ifnum\synctex=\zerocount \else
\writeline
- \writestatus\m!systems{BEWARE: syntex functionality is enabled!}%
+ \writestatus\m!systems{BEWARE: synctex functionality is enabled!}%
\writeline
\globallet\synctexwarning\relax
\fi \fi}
diff --git a/tex/context/base/core-uti.lua b/tex/context/base/core-uti.lua
index 7dd3bba19..6a47cf45c 100644
--- a/tex/context/base/core-uti.lua
+++ b/tex/context/base/core-uti.lua
@@ -285,6 +285,7 @@ function statistics.formatruntime(runtime)
local pages = tex.count['realpageno'] - 1
if shipped > 0 or pages > 0 then
local persecond = shipped / runtime
+ if pages == 0 then pages = shipped end
return format("%s seconds, %i processed pages, %i shipped pages, %.3f pages/second",runtime,pages,shipped,persecond)
else
return format("%s seconds",runtime)
diff --git a/tex/context/base/data-res.lua b/tex/context/base/data-res.lua
index 19566a68a..5d48ce655 100644
--- a/tex/context/base/data-res.lua
+++ b/tex/context/base/data-res.lua
@@ -900,11 +900,12 @@ end
-- we join them and split them after the expansion has taken place. This
-- is more convenient.
-local checkedsplit = string.checkedsplit
-local normalsplit = string.split
+--~ local checkedsplit = string.checkedsplit
local cache = { }
+local splitter = lpeg.Ct(lpeg.splitat(lpeg.S(os.type == "windows" and ";" or ":;")))
+
local function split_kpse_path(str) -- beware, this can be either a path or a {specification}
local found = cache[str]
if not found then
@@ -912,7 +913,8 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s
found = { }
else
str = gsub(str,"\\","/")
- local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+--~ local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator)
+local split = lpegmatch(splitter,str)
found = { }
for i=1,#split do
local s = split[i]
@@ -1375,7 +1377,7 @@ end
function resolvers.expanded_path_list(str)
if not str then
- return ep or { }
+ return ep or { } -- ep ?
elseif instance.savelists then
-- engine+progname hash
str = gsub(str,"%$","")
diff --git a/tex/context/base/enco-ini.mkiv b/tex/context/base/enco-ini.mkiv
index 42730ed26..5b6de5fa9 100644
--- a/tex/context/base/enco-ini.mkiv
+++ b/tex/context/base/enco-ini.mkiv
@@ -66,7 +66,7 @@
\setvalue{\??ac\string#1\string#2}{#3}}
\def\dohandleaccent#1#2%
- {\csname\??ac\string#1\string#2\endcsname}
+ {\csname\??ac\string#1\string#2\empty\endcsname}
\def\definecharacter#1 #2 %
{\doifnumberelse{\string#2}
@@ -361,6 +361,23 @@
\def\flushcontrolspacebox
{\copy\controlspacebox}
+% a few defaults (\<whatever>{}), we really need the verbose \empty as it will be
+% stringified
+
+\defineaccent ^ {\empty} {\textcircumflex}
+\defineaccent ` {\empty} {\textgrave}
+\defineaccent ~ {\empty} {\texttilde}
+\defineaccent " {\empty} {\textdiaeresis}
+\defineaccent ' {\empty} {\textacute}
+\defineaccent . {\empty} {\textdotaccent}
+\defineaccent = {\empty} {\textmacron}
+\defineaccent c {\empty} {\textcedilla}
+\defineaccent H {\empty} {\texthungarumlaut}
+\defineaccent k {\empty} {\textogonek}
+\defineaccent r {\empty} {\textring}
+\defineaccent u {\empty} {\textbreve}
+\defineaccent v {\empty} {\textcaron}
+
% from enco-acc:
%
% we should to this at the lua end and share code ..
diff --git a/tex/context/base/font-col.mkiv b/tex/context/base/font-col.mkiv
index 22a67ac8e..952dd9974 100644
--- a/tex/context/base/font-col.mkiv
+++ b/tex/context/base/font-col.mkiv
@@ -12,6 +12,8 @@
%C details.
% ! EXPERIMENTAL ! code will be made more nice
+%
+% actually we can now do more at the lua end
% todo: missing only, force always, multiple fallbacks with test, scale
%
diff --git a/tex/context/base/font-ini.mkiv b/tex/context/base/font-ini.mkiv
index cbe9f2234..61e5b8cc8 100644
--- a/tex/context/base/font-ini.mkiv
+++ b/tex/context/base/font-ini.mkiv
@@ -603,8 +603,8 @@
\let\relativefontsize \defaultrelativefontsize
-\def\saverelativefontsize#1#2% #1=rm|ss|.. #2=waarde
- {\setxvalue{\fontclass#1\s!rscale}{#2}}
+% \def\saverelativefontsize#1#2% #1=rm|ss|.. #2=waarde
+% {\setxvalue{\fontclass#1\s!rscale}{#2}}
\def\checkrelativefontid
{\ifcsname\??tf\fontclass\s!rname\endcsname
@@ -614,9 +614,6 @@
\let\relativefontid\empty
\fi}
-% \def\checkrelativefontid
-% {\let\relativefontid\minusone}
-
\def\checkrelativefontsize#1%
{\edef\relativefontsize
{\ifcsname\fontclass#1\s!rscale\endcsname
@@ -633,28 +630,6 @@
\let\relativefontid\minusone
\fi}
-% \letvalue{\s!default\s!rscale}\defaultrelativefontsize
-%
-% \def\checkrelativefontsize#1%
-% {\edef\relativefontsize
-% {\csname
-% \ifcsname\fontclass#1\s!rscale\endcsname
-% \fontclass#1%
-% \else\ifcsname\defaultfontclass#1\s!rscale\endcsname
-% \defaultfontclass#1%
-% \else
-% \s!default
-% \fi\fi
-% \s!rscale\endcsname}}
-
-%D We also save:
-
-\def\savemathtextstyle#1% #1=rm|ss|..
- {\doifsomething{#1}{\setxvalue{\fontclass\c!mm\s!text}{#1}}}
-
-\def\currentmathtextstyle % we default to empty !
- {\executeifdefined{\fontclass\c!mm\s!text}\empty}
-
%D Scaling macros:
%D
%D This system is somewhat complicated by two (possible conflicting)
@@ -761,8 +736,8 @@
\the\everydefinefont}
\def\updatefontclassparameters
- {\edef\@@fontclassfeatures {\ifcsname\fontclass\s!features \endcsname\csname\fontclass\s!features \endcsname\fi}%
- \edef\@@fontclassfallbacks{\ifcsname\fontclass\s!fallbacks\endcsname\csname\fontclass\s!fallbacks\endcsname\fi}}
+ {\edef\@@fontclassfeatures {\ifcsname\fontclass\fontstyle\s!features \endcsname\csname\fontclass\fontstyle\s!features \endcsname\fi}%
+ \edef\@@fontclassfallbacks{\ifcsname\fontclass\fontstyle\s!fallbacks\endcsname\csname\fontclass\fontstyle\s!fallbacks\endcsname\fi}}
% resolve
@@ -1164,7 +1139,6 @@
\let\localrelativefontsize\defaultrelativefontsize
\let\localabsolutefontsize\fontbody
\lowleveldefinefont{#2}\rawfontidentifier
-% \let\localrelativefontsize\defaultrelativefontsize % not needed
\csname\rawfontidentifier\endcsname
\autofontsizefalse
\setfontcharacteristics
@@ -1177,7 +1151,6 @@
\def\localrelativefontsize{#1}%
\def\localabsolutefontsize{#2}%
\lowleveldefinefont{#4}\newfontidentifier
-% \let\localrelativefontsize\defaultrelativefontsize % not needed
\fi
\csname\newfontidentifier\endcsname
\autofontsizefalse
@@ -2105,11 +2078,6 @@
\def\registerfontclass#1%
{\letgvalue{\@fontclass@#1}\v!yes} % global ?
-% \def\setcurrentfontclass#1%
-% {\ifcsname\@fontclass@#1\endcsname
-% \edef\fontclass{#1}%
-% \fi}
-
\edef\@no@fontclass@{\@fontclass@:?:}
\def\setcurrentfontclass#1%
@@ -2121,6 +2089,11 @@
\trycurrentfontclass{#1}%
\fi\fi\fi}
+\def\savefontclassparameters#1#2#3#4% #1=rm|ss|.. rscale features fallbacks
+ {\setxvalue{\fontclass#1\s!rscale }{#2}%
+ \setxvalue{\fontclass#1\s!features }{#3}%
+ \setxvalue{\fontclass#1\s!fallbacks}{#4}}
+
\settrue\autotypescripts
\def\trycurrentfontclass#1%
@@ -2272,48 +2245,6 @@
\let\fontstrategy\relax
-% \def\synchronizefont
-% {\tryingfonttrue
-% \ifx\fontclass\empty\else
-% \global\let\fontstrategy\dofontclassstrategy
-% \the\fontstrategies \relax % \relax still needed ?
-% \fi
-% \iftryingfont
-% \global\let\fontstrategy\dofontstrategy
-% \the\fontstrategies \relax % \relax still needed ?
-% \fi
-% \autofontsizefalse
-% \ifskipfontcharacteristics
-% \setfontcharacteristics
-% \the\everyfontswitch
-% \fi}
-
-% \def\dofontstrategy#1#2#3#4#5%
-% {\ifcsname#2#3#4#5\endcsname
-% #1\csname#2#3#4#5\endcsname \tryingfontfalse
-% \fi}
-
-% \def\dofontclassstrategy#1#2#3#4#5%
-% {\ifcsname\fontclass#2#3#4#5\endcsname
-% #1\csname\fontclass#2#3#4#5\endcsname \tryingfontfalse
-% \fi}
-
-% \def\synchronizefont % we can have dups i.e. no need to let fontstrategy
-% {\tryingfonttrue
-% \ifx\fontclass\empty\else
-% \global\let\fontstrategy\dofontclassstrategy
-% \applyfontstrategies
-% \fi
-% \iftryingfont
-% \global\let\fontstrategy\dofontstrategy
-% \applyfontstrategies
-% \fi
-% \autofontsizefalse
-% \ifskipfontcharacteristics
-% \setfontcharacteristics
-% \the\everyfontswitch
-% \fi}
-
\def\synchronizefont % we can have dups i.e. no need to let fontstrategy
{\tryingfonttrue
\ifx\fontclass\empty
@@ -2327,69 +2258,6 @@
\the\everyfontswitch
\fi}
-% \appendtoks \iftryingfont \fontstrategy \autofontsizefalse % --- --- --- --- % pt tt bf a
-% \fontbody \fontstyle \fontalternative \fontsize
-% \fi \to \fontstrategies
-%
-% \appendtoks \iftryingfont \fontstrategy \autofontsizetrue % --- --- --- def % pt tt bf
-% \fontbody \fontstyle \fontalternative \defaultfontsize
-% \fi \to \fontstrategies
-%
-% \appendtoks \iftryingfont \fontstrategy \autofontsizetrue % --- --- def --- % pt tt tf a
-% \fontbody \fontstyle \defaultfontalternative \fontsize
-% \fi \to \fontstrategies
-%
-% \appendtoks \iftryingfont \fontstrategy \autofontsizetrue % --- --- def def % pt tt tf
-% \fontbody \fontstyle \defaultfontalternative \defaultfontsize
-% \fi \to \fontstrategies
-%
-% \appendtoks \iftryingfont \fontstrategy \autofontsizefalse % --- def def def % pt rm tf
-% \fontbody \defaultfontstyle \defaultfontalternative \defaultfontsize
-% \fi \to \fontstrategies
-%
-% \appendtoks \iftryingfont \fontstrategy \autofontsizetrue % def def def def % rm tf
-% \defaultfontbody \defaultfontstyle \defaultfontalternative \defaultfontsize
-% \fi \to \fontstrategies
-
-% \def\fontstrategiesa % --- --- --- --- % pt tt bf a
-% {\fontstrategy \autofontsizefalse \fontbody \fontstyle \fontalternative \fontsize
-% \iftryingfont \fontstrategiesb \fi}
-% \def\fontstrategiesb % --- --- --- def % pt tt bf
-% {\fontstrategy \autofontsizetrue \fontbody \fontstyle \fontalternative \defaultfontsize
-% \iftryingfont \fontstrategiesc \fi}
-% \def\fontstrategiesc % --- --- def --- % pt tt tf a
-% {\fontstrategy \autofontsizetrue \fontbody \fontstyle \defaultfontalternative \fontsize
-% \iftryingfont \fontstrategiesd \fi}
-% \def\fontstrategiesd % --- --- def def % pt tt tf
-% {\fontstrategy \autofontsizetrue \fontbody \fontstyle \defaultfontalternative \defaultfontsize
-% \iftryingfont \fontstrategiese \fi}
-% \def\fontstrategiese % --- def def def % pt rm tf
-% {\fontstrategy \autofontsizefalse \fontbody \defaultfontstyle \defaultfontalternative \defaultfontsize
-% \iftryingfont \fontstrategiesf \fi}
-% \def\fontstrategiesf % def def def def % rm tf
-% {\fontstrategy \autofontsizetrue \defaultfontbody \defaultfontstyle \defaultfontalternative \defaultfontsize}
-
-% \fontstrategies {\fontstrategiesa}
-% \let\applyfontstrategies\fontstrategiesa
-
-% \def\fontclassstrategiesa % --- --- --- --- % pt tt bf a
-% {\dofontclassstrategy \autofontsizefalse \fontbody \fontstyle \fontalternative \fontsize
-% \iftryingfont \fontclassstrategiesb \fi}
-% \def\fontclassstrategiesb % --- --- --- def % pt tt bf
-% {\dofontclassstrategy \autofontsizetrue \fontbody \fontstyle \fontalternative \defaultfontsize
-% \iftryingfont \fontclassstrategiesc \fi}
-% \def\fontclassstrategiesc % --- --- def --- % pt tt tf a
-% {\dofontclassstrategy \autofontsizetrue \fontbody \fontstyle \defaultfontalternative \fontsize
-% \iftryingfont \fontclassstrategiesd \fi}
-% \def\fontclassstrategiesd % --- --- def def % pt tt tf
-% {\dofontclassstrategy \autofontsizetrue \fontbody \fontstyle \defaultfontalternative \defaultfontsize
-% \iftryingfont \fontclassstrategiese \fi}
-% \def\fontclassstrategiese % --- def def def % pt rm tf
-% {\dofontclassstrategy \autofontsizefalse \fontbody \defaultfontstyle \defaultfontalternative \defaultfontsize
-% \iftryingfont \fontclassstrategiesf \fi}
-% \def\fontclassstrategiesf % def def def def % rm tf
-% {\dofontclassstrategy \autofontsizetrue \defaultfontbody \defaultfontstyle \defaultfontalternative \defaultfontsize}
-
\def\fontclassstrategiesa % --- --- --- --- % pt tt bf a
{\ifcsname\fontclass\fontbody \fontstyle \fontalternative \fontsize\endcsname
\autofontsizefalse
@@ -2440,24 +2308,6 @@
% no class
-% \def\fontstrategiesa % --- --- --- --- % pt tt bf a
-% {\dofontstrategy \autofontsizefalse \fontbody \fontstyle \fontalternative \fontsize
-% \iftryingfont \fontstrategiesb \fi}
-% \def\fontstrategiesb % --- --- --- def % pt tt bf
-% {\dofontstrategy \autofontsizetrue \fontbody \fontstyle \fontalternative \defaultfontsize
-% \iftryingfont \fontstrategiesc \fi}
-% \def\fontstrategiesc % --- --- def --- % pt tt tf a
-% {\dofontstrategy \autofontsizetrue \fontbody \fontstyle \defaultfontalternative \fontsize
-% \iftryingfont \fontstrategiesd \fi}
-% \def\fontstrategiesd % --- --- def def % pt tt tf
-% {\dofontstrategy \autofontsizetrue \fontbody \fontstyle \defaultfontalternative \defaultfontsize
-% \iftryingfont \fontstrategiese \fi}
-% \def\fontstrategiese % --- def def def % pt rm tf
-% {\dofontstrategy \autofontsizefalse \fontbody \defaultfontstyle \defaultfontalternative \defaultfontsize
-% \iftryingfont \fontstrategiesf \fi}
-% \def\fontstrategiesf % def def def def % rm tf
-% {\dofontstrategy \autofontsizetrue \defaultfontbody \defaultfontstyle \defaultfontalternative \defaultfontsize}
-
\def\fontstrategiesa % --- --- --- --- % pt tt bf a
{\ifcsname\fontbody \fontstyle \fontalternative \fontsize\endcsname
\autofontsizefalse
@@ -3213,19 +3063,6 @@
%D or even better:
-% \def\doemphasistypeface#1#2% slow
-% {\doifelsevalue{\??ft\fontclass\normalizedbodyfontsize\c!em}\v!slanted
-% {#1}%
-% {\doifelsevalue{\??ft\fontclass\normalizedbodyfontsize\c!em}\v!italic
-% {#2}%
-% {\doifelsevaluenothing{\??ft\fontclass\normalizedbodyfontsize\c!em}
-% {\doifelsevalue{\??ft\normalizedbodyfontsize\c!em}\v!slanted
-% {#1}%
-% {\doifelsevalue{\??ft\normalizedbodyfontsize\c!em}\v!italic
-% {#2}%
-% {\getvalue{\??ft\normalizedbodyfontsize\c!em}}}}
-% {\getvalue{\??ft\fontclass\normalizedbodyfontsize\c!em}}}}}
-
\def\doemphasistypeface#1#2%
{\edef\emphasizedtypeface{\csname\??ft\fontclass\normalizedbodyfontsize\c!em\endcsname}%
\ifx\emphasizedtypeface\v!slanted
@@ -3318,18 +3155,6 @@
\expandafter\emphasislook
\fi}
-% \def\emphasislook
-% {\begingroup
-% \beginrobusttest
-% \futurelet\next\emphasistest}
-
-% \def\emphasistest
-% {\normalifcat\noexpand\next,%
-% \endrobusttest\expandafter\doemphasiscorrection
-% \normalelse
-% \endrobusttest\expandafter\dododoemphasiscorrection
-% \normalfi}
-
\def\emphasislook
{\begingroup
\futurelet\next\emphasistest}
diff --git a/tex/context/base/l-lpeg.lua b/tex/context/base/l-lpeg.lua
index f060f3b36..c936d0010 100644
--- a/tex/context/base/l-lpeg.lua
+++ b/tex/context/base/l-lpeg.lua
@@ -98,6 +98,15 @@ lpeg.splitat = splitat
local cache = { }
+function lpeg.split(separator,str)
+ local c = cache[separator]
+ if not c then
+ c = Ct(splitat(separator))
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:split(separator)
local c = cache[separator]
if not c then
@@ -109,6 +118,17 @@ end
local cache = { }
+function lpeg.checkedsplit(separator,str)
+ local c = cache[separator]
+ if not c then
+ separator = P(separator)
+ local other = C((1 - separator)^0)
+ c = Ct(separator^0 * other * (separator^1 * other)^0)
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:checkedsplit(separator)
local c = cache[separator]
if not c then
diff --git a/tex/context/base/lang-ini.lua b/tex/context/base/lang-ini.lua
index 0538b44f8..e7818048d 100644
--- a/tex/context/base/lang-ini.lua
+++ b/tex/context/base/lang-ini.lua
@@ -9,12 +9,12 @@ if not modules then modules = { } end modules ['lang-ini'] = {
-- needs a cleanup (share locals)
local utf = unicode.utf8
-
-local find, lower, format, match, utfchar = string.find, string.lower, string.format, string.match, utf.char
+local utfbyte = utf.byte
+local format = string.format
local concat = table.concat
local lpegmatch = lpeg.match
-if lang.use_new then lang.use_new(true) end
+local trace_patterns = false trackers.register("languages.patterns", function(v) trace_patterns = v end)
languages = languages or {}
languages.version = 1.009
@@ -32,18 +32,13 @@ local langdata = languages.hyphenation.data
--~ string =lang:hyphenation()
--~ lang:clear_hyphenation()
-
-- we can consider hiding data (faster access too)
---~ local function filter(filename,what)
---~ local data = io.loaddata(resolvers.find_file(filename))
---~ local data = match(data,string.format("\\%s%%s*(%%b{})",what or "patterns"))
---~ return match(data,"{%s*(.-)%s*}") or ""
---~ end
-
-- loading the 26 languages that we normally load in mkiv, the string based variant
-- takes .84 seconds (probably due to the sub's) while the lpeg variant takes .78
-- seconds
+--
+-- the following lpeg can probably be improved (it was one of the first I made)
local leftbrace = lpeg.P("{")
local rightbrace = lpeg.P("}")
@@ -57,7 +52,7 @@ local command = lpeg.P("\\patterns")
local parser = (1-command)^0 * command * content
local function filterpatterns(filename)
- if find(filename,"%.rpl") then
+ if file.extname(filename) == "rpl" then
return io.loaddata(resolvers.find_file(filename)) or ""
else
return lpegmatch(parser,io.loaddata(resolvers.find_file(filename)) or "")
@@ -68,7 +63,7 @@ local command = lpeg.P("\\hyphenation")
local parser = (1-command)^0 * command * content
local function filterexceptions(filename)
- if find(filename,"%.rhl") then
+ if file.extname(filename) == "rhl" then
return io.loaddata(resolvers.find_file(filename)) or ""
else
return lpegmatch(parser,io.loaddata(resolvers.find_file(filename)) or {}) -- "" ?
@@ -96,14 +91,22 @@ function languages.hyphenation.number(tag)
return (d and d:id()) or 0
end
+lang.exceptions = lang.hyphenation
+
local function loadthem(tag, filename, filter, target)
statistics.starttiming(languages)
local data = record(tag)
- filename = (filename and filename ~= "" and resolvers.find_file(filename)) or ""
- local ok = filename ~= ""
+ local fullname = (filename and filename ~= "" and resolvers.find_file(filename)) or ""
+ local ok = fullname ~= ""
if ok then
- lang[target](data,filterpatterns(filename))
+ if trace_patterns then
+ logs.report("languages","filtering %s for language '%s' from '%s'",target,tag,fullname)
+ end
+ lang[target](data,filterpatterns(fullname))
else
+ if trace_patterns then
+ logs.report("languages","no %s for language '%s' in '%s'",target,tag,filename or "?")
+ end
lang[target](data,"")
end
langdata[tag] = data
@@ -116,7 +119,7 @@ function languages.hyphenation.loadpatterns(tag, patterns)
end
function languages.hyphenation.loadexceptions(tag, exceptions)
- return loadthem(tag, patterns, filterexceptions, "hyphenation")
+ return loadthem(tag, patterns, filterexceptions, "exceptions")
end
function languages.hyphenation.exceptions(tag, ...)
@@ -174,8 +177,8 @@ function languages.setup(what,settings)
local righthyphen = settings.righthyphen
lefthyphen = lefthyphen ~= "" and lefthyphen or nil
righthyphen = righthyphen ~= "" and righthyphen or nil
- lefthyphen = lefthyphen and utf.byte(lefthyphen) or 0
- righthyphen = righthyphen and utf.byte(righthyphen) or 0
+ lefthyphen = lefthyphen and utfbyte(lefthyphen) or 0
+ righthyphen = righthyphen and utfbyte(righthyphen) or 0
lang.posthyphenchar(what,lefthyphen)
lang.prehyphenchar (what,righthyphen)
lang.postexhyphenchar(what,lefthyphen)
@@ -234,7 +237,7 @@ function languages.enable(tags)
for i=1,#tags do
local tag = tags[i]
local l = registered[tag]
- if l then
+ if l and l ~= "" then
if not l.loaded then
local tag = l.parent
local number = languages.hyphenation.number(tag)
@@ -248,6 +251,9 @@ function languages.enable(tags)
numbers[l.number] = tag
end
l.loaded = true
+ if trace_patterns then
+ logs.report("languages","assigning number %s",l.number)
+ end
end
if l.number > 0 then
return l.number
@@ -293,188 +299,6 @@ function languages.logger.report()
return (#result > 0 and concat(result," ")) or "none"
end
-languages.words = languages.words or {}
-languages.words.data = languages.words.data or {}
-languages.words.enables = false
-languages.words.threshold = 4
-
-languages.words.colors = {
- ["known"] = "green",
- ["unknown"] = "red",
-}
-
-do -- can use predefined patterns
-
- local spacing = lpeg.S(" \n\r\t")
- local markup = lpeg.S("-=")
- local lbrace = lpeg.P("{")
- local rbrace = lpeg.P("}")
- local disc = (lbrace * (1-rbrace)^0 * rbrace)^1 -- or just 3 times, time this
- local word = lpeg.Cs((markup/"" + disc/"" + (1-spacing))^1)
-
- function languages.words.load(tag, filename)
- local filename = resolvers.find_file(filename,'other text file') or ""
- if filename ~= "" then
- statistics.starttiming(languages)
- local data = io.loaddata(filename) or ""
- local words = languages.words.data[tag] or {}
- parser = (spacing + word/function(s) words[s] = true end)^0
- lpegmatch(parser,data)
- languages.words.data[tag] = words
- statistics.stoptiming(languages)
- end
- end
-
-end
-
-function languages.words.found(id, str)
- local tag = numbers[id]
- if tag then
- local data = languages.words.data[tag]
- return data and (data[str] or data[lower(str)])
- else
- return false
- end
-end
-
--- The following code is an adaption of experimental code for
--- hyphenating and spell checking.
-
-do
-
- local glyph, disc, kern = node.id('glyph'), node.id('disc'), node.id('kern')
-
- local bynode = node.traverse
- local chardata = characters.data
-
- local function mark_words(head,found) -- can be optimized
- local current, start, str, language, n = head, nil, "", nil, 0
- local function action()
- if #str > 0 then
- local f = found(language,str)
- if f then
- for i=1,n do
- f(start)
- start = start.next
- end
- end
- end
- str, start, n = "", nil, 0
- end
- while current do
- local id = current.id
- if id == glyph then
- local a = current.lang
- if a then
- if a ~= language then
- if start then
- action()
- end
- language = a
- end
- elseif start then
- action()
- language = a
- end
- local components = current.components
- if components then
- start = start or current
- n = n + 1
- for g in bynode(components) do
- str = str .. utfchar(g.char)
- end
- else
- local code = current.char
- if chardata[code].uccode or chardata[code].lccode then
- start = start or current
- n = n + 1
- str = str .. utfchar(code)
- elseif start then
- action()
- end
- end
- elseif id == disc then
- if n > 0 then n = n + 1 end
- -- ok
- elseif id == kern and current.subtype == 0 and start then
- -- ok
- elseif start then
- action()
- end
- current = current.next
- end
- if start then
- action()
- end
- return head
- end
-
- languages.words.methods = { }
- languages.words.method = 1
-
- local lw = languages.words
-
- languages.words.methods[1] = function(head, attribute, yes, nop)
- local set = node.set_attribute
- local unset = node.unset_attribute
- local right, wrong = false, false
- if yes then right = function(n) set(n,attribute,yes) end end
- if nop then wrong = function(n) set(n,attribute,nop) end end
- for n in node.traverse(head) do
- unset(n,attribute) -- hm
- end
- local found, done = languages.words.found, false
- mark_words(head, function(language,str)
- if #str < lw.threshold then
- return false
- elseif found(language,str) then
- done = true
- return right
- else
- done = true
- return wrong
- end
- end)
- return head, done
- end
-
- local color = attributes.private('color')
-
- function languages.words.check(head)
- if lw.enabled and head.next then
- local colors = lw.colors
- local alc = attributes.list[color]
- return lw.methods[lw.method](head, color, alc[colors.known], alc[colors.unknown])
- else
- return head, false
- end
- end
-
- function languages.words.enable()
- tasks.enableaction("processors","languages.words.check")
- languages.words.enabled = true
- end
-
- function languages.words.disable()
- languages.words.enabled = false
- end
-
-end
-
--- for the moment we hook it into the attribute handler
-
---~ languagehacks = { }
-
---~ function languagehacks.process(namespace,attribute,head)
---~ return languages.check(head)
---~ end
-
---~ chars.plugins[chars.plugins+1] = {
---~ name = "language",
---~ namespace = languagehacks,
---~ processor = languagehacks.process
---~ }
-
-- must happen at the tex end
languages.associate('en','latn','eng')
diff --git a/tex/context/base/lang-ini.mkiv b/tex/context/base/lang-ini.mkiv
index 0662e5870..920044640 100644
--- a/tex/context/base/lang-ini.mkiv
+++ b/tex/context/base/lang-ini.mkiv
@@ -303,7 +303,7 @@
\def\dosetnormallanguage#1#2% current default
{\edef\askedlanguagepatterns{\specificlanguageparameter{#1}\s!patterns}%
- \normallanguage=\ctxlua{tex.sprint(languages.enable({"\askedlanguagepatterns","#1","\askedlanguagepatterns","#2"}))}%
+ \normallanguage=\ctxlua{tex.sprint(languages.enable({"\askedlanguagepatterns","#1","#2"}))}%
\ifproductionrun
\setxvalue{\??la\??la#1#2}{\number\normallanguage}%
\fi}
@@ -317,7 +317,7 @@
\newtoks \everylanguage
-\def\sethyphenationvariables
+\def\sethyphenationvariables % as we can have cloning we need to set it each time, unless we move all to lua
{\ctxlua{languages.setup(tex.language, {
lefthyphen = "\languageparameter\c!lefthyphen",
righthyphen = "\languageparameter\c!righthyphen",
@@ -553,33 +553,6 @@
\let\preloadallpatterns\relax % just for old times sake
\let\preloadlanguages \relax % just for old times sake
-%D This might bexcome a seperate file:
-
-% mkiv only -- todo: internationalize command names
-
-% \loadspellchecklist[en][words-en.txt]
-% \loadspellchecklist[us][words-en.txt]
-% \loadspellchecklist[nl][words-nl.txt]
-% \setupspellchecking[state=start]
-
-\def\loadspellchecklist
- {\dodoubleempty\doloadspellchecklist}
-
-\def\doloadspellchecklist[#1][#2]%
- {\ctxlua{languages.words.load("#1","#2")}}
-
-\def\setupspellchecking
- {\dosingleargument\dosetupspellchecking}
-
-\def\setupspellchecking[#1]% todo colors
- {\getparameters[\??wl][#1]%
- \doifelse\@@wlstate\v!start
- {\ctxlua{languages.words.enable()}}
- {\ctxlua{languages.words.disable()}}}
-
-\setupspellchecking
- [\c!state=\v!stop]
-
\uchyph=1
\exhyphenchar=45 % to permit breaking at explicit hyphens
diff --git a/tex/context/base/lang-wrd.lua b/tex/context/base/lang-wrd.lua
new file mode 100644
index 000000000..1452d5279
--- /dev/null
+++ b/tex/context/base/lang-wrd.lua
@@ -0,0 +1,185 @@
+if not modules then modules = { } end modules ['lang-ini'] = {
+ version = 1.001,
+ comment = "companion to lang-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local utf = unicode.utf8
+local lower, utfchar = string.lower, utf.char
+local lpegmatch = lpeg.match
+
+languages.words = languages.words or {}
+languages.words.data = languages.words.data or {}
+languages.words.enables = false
+languages.words.threshold = 4
+
+languages.words.colors = {
+ ["known"] = "green",
+ ["unknown"] = "red",
+}
+
+local spacing = lpeg.S(" \n\r\t")
+local markup = lpeg.S("-=")
+local lbrace = lpeg.P("{")
+local rbrace = lpeg.P("}")
+local disc = (lbrace * (1-rbrace)^0 * rbrace)^1 -- or just 3 times, time this
+local word = lpeg.Cs((markup/"" + disc/"" + (1-spacing))^1)
+
+function languages.words.load(tag, filename)
+ local filename = resolvers.find_file(filename,'other text file') or ""
+ if filename ~= "" then
+ statistics.starttiming(languages)
+ local data = io.loaddata(filename) or ""
+ local words = languages.words.data[tag] or {}
+ parser = (spacing + word/function(s) words[s] = true end)^0
+ lpegmatch(parser,data)
+ languages.words.data[tag] = words
+ statistics.stoptiming(languages)
+ end
+end
+
+function languages.words.found(id, str)
+ local tag = numbers[id]
+ if tag then
+ local data = languages.words.data[tag]
+ return data and (data[str] or data[lower(str)])
+ else
+ return false
+ end
+end
+
+-- The following code is an adaption of experimental code for
+-- hyphenating and spell checking.
+
+local glyph, disc, kern = node.id('glyph'), node.id('disc'), node.id('kern')
+
+local bynode = node.traverse
+local chardata = characters.data
+
+local function mark_words(head,found) -- can be optimized
+ local current, start, str, language, n = head, nil, "", nil, 0
+ local function action()
+ if #str > 0 then
+ local f = found(language,str)
+ if f then
+ for i=1,n do
+ f(start)
+ start = start.next
+ end
+ end
+ end
+ str, start, n = "", nil, 0
+ end
+ while current do
+ local id = current.id
+ if id == glyph then
+ local a = current.lang
+ if a then
+ if a ~= language then
+ if start then
+ action()
+ end
+ language = a
+ end
+ elseif start then
+ action()
+ language = a
+ end
+ local components = current.components
+ if components then
+ start = start or current
+ n = n + 1
+ for g in bynode(components) do
+ str = str .. utfchar(g.char)
+ end
+ else
+ local code = current.char
+ if chardata[code].uccode or chardata[code].lccode then
+ start = start or current
+ n = n + 1
+ str = str .. utfchar(code)
+ elseif start then
+ action()
+ end
+ end
+ elseif id == disc then
+ if n > 0 then n = n + 1 end
+ -- ok
+ elseif id == kern and current.subtype == 0 and start then
+ -- ok
+ elseif start then
+ action()
+ end
+ current = current.next
+ end
+ if start then
+ action()
+ end
+ return head
+end
+
+languages.words.methods = { }
+languages.words.method = 1
+
+local lw = languages.words
+
+languages.words.methods[1] = function(head, attribute, yes, nop)
+ local set = node.set_attribute
+ local unset = node.unset_attribute
+ local right, wrong = false, false
+ if yes then right = function(n) set(n,attribute,yes) end end
+ if nop then wrong = function(n) set(n,attribute,nop) end end
+ for n in node.traverse(head) do
+ unset(n,attribute) -- hm
+ end
+ local found, done = languages.words.found, false
+ mark_words(head, function(language,str)
+ if #str < lw.threshold then
+ return false
+ elseif found(language,str) then
+ done = true
+ return right
+ else
+ done = true
+ return wrong
+ end
+ end)
+ return head, done
+end
+
+local color = attributes.private('color')
+
+function languages.words.check(head)
+ if lw.enabled and head.next then
+ local colors = lw.colors
+ local alc = attributes.list[color]
+ return lw.methods[lw.method](head, color, alc[colors.known], alc[colors.unknown])
+ else
+ return head, false
+ end
+end
+
+function languages.words.enable()
+ tasks.enableaction("processors","languages.words.check")
+ languages.words.enabled = true
+end
+
+function languages.words.disable()
+ languages.words.enabled = false
+end
+
+-- for the moment we hook it into the attribute handler
+
+--~ languagehacks = { }
+
+--~ function languagehacks.process(namespace,attribute,head)
+--~ return languages.check(head)
+--~ end
+
+--~ chars.plugins[chars.plugins+1] = {
+--~ name = "language",
+--~ namespace = languagehacks,
+--~ processor = languagehacks.process
+--~ }
diff --git a/tex/context/base/lang-wrd.mkiv b/tex/context/base/lang-wrd.mkiv
new file mode 100644
index 000000000..e517ab5ae
--- /dev/null
+++ b/tex/context/base/lang-wrd.mkiv
@@ -0,0 +1,47 @@
+%D \module
+%D [ file=lang-wrd,
+%D version=2006.XX.XX,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Checking,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Experimental.
+
+\writestatus{loading}{ConTeXt Language Macros / Checking}
+
+\registerctxluafile{lang-wrd}{1.001}
+
+\unprotect
+
+% mkiv only -- todo: internationalize command names
+
+% \loadspellchecklist[en][words-en.txt]
+% \loadspellchecklist[us][words-en.txt]
+% \loadspellchecklist[nl][words-nl.txt]
+% \setupspellchecking[state=start]
+
+\def\loadspellchecklist
+ {\dodoubleempty\doloadspellchecklist}
+
+\def\doloadspellchecklist[#1][#2]%
+ {\ctxlua{languages.words.load("#1","#2")}}
+
+\def\setupspellchecking
+ {\dosingleargument\dosetupspellchecking}
+
+\def\setupspellchecking[#1]% todo colors
+ {\getparameters[\??wl][#1]%
+ \doifelse\@@wlstate\v!start
+ {\ctxlua{languages.words.enable()}}
+ {\ctxlua{languages.words.disable()}}}
+
+\setupspellchecking
+ [\c!state=\v!stop]
+
+\protect \endinput
diff --git a/tex/context/base/lpdf-ini.lua b/tex/context/base/lpdf-ini.lua
index 416e2eae2..e3116c80b 100644
--- a/tex/context/base/lpdf-ini.lua
+++ b/tex/context/base/lpdf-ini.lua
@@ -7,7 +7,7 @@ if not modules then modules = { } end modules ['lpdf-ini'] = {
}
local setmetatable, getmetatable, type, next, tostring, tonumber, rawset = setmetatable, getmetatable, type, next, tostring, tonumber, rawset
-local char, byte, format, gsub, concat, match, sub = string.char, string.byte, string.format, string.gsub, table.concat, string.match, string.sub
+local char, byte, format, gsub, concat, match, sub, gmatch = string.char, string.byte, string.format, string.gsub, table.concat, string.match, string.sub, string.gmatch
local utfvalues = string.utfvalues
local texwrite, texset, texsprint, ctxcatcodes = tex.write, tex.set, tex.sprint, tex.ctxcatcodes
local sind, cosd = math.sind, math.cosd
@@ -64,25 +64,21 @@ lpdf.tosixteen = tosixteen
--
-- -- no need for escaping .. just use unicode instead
+-- \0 \t \n \r \f <space> ( ) [ ] { } / %
+
local function toeight(str)
return "(" .. str .. ")"
end
lpdf.toeight = toeight
-local escapes = "-"
-
-local escaped = lpeg.Cs(lpeg.Cc("(") * (lpeg.S("\\/#<>[]()")/escapes + lpeg.P(1))^0 * lpeg.Cc(")"))
-
-local function cleaned(str)
- if not str or str == "" then
- return "()"
- else
- return lpegmatch(escaped,str)
- end
-end
-
-lpdf.cleaned = cleaned
+--~ local escaped = lpeg.Cs((lpeg.S("\0\t\n\r\f ()[]{}/%")/"#" + lpeg.P(1))^0)
+--~
+--~ local function cleaned(str)
+--~ return (str and str ~= "" and lpegmatch(escaped,str)) or ""
+--~ end
+--~
+--~ lpdf.cleaned = cleaned -- not public yet
local function merge_t(a,b)
local t = { }
@@ -262,11 +258,20 @@ for i=-1,9 do cache[i] = pdfnumber(i) end
local cache = { } -- can be weak
+local forbidden, replacements = "\0\t\n\r\f ()[]{}/%%#\\", { } -- table faster than function
+
+for s in gmatch(forbidden,".") do
+ replacements[s] = format("#%02x",byte(s))
+end
+
+local escaped = lpeg.Cs(lpeg.Cc("/") * (lpeg.S(forbidden)/replacements + lpeg.P(1))^0)
+
local function pdfconstant(str,default)
str = str or default or ""
local c = cache[str]
if not c then
- c = setmetatable({ "/" .. str },mt_c)
+ -- c = setmetatable({ "/" .. str },mt_c)
+ c = setmetatable({ lpegmatch(escaped,str) },mt_c)
cache[str] = c
end
return c
diff --git a/tex/context/base/luat-ini.lua b/tex/context/base/luat-ini.lua
index 295a9ab8f..55384f3fc 100644
--- a/tex/context/base/luat-ini.lua
+++ b/tex/context/base/luat-ini.lua
@@ -129,6 +129,8 @@ end
storage.register("lua/numbers", lua.numbers, "lua.numbers")
storage.register("lua/messages", lua.messages, "lua.messages")
+--~ local arguments, files = document.arguments, document.files -- set later
+
function document.setargument(key,value)
document.arguments[key] = value
end
@@ -149,6 +151,10 @@ function document.getargument(key,default)
tex.sprint(tex.ctxcatcodes,v or default or "")
end
+function document.setfilename(i,name)
+ document.files[tonumber(i)] = name
+end
+
function document.getfilename(i)
tex.sprint(tex.ctxcatcodes,document.files[i] or "")
end
diff --git a/tex/context/base/luat-ini.mkiv b/tex/context/base/luat-ini.mkiv
index 84214ea73..833a3e66a 100644
--- a/tex/context/base/luat-ini.mkiv
+++ b/tex/context/base/luat-ini.mkiv
@@ -190,12 +190,16 @@
\def\setdocumentfilename #1#2{\ctxlua{document.setfilename(#1,"#2")}}
\def\setdocumentargument #1#2{\ctxlua{document.setargument("#1","#2")}}
-\def\setdefaultdocumentargument#1#2{\ctxlua{document.getargument("#1","#2")}}
-\def\getdocumentfilename #1{\ctxlua{document.getfilename(#1)}}
-\def\getdocumentargument #1{\ctxlua{document.getargument(#1)}}
+\def\setdocumentargumentdefault#1#2{\ctxlua{document.setdefaultargument("#1","#2")}}
+\def\getdocumentfilename #1{\ctxlua{document.getfilename("#1")}}
+\def\getdocumentargument #1{\ctxlua{document.getargument("#1")}}
+\def\getdocumentargumentdefault#1#2{\ctxlua{document.getargument("#1","#2")}}
\def\doifdocumentargumentelse #1{\doifsomethingelse{\getdocumentargument{#1}}}
\def\doifdocumentargument #1{\doifsomething {\getdocumentargument{#1}}}
\def\doifnotdocumentargument #1{\doifnothing {\getdocumentargument{#1}}}
+\def\doifdocumentfilenameelse #1{\doifsomethingelse{\getdocumentfilename{#1}}}
+\def\doifdocumentfilename #1{\doifsomething {\getdocumentfilename{#1}}}
+\def\doifnotdocumentfilename #1{\doifnothing {\getdocumentfilename{#1}}}
\let\doifelsedocumentargument\doifdocumentargumentelse
diff --git a/tex/context/base/m-database.tex b/tex/context/base/m-database.tex
index 02b86cf09..3bb050f14 100644
--- a/tex/context/base/m-database.tex
+++ b/tex/context/base/m-database.tex
@@ -89,12 +89,16 @@
\edef\detokenizedrelax{\detokenize{\relax}}
+\edef\processseplistseparator{\detokenize{,}}%
+
\def\dodefineprocessseplist#1#2% separator \docommand
- {\def\dodoprocessseplist##1##2#1%
+ {\edef\processseplistseparator{\detokenize{#1}}%
+ \def\dodoprocessseplist##1##2#1%
{\edef\!!stringa{\detokenize{##1}}%
\ifx\detokenizedrelax\!!stringa
\expandafter\nodoprocessseplist
- \else\ifx\!!stringa#1%
+ % \else\ifx\!!stringa#1%
+ \else\ifx\!!stringa\processseplistseparator
#2{}%
#2{##2}%
\expandafter\expandafter\expandafter\dodoprocessseplist
@@ -397,4 +401,21 @@ a,b,c,č
d,e,f,š
\stopCSV
+\enableregime[utf]
+
+\defineseparatedlist[X][separator=X,left=(,right=),first=\endgraf,last=\endgraf]
+\defineseparatedlist[Y][separator=Y,left=(,right=),first=\endgraf,last=\endgraf]
+
+\startX
+aXb
+Xc
+čXš
+\stopX
+
+\startY
+aYb
+Yc
+čYš
+\stopY
+
\stoptext
diff --git a/tex/context/base/math-ini.mkiv b/tex/context/base/math-ini.mkiv
index 08c2e1604..c8518dc3a 100644
--- a/tex/context/base/math-ini.mkiv
+++ b/tex/context/base/math-ini.mkiv
@@ -166,7 +166,7 @@
\def\@@mathlimopcomm #1{\mathop{#1}} %no \limits
\def\@@mathnolopcomm #1{\mathop{#1}\nolimits}
-\def\@@mathboxcomm #1{\dontleavehmode\hbox{$\mathsurround\zeropoint#1$}}
+\def\@@mathboxcomm #1{\dontleavehmode\hbox\Ustartmath\mathsurround\zeropoint#1\Ustopmath}
\def\@@mathchoicecomm#1{[todo #1]}
\chardef\mathordcode = 0 \let\mathordcomm \mathord
@@ -302,9 +302,11 @@
%D
%D This hooks into the math handler with:
-\appendtoks
- \setmathfunctionstyle\currentmathtextstyle
-\to \everybodyfont
+% no longer supported this way, has to be done with \setupmathematics
+%
+% \appendtoks
+% \setmathfunctionstyle\currentmathtextstyle
+% \to \everybodyfont
%D Usage:
%D
diff --git a/tex/context/base/mtx-context-arrange.tex b/tex/context/base/mtx-context-arrange.tex
index 21a06b3a8..73431567d 100644
--- a/tex/context/base/mtx-context-arrange.tex
+++ b/tex/context/base/mtx-context-arrange.tex
@@ -89,11 +89,15 @@
if document.arguments.sort then
table.sort(document.files)
end
- local emptypages = document.arguments.addempty or ""
- local textwidth = document.arguments.textwidth or "0cm"
+ local emptypages = document.arguments.addempty or ""
+ local textwidth = document.arguments.textwidth or "0cm"
for _, filename in ipairs(document.files) do
if not string.find(filename,"^mtx%-context%-") then
- fprint("\\insertpages[%s][%s][width=%s]",filename,emptypages,textwidth)
+ context.insertpages (
+ { filename },
+ { emptypages },
+ { width = textwidth }
+ )
end
end
else
diff --git a/tex/context/base/mtx-context-combine.tex b/tex/context/base/mtx-context-combine.tex
index 991e974ae..8a861ab83 100644
--- a/tex/context/base/mtx-context-combine.tex
+++ b/tex/context/base/mtx-context-combine.tex
@@ -1,5 +1,3 @@
-% engine=luatex
-
%D \module
%D [ file=mtx-context-combine,
%D version=2009.03.21,
@@ -19,17 +17,19 @@
%
% usage: context --extra=combine [options] list-of-files
%
-% --sort : sort filenames first
-% --paperoffset=dimension : left-top-offset
-% --nobanner : no footer etc
-% --combination : h*v or hxv
-% --paperformat : paper*print or paperxprint
-% --nobanner : no footerlines
-% --bannerheight : height of banner
-% --bannerstring : height of bannerstring
+% --sort : sort filenames first
+% --paperoffset=dimension : left-top-offset
+% --nobanner : no footer etc
+% --combination : h*v or hxv
+% --paperformat=spec : paper*print or paperxprint
+% --nobanner : no footerlines
+% --bannerheight=dimension : height of banner
+% --bannerstring=dimension : height of bannerstring
%
% end help
+\input mtx-context-common.tex
+
\doifdocumentargumentelse {paperoffset} {
\setuplayout
@@ -50,45 +50,16 @@
width=middle,
height=middle]
-\startluacode
- local combination = document.arguments['combination'] or '2*2'
- local nx, ny = string.match(combination,"^(%d+)%s*[%*x]%s*(%d+)$")
- if not nx then
- nx, ny = 2, 2
- elseif not ny then
- nx = tonumber(combination) or 2
- ny = nx
- else
- nx = tonumber(nx) or 2
- ny = tonumber(ny) or nx or 2
- end
- document.setargument("nx",nx)
- document.setargument("ny",ny)
-\stopluacode
-
-\startluacode
- local paperformat = document.arguments['paperformat'] or 'A4*A4'
- paperformat = string.upper(paperformat)
- local f, t = string.match(paperformat,"^(.-)%s*[%*xX]%s*(.-)$")
- if not f then
- f, t = "A4", "A4"
- elseif not t then
- t = f
- end
- document.setargument("from",f)
- document.setargument("to",t)
-\stopluacode
-
\setuppapersize
- [\getdocumentargument{from}]
- [\getdocumentargument{to}]
+ [\getdocumentargument{paperformat_paper}]
+ [\getdocumentargument{paperformat_print}]
\doifnotdocumentargument {bannerheight} {
\setuplayout
[footer=1cm]
}
-\doifdocumentargumentelse {nobanner} {yes} {
+\doifelse {\getdocumentargument{nobanner}} {yes} {
\setuplayout
[footer=0cm]
\setupbackgrounds
@@ -112,7 +83,6 @@
\startluacode
local format = string.format
- local fprint = function(...) tex.sprint(tex.ctxcatcodes,format(...)) end
if #document.files > 0 then
if document.arguments["sort"] then
@@ -120,25 +90,25 @@
end
local dobanner = not document.arguments["nobanner"]
local bannerheight = document.arguments["bannerheight"]
- local nx = document.arguments.nx or 2
- local ny = document.arguments.ny or 2
+ local nx = document.arguments.combination_nx or 2
+ local ny = document.arguments.combination_ny or 2
for _, filename in ipairs(document.files) do
if not string.find(filename,"^mtx%-context%-") then
-- could be a macro
local bannerstring = format("\\tttf\\detokenize{%s}\\quad\\quad\\currentdate\\quad\\quad\\pagenumber",file.basename(filename))
if dobanner then
if bannerheight then
- fprint("\\setuptexttexts[{\\setlayerframed[page][preset=middlebottom][frame=off,height=%s]{%s}}]",bannerheight,bannerstring)
+ context("\\setuptexttexts[{\\setlayerframed[page][preset=middlebottom][frame=off,height=%s]{%s}}]",bannerheight,bannerstring)
else
- fprint("\\setupfootertexts[{%s}]",bannerstring)
+ context("\\setupfootertexts[{%s}]",bannerstring)
end
end
- fprint("\\combinepages[%s][nx=%s,ny=%s]",filename,nx,ny)
- fprint("\\page")
+ context("\\combinepages[%s][nx=%s,ny=%s]",filename,nx,ny)
+ context("\\page")
end
end
else
- fprint("no files given")
+ context("no files given")
end
\stopluacode
diff --git a/tex/context/base/mtx-context-common.tex b/tex/context/base/mtx-context-common.tex
new file mode 100644
index 000000000..8327dd28d
--- /dev/null
+++ b/tex/context/base/mtx-context-common.tex
@@ -0,0 +1,43 @@
+%D \module
+%D [ file=mtx-context-common,
+%D version=2009.03.21,
+%D title=\CONTEXT\ Extra Trickry,
+%D subtitle=Common Stuff,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=\PRAGMA]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\startluacode
+ local combination = document.arguments['combination'] or '2*2'
+ local nx, ny = string.match(combination,"^(%d+)%s*[%*x]%s*(%d+)$")
+ if not nx then
+ nx, ny = 2, 2
+ elseif not ny then
+ nx = tonumber(combination) or 2
+ ny = nx
+ else
+ nx = tonumber(nx) or 2
+ ny = tonumber(ny) or nx or 2
+ end
+ document.setargument("combination_nx",nx)
+ document.setargument("combination_ny",ny)
+\stopluacode
+
+\startluacode
+ local paperformat = document.arguments['paperformat'] or 'A4*A4'
+ paperformat = string.upper(paperformat)
+ local f, t = string.match(paperformat,"^(.-)%s*[%*xX]%s*(.-)$")
+ if not f then
+ f, t = "A4", "A4"
+ elseif not t then
+ t = f
+ end
+ document.setargument("paperformat_paper",f)
+ document.setargument("paperformat_print",t)
+\stopluacode
+
+\endinput
diff --git a/tex/context/base/mtx-context-ideas.tex b/tex/context/base/mtx-context-ideas.tex
index f1ef1d35f..24d11a5b5 100644
--- a/tex/context/base/mtx-context-ideas.tex
+++ b/tex/context/base/mtx-context-ideas.tex
@@ -1,5 +1,3 @@
-% engine=luatex
-
%D \module
%D [ file=mtx-context-ideas,
%D version=2009.03.21,
diff --git a/tex/context/base/mtx-context-listing.tex b/tex/context/base/mtx-context-listing.tex
index 5c978fc6a..d0dbcbba0 100644
--- a/tex/context/base/mtx-context-listing.tex
+++ b/tex/context/base/mtx-context-listing.tex
@@ -1,5 +1,3 @@
-% engine=luatex
-
%D \module
%D [ file=mtx-context-listing,
%D version=2008.11.10, % about that time i started playing with this
@@ -23,53 +21,79 @@
% --topspace=dimension : distance above first line
% --backspace=dimension : distance before left margin
% --pretty : pretty print comform suffix (temporarily disabled)
+% --bodyfont=list : additional bodyfont settings
+% --paperformat=spec : paper*print or paperxprint
%
% end help
+\input mtx-context-common.tex
+
\setupbodyfont
- [11pt,tt]
+ [11pt,tt,\getdocumentargument{bodyfont}]
+
+\setuptyping
+ [lines=yes]
\setuplayout
[header=0cm,
footer=1.5cm,
+ topspace=\getdocumentargumentdefault{topspace}{1.5cm},
+ backspace=\getdocumentargumentdefault{backspace}{1.5cm},
width=middle,
height=middle]
-% todo: use \arguments{topspace}
+\setuppapersize
+ [\getdocumentargument{paperformat_paper}]
+ [\getdocumentargument{paperformat_print}]
-\startluacode
- local topspace = document.arguments["topspace"] or 0
- if dimen(topspace) > dimen(0) then
- tex.sprint(string.format("\\setuplayout[topspace=%s]",dimen(topspace)))
- end
- local backspace = document.arguments["backspace"] or 0
- if dimen(topspace) > dimen(0) then
- tex.sprint(string.format("\\setuplayout[backspace=%s]",dimen(backspace)))
- end
-\stopluacode
-
-\setuptyping
- [lines=yes]
-
-\setuptyping
- [option=color]
+% \startluacode
+% -- syntax check
+% local topspace = dimen(document.arguments.topspace or 0)
+% local backspace = dimen(document.arguments.backspace or 0)
+% local zeropoint = dimen(0)
+% if topspace > zeropoint then
+% context.setuplayout { topspace = tostring(topspace) }
+% end
+% if backspace > zeropoint then
+% context.setuplayout { backspace = tostring(backspace) }
+% end
+% \stopluacode
\starttext
\startluacode
+ local types = {
+ mkiv = "tex",
+ mkii = "tex",
+ cld = "lua",
+ lfg = "lua",
+ }
+
if #document.files > 0 then
- if document.arguments["sort"] then
+ if document.arguments.sort then
table.sort(document.files)
end
for _, filename in ipairs(document.files) do
if not string.find(filename,"^mtx%-context%-") then
- tex.sprint("\\page\n")
- tex.sprint(string.format("\\setupfootertexts[\\detokenize{%s}][\\pagenumber]\n",file.basename(filename)))
- tex.sprint(string.format("\\typefile{%s}",filename))
+ local pretty = document.arguments.pretty
+ if pretty == true then
+ pretty = file.extname(filename) or ""
+ elseif pretty == false then
+ pretty = ""
+ else
+ -- forced
+ end
+ context.page()
+ context.setupfootertexts( -- return true: we need to keep this entry
+ { function() context.detokenize(file.basename(filename)) return true end },
+ { function() context.pagenumber() return true end }
+ )
+ context.setuptyping { option = types[pretty] or pretty }
+ context.typefile(filename)
end
end
else
- tex.sprint(tex.ctxcatcodes,"no files given")
+ context("no files given")
end
\stopluacode
diff --git a/tex/context/base/mtx-context-timing.tex b/tex/context/base/mtx-context-timing.tex
index 51e6427f6..b788d4b63 100644
--- a/tex/context/base/mtx-context-timing.tex
+++ b/tex/context/base/mtx-context-timing.tex
@@ -1,5 +1,3 @@
-% engine=luatex
-
%D \module
%D [ file=mtx-context-timing,
%D version=2009.03.21,
diff --git a/tex/context/base/mult-cld.lua b/tex/context/base/mult-cld.lua
index 1d1542ab7..81038b68b 100644
--- a/tex/context/base/mult-cld.lua
+++ b/tex/context/base/mult-cld.lua
@@ -13,7 +13,8 @@ if not modules then modules = { } end modules ['mult-cld'] = {
-- code. It can also be handy when generating documents from databases or
-- when constructing large tables or so.
--
--- Todo: optional checking against interface!
+-- Todo: optional checking against interface
+-- Todo: coroutine trickery
context = context or { }
@@ -21,7 +22,7 @@ local format, concat = string.format, table.concat
local next, type = next, type
local texsprint, texiowrite, ctxcatcodes = tex.sprint, texio.write, tex.ctxcatcodes
-local flush = texsprint
+local flush = texsprint or function(cct,...) print(table.concat{...}) end
local _stack_, _n_ = { }, 0
@@ -32,8 +33,11 @@ local function _store_(ti)
end
local function _flush_(n)
- _stack_[n]()
- _stack_[n] = nil
+ if not _stack_[n]() then
+ _stack_[n] = nil
+ else
+ -- keep, beware, that way the stack can grow
+ end
end
context._stack_ = _stack_
@@ -74,9 +78,15 @@ local function writer(k,...)
elseif typ == "string" or typ == "number" then
flush(ctxcatcodes,"{",ti,"}")
elseif typ == "table" then
- local c = concat(ti,",")
- if c ~= "" then
- flush(ctxcatcodes,"[",c,"]")
+ local tn = #ti
+ if tn > 0 then
+ for j=1,tn do
+ local tj = ti[j]
+ if type(tj) == "function" then
+ ti[j] = "\\mkivflush{" .. _store_(tj) .. "}"
+ end
+ end
+ flush(ctxcatcodes,"[",concat(ti,","),"]")
else
flush(ctxcatcodes,"[")
local done = false
@@ -98,6 +108,8 @@ local function writer(k,...)
-- if force == "direct" then
flush(ctxcatcodes,tostring(ti))
-- end
+ elseif typ == "thread" then
+ logs.report("interfaces","coroutines not supported as we cannot yeild across boundaries")
else
logs.report("interfaces","error: %s gets a weird argument %s",k,tostring(ti))
end
@@ -108,12 +120,6 @@ end
-- -- --
---~ local function indexer(t,k)
---~ local f = function(...) return writer("\\"..k.." ",...) end
---~ t[k] = f
---~ return f
---~ end
-
local function indexer(t,k)
local c = "\\" .. k .. " "
local f = function(...) return writer(c,...) end
@@ -121,14 +127,6 @@ local function indexer(t,k)
return f
end
---~ local function caller(t,f,...)
---~ if f then
---~ flush(ctxcatcodes,format(f,...))
---~ else
---~ flush(ctxcatcodes,"\n")
---~ end
---~ end
-
local function caller(t,f,a,...)
if a then
flush(ctxcatcodes,format(f,a,...))
diff --git a/tex/context/base/mult-de.tex b/tex/context/base/mult-de.tex
index bce73f3d7..ee557cd58 100644
--- a/tex/context/base/mult-de.tex
+++ b/tex/context/base/mult-de.tex
@@ -86,6 +86,7 @@
\setinterfacevariable{backward}{rueckwaerts}
\setinterfacevariable{bbl}{bbl}
\setinterfacevariable{before}{vor}
+\setinterfacevariable{begin}{begin}
\setinterfacevariable{bib}{bib}
\setinterfacevariable{big}{gross}
\setinterfacevariable{bigbodyfont}{bigbodyfont}
@@ -141,6 +142,7 @@
\setinterfacevariable{each}{jede}
\setinterfacevariable{edge}{kante}
\setinterfacevariable{empty}{leer}
+\setinterfacevariable{end}{end}
\setinterfacevariable{endnote}{endnote}
\setinterfacevariable{enumeration}{nummerierung}
\setinterfacevariable{environment}{umgebung}
diff --git a/tex/context/base/mult-def.lua b/tex/context/base/mult-def.lua
index df65f4bcc..d02707fc9 100644
--- a/tex/context/base/mult-def.lua
+++ b/tex/context/base/mult-def.lua
@@ -11119,6 +11119,14 @@ return {
},
},
["variables"]={
+ ["end"]={
+ ["en"]="end",
+ ["nl"]="eind",
+ },
+ ["begin"]={
+ ["en"]="begin",
+ ["nl"]="begin",
+ },
["down"]={
["en"]="down",
["nl"]="omlaag",
diff --git a/tex/context/base/mult-en.tex b/tex/context/base/mult-en.tex
index 897e30db1..c8678a80c 100644
--- a/tex/context/base/mult-en.tex
+++ b/tex/context/base/mult-en.tex
@@ -86,6 +86,7 @@
\setinterfacevariable{backward}{backward}
\setinterfacevariable{bbl}{bbl}
\setinterfacevariable{before}{before}
+\setinterfacevariable{begin}{begin}
\setinterfacevariable{bib}{bib}
\setinterfacevariable{big}{big}
\setinterfacevariable{bigbodyfont}{bigbodyfont}
@@ -141,6 +142,7 @@
\setinterfacevariable{each}{each}
\setinterfacevariable{edge}{edge}
\setinterfacevariable{empty}{empty}
+\setinterfacevariable{end}{end}
\setinterfacevariable{endnote}{endnote}
\setinterfacevariable{enumeration}{enumeration}
\setinterfacevariable{environment}{environment}
diff --git a/tex/context/base/mult-fr.tex b/tex/context/base/mult-fr.tex
index e7c0e7dc6..20a20f4a7 100644
--- a/tex/context/base/mult-fr.tex
+++ b/tex/context/base/mult-fr.tex
@@ -86,6 +86,7 @@
\setinterfacevariable{backward}{retourarriere}
\setinterfacevariable{bbl}{bbl}
\setinterfacevariable{before}{avant}
+\setinterfacevariable{begin}{begin}
\setinterfacevariable{bib}{bib}
\setinterfacevariable{big}{grand}
\setinterfacevariable{bigbodyfont}{grandepolicecorp}
@@ -141,6 +142,7 @@
\setinterfacevariable{each}{chaque}
\setinterfacevariable{edge}{bord}
\setinterfacevariable{empty}{vide}
+\setinterfacevariable{end}{end}
\setinterfacevariable{endnote}{notefin}
\setinterfacevariable{enumeration}{enumeration}
\setinterfacevariable{environment}{environement}
diff --git a/tex/context/base/mult-ini.mkiv b/tex/context/base/mult-ini.mkiv
index 547bbb39a..107597a6d 100644
--- a/tex/context/base/mult-ini.mkiv
+++ b/tex/context/base/mult-ini.mkiv
@@ -118,6 +118,11 @@
\def\!!fill {fill}
\def\!!to {to}
\def\!!spread{spread}
+
+%D Kind of special:
+
+\edef\!!TLT{\detokenize{TLT}}
+\edef\!!TRT{\detokenize{TRT}}
%D \macros
%D {defineinterfaceconstant,
diff --git a/tex/context/base/mult-it.tex b/tex/context/base/mult-it.tex
index 340643ad3..ad055f7c3 100644
--- a/tex/context/base/mult-it.tex
+++ b/tex/context/base/mult-it.tex
@@ -86,6 +86,7 @@
\setinterfacevariable{backward}{indietro}
\setinterfacevariable{bbl}{bbl}
\setinterfacevariable{before}{prima}
+\setinterfacevariable{begin}{begin}
\setinterfacevariable{bib}{bib}
\setinterfacevariable{big}{grande}
\setinterfacevariable{bigbodyfont}{grossofontdeltesto}
@@ -141,6 +142,7 @@
\setinterfacevariable{each}{ogni}
\setinterfacevariable{edge}{bordo}
\setinterfacevariable{empty}{vuoto}
+\setinterfacevariable{end}{end}
\setinterfacevariable{endnote}{endnote}
\setinterfacevariable{enumeration}{enumerazione}
\setinterfacevariable{environment}{ambiente}
diff --git a/tex/context/base/mult-nl.tex b/tex/context/base/mult-nl.tex
index fa49e7c4d..e067edbb7 100644
--- a/tex/context/base/mult-nl.tex
+++ b/tex/context/base/mult-nl.tex
@@ -86,6 +86,7 @@
\setinterfacevariable{backward}{achteruit}
\setinterfacevariable{bbl}{bbl}
\setinterfacevariable{before}{voor}
+\setinterfacevariable{begin}{begin}
\setinterfacevariable{bib}{bib}
\setinterfacevariable{big}{groot}
\setinterfacevariable{bigbodyfont}{grootkorps}
@@ -141,6 +142,7 @@
\setinterfacevariable{each}{elk}
\setinterfacevariable{edge}{rand}
\setinterfacevariable{empty}{leeg}
+\setinterfacevariable{end}{eind}
\setinterfacevariable{endnote}{eindnoot}
\setinterfacevariable{enumeration}{doornummering}
\setinterfacevariable{environment}{omgeving}
diff --git a/tex/context/base/mult-ro.tex b/tex/context/base/mult-ro.tex
index 884716b04..3ad3685a8 100644
--- a/tex/context/base/mult-ro.tex
+++ b/tex/context/base/mult-ro.tex
@@ -86,6 +86,7 @@
\setinterfacevariable{backward}{inapoi}
\setinterfacevariable{bbl}{bbl}
\setinterfacevariable{before}{inainte}
+\setinterfacevariable{begin}{begin}
\setinterfacevariable{bib}{bib}
\setinterfacevariable{big}{mare}
\setinterfacevariable{bigbodyfont}{bigbodyfont}
@@ -141,6 +142,7 @@
\setinterfacevariable{each}{fiecare}
\setinterfacevariable{edge}{bordura}
\setinterfacevariable{empty}{gol}
+\setinterfacevariable{end}{end}
\setinterfacevariable{endnote}{endnote}
\setinterfacevariable{enumeration}{enumerare}
\setinterfacevariable{environment}{mediu}
diff --git a/tex/context/base/pack-rul.mkiv b/tex/context/base/pack-rul.mkiv
index a77436b61..d1098d4e0 100644
--- a/tex/context/base/pack-rul.mkiv
+++ b/tex/context/base/pack-rul.mkiv
@@ -1460,14 +1460,16 @@
\def\doinlinemframed[#1]#2%
{\begingroup
\mframedstyle\mathstyle\relax
- \inframed[#1]{$\triggermathstyle\mframedstyle#2$}%
+ \inframed[#1]{\Ustartmath\triggermathstyle\mframedstyle#2\Ustopmath}%
\endgroup}
+\def\funnymathstrut{\Ustartmath\triggermathstyle\mframedstyle\vphantom{(}\Ustopmath}
+
\def\dodisplaymframed[#1]#2%
{\begingroup
\mframedstyle\mathstyle\relax
- \def\normalstrut{$\triggermathstyle\mframedstyle\vphantom{(}$}%
- \framed[#1]{$\triggermathstyle\mframedstyle#2$}%
+ \let\normalstrut\funnymathstrut
+ \framed[#1]{\Ustartmath\triggermathstyle\mframedstyle#2\Ustopmath}%
\endgroup}
\def\mframed {\dosingleempty\dodisplaymframed}
diff --git a/tex/context/base/page-lin.lua b/tex/context/base/page-lin.lua
index b090dd4a2..22eac11a8 100644
--- a/tex/context/base/page-lin.lua
+++ b/tex/context/base/page-lin.lua
@@ -35,10 +35,15 @@ local current_list = { }
local cross_references = { }
local chunksize = 250 -- not used in boxed
-local has_attribute = node.has_attribute
-local traverse_id = node.traverse_id
-local traverse = node.traverse
-local copy_node = node.copy
+local has_attribute = node.has_attribute
+local traverse_id = node.traverse_id
+local traverse = node.traverse
+local copy_node = node.copy
+local hpack_node = node.hpack
+local insert_node_after = node.insert_after
+local insert_node_before = node.insert_before
+
+local whatsit = node.id("whatsit")
local data = nodes.lines.data
local last = #data
@@ -147,7 +152,7 @@ local function check_number(n,a,skip) -- move inline
current_list[#current_list+1] = { n, s }
if not skip and s % d.step == 0 then
local tag = d.tag or ""
- texsprint(ctxcatcodes, format("\\makenumber{%s}{%s}{%s}{%s}{%s}\\endgraf", tag, s, n.shift, n.width, the_left_margin(n.list)))
+ texsprint(ctxcatcodes, format("\\makenumber{%s}{%s}{%s}{%s}{%s}{%s}\\endgraf",tag,s,n.shift,n.width,the_left_margin(n.list),n.dir))
if trace_numbers then
logs.report("numbers","making number %s for setup %s: %s (%s)",#current_list,a,s,d.continue or "no")
end
@@ -181,9 +186,10 @@ function nodes.lines.boxed.stage_one(n)
check_number(n,a,skip)
end
else
- if node.first_character(n.list) then
+ -- the following test fails somehow (change in luatex?)
+ -- if node.first_character(n.list) then
check_number(n,a,skip)
- end
+ -- end
end
skip = false
end
diff --git a/tex/context/base/page-lin.mkiv b/tex/context/base/page-lin.mkiv
index 1cbf649dd..d0b0825c8 100644
--- a/tex/context/base/page-lin.mkiv
+++ b/tex/context/base/page-lin.mkiv
@@ -17,6 +17,8 @@
\unprotect
+% todo: save settings
+
% low level interface
\registerctxluafile{page-lin}{1.001}
@@ -34,35 +36,17 @@
\newconditional\tracelinenumbering
-% \def\mkaddtextlinenumbers#1#2#3% box col max
-% {\bgroup
-% \fullrestoreglobalbodyfont
-% \def\skipnumber{\hbox{}}%
-% \ifcase#3\relax
-% \let\makenumber\mkskiplinenumber
-% \or
-% \let\makenumber\mkleftlinenumber
-% \else\ifcase#2\relax
-% \let\makenumber\mkskiplinenumber
-% \or
-% \let\makenumber\mkleftlinenumber
-% \else
-% \let\makenumber\mkrightlinenumber
-% \fi\fi
-% \mkprocesstextlinenumbers{#1}%
-% \egroup}
-
\def\mkprocesstextlinenumbers#1%
{\setbox\linenumberscratchbox\vbox{\forgetall\offinterlineskip\ctxlua{nodes.lines.boxed.stage_one(\number#1)}}%
\ctxlua{nodes.lines.boxed.stage_two(\number#1,\number\linenumberscratchbox)}}% can move to lua code
-% id nr shift width leftskip
+% id nr shift width leftskip dir
-% \def\mkskiplinenumber #1#2#3#4#5{}
-% \def\mkleftlinenumber #1#2#3#4#5{\hbox{\llap{#2\quad\hskip#3\scaledpoint}}}
-% \def\mkrightlinenumber#1#2#3#4#5{\hbox{\rlap{\hskip#4\scaledpoint\hskip#3\scaledpoint\quad#2}}}
+% \def\mkskiplinenumber #1#2#3#4#6#5{}
+% \def\mkleftlinenumber #1#2#3#4#5#6{\hbox{\llap{#2\quad\hskip#3\scaledpoint}}}
+% \def\mkrightlinenumber#1#2#3#4#5#6{\hbox{\rlap{\hskip#4\scaledpoint\hskip#3\scaledpoint\quad#2}}}
-\def\makenumber#1#2{\hbox{\llap{#1\quad\hskip#2\scaledpoint}}\endgraf}%
+\let\makenumber\gobblesixarguments
\newconditional\boxcontentneedsprocessing
@@ -134,7 +118,7 @@
\let\currentlinenumbering\empty
\chardef\linenumbermode = 1 % 0=continue, 1=restart
-\chardef\linenumberlocation = 1 % 0=middle, 1=left, 2=right, 3=inner, 4=outer, 5=text
+\chardef\linenumberlocation = 1 % 0=middle, 1=left, 2=right, 3=inner, 4=outer, 5=text, 6=begin, 7=end
\chardef\linenumberalignment = 5 % 0=middle, 1=left, 2=right, 5=auto
\newevery \beforeeverylinenumbering \relax
@@ -206,6 +190,8 @@
\expandafter\chardef\csname\??rn:l:\v!inner \endcsname \plusthree
\expandafter\chardef\csname\??rn:l:\v!outer \endcsname \plusfour
\expandafter\chardef\csname\??rn:l:\v!text \endcsname \plusfive
+\expandafter\chardef\csname\??rn:l:\v!begin \endcsname \plussix
+\expandafter\chardef\csname\??rn:l:\v!end \endcsname \plusseven
\expandafter\chardef\csname\??rn:a:\v!middle \endcsname \zerocount
\expandafter\chardef\csname\??rn:a:\v!right \endcsname \plusone
@@ -214,29 +200,6 @@
\expandafter\chardef\csname\??rn:a:\v!flushright\endcsname \plustwo
\expandafter\chardef\csname\??rn:a:\v!auto \endcsname \plusfive
-% \def\dostartlinenumbering[#1][#2]% todo: c!continue
-% {\begingroup
-% \chardef\linenumbermode\plusone
-% \ifsecondargument
-% \def\currentlinenumbering{#1}%
-% \doifnumberelse{#2}% downward compatible
-% {\setvalue{\??rn#1\c!start}{#2}}%
-% {\doif{#2}\v!continue{\chardef\linenumbermode\zerocount}}%
-% \else\iffirstargument
-% \doifnumberelse{#1}% downward compatible
-% {\let\currentlinenumbering\empty
-% \setvalue{\??rn\c!start}{#1}}%
-% {\doifelse{#1}\v!continue
-% {\let\currentlinenumbering\empty
-% \chardef\linenumbermode\zerocount}
-% {\def\currentlinenumbering{#1}}}%
-% \fi\fi
-% \doif{\linenumberparameter\c!continue}\v!yes
-% {\chardef\linenumbermode\zerocount}%
-% \numberinglinestrue
-% \the\beforeeverylinenumbering
-% \mkstarttextlinenumbering\currentlinenumbering\linenumbermode}
-
\def\dostartlinenumbering[#1][#2]% todo: c!continue
{\begingroup
\chardef\linenumbermode\plusone
@@ -272,7 +235,7 @@
% number placement
-\let\mkskiplinenumber \gobblefivearguments
+\let\mkskiplinenumber \gobblesixarguments
\def\mkdoinnerlinenumber{\doifoddpageelse\mkdoleftlinenumber\mkdorightlinenumber}
\def\mkdoouterlinenumber{\doifoddpageelse\mkdorightlinenumber\mkdoleftlinenumber}
@@ -290,6 +253,10 @@
\expandafter\mkdoouterlinenumber
\or
\expandafter\mkdotextlinenumber
+ \or
+ \expandafter\mkdobeginlinenumber
+ \or
+ \expandafter\mkdoendlinenumber
\fi}
\def\mkrightlinenumber
@@ -304,49 +271,71 @@
\or
\expandafter\mkdoinnerlinenumber
\or
- \expandafter\mkdorightlinenumber
+ \expandafter\mkdotextlinenumber
+ \or
+ \expandafter\mkdoendlinenumber
+ \or
+ \expandafter\mkdobeginlinenumber
\fi}
\def\mkaddtextlinenumbers#1#2#3% box col max
{\bgroup
- \chardef\linenumberlocation \executeifdefined{\??rn:l:\linenumberparameter\c!location}\plusone % left
- \chardef\linenumberalignment\executeifdefined{\??rn:a:\linenumberparameter\c!align }\plusfive % auto
+ \chardef\linenumberbox #1\relax
+ \chardef\linenumbercolumn #2\relax
+ \chardef\linenumberlastcolumn#3\relax
\fullrestoreglobalbodyfont
\def\skipnumber{\hbox{}}%
- \ifcase#3\relax
- \let\makenumber\mkskiplinenumber
+ \let\makenumber\maketextlinenumber
+ \mkprocesstextlinenumbers\linenumberbox
+ \egroup}
+
+\def\maketextlinenumber#1%
+ {\edef\currentlinenumbering{#1}%
+ \chardef\linenumberlocation \executeifdefined{\??rn:l:\linenumberparameter\c!location}\plusone % left
+ \chardef\linenumberalignment\executeifdefined{\??rn:a:\linenumberparameter\c!align }\plusfive % auto
+ \ifcase\linenumberlastcolumn\relax
+ \let\domakenumber\mkskiplinenumber
\or
% one column
\ifcase\linenumberlocation
+ \let\domakenumber\mkskiplinenumber
% hm
\or
- \let\makenumber\mkleftlinenumber
+ \let\domakenumber\mkleftlinenumber
\or
- \let\makenumber\mkrightlinenumber
+ \let\domakenumber\mkrightlinenumber
\or % inner
- \let\makenumber\mkdoinnerlinenumber
+ \let\domakenumber\mkdoinnerlinenumber
\or % outer
- \let\makenumber\mkdoouterlinenumber
+ \let\domakenumber\mkdoouterlinenumber
\or % text
- \let\makenumber\mkdotextlinenumber
+ \let\domakenumber\mkdotextlinenumber
+ \or
+ \let\domakenumber\mkdobeginlinenumber
+ \or
+ \let\domakenumber\mkdoendlinenumber
\fi
- \else\ifcase#2\relax
- \let\makenumber\mkskiplinenumber
+ \else\ifcase\linenumbercolumn\relax
+ \let\domakenumber\mkskiplinenumber
\or
- \let\makenumber\mkleftlinenumber
+ \let\domakenumber\mkleftlinenumber
\ifcase\linenumberlocation\or
\chardef\linenumberlocation\plusone
\or
\chardef\linenumberlocation\plustwo
- \or
+ \else
\chardef\linenumberlocation\plusone
\or
\chardef\linenumberlocation\plusone
\or
\chardef\linenumberlocation\plusone
+ \or
+ \chardef\linenumberlocation\plusone % todo
+ \or
+ \chardef\linenumberlocation\plusone % todo
\fi
\else
- \let\makenumber\mkrightlinenumber
+ \let\domakenumber\mkrightlinenumber
\ifcase\linenumberlocation\or
\chardef\linenumberlocation\plustwo
\or
@@ -355,26 +344,52 @@
\chardef\linenumberlocation\plustwo
\or
\chardef\linenumberlocation\plustwo
+ \or
+ \chardef\linenumberlocation\plustwo % todo
+ \or
+ \chardef\linenumberlocation\plustwo % todo
\fi
\fi\fi
- \mkprocesstextlinenumbers{#1}%
- \egroup}
+ \domakenumber{#1}}
+
+\def\mkdotextlinenumber #1#2#3#4#5#6% beware, one needs so compensate for this in the width !
+ {\hbox{\dosomelinenumber{#1}{2}{#2}{#5}\hskip#3\scaledpoint}}
-\def\mkdotextlinenumber #1#2#3#4#5% beware, one needs so compensate for this in the width !
+\def\mkdotextlinenumber #1#2#3#4#5#6% beware, one needs so compensate for this in the width !
{\hbox{\dosomelinenumber{#1}{2}{#2}{#5}\hskip#3\scaledpoint}}
-\def\mkdoleftlinenumber #1#2#3#4#5%
- {\hbox{\llap{\dosomelinenumber{#1}{2}{#2}{#5}\hskip#3\scaledpoint}}}
+\def\mkdoleftlinenumber #1#2#3#4#5#6%
+ {\naturalhbox to \zeropoint
+ {\ifcase\istltdir#6\else \hskip-#4\scaledpoint \fi
+ \llap{\dosomelinenumber{#1}{2}{#2}{#5}\kern#3\scaledpoint}}}
+
+\def\mkdorightlinenumber#1#2#3#4#5#6%
+ {\naturalhbox to \zeropoint
+ {\ifcase\istltdir#6\else \hskip-#4\scaledpoint \fi
+ \rlap{\hskip#4\scaledpoint\hskip#3\scaledpoint\dosomelinenumber{#1}{1}{#2}{#5}}}}
-\def\mkdorightlinenumber#1#2#3#4#5%
- {\hbox{\rlap{\hskip#4\scaledpoint\hskip#3\scaledpoint\dosomelinenumber{#1}{1}{#2}{#5}}}}
+\def\mkdobeginlinenumber #1#2#3#4#5#6%
+ {\ifcase\istltdir#6\relax
+ \chardef\linenumberlocation\plusone
+ \expandafter\mkdoleftlinenumber
+ \else
+ \chardef\linenumberlocation\plustwo
+ \expandafter\mkdorightlinenumber
+ \fi{#1}{#2}{#3}{#4}{#5}{#6}}
+
+\def\mkdoendlinenumber#1#2#3#4#5#6%
+ {\ifcase\istltdir#6\relax
+ \chardef\linenumberlocation\plustwo
+ \expandafter\mkdorightlinenumber
+ \else
+ \chardef\linenumberlocation\plusone
+ \expandafter\mkdoleftlinenumber
+ \fi{#1}{#2}{#3}{#4}{#5}{#6}}
\def\dosomelinenumber#1#2#3#4% tag 1=left|2=right linenumber leftskip
{\begingroup
\def\currentlinenumbering{#1}%
\def\linenumber{#3}% unsafe
-% \chardef\linenumberlocation \executeifdefined{\??rn:l:\linenumberparameter\c!location}\plusone % left
-% \chardef\linenumberalignment\executeifdefined{\??rn:a:\linenumberparameter\c!align }\plusfive % auto
\doifelse{\linenumberparameter\c!width}\v!margin
{\linenumberwidth\leftmarginwidth}
{\linenumberwidth\linenumberparameter\c!width}%
diff --git a/tex/context/base/page-mar.mkiv b/tex/context/base/page-mar.mkiv
index 83a08d00e..09f0d7e6b 100644
--- a/tex/context/base/page-mar.mkiv
+++ b/tex/context/base/page-mar.mkiv
@@ -120,9 +120,6 @@
\definemarginline[atleftmargin] [\c!location=\v!left, \c!command=\lrlap,\c!width=\zeropoint,\c!distance=\zeropoint,\c!hoffset=\zeropoint]
\definemarginline[atrightmargin][\c!location=\v!right,\c!command=\rllap,\c!width=\zeropoint,\c!distance=\zeropoint,\c!hoffset=\zeropoint]
-\ifx\lrlap\undefined \def\lrlap#1{\llap{\rlap{#1}}} \fi
-\ifx\rllap\undefined \def\rllap#1{\rlap{\llap{#1}}} \fi
-
\def\lrlap#1{\llap{\rlap{#1}}}
\def\rllap#1{\rlap{\hskip\hsize\llap{#1}}}
diff --git a/tex/context/base/pret-lua.lua b/tex/context/base/pret-lua.lua
index b8553db07..9af44cbf4 100644
--- a/tex/context/base/pret-lua.lua
+++ b/tex/context/base/pret-lua.lua
@@ -263,6 +263,10 @@ function visualizer.flush_line(str, nested)
elseif inlongstring then
state, i = written(state,c,i)
elseif c == '"' or c == "'" then
+if word then
+ state = flush_lua_word(state,word)
+ word = nil
+end
instr = true
state = change_state(states[c],state)
state, i = written(state,c,i)
diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex
index 45bca44f2..a55eb95f1 100644
--- a/tex/context/base/s-abr-01.tex
+++ b/tex/context/base/s-abr-01.tex
@@ -315,13 +315,10 @@
\def\NEWPAGE {\SystemSpecialB{newpage}}
\def\NEWLINE {\SystemSpecialB{newline}}
-
\doifmodeelse {mkiv} {
- \def\THANH{Han The Thanh} % todo
+ \unexpanded\def\THANH{H\agrave n Th\ecircumflexacute\ Th\agrave nh}
} {
- \def\THANH{H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh}
+ \unexpanded\def\THANH{H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh}
}
-%def\THANH {H\`an Th\ecircumflexacute\ Th\`anh}
-
\endinput
diff --git a/tex/context/base/s-map-10.tex b/tex/context/base/s-map-10.tex
index 807ae42ef..865132f97 100644
--- a/tex/context/base/s-map-10.tex
+++ b/tex/context/base/s-map-10.tex
@@ -102,11 +102,12 @@
\definetypeface[map][tt][mono] [modern] [default][encoding=\typescripttwo]
\definetypeface[map][mm][math] [euler] [default][encoding=\typescripttwo]
- \usemathcollection[eul]
+% \usemathcollection[eul]
\stoptypescript
% activate protruding
+
\setupinterlinespace[line=11pt]
\setupfontsynonym[handling=pure]
diff --git a/tex/context/base/scrn-fld.mkiv b/tex/context/base/scrn-fld.mkiv
index b94d8b8ed..19a5ede91 100644
--- a/tex/context/base/scrn-fld.mkiv
+++ b/tex/context/base/scrn-fld.mkiv
@@ -68,8 +68,8 @@
\@EA\processcommalist\@EA[#1]\dopresetfieldsymbols}
\def\definedefaultsymbols
- {\definesymbol[defaultyes][$\times$]%
- \definesymbol[defaultno][$\cdot$]}
+ {\definesymbol[defaultyes][\mathematics{\times}]%
+ \definesymbol[defaultno ][\mathematics{\cdot }]}
\def\resetfieldsymbol[#1]% for experimental usage only
{\resetobject{SYM}{#1}}
diff --git a/tex/context/base/spac-hor.mkiv b/tex/context/base/spac-hor.mkiv
index 74893bf25..cfd2677d4 100644
--- a/tex/context/base/spac-hor.mkiv
+++ b/tex/context/base/spac-hor.mkiv
@@ -115,7 +115,7 @@
\setvalue{\??in->\v!no }{\noindentation}
\setvalue{\??in->\v!auto }{\autoindentation}
-\def\checknextindentation[#1]%
+\unexpanded\def\checknextindentation[#1]%
{\csname\??in->\ifcsname\??in->#1\endcsname#1\else\s!empty\fi\endcsname}
%D Here come the handlers.
diff --git a/tex/context/base/spac-ver.lua b/tex/context/base/spac-ver.lua
index b3bfcc00c..c75eb1baa 100644
--- a/tex/context/base/spac-ver.lua
+++ b/tex/context/base/spac-ver.lua
@@ -17,6 +17,8 @@ if not modules then modules = { } end modules ['spac-ver'] = {
-- still needed tex -> lua -> tex > lua chain (needed because we can have
-- expandable settings at the tex end
+-- todo: strip baselineskip around display math
+
local next, type, tonumber = next, type, tonumber
local format, gmatch, concat, match = string.format, string.gmatch, table.concat, string.match
local ceil, floor, max, min, round = math.ceil, math.floor, math.max, math.min, math.round
diff --git a/tex/context/base/strc-mat.mkiv b/tex/context/base/strc-mat.mkiv
index 7653544a7..ac051a613 100644
--- a/tex/context/base/strc-mat.mkiv
+++ b/tex/context/base/strc-mat.mkiv
@@ -471,6 +471,13 @@
\the\everyresetformulas
\dorechecknextindentation} % here ?
+%D \starttyping
+%D % test \par % no preceding hlist
+%D % $$x$$ % preceding hlist
+%D % \noindent $$x$$ % no preceding hlist
+%D \startformula x \stopformula % now has \noindent (in mkii we messed with baselineskip)
+%D \stoptyping
+
\def\startdisplaymath
{\bgroup
\par
@@ -480,14 +487,15 @@
\ifvmode
\prevdepth-\maxdimen % texbook pagina 79-80
\fi
- $$
+ \noindent % else funny hlist with funny baselineskip
+ \Ustartdisplaymath
\setdisplaydimensions
%\setpredisplaysize
\startinnermath}
\def\stopdisplaymath
{\stopinnermath
- $$%
+ \Ustopdisplaymath
\par
\afterdisplayspace
\par
@@ -580,10 +588,10 @@
\fi
\hbox to \localhsize \bgroup
\hss
- \def\normalstartformula{\vskip-\strutdepth$$}% i hate this
- \def\normalstopformula {$$}%
- \def\startformula {$\vcenter\bgroup\normalstartformula}%
- \def\stopformula {\normalstopformula\egroup$\hss}%
+ \def\normalstartformula{\vskip-\strutdepth\Ustartdisplaymath}% i hate this
+ \def\normalstopformula {\Ustopdisplaymath}%
+ \def\startformula {\Ustartmath\vcenter\bgroup\normalstartformula}%
+ \def\stopformula {\normalstopformula\egroup\Ustopmath\hss}%
#2%
\egroup
\stopdisplaymath
diff --git a/tex/context/base/supp-dir.mkiv b/tex/context/base/supp-dir.mkiv
index 70738357b..0634bd36f 100644
--- a/tex/context/base/supp-dir.mkiv
+++ b/tex/context/base/supp-dir.mkiv
@@ -18,4 +18,24 @@
% \expanded{\defineactivecharacter \number"2000E} {\textdir TRT\relax}
% \expanded{\defineactivecharacter \number"2000F} {\textdir TLT\relax}
+\unexpanded\def\showdirsinmargin
+ {\doifelse{\the\pardir}\!!TLT
+ {\inleft{\normalexpanded{\noexpand\hbox dir TLT{\ttxx[\the\pardir,\the\textdir]}}}}
+ {\inleft{\normalexpanded{\noexpand\hbox dir TLT{\ttxx[\the\pardir,\the\textdir]}}}}}
+
+\bgroup
+ \catcode`L=\othercatcode \gdef\istltdir#1#2#3{\if#2L0\else1\fi}
+ \catcode`R=\othercatcode \gdef\istrtdir#1#2#3{\if#2R0\else1\fi}
+\egroup
+
+\def\istlttextdir{\expandafter\istltdir\the\textdir}
+\def\istrttextdir{\expandafter\istrtdir\the\textdir}
+
+\def\istltpardir {\expandafter\istltdir\the\pardir }
+\def\istrtpardir {\expandafter\istrtdir\the\pardir }
+
+% \ifcase\istlttextdir Y\else N\fi
+% \ifcase\istltpardir Y\else N\fi
+% \ifcase\istltdir TRT\relax Y\else N\fi
+
\protect \endinput
diff --git a/tex/context/base/supp-mat.tex b/tex/context/base/supp-mat.mkii
index 1a51164e6..1a51164e6 100644
--- a/tex/context/base/supp-mat.tex
+++ b/tex/context/base/supp-mat.mkii
diff --git a/tex/context/base/supp-mat.mkiv b/tex/context/base/supp-mat.mkiv
new file mode 100644
index 000000000..595786f21
--- /dev/null
+++ b/tex/context/base/supp-mat.mkiv
@@ -0,0 +1,293 @@
+%D \module
+%D [ file=supp-mat,
+%D version=1998.09.10,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Math,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D For practical reasons, I decided to move some math things to
+%D a support module. There is nothing spectacular here. It may move
+%D back to math-ini.
+
+\writestatus{loading}{ConTeXt Support Macros / Math}
+
+\unprotect
+
+%D \macros
+%D {mathematics, math, nomathematics, startmathmode}
+%D
+%D The \type{$} can be both an begin and end math character.
+%D This can lead to confusing and errorprone situations when
+%D macros insert \type{$}. When for instance we have defined:
+%D
+%D \starttyping
+%D \def\MyPlus{$\,+\,$}
+%D \stoptyping
+%D
+%D the sequence \type{$x^2 \MyPlus y^2 = r^2$} will expand to:
+%D
+%D \starttyping
+%D $x^2 $\,+\,$ y^2 = r^2$
+%D \stoptyping
+%D
+%D Here the \type{\,} are given outside math mode and \TEX\ will
+%D definitely complain about this. A more save definition would
+%D have been:
+%D
+%D \starttyping
+%D \def\MyPlus{\mathematics{\,+\,}}
+%D \stoptyping
+%D
+%D Which is implemented as:
+
+\long\def\mathematics#1{\relax \ifmmode#1\else\Ustartmath #1\Ustopmath \fi}
+\long\def\displaymath#1{\noindent \ifmmode#1\else\Ustartdisplaymath#1\Ustopdisplaymath\fi}
+\long\def\inlinemath #1{\dontleavehmode\ifmmode#1\else\Ustartmath #1\Ustopmath \fi}
+
+\let\stopmathmode\relax
+
+\def\startmathmode % cannot be used nested
+ {\relax\ifmmode
+ \let\stopmathmode\relax
+ \else
+ \Ustartmath\let\stopmathmode\Ustopmath
+ \fi}
+
+\def\startmathmode % nested variant
+ {\relax\ifmmode
+ \begingroup\let\stopmathmode\endgroup
+ \else
+ \Ustartmath\let\stopmathmode\Ustopmath
+ \fi}
+
+\def\nomathematics#1%
+ {\relax\ifmmode\hbox{#1}\else#1\fi}
+
+\let\math\mathematics
+
+%D \macros
+%D {displaymathematics,inlinemathematics,automathematics}
+%D
+%D An example of usage of the following can be found in the MathML module:
+
+\long\def\displaymathematics#1{\relax\ifmmode#1\else\dostartformula{}#1\dostopformula\fi}
+ \def\inlinemathematics {\dontleavehmode\mathematics}
+ \def\automathematics {\relax\ifhmode\@EA\inlinemathematics\else\@EA\displaymathematics\fi}
+
+% better, esp when used in bTABLE ... eTABLE
+
+\def\automathematics
+ {\relax
+ \ifhmode
+ \expandafter\inlinemathematics
+ \else\ifintable
+ \expandafter\expandafter\expandafter\inlinemathematics
+ \else
+ \expandafter\expandafter\expandafter\displaymathematics
+ \fi\fi}
+
+%D \macros
+%D {dimension, nodimension}
+%D
+%D The next few macros are used for typesetting dimensions in
+%D such a way that spacing is acceptable. I won't spend much
+%D words on these macros, because they will be overloaded in
+%D the units module.
+
+\newsignal\dimensionsignal
+
+\def\dimensiontypeface {\tf}
+\def\dimensionhalfspace {\,}
+
+\unexpanded\def\dimension#1%
+ {\def\dodimensionsignal{\kern\dimensionsignal}%
+ \ifdim\lastskip=\zeropoint\relax
+ \ifdim\lastkern=\zeropoint\relax
+ \ifmmode
+ \mathematics{\dimensionhalfspace\dimensionhalfspace\dimensiontypeface#1}%
+ \else
+ \mathematics{\dimensiontypeface#1}%
+ \fi
+ \else\ifdim\lastkern=\dimensionsignal
+ \mathematics{\dimensionhalfspace\dimensiontypeface#1}%
+ \else
+ \unkern\mathematics{\dimensionhalfspace\dimensionhalfspace\dimensiontypeface#1}%
+ \fi\fi
+ \else
+ \unskip\mathematics{\dimensionhalfspace\dimensionhalfspace\dimensiontypeface#1}%
+ \fi
+ \dodimensionsignal}
+
+\unexpanded\def\nodimension#1%
+ {\unskip#1\global\let\dodimensionsignal\relax}
+
+%D \macros
+%D {super, suber}
+%D
+%D \TEX\ uses \type{^} and \type{_} for entering super- and
+%D subscript mode. We want however a bit more control than
+%D normally provided, and therefore provide \type {\super}
+%D and \type{\suber} (\type {\sub} is already taken).
+
+\global\let\normalsuper=^
+\global\let\normalsuber=_
+
+\newcount\supersubmode
+
+\newevery\everysupersub \EverySuperSub
+
+\appendtoks \advance\supersubmode 1\relax \to \everysupersub
+
+% \def\dodosuper#1{\normalsuper{\the\everysupersub#1}}
+% \def\dodosuber#1{\normalsuber{\the\everysupersub#1}}
+%
+% \def\dosuper{\ifx\next\bgroup\expandafter\dodosuper\else\normalsuper\fi}
+% \def\dosuber{\ifx\next\bgroup\expandafter\dodosuber\else\normalsuber\fi}
+%
+% \def\super{\futurelet\next\dosuper}
+% \def\suber{\futurelet\next\dosuber}
+
+\def\super#1{\normalsuper{\the\everysupersub#1}}
+\def\suber#1{\normalsuber{\the\everysupersub#1}}
+
+%D \macros
+%D {enablesupsub}
+%D
+%D We can let \type {^} and \type {_} act like \type {\super}
+%D and \type {\suber} by saying \type {\enablesupsub}.
+
+\bgroup
+\catcode`\^=\@@active
+\catcode`\_=\@@active
+\gdef\enablesupsub
+ {\catcode`\^=\@@active
+ \def^{\ifmmode\expandafter\super\else\expandafter\normalsuper\fi}%
+ \catcode`\_=\@@active
+ \def_{\ifmmode\expandafter\suber\else\expandafter\normalsuber\fi}}
+\egroup
+
+%D \macros
+%D {restoremathstyle}
+%D
+%D We can pick up the current math style by calling \type
+%D {\restoremathstyle}.
+
+\def\restoremathstyle
+ {\ifmmode
+ \ifcase\supsubmode
+ \textstyle
+ \or
+ \scriptstyle
+ \else
+ \scriptscriptstyle
+ \fi
+ \fi}
+
+%D \macros
+%D {cramped}
+%D
+%D \TEX provides no primitive to force in cramped math mode. Here is
+%D a macro that does so. It is based on a solution by Don Knuth (\useurl
+%D {http://www.ctan.org/tex-archive/digests/tex-implementors/042}).
+%D
+%D \startbuffer
+%D \ruledhbox{$\left\{{x^2\over y^2}\right\}$}
+%D \ruledhbox{$\cramped{\left\{ {x^2\over y^2}\right\}}$}
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\def\cramped
+ {\mathpalette\docramped}
+
+%D We force a cramped style by issuing a non||existing radical (box).
+%D After that we make sure the height is correct. (Comment taken from
+%D Morten Høgholm's mathtools package.) Macro suggested by AM and
+%D cleaned up a bit by HH.
+
+% original
+%
+% \def\docramped#1#2%
+% {\setbox\scratchbox\hbox
+% {\nulldelimiterspace\zeropoint
+% $\mathsurround\zeropoint#1\radical\zerocount{#2}$}%
+% \ifx#1\displaystyle
+% \scratchdimen\fontdimen8\textfont3
+% \advance\scratchdimen .25\fontdimen5\textfont2
+% \else
+% \scratchdimen1.25\fontdimen8
+% \ifx#1\textstyle\textfont
+% \else
+% \ifx#1\scriptstyle\scriptfont\else\scriptscriptfont\fi
+% \fi
+% 3
+% \fi
+% \advance\scratchdimen-\ht\scratchbox
+% \ht\scratchbox-\scratchdimen
+% \box\scratchbox}
+
+\def\docramped#1#2%
+ {\begingroup % added HH, made even more cramped
+ \setbox\scratchbox\hbox
+ {\nulldelimiterspace\zeropoint
+ \Ustartmath\mathsurround\zeropoint#1\radical\zerocount{#2}\Ustopmath}%
+ \ht\scratchbox-\dimexpr
+ \ifx#1\displaystyle
+ \fontdimen8\textfont3
+ +.25\fontdimen5\textfont2
+ \else
+ 1.25\fontdimen8
+ \ifx#1\textstyle
+ \textfont
+ \else\ifx#1\scriptstyle
+ \scriptfont
+ \else
+ \scriptscriptfont
+ \fi \fi
+ \plusthree
+ \fi
+ -\ht\scratchbox
+ \relax
+ \box\scratchbox
+ \endgroup}
+
+%D \macros
+%D {cramedllap, crampedrlap, crampedclap}
+%D
+%D In many cases, one wants to use the \tex {clap} macro in
+%D math mode while using subscripts. Normally, subscripts are
+%D in cramped mode, and these macros allow you to go to
+%D cramped mode. For example:
+%D
+%D \startbuffer
+%D \startformula
+%D \sum_{a^2 < b^2 < c^2} \quad
+%D \sum_{\clap{a^2 < b^2 < c^2}} \quad
+%D \sum_{\crampedclap{a^2 < b^2 < c^2}}
+%D \stopformula
+%D \stopbuffer
+%D
+%D \start
+%D \typebuffer
+%D \switchtobodyfont[24pt]
+%D \getbuffer
+%D \stop
+%D
+%D Notice that \type {\clap{\cramped ... }} would also work,
+%D but it requires \TEX\ to typeset it arguments 16 times.
+
+\def\docrampedllap#1#2{{}\dollap{\docramped #1{#2}}}
+\def\docrampedrlap#1#2{{}\dorlap{\docramped #1{#2}}}
+\def\docrampedclap#1#2{{}\doclap{\docramped #1{#2}}}
+
+\def\crampedllap{\mathpalette\docrampedllap}
+\def\crampedrlap{\mathpalette\docrampedrlap}
+\def\crampedclap{\mathpalette\docrampedclap}
+
+\protect \endinput
diff --git a/tex/context/base/type-ini.mkiv b/tex/context/base/type-ini.mkiv
index fcd16cd27..af9258b44 100644
--- a/tex/context/base/type-ini.mkiv
+++ b/tex/context/base/type-ini.mkiv
@@ -402,65 +402,71 @@
\def\typefaceencoding{\defaultencoding}
-\def\dodefinetypeface[#1][#2][#3][#4][#5][#6]%
- {\dododefinetypeface[#1][#2]%
- \iffifthargument % sixth is optional
- % we need to expand since in #6 there can be a \typescripttwo
- \normalexpanded{\noexpand\getparameters[\??ts][\s!rscale=\plusone,\s!encoding=\defaultencoding,\s!features=,\s!fallbacks=,\s!text=,#6]}% \geteparameters
- \pushmacro\relativefontsize
- \pushmacro\typefaceencoding
- \pushmacro\fontclass
- \let\relativefontsize\@@tsrscale
- \let\typefaceencoding\@@tsencoding
- \setcurrentfontclass{#1}%
- \letvalue{\fontclass\s!features }\@@tsfeatures % new per 16/6/2007
- \letvalue{\fontclass\s!fallbacks}\@@tsfallbacks % new per 12/10/2008
- \saverelativefontsize{#2}\relativefontsize % fall back
- \savemathtextstyle\@@tstext % math text style (new per 28/4/2006)
- \iftracetypescripts\writestatus\m!fonts{define: [#1] [#2] [#3] [#4]}\fi
- % we need to keep typefaceencoding for a while as it can still be used to filter
- % old scripts as we just strip the texnansi- prefix
- \ifx\typefaceencoding\t!default
- \usetypescript[#3][#4][\t!name,\t!default]% will be default some day
- \else
- \usetypescript[#3][#4][\t!name,\t!default,\typefaceencoding]%
- \fi
- \usetypescript[#3][#5][\t!size]%
- \popmacro\fontclass
- \popmacro\typefaceencoding
- \popmacro\relativefontsize
- \else\iffourthargument
- \definetypeface[#1][#2][#3][#4][\s!default]%
- \else\ifthirdargument
- \getparameters[\??tf#1#2][#3]%
- \fi\fi\fi}
-
-% will become (once we've adapted the typescripts):
+% we need to keep typefaceencoding for a while as it can still be used to filter
+% old scripts as we just strip the texnansi- prefix
+
+% \def\dostarttypefacedefining#1#2%
+% {\pushmacro\fontclass
+% \setcurrentfontclass{#1}%
+% \pushmacro\relativefontsize
+% \let\relativefontsize\@@tsrscale % still needed ?
+% \savefontclassparameters{#2}\@@tsrscale\@@tsfeatures\@@tsfallbacks}
+%
+% \def\dostoptypefacedefining
+% {\popmacro\relativefontsize
+% \popmacro\fontclass}
%
% \def\dodefinetypeface[#1][#2][#3][#4][#5][#6]%
% {\dododefinetypeface[#1][#2]%
-% \iffifthargument % sixth is optional
-% % we need to expand since in #6 there can be a \typescripttwo
-% \normalexpanded{\noexpand\getparameters[\??ts][\s!rscale=\plusone,\s!features=,\s!fallbacks=,\s!text=,#6]}% \geteparameters
-% \pushmacro\relativefontsize
-% \pushmacro\fontclass
-% \let\relativefontsize\@@tsrscale
-% \setcurrentfontclass{#1}%
-% \letvalue{\fontclass\s!features }\@@tsfeatures % new per 16/6/2007
-% \letvalue{\fontclass\s!fallbacks}\@@tsfallbacks % new per 12/10/2008
-% \saverelativefontsize{#2}\relativefontsize % fall back
-% \savemathtextstyle\@@tstext % math text style (new per 28/4/2006)
+% \iffifthargument % sixth is optional, we need to expand since in #6 there can be a \typescripttwo
+% % \normalexpanded{\noexpand\getparameters[\??ts][\s!rscale=\plusone,\s!encoding=\defaultencoding,\s!features=,\s!fallbacks=,#6]}% \geteparameters
+% \geteparameters[\??ts][\s!rscale=\plusone,\s!encoding=\defaultencoding,\s!features=,\s!fallbacks=,#6]%
+% \dostarttypefacedefining{#1}{#2}%
+% \pushmacro\typefaceencoding
+% \let\typefaceencoding\@@tsencoding
% \iftracetypescripts\writestatus\m!fonts{define: [#1] [#2] [#3] [#4]}\fi
-% \usetypescript[#3][#4][\t!name,\t!default,\empty]% brr, this empty, no encoding
+% \ifx\typefaceencoding\t!default
+% \usetypescript[#3][#4][\t!name,\t!default]% will be default some day
+% \else
+% \usetypescript[#3][#4][\t!name,\t!default,\typefaceencoding]%
+% \fi
% \usetypescript[#3][#5][\t!size]%
-% \popmacro\fontclass
-% \popmacro\relativefontsize
+% %
+% \dostoptypefacedefining
+% %
+% \popmacro\typefaceencoding
% \else\iffourthargument
% \definetypeface[#1][#2][#3][#4][\s!default]%
% \else\ifthirdargument
% \getparameters[\??tf#1#2][#3]%
% \fi\fi\fi}
+\def\dostarttypefacedefining#1#2#3%
+ {\geteparameters[\??ts][\s!rscale=\plusone,\s!features=,\s!fallbacks=,#3]%
+ \pushmacro\fontclass
+ \setcurrentfontclass{#1}%
+ \pushmacro\relativefontsize
+ \let\relativefontsize\@@tsrscale % still needed ?
+ \savefontclassparameters{#2}\@@tsrscale\@@tsfeatures\@@tsfallbacks}
+
+\def\dostoptypefacedefining
+ {\popmacro\relativefontsize
+ \popmacro\fontclass}
+
+\def\dodefinetypeface[#1][#2][#3][#4][#5][#6]%
+ {\dododefinetypeface[#1][#2]%
+ \iffifthargument % sixth is optional, we need to expand since in #6 there can be a \typescripttwo
+ \iftracetypescripts\writestatus\m!fonts{define: [#1] [#2] [#3] [#4]}\fi
+ \dostarttypefacedefining{#1}{#2}{#6}%
+ \usetypescript[#3][#4][\t!name,\t!default]%
+ \usetypescript[#3][#5][\t!size]%
+ \dostoptypefacedefining
+ \else\iffourthargument
+ \definetypeface[#1][#2][#3][#4][\s!default]%
+ \else\ifthirdargument
+ \getparameters[\??tf#1#2][#3]%
+ \fi\fi\fi}
+
\def\dododefinetypeface[#1][#2]% saveguard against redefinition
{\doifsomething{#1}
{\ifcsname\??tf#1\s!default\endcsname \else
diff --git a/tex/context/base/type-otf.mkiv b/tex/context/base/type-otf.mkiv
index e97956ad5..05864c2a4 100644
--- a/tex/context/base/type-otf.mkiv
+++ b/tex/context/base/type-otf.mkiv
@@ -16,6 +16,25 @@
%D in good old \TEX, and these may differ a bit. Here we also see
%D some oldstyle definitions which normally are done with features.
+
+% \starttypescriptcollection[myfonts]
+%
+% \starttypescript [serif] [myserif] [name]
+% \setups[font:fallback:serif]
+% \definefontsynonym [Serif] [file:myserif.ttf] [features=default]
+% \definefontsynonym [SerifBold] [file:myserifbold.ttf] [features=default]
+% \definefontsynonym [SerifItalic] [file:myserifitalic.ttf] [features=default]
+% \definefontsynonym [SerifBoldItalic] [file:myserifbolditalic.ttf] [features=default]
+% \stoptypescript
+%
+% \starttypescript[myfont]
+% \definetypeface [myfont] [rm] [serif] [myserif] [default]
+% \stoptypescript
+%
+% \stoptypescriptcollection
+%
+% \setupbodyfont[myfont]
+
\starttypescriptcollection[fallback]
\starttypescript [fallback]
@@ -813,51 +832,78 @@
\stoptypescript
- % maybe no -Regular etc
-
- \starttypescript [math] [antykwa-torunska-light] [name]
- \definefontsynonym [MathRoman] [AntykwaTorunska-Math-Letters-Light]
- %definefontsynonym [MathItalic] [AntykwaTorunska-Math-Letters-LightItalic]
- %definefontsynonym [MathSymbol] [AntykwaTorunska-Math-Symbols-Light]
- %definefontsynonym [MathExtension] [AntykwaTorunska-Math-Extension-Light]
- \stoptypescript
-
- \starttypescript [math] [antykwa-torunska] [name]
- \definefontsynonym [MathRoman] [AntykwaTorunska-Math-Letters-Regular]
- %definefontsynonym [MathItalic] [AntykwaTorunska-Math-Letters-Italic]
- %definefontsynonym [MathSymbol] [AntykwaTorunska-Math-Symbols-Regular]
- %definefontsynonym [MathExtension] [AntykwaTorunska-Math-Extension-Regular]
- \stoptypescript
-
- \starttypescript [math] [antykwa-torunska-cond] [name]
- \definefontsynonym [MathRoman] [AntykwaTorunska-Math-Letters-CondRegular]
- %definefontsynonym [MathItalic] [AntykwaTorunska-Math-Letters-CondItalic]
- %definefontsynonym [MathSymbol] [AntykwaTorunska-Math-Symbols-CondRegular]
- %definefontsynonym [MathExtension] [AntykwaTorunska-Math-Extension-CondRegular]
- \stoptypescript
-
- \starttypescript [math] [antykwa-torunska-lightcond] [name]
- \definefontsynonym [MathRoman] [AntykwaTorunska-Math-Letters-CondLight]
- %definefontsynonym [MathItalic] [AntykwaTorunska-Math-Letters-CondLightItalic]
- %definefontsynonym [MathSymbol] [AntykwaTorunska-Math-Symbols-CondLight]
- %definefontsynonym [MathExtension] [AntykwaTorunska-Math-Extension-CondLight]
- \stoptypescript
-
\starttypescript [antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond]
\definetypeface[antykwa][rm][serif][\typescriptone] [default]
- \definetypeface[antykwa][ss][sans] [modern] [default,rscale=1.05]
- \definetypeface[antykwa][tt][mono] [modern] [default,rscale=1.05]
+ \definetypeface[antykwa][ss][sans] [modern] [default] [rscale=1.05]
+ \definetypeface[antykwa][tt][mono] [modern] [default] [rscale=1.05]
\definetypeface[antykwa][mm][math] [\typescriptone] [default]
\quittypescriptscanning
\stoptypescript
% Antykwa Poltawskiego (GUST)
- \starttypescript [serif] [antykwa-poltawskiego]
- \definefontsynonym [AntykwaPoltawskiego-Regular] [antpr]
- \definefontsynonym [AntykwaPoltawskiego-Bold] [antpb]
- \definefontsynonym [AntykwaPoltawskiego-Italic] [antpri]
- \definefontsynonym [AntykwaPoltawskiego-BoldItalic] [antpbi]
+% \starttypescript [serif] [antykwa-poltawskiego]
+% \definefontsynonym [AntykwaPoltawskiego-Regular] [antpr]
+% \definefontsynonym [AntykwaPoltawskiego-Bold] [antpb]
+% \definefontsynonym [AntykwaPoltawskiego-Italic] [antpri]
+% \definefontsynonym [AntykwaPoltawskiego-BoldItalic] [antpbi]
+% \stoptypescript
+
+% \starttypescript [serif] [antykwa-poltawskiego] [name]
+% \definefontsynonym [Serif] [AntykwaPoltawskiego-Regular]
+% \definefontsynonym [SerifBold] [AntykwaPoltawskiego-Bold]
+% \definefontsynonym [SerifItalic] [AntykwaPoltawskiego-Italic]
+% \definefontsynonym [SerifSlanted] [AntykwaPoltawskiego-Italic]
+% \definefontsynonym [SerifBoldItalic] [AntykwaPoltawskiego-Bold]
+% \definefontsynonym [SerifBoldSlanted] [AntykwaPoltawskiego-Bold]
+% \definefontsynonym [SerifCaps] [AntykwaPoltawskiego-Regular]
+% \stoptypescript
+
+ \starttypescript [serif] [antykwa-poltawskiego,antykwa-poltawskiego-light]
+ \definefontsynonym [AntykwaPoltawskiego-Condensed-Light] [\s!file:AntPoltLtCond-Regular] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Condensed-LightItalic] [\s!file:AntPoltLtCond-Italic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Condensed-Regular] [\s!file:AntPoltCond-Regular] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Condensed-Italic] [\s!file:AntPoltCond-Italic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Condensed-Medium] [\s!file:AntPoltMdCond-Bold] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Condensed-MediumItalic] [\s!file:AntPoltMdCond-BoldItalic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Condensed-Bold] [\s!file:AntPoltCond-Bold] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Condensed-BoldItalic] [\s!file:AntPoltCond-BoldItalic] [\s!features=\s!default]
+
+ \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Regular] [\s!file:AntPoltLtSemiCond-Regular] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Italic] [\s!file:AntPoltLtSemiCond-Italic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Regular] [\s!file:AntPoltSemiCond-Regular] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Italic] [\s!file:AntPoltSemiCond-Italic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Medium] [\s!file:AntPoltMdSemiCond-Bold] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-MediumItalic] [\s!file:AntPoltMdSemiCond-BdItalic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Bold] [\s!file:AntPoltSemiCond-Bold] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-BoldItalic] [\s!file:AntPoltSemiCond-BoldItalic] [\s!features=\s!default]
+
+ \definefontsynonym [AntykwaPoltawskiego-Light] [\s!file:AntPoltLt-Regular] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-LightItalic] [\s!file:AntPoltLt-Italic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Regular] [\s!file:AntPolt-Regular] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Italic] [\s!file:AntPolt-Italic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Medium] [\s!file:AntPoltMd-Bold] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-MediumItalic] [\s!file:AntPoltMd-BoldItalic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Bold] [\s!file:AntPolt-Bold] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-BoldItalic] [\s!file:AntPolt-BoldItalic] [\s!features=\s!default]
+
+ \definefontsynonym [AntykwaPoltawskiego-SemiExtended-Light] [\s!file:AntPoltLtSemiExtd-Regular] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiExtended-LightItalic] [\s!file:AntPoltLtSemiExtd-Italic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiExtended-Regular] [\s!file:AntPoltSemiExtd-Regular] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiExtended-Italic] [\s!file:AntPoltSemiExtd-Italic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiExtended-Medium] [\s!file:AntPoltMdSemiExtd-Bold] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiExtended-MediumItalic] [\s!file:AntPoltMdSemiExtd-BdItalic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiExtended-Bold] [\s!file:AntPoltSemiExtd-Bold] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-SemiExtended-BoldItalic] [\s!file:AntPoltSemiExtd-BoldItalic] [\s!features=\s!default]
+
+ \definefontsynonym [AntykwaPoltawskiego-Extended-Light] [\s!file:AntPoltLtExtd-Regular] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Extended-LightItalic] [\s!file:AntPoltLtExtd-Italic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Extended-Regular] [\s!file:AntPoltExtd-Regular] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Extended-Italic] [\s!file:AntPoltExtd-Italic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Extended-Medium] [\s!file:AntPoltMdExtd-Bold] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Extended-MediumItalic] [\s!file:AntPoltMdExtd-BoldItalic] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Extended-Bold] [\s!file:AntPoltExtd-Bold] [\s!features=\s!default]
+ \definefontsynonym [AntykwaPoltawskiego-Extended-BoldItalic] [\s!file:AntPoltExtd-BoldItalic] [\s!features=\s!default]
\stoptypescript
\starttypescript [serif] [antykwa-poltawskiego] [name]
@@ -865,9 +911,25 @@
\definefontsynonym [SerifBold] [AntykwaPoltawskiego-Bold]
\definefontsynonym [SerifItalic] [AntykwaPoltawskiego-Italic]
\definefontsynonym [SerifSlanted] [AntykwaPoltawskiego-Italic]
- \definefontsynonym [SerifBoldItalic] [AntykwaPoltawskiego-Bold]
- \definefontsynonym [SerifBoldSlanted] [AntykwaPoltawskiego-Bold]
- \definefontsynonym [SerifCaps] [AntykwaPoltawskiego-Regular]
+ \definefontsynonym [SerifBoldItalic] [AntykwaPoltawskiego-BoldItalic]
+ \definefontsynonym [SerifBoldSlanted] [AntykwaPoltawskiego-BoldItalic]
+ \stoptypescript
+
+ \starttypescript [serif] [antykwa-poltawskiego-light] [name]
+ \definefontsynonym [Serif] [AntykwaPoltawskiego-Light]
+ \definefontsynonym [SerifBold] [AntykwaPoltawskiego-Medium]
+ \definefontsynonym [SerifItalic] [AntykwaPoltawskiego-LightItalic]
+ \definefontsynonym [SerifSlanted] [AntykwaPoltawskiego-LightItalic]
+ \definefontsynonym [SerifBoldItalic] [AntykwaPoltawskiego-MediumItalic]
+ \definefontsynonym [SerifBoldSlanted] [AntykwaPoltawskiego-MediumItalic]
+ \stoptypescript
+
+ \starttypescript [antykwa-poltawskiego,antykwa-poltawskiego-light]
+ \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
+ \definetypeface [\typescriptone] [ss] [sans] [modern] [default] [rscale=1.05]
+ \definetypeface [\typescriptone] [tt] [mono] [modern] [default] [rscale=1.05]
+ \definetypeface [\typescriptone] [mm] [math] [modern] [default] [rscale=1.05]
+ \quittypescriptscanning
\stoptypescript
\stoptypescriptcollection
@@ -1086,34 +1148,6 @@
\definefontsynonym [SansBoldItalic] [Iwona-CapsCondHeavy-Italic]
\stoptypescript
- \starttypescript [math] [iwona-light] [name]
- \definefontsynonym [MathRoman] [Iwona-Math-Letters-Light-Regular]
- %definefontsynonym [MathItalic] [Iwona-Math-Letters-Light-Italic]
- %definefontsynonym [MathSymbol] [Iwona-Math-Symbols-Light]
- %definefontsynonym [MathExtension] [Iwona-Math-Extension-Light]
- \stoptypescript
-
- \starttypescript [math] [iwona] [name]
- \definefontsynonym [MathRoman] [Iwona-Math-Letters-Regular]
- %definefontsynonym [MathItalic] [Iwona-Math-Letters-Italic]
- %definefontsynonym [MathSymbol] [Iwona-Math-Symbols-Regular]
- %definefontsynonym [MathExtension] [Iwona-Math-Extension-Regular]
- \stoptypescript
-
- \starttypescript [math] [iwona-medium] [name]
- \definefontsynonym [MathRoman] [Iwona-Math-Letters-Medium-Regular]
- %definefontsynonym [MathItalic] [Iwona-Math-Letters-Medium-Italic]
- %definefontsynonym [MathSymbol] [Iwona-Math-Symbols-Medium]
- %definefontsynonym [MathExtension] [Iwona-Math-Extension-Medium]
- \stoptypescript
-
- \starttypescript [math] [iwona-heavy] [name]
- \definefontsynonym [MathRoman] [Iwona-Math-Letters-Heavy-Regular]
- %definefontsynonym [MathItalic] [Iwona-Math-Letters-Heavy-Italic]
- %definefontsynonym [MathSymbol] [Iwona-Math-Symbols-Heavy]
- %definefontsynonym [MathExtension] [Iwona-Math-Extension-Heavy]
- \stoptypescript
-
\starttypescript [iwona,iwona-light,iwona-heavy,iwona-medium]
\definetypeface[\typescriptone][ss][sans] [\typescriptone] [default]
\definetypeface[\typescriptone][rm][serif][modern] [default]
@@ -1141,36 +1175,6 @@
\definefontsynonym[Kurier-HeavyItalic] [kurierhi]
\stoptypescript
-% todo:
-
-% \starttypescript [math] [kurier] [default]
-% \definefontsynonym [Kurier-Math-Letters-Regular] [rm-kurierr]
-% \definefontsynonym [Kurier-Math-Letters-Italic] [mi-kurierri]
-% \definefontsynonym [Kurier-Math-Symbols-Regular] [sy-kurierrz]
-% \definefontsynonym [Kurier-Math-Extension-Regular] [ex-kurierr]
-% \stoptypescript
-
-% \starttypescript [math] [kurier-light] [default]
-% \definefontsynonym [Kurier-Math-Letters-Light-Regular] [rm-kurierl]
-% \definefontsynonym [Kurier-Math-Letters-Light-Italic] [mi-kurierli]
-% \definefontsynonym [Kurier-Math-Symbols-Light] [sy-kurierlz]
-% \definefontsynonym [Kurier-Math-Extension-Light] [ex-kurierl]
-% \stoptypescript
-
-% \starttypescript [math] [kurier-medium] [default]
-% \definefontsynonym [Kurier-Math-Letters-Medium-Regular] [rm-kurierm]
-% \definefontsynonym [Kurier-Math-Letters-Medium-Italic] [mi-kuriermi]
-% \definefontsynonym [Kurier-Math-Symbols-Medium-Regular] [sy-kuriermz]
-% \definefontsynonym [Kurier-Math-Extension-Medium] [ex-kurierm]
-% \stoptypescript
-
-% \starttypescript [math] [kurier,kurier-light,kurier-medium] [default]
-% \loadmapfile[kurier-rm.map]
-% \loadmapfile[kurier-mi.map]
-% \loadmapfile[kurier-sy.map]
-% \loadmapfile[kurier-ex.map]
-% \stoptypescript
-
\starttypescript [sans] [kurier-light] [name]
\setups[font:fallback:sans]
\definefontsynonym [Sans] [Kurier-Light-Regular]
@@ -1195,29 +1199,6 @@
\definefontsynonym [SansBoldItalic] [Kurier-Heavy-Italic]
\stoptypescript
-% todo:
-
-% \starttypescript [math] [kurier-light] [name]
-% \definefontsynonym [MathRoman] [Kurier-Math-Letters-Light-Regular]
-% %definefontsynonym [MathItalic] [Kurier-Math-Letters-Light-Italic]
-% %definefontsynonym [MathSymbol] [Kurier-Math-Symbols-Light]
-% %definefontsynonym [MathExtension] [Kurier-Math-Extension-Light]
-% \stoptypescript
-
-% \starttypescript [math] [kurier] [name]
-% \definefontsynonym [MathRoman] [Kurier-Math-Letters-Regular]
-% %definefontsynonym [MathItalic] [Kurier-Math-Letters-Italic]
-% %definefontsynonym [MathSymbol] [Kurier-Math-Symbols-Regular]
-% %definefontsynonym [MathExtension] [Kurier-Math-Extension-Regular]
-% \stoptypescript
-
-% \starttypescript [math] [kurier-medium] [name]
-% \definefontsynonym [MathRoman] [Kurier-Math-Letters-Medium-Regular]
-% %definefontsynonym [MathItalic] [Kurier-Math-Letters-Medium-Italic]
-% %definefontsynonym [MathSymbol] [Kurier-Math-Symbols-Medium]
-% %definefontsynonym [MathExtension] [Kurier-Math-Extension-Medium]
-% \stoptypescript
-
\stoptypescriptcollection
\starttypescriptcollection[symbols]
diff --git a/tex/context/interface/cont-cs.xml b/tex/context/interface/cont-cs.xml
index d8c40501f..12e09e198 100644
--- a/tex/context/interface/cont-cs.xml
+++ b/tex/context/interface/cont-cs.xml
@@ -5438,8 +5438,18 @@
<cd:constant type="cd:dimension"/>
</cd:parameter>
<cd:parameter name="misto">
- <cd:constant type="dotextu"/>
+ <cd:constant type="nastred"/>
+ <cd:constant type="vlevo"/>
+ <cd:constant type="marginalie"/>
<cd:constant type="naokraji"/>
+ <cd:constant type="vlevo"/>
+ <cd:constant type="vpravo"/>
+ <cd:constant type="vpravo"/>
+ <cd:constant type="uvnitr"/>
+ <cd:constant type="vnejsi"/>
+ <cd:constant type="text"/>
+ <cd:constant type="begin"/>
+ <cd:constant type="end"/>
</cd:parameter>
<cd:parameter name="pismeno">
<cd:resolve name="style"/>
diff --git a/tex/context/interface/cont-de.xml b/tex/context/interface/cont-de.xml
index d269812a8..fd86ba64d 100644
--- a/tex/context/interface/cont-de.xml
+++ b/tex/context/interface/cont-de.xml
@@ -5438,8 +5438,18 @@
<cd:constant type="cd:dimension"/>
</cd:parameter>
<cd:parameter name="platz">
- <cd:constant type="imtext"/>
+ <cd:constant type="mittig"/>
+ <cd:constant type="links"/>
+ <cd:constant type="marginalie"/>
<cd:constant type="imrand"/>
+ <cd:constant type="imlinken"/>
+ <cd:constant type="rechts"/>
+ <cd:constant type="imrechten"/>
+ <cd:constant type="innen"/>
+ <cd:constant type="aussen"/>
+ <cd:constant type="text"/>
+ <cd:constant type="begin"/>
+ <cd:constant type="end"/>
</cd:parameter>
<cd:parameter name="stil">
<cd:resolve name="style"/>
diff --git a/tex/context/interface/cont-en.xml b/tex/context/interface/cont-en.xml
index 715de2dc9..965dcda61 100644
--- a/tex/context/interface/cont-en.xml
+++ b/tex/context/interface/cont-en.xml
@@ -5438,8 +5438,18 @@
<cd:constant type="cd:dimension"/>
</cd:parameter>
<cd:parameter name="location">
- <cd:constant type="intext"/>
+ <cd:constant type="middle"/>
+ <cd:constant type="left"/>
+ <cd:constant type="margin"/>
<cd:constant type="inmargin"/>
+ <cd:constant type="inleft"/>
+ <cd:constant type="right"/>
+ <cd:constant type="inright"/>
+ <cd:constant type="inner"/>
+ <cd:constant type="outer"/>
+ <cd:constant type="text"/>
+ <cd:constant type="begin"/>
+ <cd:constant type="end"/>
</cd:parameter>
<cd:parameter name="style">
<cd:resolve name="style"/>
diff --git a/tex/context/interface/cont-fr.xml b/tex/context/interface/cont-fr.xml
index ec3a877b6..70327b78a 100644
--- a/tex/context/interface/cont-fr.xml
+++ b/tex/context/interface/cont-fr.xml
@@ -5438,8 +5438,18 @@
<cd:constant type="cd:dimension"/>
</cd:parameter>
<cd:parameter name="emplacement">
- <cd:constant type="danstexte"/>
+ <cd:constant type="milieu"/>
+ <cd:constant type="gauche"/>
+ <cd:constant type="marge"/>
<cd:constant type="dansmarge"/>
+ <cd:constant type="dansgauche"/>
+ <cd:constant type="droite"/>
+ <cd:constant type="dansdroit"/>
+ <cd:constant type="interieur"/>
+ <cd:constant type="exterieur"/>
+ <cd:constant type="texte"/>
+ <cd:constant type="begin"/>
+ <cd:constant type="end"/>
</cd:parameter>
<cd:parameter name="style">
<cd:resolve name="style"/>
diff --git a/tex/context/interface/cont-it.xml b/tex/context/interface/cont-it.xml
index 412eb3ab9..102f619da 100644
--- a/tex/context/interface/cont-it.xml
+++ b/tex/context/interface/cont-it.xml
@@ -5438,8 +5438,18 @@
<cd:constant type="cd:dimension"/>
</cd:parameter>
<cd:parameter name="luogo">
- <cd:constant type="intesto"/>
+ <cd:constant type="centro"/>
+ <cd:constant type="sinistra"/>
+ <cd:constant type="margine"/>
<cd:constant type="inmargine"/>
+ <cd:constant type="insinistra"/>
+ <cd:constant type="destra"/>
+ <cd:constant type="indestra"/>
+ <cd:constant type="interno"/>
+ <cd:constant type="esterno"/>
+ <cd:constant type="testo"/>
+ <cd:constant type="begin"/>
+ <cd:constant type="end"/>
</cd:parameter>
<cd:parameter name="stile">
<cd:resolve name="style"/>
diff --git a/tex/context/interface/cont-nl.xml b/tex/context/interface/cont-nl.xml
index 49f0ac1bb..5701dc4d4 100644
--- a/tex/context/interface/cont-nl.xml
+++ b/tex/context/interface/cont-nl.xml
@@ -5438,8 +5438,18 @@
<cd:constant type="cd:dimension"/>
</cd:parameter>
<cd:parameter name="plaats">
- <cd:constant type="intekst"/>
+ <cd:constant type="midden"/>
+ <cd:constant type="links"/>
+ <cd:constant type="marge"/>
<cd:constant type="inmarge"/>
+ <cd:constant type="inlinker"/>
+ <cd:constant type="rechts"/>
+ <cd:constant type="inrechter"/>
+ <cd:constant type="binnen"/>
+ <cd:constant type="buiten"/>
+ <cd:constant type="tekst"/>
+ <cd:constant type="begin"/>
+ <cd:constant type="eind"/>
</cd:parameter>
<cd:parameter name="letter">
<cd:resolve name="style"/>
diff --git a/tex/context/interface/cont-pe.xml b/tex/context/interface/cont-pe.xml
index d01becdb8..2a07b6238 100644
--- a/tex/context/interface/cont-pe.xml
+++ b/tex/context/interface/cont-pe.xml
@@ -5438,8 +5438,18 @@
<cd:constant type="cd:dimension"/>
</cd:parameter>
<cd:parameter name="مکان">
- <cd:constant type="درون‌متن"/>
+ <cd:constant type="میان"/>
+ <cd:constant type="چپ"/>
+ <cd:constant type="حاشیه"/>
<cd:constant type="درون‌حاشیه"/>
+ <cd:constant type="درون‌چپ"/>
+ <cd:constant type="راست"/>
+ <cd:constant type="درون‌راست"/>
+ <cd:constant type="داخلی"/>
+ <cd:constant type="خارجی"/>
+ <cd:constant type="متن"/>
+ <cd:constant type="begin"/>
+ <cd:constant type="end"/>
</cd:parameter>
<cd:parameter name="سبک">
<cd:resolve name="style"/>
diff --git a/tex/context/interface/cont-ro.xml b/tex/context/interface/cont-ro.xml
index c93c6870c..b2d121dec 100644
--- a/tex/context/interface/cont-ro.xml
+++ b/tex/context/interface/cont-ro.xml
@@ -5438,8 +5438,18 @@
<cd:constant type="cd:dimension"/>
</cd:parameter>
<cd:parameter name="locatie">
- <cd:constant type="intext"/>
+ <cd:constant type="centru"/>
+ <cd:constant type="stanga"/>
+ <cd:constant type="margine"/>
<cd:constant type="inmargine"/>
+ <cd:constant type="instanga"/>
+ <cd:constant type="dreapta"/>
+ <cd:constant type="indreapta"/>
+ <cd:constant type="intern"/>
+ <cd:constant type="extern"/>
+ <cd:constant type="text"/>
+ <cd:constant type="begin"/>
+ <cd:constant type="end"/>
</cd:parameter>
<cd:parameter name="stil">
<cd:resolve name="style"/>
diff --git a/tex/context/interface/keys-cs.xml b/tex/context/interface/keys-cs.xml
index edef67e7b..6e39f7e5e 100644
--- a/tex/context/interface/keys-cs.xml
+++ b/tex/context/interface/keys-cs.xml
@@ -89,6 +89,7 @@
<cd:variable name='backward' value='zpet'/>
<cd:variable name='bbl' value='bbl'/>
<cd:variable name='before' value='pred'/>
+ <cd:variable name='begin' value='begin'/>
<cd:variable name='bib' value='bib'/>
<cd:variable name='big' value='velke'/>
<cd:variable name='bigbodyfont' value='bigbodyfont'/>
@@ -144,6 +145,7 @@
<cd:variable name='each' value='kazdy'/>
<cd:variable name='edge' value='hrana'/>
<cd:variable name='empty' value='prazdne'/>
+ <cd:variable name='end' value='end'/>
<cd:variable name='endnote' value='endnote'/>
<cd:variable name='enumeration' value='vycet'/>
<cd:variable name='environment' value='prostredi'/>
diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml
index 3a13fd632..55cc94bd2 100644
--- a/tex/context/interface/keys-de.xml
+++ b/tex/context/interface/keys-de.xml
@@ -89,6 +89,7 @@
<cd:variable name='backward' value='rueckwaerts'/>
<cd:variable name='bbl' value='bbl'/>
<cd:variable name='before' value='vor'/>
+ <cd:variable name='begin' value='begin'/>
<cd:variable name='bib' value='bib'/>
<cd:variable name='big' value='gross'/>
<cd:variable name='bigbodyfont' value='bigbodyfont'/>
@@ -144,6 +145,7 @@
<cd:variable name='each' value='jede'/>
<cd:variable name='edge' value='kante'/>
<cd:variable name='empty' value='leer'/>
+ <cd:variable name='end' value='end'/>
<cd:variable name='endnote' value='endnote'/>
<cd:variable name='enumeration' value='nummerierung'/>
<cd:variable name='environment' value='umgebung'/>
diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml
index 593073018..685b60a5a 100644
--- a/tex/context/interface/keys-en.xml
+++ b/tex/context/interface/keys-en.xml
@@ -89,6 +89,7 @@
<cd:variable name='backward' value='backward'/>
<cd:variable name='bbl' value='bbl'/>
<cd:variable name='before' value='before'/>
+ <cd:variable name='begin' value='begin'/>
<cd:variable name='bib' value='bib'/>
<cd:variable name='big' value='big'/>
<cd:variable name='bigbodyfont' value='bigbodyfont'/>
@@ -144,6 +145,7 @@
<cd:variable name='each' value='each'/>
<cd:variable name='edge' value='edge'/>
<cd:variable name='empty' value='empty'/>
+ <cd:variable name='end' value='end'/>
<cd:variable name='endnote' value='endnote'/>
<cd:variable name='enumeration' value='enumeration'/>
<cd:variable name='environment' value='environment'/>
diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml
index c560c48a8..f1411969c 100644
--- a/tex/context/interface/keys-fr.xml
+++ b/tex/context/interface/keys-fr.xml
@@ -89,6 +89,7 @@
<cd:variable name='backward' value='retourarriere'/>
<cd:variable name='bbl' value='bbl'/>
<cd:variable name='before' value='avant'/>
+ <cd:variable name='begin' value='begin'/>
<cd:variable name='bib' value='bib'/>
<cd:variable name='big' value='grand'/>
<cd:variable name='bigbodyfont' value='grandepolicecorp'/>
@@ -144,6 +145,7 @@
<cd:variable name='each' value='chaque'/>
<cd:variable name='edge' value='bord'/>
<cd:variable name='empty' value='vide'/>
+ <cd:variable name='end' value='end'/>
<cd:variable name='endnote' value='notefin'/>
<cd:variable name='enumeration' value='enumeration'/>
<cd:variable name='environment' value='environement'/>
diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml
index 6a920dfd8..0ae4ca3b2 100644
--- a/tex/context/interface/keys-it.xml
+++ b/tex/context/interface/keys-it.xml
@@ -89,6 +89,7 @@
<cd:variable name='backward' value='indietro'/>
<cd:variable name='bbl' value='bbl'/>
<cd:variable name='before' value='prima'/>
+ <cd:variable name='begin' value='begin'/>
<cd:variable name='bib' value='bib'/>
<cd:variable name='big' value='grande'/>
<cd:variable name='bigbodyfont' value='grossofontdeltesto'/>
@@ -144,6 +145,7 @@
<cd:variable name='each' value='ogni'/>
<cd:variable name='edge' value='bordo'/>
<cd:variable name='empty' value='vuoto'/>
+ <cd:variable name='end' value='end'/>
<cd:variable name='endnote' value='endnote'/>
<cd:variable name='enumeration' value='enumerazione'/>
<cd:variable name='environment' value='ambiente'/>
diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml
index 3d33c84ac..16d2e0983 100644
--- a/tex/context/interface/keys-nl.xml
+++ b/tex/context/interface/keys-nl.xml
@@ -89,6 +89,7 @@
<cd:variable name='backward' value='achteruit'/>
<cd:variable name='bbl' value='bbl'/>
<cd:variable name='before' value='voor'/>
+ <cd:variable name='begin' value='begin'/>
<cd:variable name='bib' value='bib'/>
<cd:variable name='big' value='groot'/>
<cd:variable name='bigbodyfont' value='grootkorps'/>
@@ -144,6 +145,7 @@
<cd:variable name='each' value='elk'/>
<cd:variable name='edge' value='rand'/>
<cd:variable name='empty' value='leeg'/>
+ <cd:variable name='end' value='eind'/>
<cd:variable name='endnote' value='eindnoot'/>
<cd:variable name='enumeration' value='doornummering'/>
<cd:variable name='environment' value='omgeving'/>
diff --git a/tex/context/interface/keys-pe.xml b/tex/context/interface/keys-pe.xml
index fc00846fa..4539ee081 100644
--- a/tex/context/interface/keys-pe.xml
+++ b/tex/context/interface/keys-pe.xml
@@ -89,6 +89,7 @@
<cd:variable name='backward' value='عقب‌گرد'/>
<cd:variable name='bbl' value='bbl'/>
<cd:variable name='before' value='قبل‌از'/>
+ <cd:variable name='begin' value='begin'/>
<cd:variable name='bib' value='bib'/>
<cd:variable name='big' value='بزرگ'/>
<cd:variable name='bigbodyfont' value='قلم‌بدنه‌بزرگ'/>
@@ -144,6 +145,7 @@
<cd:variable name='each' value='هر'/>
<cd:variable name='edge' value='لبه'/>
<cd:variable name='empty' value='تهی'/>
+ <cd:variable name='end' value='end'/>
<cd:variable name='endnote' value='ته‌نوشت'/>
<cd:variable name='enumeration' value='شماره‌بندی'/>
<cd:variable name='environment' value='محیط'/>
diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml
index 8104bb6f5..b0b65444b 100644
--- a/tex/context/interface/keys-ro.xml
+++ b/tex/context/interface/keys-ro.xml
@@ -89,6 +89,7 @@
<cd:variable name='backward' value='inapoi'/>
<cd:variable name='bbl' value='bbl'/>
<cd:variable name='before' value='inainte'/>
+ <cd:variable name='begin' value='begin'/>
<cd:variable name='bib' value='bib'/>
<cd:variable name='big' value='mare'/>
<cd:variable name='bigbodyfont' value='bigbodyfont'/>
@@ -144,6 +145,7 @@
<cd:variable name='each' value='fiecare'/>
<cd:variable name='edge' value='bordura'/>
<cd:variable name='empty' value='gol'/>
+ <cd:variable name='end' value='end'/>
<cd:variable name='endnote' value='endnote'/>
<cd:variable name='enumeration' value='enumerare'/>
<cd:variable name='environment' value='mediu'/>
diff --git a/tex/context/test/chem-str-test.tex b/tex/context/test/chem-str-test.tex
deleted file mode 100644
index fd6a8227a..000000000
--- a/tex/context/test/chem-str-test.tex
+++ /dev/null
@@ -1,560 +0,0 @@
-% Beware, integrated ppchtex support is incomplete and under
-% construction so when you depend on the full functionality
-% you need to use the module!
-%
-% For testing new functionality:
-%
-% \startMPextensions
-% input "mp-chem.mp" ;
-% \stopMPextensions
-% \startluacode
-% dofile(resolvers.find_file("chem-str.lua","tex"))
-% \stopluacode
-% \setbox\scratchbox\hbox{\startMPcode\stopMPcode}
-
-\enabletrackers[chemistry.structure]
-
-\starttext
-
-\defineprocessor[ch:r][color=red]
-\defineprocessor[ch:g][color=green]
-\defineprocessor[ch:b][color=blue]
-
-\setupchemical[frame=on,offset=3pt]
-
-\startbuffer[test-set]
-
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,MOV1,B] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,MOV2,B] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,MOV3,B] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,MOV4,B] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,MOV5,B] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,MOV6,B] \stopchemical \quad
-
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,R,AU] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,R,AD] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,EB] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,DB] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,ER] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,DR] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,BR] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,SB] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,-SB] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,+SB] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,C] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,CC] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,CD] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,CCD] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,SB,SR] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,SB,-SR] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,SB,+SR] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,R] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,RD] \stopchemical \quad
-
- \dontleavehmode \startchemical \chemical[\ChemicalKind,SB,Z] [a,b,c,d,e,f] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,R,RZ] [a,b,c,d,e,f] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,+R,+RZ] [a,b,c,d,e,f] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,-R,-RZ] [a,b,c,d,e,f] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,RB,RZ] [a,b,c,d,e,f] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,+RB,+RZ][a,b,c,d,e,f] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,-RB,-RZ][a,b,c,d,e,f] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,R,RT] [a,b,c,d,e,f] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,R,RTT] [a,b,c,d,e,f] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,R,RBT] [a,b,c,d,e,f] \stopchemical \quad
-
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,R,RN] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,R,RTN] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,R,RBN] \stopchemical \quad
-
- \dontleavehmode \startchemical \chemical[\ChemicalKind,B,R,RN] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,ROT1,B,R,RN] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,ROT2,B,R,RN] \stopchemical \quad
- \dontleavehmode \startchemical \chemical[\ChemicalKind,ROT3,B,R,RN] \stopchemical \quad
-
-\stopbuffer
-
-\dontcomplain
-
-% \startTEXpage
-
-\setupchemicalframed[frame=on]
-
-% \startTEXpage
-% \noindent \startchemical \chemical[THREE, B,R,RZ][RZ_1,RZ_2,RZ_3]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT1,B,R,RZ][RZ_1,RZ_2,RZ_3]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT2,B,R,RZ][RZ_1,RZ_2,RZ_3]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT3,B,R,RZ][RZ_1,RZ_2,RZ_3]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT4,B,R,RZ][RZ_1,RZ_2,RZ_3]\stopchemical
-
-% \noindent \startchemical \chemical[THREE, B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT1,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT2,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT3,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT4,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3]\stopchemical
-
-% \noindent \startchemical \chemical[THREE, B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT1,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT2,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT3,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT4,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3]\stopchemical
-% \stopTEXpage
-
-% \startTEXpage
-% \noindent \startchemical \chemical[SIX,ROT1,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-% \noindent \startchemical \chemical[SIX,ROT2,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-% \noindent \startchemical \chemical[SIX,ROT3,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-% \noindent \startchemical \chemical[SIX,ROT4,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-
-% \noindent \startchemical \chemical[SIX,ROT1,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-% \noindent \startchemical \chemical[SIX,ROT2,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-% \noindent \startchemical \chemical[SIX,ROT3,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-% \noindent \startchemical \chemical[SIX,ROT4,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-
-% \noindent \startchemical \chemical[SIX,ROT1,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \noindent \startchemical \chemical[SIX,ROT2,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \noindent \startchemical \chemical[SIX,ROT3,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \noindent \startchemical \chemical[SIX,ROT4,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \stopTEXpage
-
-% \startTEXpage
-% \noindent \startchemical \chemical[FIVE,ROT1,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FIVE,ROT2,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FIVE,ROT3,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FIVE,ROT4,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-
-% \noindent \startchemical \chemical[FIVE,ROT1,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FIVE,ROT2,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FIVE,ROT3,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FIVE,ROT4,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-
-% \noindent \startchemical \chemical[FIVE,ROT1,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FIVE,ROT2,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FIVE,ROT3,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FIVE,ROT4,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \stopTEXpage
-
-% \startTEXpage
-% \noindent \startchemical \chemical[FOUR,ROT1,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FOUR,ROT2,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FOUR,ROT3,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FOUR,ROT4,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-
-% \noindent \startchemical \chemical[FOUR,ROT1,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FOUR,ROT2,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FOUR,ROT3,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FOUR,ROT4,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-
-% \noindent \startchemical \chemical[FOUR,ROT1,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FOUR,ROT2,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FOUR,ROT3,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \noindent \startchemical \chemical[FOUR,ROT4,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \stopTEXpage
-
-% \startTEXpage
-% \noindent \startchemical \chemical[THREE,ROT1,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT2,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT3,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT4,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]\stopchemical
-
-% \noindent \startchemical \chemical[THREE,ROT1,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT2,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT3,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT4,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6]\stopchemical
-
-% \noindent \startchemical \chemical[THREE,ROT1,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT2,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT3,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \noindent \startchemical \chemical[THREE,ROT4,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6]\stopchemical
-% \stopTEXpage
-
-% \startTEXpage
-% \noindent \startchemical \chemical[EIGHT,ROT1,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6,RZ_7,RZ_8]\stopchemical
-% \noindent \startchemical \chemical[EIGHT,ROT2,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6,RZ_7,RZ_8]\stopchemical
-% \noindent \startchemical \chemical[EIGHT,ROT3,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6,RZ_7,RZ_8]\stopchemical
-% \noindent \startchemical \chemical[EIGHT,ROT4,B, R, RZ, AU][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6,RZ_7,RZ_8]\stopchemical
-
-% \noindent \startchemical \chemical[EIGHT,ROT1,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6,-RZ_7,-RZ_8]\stopchemical
-% \noindent \startchemical \chemical[EIGHT,ROT2,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6,-RZ_7,-RZ_8]\stopchemical
-% \noindent \startchemical \chemical[EIGHT,ROT3,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6,-RZ_7,-RZ_8]\stopchemical
-% \noindent \startchemical \chemical[EIGHT,ROT4,B,-R,-RZ][-RZ_1,-RZ_2,-RZ_3,-RZ_4,-RZ_5,-RZ_6,-RZ_7,-RZ_8]\stopchemical
-
-% \noindent \startchemical \chemical[EIGHT,ROT1,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6,+RZ_7,+RZ_8]\stopchemical
-% \noindent \startchemical \chemical[EIGHT,ROT2,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6,+RZ_7,+RZ_8]\stopchemical
-% \noindent \startchemical \chemical[EIGHT,ROT3,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6,+RZ_7,+RZ_8]\stopchemical
-% \noindent \startchemical \chemical[EIGHT,ROT4,B,+R,+RZ][+RZ_1,+RZ_2,+RZ_3,+RZ_4,+RZ_5,+RZ_6,+RZ_7,+RZ_8]\stopchemical
-% \stopTEXpage
-
-% \enabletrackers[chemistry.molecules]
-
-% \startchemicalformula
-% \chemical{S}
-% \chemical{+}
-% \chemical{O_2}
-% \chemical{GIVES}
-% \chemical{\+{4}{S}}
-% \chemical{\+{4}{S}\-{2}{O_2}}
-% \chemical{\-{2}{O_2}}
-% \stopchemicalformula
-
-% \startformula
-% \chemical{S}
-% \chemical{+}
-% \chemical{O_2}
-% \chemical{GIVES}
-% \chemical{\+{4}{S}}
-% \chemical{\+{4}{S}\-{2}{O_2}}
-% \chemical{\-{2}{O_2}}
-% \stopformula
-
-
-\startTEXpage[offset=2cm]
-
-\startchemical[width=fit,size=small,scale=small,frame=on]
- \chemical[SIX,B]
-\stopchemical
-
-% \startchemical[width=fit,size=small,scale=small,frame=on]
-% \chemical[ONE,SB258]
-% \stopchemical
-
-% \startchemical[width=fit,size=small,scale=small,frame=on]
-% \chemical[ONE,ROT3,SB258]
-% \stopchemical
-
-% \startchemical[width=fit,size=small,scale=small,frame=on]
-% \chemical[FIVE,ROT3,SB34,+SB2,-SB5,Z345,DR35,SR4,CRZ35,SUB1,ONE,SB258,Z0,Z28][C,N,C,O,O,CH,COOC_2H_5,COOC_2H_5]
-% \stopchemical
-
-% \startchemical[scale=small,width=8000,height=8000,frame=on]
-% \chemical[SIX,SB2356,DB14,Z2346,SR36,RZ36] [C,N,C,C,H,H_2]
-% \chemical[PB:Z1,ONE,Z0,DIR8,Z0,SB24,DB7,Z27,PE][C,C,CH_3,O]
-% \chemical[PB:Z5,ONE,Z0,DIR6,Z0,SB24,DB7,Z47,PE][C,C,H_3C,O]
-% \chemical[SR24,RZ24] [CH_3,H_3C]
-% \stopchemical
-
-% \startchemical[scale=small,width=6000,height=6000,frame=on]
-% \chemical[SIX,SB2356,DB14,Z,SR36,RZ36,SR1245,RZ24][C,C,N,C,C,C,H,H_2,CH_3,H_3C]
-% \chemical[PB:RZ1,ONE,Z0,SB2,DB7,Z27,PE][C,CH_3,O]
-% \chemical[PB:RZ5,ONE,Z0,SB4,DB7,Z47,PE][C,H_3C,O]
-% \stopchemical
-
-% \startchemical[width=fit,size=small,scale=small,frame=on]
-% \chemical
-% [SIX,B,C,ADJ1,FIVE,ROT3,SB34,+SB2,-SB5,Z345,DR35,SR4,CRZ35,SUB1,ONE,OFF1,SB258,Z0,Z28]
-% [C,N,C,O,O,CH,COOC_2H_5,COOC_2H_5]
-% \stopchemical
-
-% \startchemical[width=fit,height=fit,frame=on,scale=small]
-% \chemical
-% [ONE,SB15,DB7,Z057,3OFF1,MOV1,Z0,3OFF1,MOV1,
-% Z017,SB1357,MOV3,Z0,MOV3,SB1357,Z013,3OFF5,
-% MOV5,Z0,3OFF5,SB5,Z5]
-% [C,H_2N,NH,(CH_2)_3,C,COOH,H,\SL{NH},C,COOH,H,
-% (CH_2)_2,HOOC]
-% \stopchemical
-
-% \startchemical[width=fit,height=fit,frame=on,scale=small]
-% \chemical
-% [ONE,SB15,DB7,Z057,3OFF1,MOV1,Z0,3OFF1,MOV1,Z017,SB1357,MOV3,Z0,MOV3,SB1357,Z013,3OFF5,MOV5,Z0,3OFF5,SB5,Z5]
-% [C,H_2N,NH,(CH_2)_3,C,COOH,H,\SL{NH},C,COOH,H,(CH_2)_2,HOOC]
-% \stopchemical
-
-% \startchemical
-% \chemical[ONE,Z0,DB,Z][C_0,C_1,C_1,C_3,C_4,C_5,C_6,C_7,C_8]
-% \stopchemical
-
-% \startchemical
-% \chemical[ONE,Z0,SB,Z][C_0,C_1,C_1,C_3,C_4,C_5,C_6,C_7,C_8]
-% \stopchemical
-
-% \startchemical
-% \chemical[ONE,Z0,DB,CZ][C_0,C_1,C_1,C_3,C_4,C_5,C_6,C_7,C_8]
-% \stopchemical
-
-% \startchemical
-% [width=fit,top=2000,bottom=2000,
-% scale=small,size=small]%
-% \chemical
-% [ONE,
-% SAVE,
-% Z0,SB731,MOV1,Z0,SB1,MOV1,Z0,DB8,CZ8,SB1,Z1,
-% RESTORE,
-% SAVE,
-% SUB4,ONE,Z0,SB3,SB1,MOV1,Z0,SB1,MOV1,Z0,DB8,CZ8,SB1,Z1,
-% RESTORE,
-% SUB2,ONE,Z0,SB7,SB1,MOV1,Z0,SB1,MOV1,Z0,DB8,CZ8,SB1,Z1]
-% [\SR{HC},O,C,O,C_{19}H_{39},
-% \SR{H_{2}C},O,C,O,C_{17}H_{29},
-% \SR{H_{2}C},O,C,O,C_{21}H_{41}]
-% \stopchemical
-
-% \chemical[width=fit,height=fit,frame=on,scale=small]
-% [ONE,Z0,MOV7,SB1357,Z017,3OFF5,MOV5,Z0,3OFF5,MOV5,SB15,DB7,Z057,MOV0,MOV3,SB1357,Z013,MOV5,3OFF5,Z0,6OFF5,SB5,Z5]
-% [\SL{NH},C,COOH,H,(CH_2)_3,C,H_2H,NH,C,COOH,H,(CH_2)_2,HOOC]
-% \stopchemical
-
-% \chemical[width=fit,height=fit,frame=on,scale=small]
-% [ONE,Z0,MOV7,SB1357,Z017,3OFF5,MOV5,Z0,3OFF5,MOV5,SB15,DB7,Z057,MOV0,MOV3,SB1357,Z013,MOV5,3OFF5,Z0,6OFF5,SB5,Z5]
-% [\SL{NH},C,COOH,H,(CH_2)_3,C,H_2H,NH,C,COOH,H,(CH_2)_2,HOOC]
-% \stopchemical
-
-% \startchemical[width=fit,top=1500,bottom=3500]
-% \chemical[ONE,Z0,DB1,SB3,SB7,Z7,MOV1,Z0,SB3,SB7,Z3,Z7,MOV0,SUB2,SIX,B,R6,C][C,H,C,H,H]
-% \chemical[ONE,Z0,DB1,SB3,SB7,Z7,MOV1,Z0,SB3,SB7,Z3,Z7,MOV0,SUB2,SIX,B,R6,C][C,H,C,H,H]
-% \bottext{styreen}
-% \stopchemical
-
-% \startchemical
-% \chemical[SPACE,PLUS,SPACE]
-% \stopchemical
-% \startchemical[right=600]
-% \chemical[ONE,CZ0][3CH_{3}OH]
-% \stopchemical
-% \startchemical
-% \chemical[SPACE,GIVES,SPACE,SPACE][H^+/H_2O]
-% \stopchemical
-% \startchemical
-% \chemical
-% [ONE,
-% SAVE,
-% Z0,SB7,SB3,SB1,Z1,
-% RESTORE,
-% SAVE,
-% SUB4,ONE,Z0,SB3,SB1,Z1,
-% RESTORE,
-% SUB2,ONE,Z0,SB7,SB1,Z1]
-% [\SR{HC},OH,
-% \SR{H_{2}C},OH,
-% \SR{H_{2}C},OH]
-% \stopchemical
-% \startchemical
-% \chemical[SPACE,PLUS,SPACE]
-% \stopchemical
-
-% \startchemical
-% \chemical
-% [ONE,
-% SAVE,
-% Z0,DB8,CZ8,SB1,SB5,Z5,MOV1,Z0,SB1,Z1,
-% RESTORE,
-% SAVE,
-% SUB4,ONE,Z0,DB8,CZ8,SB1,SB5,Z5,MOV1,Z0,SB1,Z1,
-% RESTORE,
-% SUB2,ONE,Z0,DB8,CZ8,SB1,SB5,Z5,MOV1,Z0,SB1,Z1]
-% [C,O,C_{19}H_{39},O,CH_{3},
-% C,O,C_{17}H_{29},O,CH_{3},
-% C,O,C_{21}H_{41},O,CH_{3}]
-% \stopchemical
-
-% \startchemical[height=4500,bottom=2500]
-% \bottext{$\beta$-D-Fructopyranose}
-% \chemical[SIX,FRONT,BB,B1236,+SB4,-SB5,Z5,+R12346,+RZ12346,-R12346,-RZ12346][Z_0,+R_1,+R_2,+R_3,+R_4,+R_6,-R_1,-R_2,-R_3,-R_4,-R_6]
-% \stopchemical
-
-% \startchemical[height=4500,bottom=2500]
-% \chemical[SIX,FRONT,BB,B]
-% \stopchemical
-
-% \startchemical
-% [width=fit,height=fit,frame=on]
-% \chemical
-% [SIX,DB135,SB246,Z,SR6,RZ6][C,C,N,\SR{HC},N,C,NH_2]
-% \chemical
-% [SIX,MOV1,DB1,SB23,SS6,Z1..3,SR3,RZ3][N,\SL{CH},N,H]
-% \stopchemical
-
-% \startchemical \chemical[SIX,B,R,RZ1=a] \stopchemical
-% \startchemical \chemical[SIX,B,R,RZ1..3=a] \stopchemical
-% \startchemical \chemical[SIX,B,R,RZ135=a] \stopchemical
-% \startchemical \chemical[SIX,B,R,RZ] [a] \stopchemical
-% \startchemical \chemical[SIX,B,R,RZ] [a,b] \stopchemical
-% \startchemical \chemical[SIX,B,R,RZ=a] \stopchemical
-
-% \definechemical[molecule]
-% {\chemical
-% [ONE,Z0,SB1357,
-% SAVE,SUB2,SIX,B,R6,C,RESTORE,
-% MOV1,Z0,SB137,MOV1,Z0,SB37,MOV1]
-% [C,C,C]}
-
-% \startchemical[width=fit,height=fit]
-% \chemical[molecule,molecule,molecule]
-% \stopchemical
-
-% \definechemical[molecule]
-% {\chemical
-% [ONE,Z0,SB1357,
-% SAVE,SUB2,SIX,B,R6,C,RESTORE,
-% MOV1,Z0,SB137,MOV1,Z0,SB37,MOV1]}
-
-% \startchemical[width=fit,height=fit]
-% \chemical[molecule,molecule,molecule][A,B,C,D,E,F,G,H,I]
-% \stopchemical
-
-\stopTEXpage
-
-% \noindent \startchemical
-% \chemical[SIX,B1..3]
-% \stopchemical
-
-% \noindent \startchemical[width=fit,height=fit] % auto5 ipb off5
-% \chemical[SIX,B,C,R,RZ][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]
-% \stopchemical
-% \noindent \startchemical[width=fit,height=fit] % auto5 ipb off5
-% \chemical[SIX,ROT1,B,C,R,RZ][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]
-% \stopchemical
-% \startchemical[width=fit,height=fit] % auto5 ipb off5
-% \chemical[SIX,ROT2,B,C,R,RZ][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]
-% \stopchemical
-% \startchemical[width=fit,height=fit] % auto5 ipb off5
-% \chemical[SIX,ROT3,B,C,R,RZ][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]
-% \stopchemical
-% \startchemical[width=fit,height=fit] % auto5 ipb off5
-% \chemical[SIX,ROT4,B,C,R,RZ][RZ_1,RZ_2,RZ_3,RZ_4,RZ_5,RZ_6]
-% \stopchemical
-
-% \startchemical[width=fit,height=fit,axis=on] % auto5 ipb off5
-% \chemical[SIX,B,C,R6,PB:RZ6,ONE,CZ0,OE1,SB5,MOV5,CZ0,OFF5,OE5,PE][CH,CH_2]
-% \stopchemical
-
-% \dontleavehmode \startchemical \chemical[SIX,B,R,RZ][1,2,3,4,5,6,] \stopchemical
-
-% \start
-% \setupchemicalframed[frame=off]
-% \dontleavehmode \startchemical[scale=medium,style=slanted,color=red,rulecolor=green,left=2000,right=4000,top=2000,bottom=2000,axis=on] \chemical[SIX,B,R,RZ][1,2,3,4,5,6,] \stopchemical
-
-% \dontleavehmode
-% \startchemical[width=fit,height=fit]
-% \chemical[SIX,B][1,2,3,4,5,6]
-% \start
-% \setupchemical[rulecolor=red]
-% \chemical[SIX,R][1,2,3,4,5,6]
-% \stop
-% \chemical[SIX,RZ][1,2,3,4,5,6]
-% \stopchemical
-% \stop
-
-% \stopTEXpage
-
-% \stoptext
-
-% \startTEXpage
-
-% \dontleavehmode \startchemical \chemical[ONE,SB,Z0,Z][0,1,2,3,4,5,6,7,8] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,DB,Z0,Z][0,1,2,3,4,5,6,7,8] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,TB,Z0,Z][0,1,2,3,4,5,6,7,8] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,EP,Z0][0] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,ES,Z0][0] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,ED,Z0][0] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,ET,Z0][0] \stopchemical \quad
-
-
-% \dontleavehmode \startchemical \chemical[ONE,SD,Z0][0] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,LDD,Z0][0] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,RDD,Z0][0] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,HB,Z0][0] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,BB,Z0][0] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,OE,Z0][0] \stopchemical \quad
-
-
-% \dontleavehmode \startchemical \chemical[ONE,SB,Z] [1,2,3,4,5,6,7,8] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,SB,CZ][1,2,3,4,5,6,7,8] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,SB,ZT][a,b,c,d,e,f,g,h] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,SB,ZN][1,2,3,4,5,6,7,8] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,SB,ZBT][1,2,3,4,5,6,7,8] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,SB,ZBN][1,2,3,4,5,6,7,8] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,SB,ZTT][1,2,3,4,5,6,7,8] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,SB,ZTN][1,2,3,4,5,6,7,8] \stopchemical \quad
-
-% \dontleavehmode \startchemical \chemical[ONE,SB,MOV1,SB] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[ONE,SB,MOV1,SB,MOV3,SB] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[SIX,B,MOV1,B] \stopchemical \quad
-
-
-% \dontleavehmode \startchemical \chemical[ONE,SB,Z0,Z][0,1,2,3,4,5,6] \stopchemical \quad
-% \stopTEXpage
-
-
-% \dorecurse{1000}{\dontleavehmode \startchemical \chemical[SIX,B,R,RZ][a,b,c,d,e,f] \stopchemical \quad}
-
-% \dontleavehmode \startchemical \chemical[SIX,B,R,RT] [a,b,c,d,e,f] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[SIX,B,R,RTT] [a,b,c,d,e,f] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[SIX,B,R,RBT] [a,b,c,d,e,f] \stopchemical \quad
-
-% \dontleavehmode \startchemical \chemical[SIX,B,R,+R,-R] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[SIX,B1..4] \stopchemical \quad
-
-% \dontleavehmode \startchemical \chemical[SIX,B,ZN] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[SIX,B,ZT][A,B,C,D,E,F] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[SIX,B,R,AU] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[SIX,B,R,AD] \stopchemical \quad
-
-% \dontleavehmode \startchemical \chemical[SIX,B,ADJ1,SIX,B] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[SIX,B,ADJ1,FIVE,ROT1,B] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[SIX,B,ADJ1,FOUR,B] \stopchemical \quad
-% \dontleavehmode \startchemical \chemical[SIX,B,ADJ1,THREE,B] \stopchemical \quad
-
-% \definechemical[sixring]
-% {\chemical[SIX,B,R]}
-
-% \startchemical[frame=on,width=6000]
-% \chemical[sixring,RZ][A,B,C,D,E,F]
-% \stopchemical
-
-% \definechemical[test]
-% {\chemical[SIX,SB,Z][A,B,C,D,E,F]}
-
-% \startchemical
-% \chemical[SIX,SB,Z,ADJ1,test,ADJ1,SIX,SB,Z][a,b,c,d,e,f,g,h,j,k,l,m,P,Q,R,S,T,U,W]
-% \chemical[ADJ1,SIX,SB,Z][1,2,3,4,5,6]
-% \stopchemical
-
-% \definechemical[test]{\chemical[SIX,SB,Z]}
-
-% \startchemical
-% \chemical[SIX,SB,Z,ADJ1,test,ADJ1,SIX,SB,Z][a,b,c,d,e,f,g,h,j,k,l,m,P,Q,R,S,T,U,W]
-% \chemical[ADJ1,SIX,SB,Z][1,2,3,4,5,6]
-% \stopchemical
-
-% \startchemical
-% \chemical[ADJ1,SIX,SB,Z][a_1,a_2,a_3,a_4,a_5,\ominus]
-% \stopchemical
-
-% \startchemical
-% \chemical[SIX,SB,Z,SAVE,ADJ1,SIX,SB,Z,ADJ1,SIX,SB,Z,RESTORE,ADJ3,SIX,SB,Z][1,2,3,4,5,6,a,b,c,d,e,f,A,B,C,D,E,F,!,!,!,!,!,!]
-% \stopchemical
-
-% $$
-% \startchemical
-% \chemical[OPENCOMPLEX]
-% \stopchemical
-% \startchemical
-% \chemical[SIX,SB,Z][1,2,3,4,5,6]
-% \stopchemical
-% \startchemical
-% \chemical[SPACE,GIVES,SPACE][a,b]
-% \stopchemical
-% \startchemical
-% \chemical[SIX,SB,Z][1,2,3,4,5,6]
-% \stopchemical
-% \startchemical
-% \chemical[CLOSECOMPLEX]
-% \stopchemical
-% $$
-
-% \stoptext
-
-% \page
-
-% \def\ChemicalKind{SIX} \getbuffer[test-set]
-% \def\ChemicalKind{FIVE} \getbuffer[test-set]
-% \def\ChemicalKind{FOUR} \getbuffer[test-set]
-% \def\ChemicalKind{THREE} \getbuffer[test-set]
-
-% \startchemical
-% \chemical[SIX,SB,C135,SR,Z0,Z,RZ][X,ch:r->A,ch:g->B,ch:b->C,D,E,F,a,b,c,d,e,f]
-% \chemical[MOV1,SIX,SB,C135,SR,Z0,Z,RZ][X,ch:r->A,ch:g->B,ch:b->C,D,E,F,a,b,c,d,e,f]
-% \chemical[MOV3,SIX,SB,C135,SR,Z0,Z,RZ][X,ch:r->A,ch:g->B,ch:b->C,D,E,F,a,b,c,d,e,f]
-% \stopchemical
-
-\stoptext
diff --git a/tex/context/test/sort-lan-test.tex b/tex/context/test/sort-lan-test.tex
deleted file mode 100644
index 0a368c091..000000000
--- a/tex/context/test/sort-lan-test.tex
+++ /dev/null
@@ -1,38 +0,0 @@
-\starttext
-
-\mainlanguage[de]
-
-\index{paar}
-\index{Paar}
-\index{paarig}
-\index{paarmal}
-\index{Pace}
-\index{Pacht}
-\index{Pack}
-\completeindex
-
-\page
-
-\mainlanguage[fi]
-
-\index{Aaltonen}
-\index{Aravirta}
-\index{Eriksson}
-\index{Hämeenniemi}
-\index{Kaisa}
-\index{Maija}
-\index{Mäntylä}
-\index{Nuorela}
-\index{Päätalo}
-\index{Suomi}
-\index{Uotila}
-\index{Yli-Hannuksela}
-\index{Ähtäri}
-\index{Äänekoski}
-\index{Åke}
-\index{Åsa}
-\index{Öhman}
-
-\completeindex
-
-\stoptext
diff --git a/tex/context/test/x-cml-test.tex b/tex/context/test/x-cml-test.tex
deleted file mode 100644
index 8df87b20a..000000000
--- a/tex/context/test/x-cml-test.tex
+++ /dev/null
@@ -1,9 +0,0 @@
-% engine=luatex
-
-\usemodule[x][cml]
-
-\starttext
-
-\xmlprocess{main}{x-cml-test.xml}{xml:process}
-
-\stoptext
diff --git a/tex/context/test/x-cml-test.xml b/tex/context/test/x-cml-test.xml
deleted file mode 100644
index b7a3893de..000000000
--- a/tex/context/test/x-cml-test.xml
+++ /dev/null
@@ -1,210 +0,0 @@
-<root>
-
- <cml:dchem>
- <cml:molecule>
- <cml:atom n="2">H</cml:atom>
- <cml:atom>O</cml:atom>
- </cml:molecule>
- </cml:dchem>
-
- <cml:dchem>
- <cml:reaction>
- <cml:molecule n="2">
- <cml:atom n="2"> H </cml:atom>
- <cml:caption> hydrogen </cml:caption>
- </cml:molecule>
- <cml:plus/>
- <cml:molecule>
- <cml:atom n="2"> O </cml:atom>
- <cml:caption> oxygen </cml:caption>
- </cml:molecule>
- <cml:gives>
- <cml:caption> hefty </cml:caption>
- </cml:gives>
- <cml:molecule n="2">
- <cml:atom n="2"> H </cml:atom>
- <cml:atom> O </cml:atom>
- <cml:caption> water </cml:caption>
- </cml:molecule>
- </cml:reaction>
- </cml:dchem>
-
- <cml:dchem>
- <cml:reaction>
- <cml:atom n="2"> O </cml:atom>
- </cml:reaction>
- </cml:dchem>
-
- <cml:dchem>
- <cml:reaction>
- <cml:molecule n="2">
- <cml:atom n="2"> H </cml:atom>
- </cml:molecule>
- <cml:plus/>
- <cml:molecule>
- <cml:atom n="2"> O </cml:atom>
- </cml:molecule>
- <cml:gives/>
- <cml:molecule n="2">
- <cml:atom n="2"> H </cml:atom>
- <cml:atom> O </cml:atom>
- </cml:molecule>
- </cml:reaction>
- </cml:dchem>
-
- <cml:dchem>
- <cml:atom n="6" charge="-5" weight="652" protons="339"> Rx </cml:atom>
- </cml:dchem>
-
- <cml:dchem> <cml:molecule n="2">
- <cml:ion charge="+2"> <cml:atom n="2"> H </cml:atom> </cml:ion>
- <cml:ion charge="-2"> <cml:atom> O </cml:atom> </cml:ion>
- </cml:molecule> </cml:dchem>
-
- <cml:dchem>
- <cml:ion charge="-1">
- <cml:atom> C </cml:atom>
- <cml:atom> O </cml:atom>
- <cml:atom> O </cml:atom>
- <cml:atom> H </cml:atom>
- </cml:ion>
- </cml:dchem>
-
- <cml:dchem>
- <cml:ion charge="-1" alternative='b'>
- <cml:atom> C </cml:atom>
- <cml:atom> O </cml:atom>
- <cml:atom> O </cml:atom>
- <cml:atom> H </cml:atom>
- </cml:ion>
- </cml:dchem>
-
- <cml:dchem>
- <?chemml ion alternative b?>
- <cml:ion charge="-1">
- <cml:atom> C </cml:atom>
- <cml:atom> O </cml:atom>
- <cml:atom> O </cml:atom>
- <cml:atom> H </cml:atom>
- </cml:ion>
- </cml:dchem>
-
- <cml:dchem>
- <cml:reaction>
- <cml:molecule n="2">
- <cml:atom n="2"> H </cml:atom>
- </cml:molecule>
- <cml:plus/>
- <cml:molecule>
- <cml:atom n="2"> O </cml:atom>
- </cml:molecule>
- <cml:equilibrium/>
- <cml:molecule n="2">
- <cml:atom n="2"> H </cml:atom>
- <cml:atom> O </cml:atom>
- </cml:molecule>
- <cml:gives>
- <cml:caption> wet feet </cml:caption>
- </cml:gives>
- <cml:molecule n="2">
- <cml:atom n="2"> H </cml:atom>
- <cml:atom> O </cml:atom>
- </cml:molecule>
- </cml:reaction>
- </cml:dchem>
-
- <cml:dchem>
- <cml:reaction>
- <cml:gives>
- </cml:gives>
- <cml:gives>
- <cml:caption>first entry</cml:caption>
- </cml:gives>
- <cml:gives>
- <cml:caption>first entry</cml:caption>
- <cml:caption>second entry</cml:caption>
- </cml:gives>
- <cml:gives/>
- </cml:reaction>
- </cml:dchem>
-
- <cml:dchem>
- <cml:molecule>
- <cml:atom> H </cml:atom>
- <cml:singlebond/>
- <cml:atom> C </cml:atom>
- <cml:doublebond/>
- <cml:atom> C </cml:atom>
- <cml:singlebond/>
- <cml:atom> H </cml:atom>
- </cml:molecule>
- </cml:dchem>
-
- <cml:dchem>
- <cml:molecule>
- <cml:atom> H </cml:atom>
- <cml:bond n="1"/>
- <cml:atom> C </cml:atom>
- <cml:bond n="2"/>
- <cml:atom> C </cml:atom>
- <cml:bond n="1"/>
- <cml:atom> H </cml:atom>
- </cml:molecule>
- </cml:dchem>
-
- <cml:dchem>
- <cml:structure>
- <cml:component>
- <cml:graphic>SIX,B</cml:graphic>
- <cml:graphic>r135</cml:graphic>
- </cml:component>
- <cml:component>
- <cml:graphic>R246</cml:graphic>
- </cml:component>
- <cml:component>
- <cml:graphic>RZ</cml:graphic>
- <cml:text>A,B,C,D,E,F</cml:text>
- </cml:component>
- </cml:structure>
- </cml:dchem>
-
- <cml:dchem>
- <cml:structure>
- <cml:component>
- <cml:graphic>SIX,B</cml:graphic>
- <cml:graphic>R135</cml:graphic>
- </cml:component>
- <cml:component>
- <cml:graphic>R246</cml:graphic>
- </cml:component>
- <cml:component>
- <cml:graphic>RZ</cml:graphic>
- <cml:text>A,B,C,D,E,F</cml:text>
- </cml:component>
- <cml:component>
- <cml:graphic>Z</cml:graphic>
- <cml:oxidation n="3">A</cml:oxidation>
- <cml:annotation location="tl">
- <cml:text>B</cml:text>
- <cml:caption>x</cml:caption>
- </cml:annotation>
- <cml:oxidation n="3" sign="+">C</cml:oxidation>
- <cml:text>D,E,F</cml:text>
- </cml:component>
- </cml:structure>
- <cml:structure>
- <cml:component>
- <cml:graphic>SIX,B</cml:graphic>
- <cml:graphic>r135</cml:graphic>
- </cml:component>
- <cml:component>
- <cml:graphic>R246</cml:graphic>
- </cml:component>
- <cml:component>
- <cml:graphic>RZ</cml:graphic>
- <cml:text>A,B,C,D,E,F</cml:text>
- </cml:component>
- </cml:structure>
- </cml:dchem>
-
-</root>
diff --git a/tex/context/test/x-ct-test.tex b/tex/context/test/x-ct-test.tex
deleted file mode 100644
index d47563e84..000000000
--- a/tex/context/test/x-ct-test.tex
+++ /dev/null
@@ -1,7 +0,0 @@
-% engine=luatex
-
-\usemodule[x][ct]
-
-\starttext
- \xmlprocess{main}{x-ct-test.xml}{}
-\stoptext
diff --git a/tex/context/test/x-ct-test.xml b/tex/context/test/x-ct-test.xml
deleted file mode 100644
index e61abb054..000000000
--- a/tex/context/test/x-ct-test.xml
+++ /dev/null
@@ -1,149 +0,0 @@
-<?xml version='1.0' standalone='yes' ?>
-
-<root xmlns:ct="http://www.pragma-ade.com/context">
-
- one:
-
- <tabulate xmlns="http://www.pragma-ade.com/context">
- <template>
- <column align='flushleft'/>
- <column align='flushright'/>
- <column align='center'/>
- </template>
- <body>
- <row>
- <cell>one</cell>
- <cell>two</cell>
- <cell>three</cell>
- </row>
- <row>
- <cell>a</cell>
- <cell>b</cell>
- <cell>c</cell>
- </row>
- <row>
- <cell>alpha</cell>
- <cell>beta</cell>
- <cell>gamma</cell>
- </row>
- </body>
- </tabulate>
-
- two:
-
- <context:tabulate>
- <context:template>
- <context:column align='flushleft'/>
- <context:column align='flushright'/>
- <context:column align='center'/>
- </context:template>
- <context:body>
- <context:row>
- <context:cell>one</context:cell>
- <context:cell>two</context:cell>
- <context:cell>three</context:cell>
- </context:row>
- <context:row>
- <context:cell>a</context:cell>
- <context:cell>b</context:cell>
- <context:cell>c</context:cell>
- </context:row>
- <context:row>
- <context:cell>alpha</context:cell>
- <context:cell>beta</context:cell>
- <context:cell>gamma</context:cell>
- </context:row>
- </context:body>
- </context:tabulate>
-
- three:
-
- <context:tabulate>
- <context:body>
- <context:row>
- <context:cell>one</context:cell>
- <context:cell>two</context:cell>
- <context:cell>three</context:cell>
- </context:row>
- <context:row>
- <context:cell>a</context:cell>
- <context:cell>b</context:cell>
- <context:cell>c</context:cell>
- </context:row>
- <context:row>
- <context:cell>alpha</context:cell>
- <context:cell>beta</context:cell>
- <context:cell>gamma</context:cell>
- </context:row>
- </context:body>
- </context:tabulate>
-
- four:
-
- <context:tabulate template="|l|l|l|">
- <context:body>
- <context:row>
- <context:cell>one</context:cell>
- <context:cell>two</context:cell>
- <context:cell>three</context:cell>
- </context:row>
- <context:row>
- <context:cell>a</context:cell>
- <context:cell>b</context:cell>
- <context:cell>c</context:cell>
- </context:row>
- <context:row>
- <context:cell>alpha</context:cell>
- <context:cell>beta</context:cell>
- <context:cell>gamma</context:cell>
- </context:row>
- </context:body>
- </context:tabulate>
-
- five:
-
- <ct:combination nx='3' ny='2'>
- <ct:pair>
- <ct:content>some content 1</ct:content>
- <ct:caption>caption a</ct:caption>
- </ct:pair>
- <ct:pair>
- <ct:content>some content 2</ct:content>
- <ct:caption>caption b</ct:caption>
- </ct:pair>
- <ct:pair>
- <ct:content>some content 3</ct:content>
- <ct:caption>caption c</ct:caption>
- </ct:pair>
- <ct:pair>
- <ct:content>some content 4</ct:content>
- <ct:caption>caption d</ct:caption>
- </ct:pair>
- <ct:pair>
- <ct:content>some content 5</ct:content>
- <ct:caption>caption e</ct:caption>
- </ct:pair>
- <ct:pair>
- <ct:content>some content 6</ct:content>
- <ct:caption>caption f</ct:caption>
- </ct:pair>
- </ct:combination>
-
- six:
-
- <ct:combination>
- <ct:pair>
- <ct:content>some content 1</ct:content>
- <ct:caption>caption a</ct:caption>
- </ct:pair>
- <ct:pair>
- <ct:content>some content 2</ct:content>
- <ct:caption>caption b</ct:caption>
- </ct:pair>
- <ct:pair>
- <ct:content>some content 3</ct:content>
- <ct:caption>caption c</ct:caption>
- </ct:pair>
- </ct:combination>
-
-</ct:root>
diff --git a/tex/context/test/x-mmp-test.tex b/tex/context/test/x-mmp-test.tex
deleted file mode 100644
index f157c13f1..000000000
--- a/tex/context/test/x-mmp-test.tex
+++ /dev/null
@@ -1,12 +0,0 @@
-% engine=luatex
-
-% \startsetups xml:process
-% \xmlregisteredsetups
-% \xmlall\xmldocument{/}
-% \stopsetups
-
-\usemodule[x][mml]
-
-\starttext
- \xmlprocess{main}{x-mmp-test.xml}{xml:process}
-\stoptext
diff --git a/tex/context/test/x-mmp-test.xml b/tex/context/test/x-mmp-test.xml
deleted file mode 100644
index 6b3e59a01..000000000
--- a/tex/context/test/x-mmp-test.xml
+++ /dev/null
@@ -1,1270 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- this file needs a bit of formatting -->
-
-<root>
-
- <mmp:math>
- <mmp:mtable>
- <mmp:mtr>
- <mmp:mtd>
- <mmp:mn>10</mmp:mn>
- </mmp:mtd>
- </mmp:mtr>
- </mmp:mtable>
- </mmp:math>
-
- <mmp:math>
- <mmp:mtable columnspacing='0' rowspacing='0'>
- <mmp:mtr>
- <mmp:mtd></mmp:mtd>
- <mmp:mtd columnalign='right'>
- <mmp:mn>10</mmp:mn>
- </mmp:mtd>
- </mmp:mtr>
- <mmp:mtr>
- <mmp:mtd columnalign='right'>
- <mmp:mn>131</mmp:mn>
- </mmp:mtd>
- <mmp:mtd columnalign='right'>
- <mmp:menclose notation='longdiv'>
- <mmp:mn>1413</mmp:mn>
- </mmp:menclose>
- </mmp:mtd>
- </mmp:mtr>
- <mmp:mtr>
- <mmp:mtd/>
- <mmp:mtd columnalign='right'>
- <mmp:mrow>
- <mmp:munder>
- <mmp:mn>131</mmp:mn>
- <mmp:mo> &UnderBar; </mmp:mo>
- </mmp:munder>
- <mmp:mphantom><mmp:mn>3</mmp:mn></mmp:mphantom>
- </mmp:mrow>
- </mmp:mtd>
- </mmp:mtr>
- <mmp:mtr>
- <mmp:mtd/>
- <mmp:mtd columnalign='right'>
- <mmp:mn>103</mmp:mn>
- </mmp:mtd>
- </mmp:mtr>
- </mmp:mtable>
- </mmp:math>
-
- <mmp:math>
- <mmp:mmultiscripts>
- <mmp:mi> R </mmp:mi>
- <mmp:mi> i </mmp:mi>
- <mmp:none/>
- <mmp:none/>
- <mmp:mi> j </mmp:mi>
- <mmp:mi> k </mmp:mi>
- <mmp:none/>
- <mmp:mi> l </mmp:mi>
- <mmp:none/>
- </mmp:mmultiscripts>
- </mmp:math>
-
- <mmp:math>
- <mmp:mmultiscripts>
- <mmp:mi> R </mmp:mi>
- <mmp:mi> i </mmp:mi>
- <mmp:mi> j </mmp:mi>
- <mmp:mprescripts/>
- <mmp:mi> k </mmp:mi>
- <mmp:mi> l </mmp:mi>
- <mmp:none/>
- </mmp:mmultiscripts>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:munder accentunder="true">
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> y </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- <mmp:mo> &UnderBrace; </mmp:mo>
- </mmp:munder>
- <mmp:mtext> versus </mmp:mtext>
- <mmp:munder accentunder="false">
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> y </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- <mmp:mo> &UnderBrace; </mmp:mo>
- </mmp:munder>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:munder>
- <mmp:mo> ( </mmp:mo>
- <mmp:mo> &UnderBar; </mmp:mo>
- </mmp:munder>
- <mmp:mfrac>
- <mmp:mi> a </mmp:mi>
- <mmp:mi> b </mmp:mi>
- </mmp:mfrac>
- <mmp:mover>
- <mmp:mo> ) </mmp:mo>
- <mmp:mo> &OverBar; </mmp:mo>
- </mmp:mover>
- </mmp:mrow>
- </mmp:math>
-
-
- <mmp:math>
- <mmp:mrow>
- <mmp:msubsup>
- <mmp:mo> &int; </mmp:mo>
- <mmp:mn> 0 </mmp:mn>
- <mmp:mn> 1 </mmp:mn>
- </mmp:msubsup>
- <mmp:mrow>
- <mmp:msup>
- <mmp:mi> &ExponentialE; </mmp:mi>
- <mmp:mi> x </mmp:mi>
- </mmp:msup>
- <mmp:mo> &InvisibleTimes; </mmp:mo>
- <mmp:mrow>
- <mmp:mo> &DifferentialD; </mmp:mo>
- <mmp:mi> x </mmp:mi>
- </mmp:mrow>
- </mmp:mrow>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mfrac>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> y </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mphantom>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> y </mmp:mi>
- </mmp:mphantom>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- </mmp:mfrac>
- </mmp:math>
-
- <mmp:math>
- <mmp:mfrac>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> y </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mphantom>
- <mmp:mo> + </mmp:mo>
- </mmp:mphantom>
- <mmp:mphantom>
- <mmp:mi> y </mmp:mi>
- </mmp:mphantom>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- </mmp:mfrac>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mfrac>
- <mmp:mi> a </mmp:mi>
- <mmp:mi> b </mmp:mi>
- </mmp:mfrac>
- <mmp:mo maxsize="1"> ) </mmp:mo>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math display='block'>
- <mmp:mrow>
- <mmp:mi>sin</mmp:mi>
- <mmp:mi>x</mmp:mi>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math display='block'>
- <mmp:mrow>
- <mmp:mn>2500</mmp:mn>
- <mmp:mstyle scriptlevel='+1'>
- <mmp:mfrac bevelled='true'>
- <mmp:mrow>
- <mmp:msup>
- <mmp:mtext>m</mmp:mtext>
- <mmp:mtext>3</mmp:mtext>
- </mmp:msup>
- </mmp:mrow>
- <mmp:mtext>s</mmp:mtext>
- </mmp:mfrac>
- </mmp:mstyle>
- </mmp:mrow>
- </mmp:math>
-
-<mmp:math display='block'>
- <mmp:mrow>
- <mmp:mn>2500</mmp:mn>
- <mmp:msup>
- <mmp:mrow>
- <mmp:mtext>km</mmp:mtext>
- </mmp:mrow>
- <mmp:mtext>3</mmp:mtext>
- </mmp:msup>
- <mmp:mtext>/s</mmp:mtext>
- </mmp:mrow>
-</mmp:math>
-
-<mmp:math display='block'>
- <mmp:mrow>
- <mmp:msup>
- <mmp:mrow>
- <mmp:mi>sin</mmp:mi>
- <mmp:mo>&#x2061;</mmp:mo>
- </mmp:mrow>
- <mmp:mn>2</mmp:mn>
- </mmp:msup>
- <mmp:mi>x</mmp:mi>
- <mmp:mo>=</mmp:mo>
- <mmp:mn>1</mmp:mn>
- <mmp:mo>&#x2212;</mmp:mo>
- <mmp:msup>
- <mmp:mrow>
- <mmp:mi>cos</mmp:mi>
- <mmp:mo>&#x2061;</mmp:mo>
- </mmp:mrow>
- <mmp:mn>2</mmp:mn>
- </mmp:msup>
- <mmp:mi>x</mmp:mi>
- </mmp:mrow>
-</mmp:math>
-
-<mmp:math display='block'>
- <mmp:semantics>
- <mmp:mrow>
- <mmp:msup>
- <mmp:mrow>
- <mmp:mrow><mmp:mo>&#x2016;</mmp:mo> <mmp:mover accent='true'>
- <mmp:mi>c</mmp:mi>
- <mmp:mo>&#x2192;</mmp:mo>
- </mmp:mover>
- <mmp:mo>&#x02016;</mmp:mo></mmp:mrow>
- </mmp:mrow>
- <mmp:mn>2</mmp:mn>
- </mmp:msup>
- <mmp:mo>=</mmp:mo><mmp:msup>
- <mmp:mrow>
- <mmp:mrow><mmp:mo>&#x2016;</mmp:mo> <mmp:mover accent='true'>
- <mmp:mi>a</mmp:mi>
- <mmp:mo>&#x2192;</mmp:mo>
- </mmp:mover>
- <mmp:mo>&#x02016;</mmp:mo></mmp:mrow>
- </mmp:mrow>
- <mmp:mn>2</mmp:mn>
- </mmp:msup>
- <mmp:mo>+</mmp:mo><mmp:msup>
- <mmp:mrow>
- <mmp:mrow><mmp:mo>&#x2016;</mmp:mo> <mmp:mover accent='true'>
- <mmp:mi>b</mmp:mi>
- <mmp:mo>&#x2192;</mmp:mo>
- </mmp:mover>
- <mmp:mo>&#x02016;</mmp:mo></mmp:mrow>
- </mmp:mrow>
- <mmp:mn>2</mmp:mn>
- </mmp:msup>
- </mmp:mrow>
- <mmp:annotation encoding='MathType-MTEF'>
- MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaWaauWaaeaaceWGJbGbaSaaaiaawMa7caGLkWoadaahaaWcbeqaaiaaikdaaaGccqGH9aqpdaqbdaqaaiqadggagaWcaaGaayzcSlaawQa7amaaCaaaleqabaGaaGOmaaaakiabgUcaRmaafmaabaGabmOyayaalaaacaGLjWUaayPcSdWaaWbaaSqabeaacaaIYaaaaaaa@4704@</mmp:annotation>
- </mmp:semantics>
-</mmp:math>
-
-<mmp:math display='block'>
- <mmp:semantics>
- <mmp:mrow>
- <mmp:mi>n</mmp:mi><mmp:mo>=</mmp:mo><mmp:mfrac>
-<mmp:mrow>
- <mmp:mi>log</mmp:mi>
- <mmp:mo>&#x2061;</mmp:mo>
- <mmp:msub>
- <mmp:mi>v</mmp:mi>
- <mmp:mn>1</mmp:mn>
- </mmp:msub>
- <mmp:mo>&#x2212;</mmp:mo>
- <mmp:mi>log</mmp:mi>
- <mmp:mo>&#x2061;</mmp:mo>
- <mmp:msub>
- <mmp:mi>v</mmp:mi>
- <mmp:mn>2</mmp:mn>
- </mmp:msub>
-</mmp:mrow>
- <mmp:mrow>
- <mmp:mi>log</mmp:mi><mmp:mo>&#x2061;</mmp:mo><mmp:msub>
- <mmp:mi>t</mmp:mi>
- <mmp:mn>1</mmp:mn>
- </mmp:msub>
- <mmp:mo>&#x2212;</mmp:mo><mmp:mi>log</mmp:mi><mmp:mo>&#x2061;</mmp:mo><mmp:msub>
- <mmp:mi>t</mmp:mi>
- <mmp:mn>2</mmp:mn>
- </mmp:msub>
- </mmp:mrow>
- </mmp:mfrac>
- </mmp:mrow>
- <mmp:annotation encoding='MathType-MTEF'>
- MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamOBaiabg2da9maalaaabaGaciiBaiaac+gacaGGNbGaamODamaaBaaaleaacaaIXaaabeaakiabgkHiTiGacYgacaGGVbGaai4zaiaadAhadaWgaaWcbaGaaGOmaaqabaaakeaaciGGSbGaai4BaiaacEgacaWG0bWaaSbaaSqaaiaaigdaaeqaaOGaeyOeI0IaciiBaiaac+gacaGGNbGaamiDamaaBaaaleaacaaIYaaabeaaaaaaaa@4CB4@</mmp:annotation>
- </mmp:semantics>
-</mmp:math>
-
-<mmp:math display='block'>
- <mmp:semantics>
- <mmp:mrow>
- <mmp:msub>
- <mmp:mi>F</mmp:mi>
- <mmp:mtext>s</mmp:mtext>
- </mmp:msub>
- <mmp:mo>=</mmp:mo><mmp:msub>
- <mmp:mi>A</mmp:mi>
- <mmp:mtext>a</mmp:mtext>
- </mmp:msub>
- <mmp:mo>&#x00B7;</mmp:mo><mmp:msub>
- <mmp:mover accent='true'>
- <mmp:mi>&#x03C3;</mmp:mi>
- <mmp:mo>&#x00AF;</mmp:mo>
- </mmp:mover>
- <mmp:mtext>o</mmp:mtext>
- </mmp:msub>
- </mmp:mrow>
- <mmp:annotation encoding='MathType-MTEF'>
- MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamOramaaBaaaleaacaqGZbaabeaakiabg2da9iaadgeadaWgaaWcbaGaaeyyaaqabaGccqWIpM+zcuaHdpWCgaqeamaaBaaaleaacaqGVbaabeaaaaa@4033@</mmp:annotation>
- </mmp:semantics>
-</mmp:math>
-
-<mmp:math display='block'>
- <mmp:semantics>
- <mmp:mrow>
- <mmp:msub>
- <mmp:mi>M</mmp:mi>
- <mmp:mrow>
- <mmp:mtext>z;pl;d</mmp:mtext>
- </mmp:mrow>
- </mmp:msub>
- <mmp:mo stretchy='false'>(</mmp:mo><mmp:mn>1</mmp:mn><mmp:mo>&#x2212;</mmp:mo><mmp:msup>
- <mmp:mrow>
- <mmp:mo stretchy='false'>(</mmp:mo><mmp:mfrac>
- <mmp:mrow>
- <mmp:mfrac>
- <mmp:mrow>
- <mmp:msub>
- <mmp:mi>N</mmp:mi>
- <mmp:mrow>
- <mmp:mtext>s;d</mmp:mtext>
- </mmp:mrow>
- </mmp:msub>
- </mmp:mrow>
- <mmp:mrow>
- <mmp:msub>
- <mmp:mi>N</mmp:mi>
- <mmp:mrow>
- <mmp:mtext>pl;d</mmp:mtext>
- </mmp:mrow>
- </mmp:msub>
- </mmp:mrow>
- </mmp:mfrac>
- <mmp:mo>&#x2212;</mmp:mo><mmp:msub>
- <mmp:mi>a</mmp:mi>
- <mmp:mn>1</mmp:mn>
- </mmp:msub>
- </mmp:mrow>
- <mmp:mrow>
- <mmp:mn>1</mmp:mn><mmp:mo>&#x2212;</mmp:mo><mmp:msub>
- <mmp:mi>a</mmp:mi>
- <mmp:mn>1</mmp:mn>
- </mmp:msub>
- </mmp:mrow>
- </mmp:mfrac>
- <mmp:mo stretchy='false'>)</mmp:mo>
- </mmp:mrow>
- <mmp:mn>2</mmp:mn>
- </mmp:msup>
- <mmp:mo stretchy='false'>)</mmp:mo>
- </mmp:mrow>
- <mmp:annotation encoding='MathType-MTEF'>
- MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamytamaaBaaaleaacaqG6bGaae4oaiaabchacaqGSbGaae4oaiaabsgaaeqaaOGaaiikaiaaigdacqGHsislcaGGOaWaaSaaaeaadaWcaaqaaiaad6eadaWgaaWcbaGaae4CaiaabUdacaqGKbaabeaaaOqaaiaad6eadaWgaaWcbaGaaeiCaiaabYgacaqG7aGaaeizaaqabaaaaOGaeyOeI0IaamyyamaaBaaaleaacaaIXaaabeaaaOqaaiaaigdacqGHsislcaWGHbWaaSbaaSqaaiaaigdaaeqaaaaakiaacMcadaahaaWcbeqaaiaaikdaaaGccaGGPaaaaa@501B@</mmp:annotation>
- </mmp:semantics>
-</mmp:math>
-
-<mmp:math display='block'>
- <mmp:semantics>
- <mmp:mrow>
- <mmp:msub>
- <mmp:mi>M</mmp:mi>
- <mmp:mrow>
- <mmp:mtext>z;pl;d</mmp:mtext>
- </mmp:mrow>
- </mmp:msub>
- <mmp:mfenced open="(" close=")">
- <mmp:mn>1</mmp:mn><mmp:mo>&#x2212;</mmp:mo><mmp:msup>
- <mmp:mrow>
- <mmp:mo stretchy='false'>(</mmp:mo><mmp:mfrac>
- <mmp:mrow>
- <mmp:mfrac>
- <mmp:mrow>
- <mmp:msub>
- <mmp:mi>N</mmp:mi>
- <mmp:mrow>
- <mmp:mtext>s;d</mmp:mtext>
- </mmp:mrow>
- </mmp:msub>
- </mmp:mrow>
- <mmp:mrow>
- <mmp:msub>
- <mmp:mi>N</mmp:mi>
- <mmp:mrow>
- <mmp:mtext>pl;d</mmp:mtext>
- </mmp:mrow>
- </mmp:msub>
- </mmp:mrow>
- </mmp:mfrac>
- <mmp:mo>&#x2212;</mmp:mo><mmp:msub>
- <mmp:mi>a</mmp:mi>
- <mmp:mn>1</mmp:mn>
- </mmp:msub>
- </mmp:mrow>
- <mmp:mrow>
- <mmp:mn>1</mmp:mn><mmp:mo>&#x2212;</mmp:mo><mmp:msub>
- <mmp:mi>a</mmp:mi>
- <mmp:mn>1</mmp:mn>
- </mmp:msub>
- </mmp:mrow>
- </mmp:mfrac>
- <mmp:mo stretchy='false'>)</mmp:mo>
- </mmp:mrow>
- <mmp:mn>2</mmp:mn>
- </mmp:msup>
- </mmp:mfenced>
- </mmp:mrow>
- <mmp:annotation encoding='MathType-MTEF'>
- MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamytamaaBaaaleaacaqG6bGaae4oaiaabchacaqGSbGaae4oaiaabsgaaeqaaOGaaiikaiaaigdacqGHsislcaGGOaWaaSaaaeaadaWcaaqaaiaad6eadaWgaaWcbaGaae4CaiaabUdacaqGKbaabeaaaOqaaiaad6eadaWgaaWcbaGaaeiCaiaabYgacaqG7aGaaeizaaqabaaaaOGaeyOeI0IaamyyamaaBaaaleaacaaIXaaabeaaaOqaaiaaigdacqGHsislcaWGHbWaaSbaaSqaaiaaigdaaeqaaaaakiaacMcadaahaaWcbeqaaiaaikdaaaGccaGGPaaaaa@501B@</mmp:annotation>
- </mmp:semantics>
-</mmp:math>
-
-<mmp:math display='block'>
- <mmp:semantics>
- <mmp:mrow>
- <mmp:mi>q</mmp:mi><mmp:mo>=</mmp:mo><mmp:mn>1</mmp:mn><mmp:mo>,</mmp:mo><mmp:mn>03</mmp:mn><mmp:msqrt>
- <mmp:mrow>
- <mmp:mn>1</mmp:mn><mmp:mo>&#x2212;</mmp:mo><mmp:msup>
- <mmp:mrow>
- <mmp:mo stretchy='false'></mmp:mo><mmp:mfrac>
- <mmp:mrow>
- <mmp:msub>
- <mmp:mi>V</mmp:mi>
- <mmp:mrow>
- <mmp:mtext>y;s;d</mmp:mtext>
- </mmp:mrow>
- </mmp:msub>
- </mmp:mrow>
- <mmp:mrow>
- <mmp:msub>
- <mmp:mi>N</mmp:mi>
- <mmp:mrow>
- <mmp:mtext>y;pl;d</mmp:mtext>
- </mmp:mrow>
- </mmp:msub>
- </mmp:mrow>
- </mmp:mfrac>
- <mmp:mo stretchy='false'>)</mmp:mo>
- </mmp:mrow>
- <mmp:mn>2</mmp:mn>
- </mmp:msup>
- </mmp:mrow>
- </mmp:msqrt>
- </mmp:mrow>
- <mmp:annotation encoding='MathType-MTEF'>
- MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamyCaiabg2da9iaaigdacaGGSaGaaGimaiaaiodadaGcaaqaaiaaigdacqGHsislcaGGOaWaaSaaaeaacaWGwbWaaSbaaSqaaiaabMhacaqG7aGaae4CaiaabUdacaqGKbaabeaaaOqaaiaad6eadaWgaaWcbaGaaeyEaiaabUdacaqGWbGaaeiBaiaabUdacaqGKbaabeaaaaGccaGGPaWaaWbaaSqabeaacaaIYaaaaaqabaaaaa@4A85@</mmp:annotation>
- </mmp:semantics>
-</mmp:math>
-
-<mmp:math display='block'>
- <mmp:mi>&#x2115;</mmp:mi>
- <mmp:annotation encoding='MathType-MTEF'>
- MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaeSyfHukaaa@3759@</mmp:annotation>
-</mmp:math>
-
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mfrac>
- <mmp:mn> 1 </mmp:mn>
- <mmp:msqrt>
- <mmp:mrow>
- <mmp:mo> - </mmp:mo>
- <mmp:mn> 1 </mmp:mn>
- </mmp:mrow>
- </mmp:msqrt>
- </mmp:mfrac>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mfrac>
- <mmp:mn> 1 </mmp:mn>
- <mmp:msqrt>
- <mmp:mrow>
- <mmp:mo> - </mmp:mo>
- <mmp:mn> 1 </mmp:mn>
- </mmp:mrow>
- </mmp:msqrt>
- </mmp:mfrac>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mfrac>
- <mmp:mn> 1 </mmp:mn>
- <mmp:msqrt>
- <mmp:mrow>
- <mmp:mo> - </mmp:mo>
- <mmp:mn> 1 </mmp:mn>
- </mmp:mrow>
- </mmp:msqrt>
- </mmp:mfrac>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mrow>
- <mmp:mi> a </mmp:mi>
- <mmp:mo> / </mmp:mo>
- <mmp:mi> b </mmp:mi>
- </mmp:mrow>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:msqrt>
- <mmp:mo> - </mmp:mo>
- <mmp:mn> 1 </mmp:mn>
- </mmp:msqrt>
- </mmp:math>
-
- <mmp:math>
- <mmp:msqrt>
- <mmp:mrow>
- <mmp:mo> - </mmp:mo>
- <mmp:mn> 1 </mmp:mn>
- </mmp:mrow>
- </mmp:msqrt>
- </mmp:math>
-
- <mmp:math>
- <mmp:mfenced>
- <mmp:mrow>
- <mmp:mi> a </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> b </mmp:mi>
- </mmp:mrow>
- </mmp:mfenced>
- </mmp:math>
-
- <mmp:math>
- <mmp:mfenced open="[">
- <mmp:mn> 0 </mmp:mn>
- <mmp:mn> 1 </mmp:mn>
- </mmp:mfenced>
- </mmp:math>
-
- <mmp:math>
- <mmp:mfrac>
- <mmp:mn> 1 </mmp:mn>
- <mmp:mn> 2 </mmp:mn>
- </mmp:mfrac>
- </mmp:math>
-
- <mmp:math>
- <mmp:mi> x </mmp:mi>
- <mmp:mi> D </mmp:mi>
- <mmp:mi> sin </mmp:mi>
- <mmp:mi></mmp:mi>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mi> sin </mmp:mi>
- <mmp:mo> &ApplyFunction; </mmp:mo>
- <mmp:mi> x </mmp:mi>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mn> 1 </mmp:mn>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> ... </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> n </mmp:mi>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mi> &pi; </mmp:mi>
- <mmp:mi> &ImaginaryI; </mmp:mi>
- <mmp:mi> &ExponentialE; </mmp:mi>
- </mmp:math>
-
- <mmp:math>
- <mmp:mn> 2 </mmp:mn>
- <mmp:mspace/>
- <mmp:mn> 0.123 </mmp:mn>
- <mmp:mspace/>
- <mmp:mn> 1,000,000 </mmp:mn>
- <mmp:mspace/>
- <mmp:mn> 2.1e10 </mmp:mn>
- <mmp:mspace/>
- <mmp:mn> 0xFFEF </mmp:mn>
- <mmp:mspace/>
- <mmp:mn> MCMLXIX </mmp:mn>
- <mmp:mspace/>
- <mmp:mn> twenty one </mmp:mn>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mn> 2 </mmp:mn>
- <mmp:mo> + </mmp:mo>
- <mmp:mrow>
- <mmp:mn> 3 </mmp:mn>
- <mmp:mo> &InvisibleTimes; </mmp:mo>
- <mmp:mi> &ImaginaryI; </mmp:mi>
- </mmp:mrow>
- </mmp:mrow>
- <mmp:mfrac> <mmp:mn> 1 </mmp:mn> <mmp:mn> 2 </mmp:mn> </mmp:mfrac>
- <mmp:mi> &pi; </mmp:mi>
- <mmp:mi> &ExponentialE; </mmp:mi>
- </mmp:math>
-
- <mmp:math>
- <mmp:mo> + </mmp:mo>
- <mmp:mo> &lt; </mmp:mo>
- <mmp:mo> &le; </mmp:mo>
- <mmp:mo> &lt;= </mmp:mo>
- <mmp:mo> ++ </mmp:mo>
- <mmp:mo> &sum; </mmp:mo>
- <mmp:mo> .NOT. </mmp:mo>
- <mmp:mo> and </mmp:mo>
- <mmp:mo> &InvisibleTimes; </mmp:mo>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mrow>
- <mmp:mi> a </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> b </mmp:mi>
- </mmp:mrow>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mo> [ </mmp:mo>
- <mmp:mrow>
- <mmp:mn> 0 </mmp:mn>
- <mmp:mo> , </mmp:mo>
- <mmp:mn> 1 </mmp:mn>
- </mmp:mrow>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mi> f </mmp:mi>
- <mmp:mo> &ApplyFunction; </mmp:mo>
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> , </mmp:mo>
- <mmp:mi> y </mmp:mi>
- </mmp:mrow>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> &InvisibleTimes; </mmp:mo>
- <mmp:mi> y </mmp:mi>
- </mmp:mrow>
- <mmp:mrow>
- <mmp:mi> f </mmp:mi>
- <mmp:mo> &ApplyFunction; </mmp:mo>
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- </mmp:mrow>
- <mmp:mrow>
- <mmp:mi> sin </mmp:mi>
- <mmp:mo> &ApplyFunction; </mmp:mo>
- <mmp:mi> x </mmp:mi>
- </mmp:mrow>
- <mmp:msub>
- <mmp:mi> m </mmp:mi>
- <mmp:mrow>
- <mmp:mn> 1 </mmp:mn>
- <mmp:mo> &InvisibleComma; </mmp:mo>
- <mmp:mn> 2 </mmp:mn>
- </mmp:mrow>
- </mmp:msub>
- </mmp:math>
-
- <mmp:math>
- <mmp:mfrac>
- <mmp:mo> &DifferentialD; </mmp:mo>
- <mmp:mrow>
- <mmp:mo> &DifferentialD; </mmp:mo>
- <mmp:mi> x </mmp:mi>
- </mmp:mrow>
- </mmp:mfrac>
- </mmp:math>
-
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:munder>
- <mmp:mo> &RightArrow; </mmp:mo>
- <mmp:mtext> maps to </mmp:mtext>
- </mmp:munder>
- <mmp:mi> y </mmp:mi>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mtext> Theorem 1: </mmp:mtext>
- <mmp:mtext> &ThinSpace; </mmp:mtext>
- <mmp:mtext> &ThickSpace;&ThickSpace; </mmp:mtext>
- <mmp:mtext> /* a comment */ </mmp:mtext>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mo> there exists </mmp:mo>
- <mmp:mrow>
- <mmp:mrow>
- <mmp:mi> &delta; </mmp:mi>
- <mmp:mo> &gt; </mmp:mo>
- <mmp:mn> 0 </mmp:mn>
- </mmp:mrow>
- <mmp:mo> such that </mmp:mo>
- <mmp:mrow>
- <mmp:mrow>
- <mmp:mi> f </mmp:mi>
- <mmp:mo> &ApplyFunction; </mmp:mo>
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- </mmp:mrow>
- <mmp:mo> &lt; </mmp:mo>
- <mmp:mn> 1 </mmp:mn>
- </mmp:mrow>
- </mmp:mrow>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:msup>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:malignmark edge="right"/>
- </mmp:mrow>
- <mmp:mn> 2 </mmp:mn>
- </mmp:msup>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mi><mmp:mglyph fontfamily="my-braid-font" index="2" alt="23braid"/></mmp:mi>
- <mmp:mo>+</mmp:mo>
- <mmp:mi><mmp:mglyph fontfamily="my-braid-font" index="5" alt="132braid"/></mmp:mi>
- <mmp:mo>=</mmp:mo>
- <mmp:mi><mmp:mglyph fontfamily="my-braid-font" index="3" alt="13braid"/></mmp:mi>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mrow>
- <mmp:mn> 2 </mmp:mn>
- <mmp:mo> &InvisibleTimes; </mmp:mo>
- <mmp:mi> x </mmp:mi>
- </mmp:mrow>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> y </mmp:mi>
- <mmp:mo> - </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> , </mmp:mo>
- <mmp:mi> y </mmp:mi>
- </mmp:mrow>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mfrac linethickness="0">
- <mmp:mi> a </mmp:mi>
- <mmp:mi> b </mmp:mi>
- </mmp:mfrac>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- <mmp:mfrac linethickness="2">
- <mmp:mfrac>
- <mmp:mi> a </mmp:mi>
- <mmp:mi> b </mmp:mi>
- </mmp:mfrac>
- <mmp:mfrac>
- <mmp:mi> c </mmp:mi>
- <mmp:mi> d </mmp:mi>
- </mmp:mfrac>
- </mmp:mfrac>
- </mmp:math>
-
- <mmp:math>
- <mmp:mfrac>
- <mmp:mn> 1 </mmp:mn>
- <mmp:mrow>
- <mmp:msup>
- <mmp:mi> x </mmp:mi>
- <mmp:mn> 3 </mmp:mn>
- </mmp:msup>
- <mmp:mo> + </mmp:mo>
- <mmp:mfrac>
- <mmp:mi> x </mmp:mi>
- <mmp:mn> 3 </mmp:mn>
- </mmp:mfrac>
- </mmp:mrow>
- </mmp:mfrac>
- <mmp:mo> = </mmp:mo>
- <mmp:mfrac bevelled="true">
- <mmp:mn> 1 </mmp:mn>
- <mmp:mrow>
- <mmp:msup>
- <mmp:mi> x </mmp:mi>
- <mmp:mn> 3 </mmp:mn>
- </mmp:msup>
- <mmp:mo> + </mmp:mo>
- <mmp:mfrac>
- <mmp:mi> x </mmp:mi>
- <mmp:mn> 3 </mmp:mn>
- </mmp:mfrac>
- </mmp:mrow>
- </mmp:mfrac>
- </mmp:math>
-
- <mmp:math>
- <mmp:mfrac>
- <mmp:mrow>
- <mmp:mn> 1 </mmp:mn>
- <mmp:mo> + </mmp:mo>
- <mmp:msqrt>
- <mmp:mn> 5 </mmp:mn>
- </mmp:msqrt>
- </mmp:mrow>
- <mmp:mn> 2 </mmp:mn>
- </mmp:mfrac>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mo maxsize="1"> ( </mmp:mo>
- <mmp:mfrac> <mmp:mi> a </mmp:mi> <mmp:mi> b </mmp:mi> </mmp:mfrac>
- <mmp:mo maxsize="1"> ) </mmp:mo>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mstyle maxsize="1">
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mfrac> <mmp:mi> a </mmp:mi> <mmp:mi> b </mmp:mi> </mmp:mfrac>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- </mmp:mstyle>
- </mmp:math>
-
- <mmp:math>
- <mmp:merror>
- <mmp:mtext> Unrecognized element: mfraction;
- arguments were: </mmp:mtext>
- <mmp:mrow> <mmp:mn> 1 </mmp:mn> <mmp:mo> + </mmp:mo> <mmp:msqrt> <mmp:mn> 5 </mmp:mn> </mmp:msqrt> </mmp:mrow>
- <mmp:mtext> and </mmp:mtext>
- <mmp:mn> 2 </mmp:mn>
- </mmp:merror>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mpadded width="0"> <mmp:mi> C </mmp:mi> </mmp:mpadded>
- <mmp:mspace width="0.3em"/>
- <mmp:mtext> | </mmp:mtext>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:semantics>
- <mmp:mrow>
- <mmp:mpadded width="0"> <mmp:mi> C </mmp:mi> </mmp:mpadded>
- <mmp:mspace width="0.3em"/>
- <mmp:mtext> | </mmp:mtext>
- </mmp:mrow>
- <mmp:annotation-xml encoding="MathML-Presentation">
- <mmp:mi> &Copf; </mmp:mi>
- </mmp:annotation-xml>
- </mmp:semantics>
- </mmp:math>
-
- <mmp:math>
- <mmp:mfrac>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> y </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mphantom>
- <mmp:mo form="infix"> + </mmp:mo>
- <mmp:mi> y </mmp:mi>
- </mmp:mphantom>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- </mmp:mfrac>
- </mmp:math>
-
- <mmp:math>
- <mmp:mfrac>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> y </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mphantom>
- <mmp:mo> + </mmp:mo>
- </mmp:mphantom>
- <mmp:mphantom>
- <mmp:mi> y </mmp:mi>
- </mmp:mphantom>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- </mmp:mfrac>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow> <mmp:mo> ( </mmp:mo> <mmp:mi>x</mmp:mi> <mmp:mo> ) </mmp:mo> </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mrow> <mmp:mi>x</mmp:mi> <mmp:mo>,</mmp:mo> <mmp:mi>y</mmp:mi> </mmp:mrow>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mi>x</mmp:mi> <mmp:mo>+</mmp:mo> <mmp:mi>y</mmp:mi> <mmp:mo>+</mmp:mo> <mmp:mi>z</mmp:mi>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mi> f </mmp:mi>
- <mmp:mo> &ApplyFunction; </mmp:mo>
- <mmp:mfenced>
- <mmp:mi> x </mmp:mi>
- <mmp:mi> y </mmp:mi>
- </mmp:mfenced>
- </mmp:mrow>
- </mmp:math>
-
-
- <mmp:math>
- <mmp:msub>
- <mmp:mi>a</mmp:mi>
- <mmp:mrow>
- <mmp:menclose notation='actuarial'>
- <mmp:mi>n</mmp:mi>
- </mmp:menclose>
- <mmp:mo>&it;</mmp:mo>
- <mmp:mi>i</mmp:mi>
- </mmp:mrow>
- </mmp:msub>
- </mmp:math>
-
- <mmp:math>
- <mmp:msup>
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> y </mmp:mi>
- </mmp:mrow>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- <mmp:mn> 2 </mmp:mn>
- </mmp:msup>
- </mmp:math>
-
-
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mover accent="true">
- <mmp:mi> x </mmp:mi>
- <mmp:mo> &Hat; </mmp:mo>
- </mmp:mover>
- <mmp:mtext> versus </mmp:mtext>
- <mmp:mover accent="false">
- <mmp:mi> x </mmp:mi>
- <mmp:mo> &Hat; </mmp:mo>
- </mmp:mover>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mover accent="true">
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> y </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- <mmp:mo> &OverBar; </mmp:mo>
- </mmp:mover>
- <mmp:mtext> versus </mmp:mtext>
- <mmp:mover accent="false">
- <mmp:mrow>
- <mmp:mi> x </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> y </mmp:mi>
- <mmp:mo> + </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- <mmp:mo> &OverBar; </mmp:mo>
- </mmp:mover>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mover>
- <mmp:munder>
- <mmp:mo> &int; </mmp:mo>
- <mmp:mn> 0 </mmp:mn>
- </mmp:munder>
- <mmp:mi> &infin; </mmp:mi>
- </mmp:mover>
- <mmp:mtext> versus </mmp:mtext>
- <mmp:munderover>
- <mmp:mo> &int; </mmp:mo>
- <mmp:mn> 0 </mmp:mn>
- <mmp:mi> &infin; </mmp:mi>
- </mmp:munderover>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mmultiscripts>
- <mmp:mi> F </mmp:mi>
- <mmp:mn> 1 </mmp:mn>
- <mmp:none/>
- <mmp:mprescripts/>
- <mmp:mn> 0 </mmp:mn>
- <mmp:none/>
- </mmp:mmultiscripts>
- <mmp:mo> &ApplyFunction; </mmp:mo>
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mrow>
- <mmp:mo> ; </mmp:mo>
- <mmp:mi> a </mmp:mi>
- <mmp:mo> ; </mmp:mo>
- <mmp:mi> z </mmp:mi>
- </mmp:mrow>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mrow>
- <mmp:mo> ( </mmp:mo>
- <mmp:mtable>
- <mmp:mtr>
- <mmp:mtd> <mmp:mn>1</mmp:mn> </mmp:mtd>
- <mmp:mtd> <mmp:mn>0</mmp:mn> </mmp:mtd>
- <mmp:mtd> <mmp:mn>0</mmp:mn> </mmp:mtd>
- </mmp:mtr>
- <mmp:mtr>
- <mmp:mtd> <mmp:mn>0</mmp:mn> </mmp:mtd>
- <mmp:mtd> <mmp:mn>1</mmp:mn> </mmp:mtd>
- <mmp:mtd> <mmp:mn>0</mmp:mn> </mmp:mtd>
- </mmp:mtr>
- <mmp:mtr>
- <mmp:mtd> <mmp:mn>0</mmp:mn> </mmp:mtd>
- <mmp:mtd> <mmp:mn>0</mmp:mn> </mmp:mtd>
- <mmp:mtd> <mmp:mn>1</mmp:mn> </mmp:mtd>
- </mmp:mtr>
- </mmp:mtable>
- <mmp:mo> ) </mmp:mo>
- </mmp:mrow>
- </mmp:math>
-
- <mmp:math>
- <mmp:mtable>
- <mmp:mlabeledtr id='e-is-m-c-square'>
- <mmp:mtd>
- <mmp:mtext> (2.1) </mmp:mtext>
- </mmp:mtd>
- <mmp:mtd>
- <mmp:mrow>
- <mmp:mi>E</mmp:mi>
- <mmp:mo>=</mmp:mo>
- <mmp:mrow>
- <mmp:mi>m</mmp:mi>
- <mmp:mo>&it;</mmp:mo>
- <mmp:msup>
- <mmp:mi>c</mmp:mi>
- <mmp:mn>2</mmp:mn>
- </mmp:msup>
- </mmp:mrow>
- </mmp:mrow>
- </mmp:mtd>
- </mmp:mlabeledtr>
- </mmp:mtable>
- </mmp:math>
-
- <mmp:math>
- <mmp:mtable groupalign="decimalpoint left left decimalpoint left left decimalpoint">
- <mmp:mtr>
- <mmp:mtd>
- <mmp:mrow>
- <mmp:mrow>
- <mmp:mrow>
- <mmp:maligngroup/>
- <mmp:mn> 8.44 </mmp:mn>
- <mmp:mo> &InvisibleTimes; </mmp:mo>
- <mmp:maligngroup/>
- <mmp:mi> x </mmp:mi>
- </mmp:mrow>
- <mmp:maligngroup/>
- <mmp:mo> + </mmp:mo>
- <mmp:mrow>
- <mmp:maligngroup/>
- <mmp:mn> 55 </mmp:mn>
- <mmp:mo> &InvisibleTimes; </mmp:mo>
- <mmp:maligngroup/>
- <mmp:mi> y </mmp:mi>
- </mmp:mrow>
- </mmp:mrow>
- <mmp:maligngroup/>
- <mmp:mo> = </mmp:mo>
- <mmp:maligngroup/>
- <mmp:mn> 0 </mmp:mn>
- </mmp:mrow>
- </mmp:mtd>
- <mmp:mtd>
- <mmp:mrow>
- <mmp:mrow>
- <mmp:mrow>
- <mmp:maligngroup/>
- <mmp:mn> 3.1 </mmp:mn>
- <mmp:mo> &InvisibleTimes; </mmp:mo>
- <mmp:maligngroup/>
- <mmp:mi> x </mmp:mi>
- </mmp:mrow>
- <mmp:maligngroup/>
- <mmp:mo> - </mmp:mo>
- <mmp:mrow>
- <mmp:maligngroup/>
- <mmp:mn> 0.7 </mmp:mn>
- <mmp:mo> &InvisibleTimes; </mmp:mo>
- <mmp:maligngroup/>
- <mmp:mi> y </mmp:mi>
- </mmp:mrow>
- </mmp:mrow>
- <mmp:maligngroup/>
- <mmp:mo> = </mmp:mo>
- <mmp:maligngroup/>
- <mmp:mrow>
- <mmp:mo> - </mmp:mo>
- <mmp:mn> 1.1 </mmp:mn>
- </mmp:mrow>
- </mmp:mrow>
- </mmp:mtd>
- </mmp:mtr>
- </mmp:mtable>
- </mmp:math>
-
-</root>
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 3e3e7c34c..dc3e8c7c9 100644
--- a/tex/generic/context/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 05/08/10 13:33:54
+-- merge date : 05/12/10 18:43:22
do -- begin closure to overcome local limits and interference
@@ -394,6 +394,15 @@ lpeg.splitat = splitat
local cache = { }
+function lpeg.split(separator,str)
+ local c = cache[separator]
+ if not c then
+ c = Ct(splitat(separator))
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:split(separator)
local c = cache[separator]
if not c then
@@ -405,6 +414,17 @@ end
local cache = { }
+function lpeg.checkedsplit(separator,str)
+ local c = cache[separator]
+ if not c then
+ separator = P(separator)
+ local other = C((1 - separator)^0)
+ c = Ct(separator^0 * other * (separator^1 * other)^0)
+ cache[separator] = c
+ end
+ return match(c,str)
+end
+
function string:checkedsplit(separator)
local c = cache[separator]
if not c then