summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2008-05-09 19:33:00 +0200
committerHans Hagen <pragma@wxs.nl>2008-05-09 19:33:00 +0200
commit3d7afaa86d4d170aacd4d287e70149d22172bf4f (patch)
treeb011663a8b36ddbfb0cdba99433e92920e23e79f
parentd948cb4eddff16f17051d8078b4c55cdd8e8f681 (diff)
downloadcontext-3d7afaa86d4d170aacd4d287e70149d22172bf4f.tar.gz
stable 2008.05.09 19:33
-rw-r--r--context/data/scite-ctx.properties7
-rw-r--r--fonts/pfm/hoekwater/context/koeieletters.pfmbin0 -> 2798 bytes
-rw-r--r--metapost/context/base/mp-core.mp18
-rw-r--r--metapost/context/base/mp-grph.mp30
-rw-r--r--metapost/context/base/mp-mlib.mp59
-rw-r--r--scripts/context/lua/luatools.lua66
-rw-r--r--scripts/context/lua/mtx-chars.lua11
-rw-r--r--scripts/context/lua/mtx-context.lua101
-rw-r--r--scripts/context/lua/mtx-update.lua4
-rw-r--r--scripts/context/lua/mtxrun.lua403
-rw-r--r--scripts/context/ruby/base/tex.rb3
-rwxr-xr-xscripts/context/stubs/unix/context2
-rw-r--r--tex/context/base/attr-ini.lua4
-rw-r--r--tex/context/base/char-def.lua136
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/core-itm.tex31
-rw-r--r--tex/context/base/core-mis.tex35
-rw-r--r--tex/context/base/core-pgr.tex2
-rw-r--r--tex/context/base/core-pos.lua4
-rw-r--r--tex/context/base/core-pos.tex4
-rw-r--r--tex/context/base/core-rul.tex13
-rw-r--r--tex/context/base/core-spa.lua2
-rw-r--r--tex/context/base/core-trf.tex7
-rw-r--r--tex/context/base/core-tsp.tex1
-rw-r--r--tex/context/base/core-ver.mkiv2
-rw-r--r--tex/context/base/enco-utf.tex2264
-rw-r--r--tex/context/base/font-afm.lua30
-rw-r--r--tex/context/base/font-ext.lua2
-rw-r--r--tex/context/base/font-ini.lua3
-rw-r--r--tex/context/base/font-otf.lua101
-rw-r--r--tex/context/base/font-syn.lua7
-rw-r--r--tex/context/base/font-tfm.lua31
-rw-r--r--tex/context/base/l-dir.lua32
-rw-r--r--tex/context/base/l-file.lua4
-rw-r--r--tex/context/base/l-xml.lua429
-rw-r--r--tex/context/base/lang-url.lua10
-rw-r--r--tex/context/base/lxml-ini.lua103
-rw-r--r--tex/context/base/lxml-ini.tex115
-rw-r--r--tex/context/base/m-timing.tex2
-rw-r--r--tex/context/base/math-ini.lua215
-rw-r--r--tex/context/base/math-tex.tex8
-rw-r--r--tex/context/base/meta-ini.mkii2
-rw-r--r--tex/context/base/meta-ini.mkiv46
-rw-r--r--tex/context/base/mlib-pps.lua165
-rw-r--r--tex/context/base/mlib-run.lua21
-rw-r--r--tex/context/base/s-sys-01.tex16
-rw-r--r--tex/context/base/supp-box.tex3
-rw-r--r--tex/context/base/syst-cat.tex25
-rw-r--r--tex/context/base/type-buy.tex12
-rw-r--r--tex/context/base/x-cals.mkiv4
-rw-r--r--tex/context/base/x-mmb.mkiv256
-rw-r--r--tex/context/base/x-mmc.mkiv2390
-rw-r--r--tex/context/base/x-mml.mkiv23
-rw-r--r--tex/context/base/x-mmp.mkiv176
-rw-r--r--tex/context/base/x-newmml.tex11
-rw-r--r--tex/context/interface/keys-cz.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-ro.xml2
63 files changed, 5622 insertions, 1847 deletions
diff --git a/context/data/scite-ctx.properties b/context/data/scite-ctx.properties
index 05fd90608..94a51aeb7 100644
--- a/context/data/scite-ctx.properties
+++ b/context/data/scite-ctx.properties
@@ -42,6 +42,7 @@ ctx.menulist.example=\
wrap=wrap_text|\
unwrap=unwrap_text|\
sort=sort_text|\
+ uncomment=uncomment_xml|\
document=document_text|\
quote=quote_text|\
compound=compound_text|\
@@ -145,3 +146,9 @@ ctx.template.rescan=no
ctx.template.suffix.tex=tex
ctx.template.suffix.xml=xml
+
+command.name.27.*=XML Uncomment
+command.subsystem.27.*=3
+command.27.*=uncomment_xml
+command.save.before.27.*=2
+command.groupundo.27.*=yes
diff --git a/fonts/pfm/hoekwater/context/koeieletters.pfm b/fonts/pfm/hoekwater/context/koeieletters.pfm
new file mode 100644
index 000000000..8c890917a
--- /dev/null
+++ b/fonts/pfm/hoekwater/context/koeieletters.pfm
Binary files differ
diff --git a/metapost/context/base/mp-core.mp b/metapost/context/base/mp-core.mp
index 7967b718f..2b62559b8 100644
--- a/metapost/context/base/mp-core.mp
+++ b/metapost/context/base/mp-core.mp
@@ -1114,16 +1114,16 @@ def draw_multi_pars =
for i=1 upto nofmultipars :
do_draw_par(multipars[i]) ;
if boxgridtype= 1 :
- draw baseline_grid (multipars[i],up,true ) withcolor boxgridcolor ;
+ draw baseline_grid (multipars[i],up,true ) ; % withcolor boxgridcolor ;
elseif boxgridtype= 2 :
- draw baseline_grid (multipars[i],up,false) withcolor boxgridcolor ;
+ draw baseline_grid (multipars[i],up,false) ; % withcolor boxgridcolor ;
elseif boxgridtype= 3 :
- draw baseline_grid (multipars[i],up,true ) withcolor boxgridcolor ;
+ draw baseline_grid (multipars[i],up,true ) ; % withcolor boxgridcolor ;
draw baseline_grid (multipars[i],up,true )
- shifted (0,ExHeight) withcolor boxgridcolor ;
+ shifted (0,ExHeight) ; % withcolor boxgridcolor ;
elseif boxgridtype= 4 :
draw baseline_grid (multipars[i],up,true )
- shifted (0,ExHeight/2) withcolor boxgridcolor ;
+ shifted (0,ExHeight/2) ; % withcolor boxgridcolor ;
elseif boxgridtype=11 :
draw graphic_grid(multipars[i],boxgriddistance,boxgriddistance,boxgriddistance/2,boxgriddistance/2) ;
elseif boxgridtype=12 :
@@ -1166,8 +1166,14 @@ vardef baseline_grid (expr pxy, pdir, at_baseline) =
if (par_line_height>0) and (bbheight(pxy)>1) and (bbwidth(pxy)>1) and (boxgridwidth>0) :
save i, grid, bb ; picture grid ; pair start ; path bb ;
def _do_ (expr start) =
+ % 1 = normal, 2 = with background (i.e. no shine-through)
+ if boxdashtype = 2 :
+ draw start -- start shifted (bbwidth(pxy),0)
+ withpen pencircle scaled boxgridwidth
+ withcolor boxfillcolor ;
+ fi ;
draw start -- start shifted (bbwidth(pxy),0)
- if boxdashtype = 1 : dashed evenly fi
+ if boxdashtype > 0 : dashed evenly fi
withpen pencircle scaled boxgridwidth
withcolor boxgridcolor ;
enddef ;
diff --git a/metapost/context/base/mp-grph.mp b/metapost/context/base/mp-grph.mp
index e2e7e7529..87a179677 100644
--- a/metapost/context/base/mp-grph.mp
+++ b/metapost/context/base/mp-grph.mp
@@ -59,21 +59,21 @@ string graphictextfile ; graphictextfile := "dummy.mpo" ;
def data_mpo_file = job_name & "-mp.mpo" enddef ;
def data_mpy_file = job_name & "-mp.mpy" enddef ;
-% def savegraphictext (expr str) =
-% if (graphictextstring<>"") :
-% write graphictextstring to data_mpo_file ;
-% graphictextstring := "" ;
-% fi ;
-% write str to data_mpo_file ;
-% let erasegraphictextfile = relax ;
-% enddef ;
-
-% def erasegraphictextfile =
-% write EOF to data_mpo_file ;
-% let erasegraphictextfile = relax ;
-% enddef ;
-
-% extra_beginfig := extra_beginfig & " erasegraphictextfile ;" ;
+def savegraphictext (expr str) =
+ if (graphictextstring<>"") :
+ write graphictextstring to data_mpo_file ;
+ graphictextstring := "" ;
+ fi ;
+ write str to data_mpo_file ;
+ let erasegraphictextfile = relax ;
+enddef ;
+
+def erasegraphictextfile =
+ write EOF to data_mpo_file ;
+ let erasegraphictextfile = relax ;
+enddef ;
+
+extra_beginfig := extra_beginfig & " erasegraphictextfile ;" ;
def begingraphictextfig (expr n) =
foundpicture := n ; scratchpicture := nullpicture ;
diff --git a/metapost/context/base/mp-mlib.mp b/metapost/context/base/mp-mlib.mp
index 520e49b06..dad7ab787 100644
--- a/metapost/context/base/mp-mlib.mp
+++ b/metapost/context/base/mp-mlib.mp
@@ -18,27 +18,36 @@ boolean context_mlib ; context_mlib := true ;
numeric _tt_w_[], _tt_h_[], _tt_d_[] ;
numeric _tt_n_ ; _tt_n_ := 0 ;
+picture _tt_p_ ; _tt_p_ := nullpicture ;
boolean _trial_run_ ; _trial_run_ := false ;
def resettextexts =
_tt_n_ := 0 ;
+ _tt_p_ := nullpicture ;
enddef ;
+extra_endfig := ";draw _tt_p_; " & extra_endfig ;
+extra_beginfig := extra_beginfig & "resettextexts;";
+
vardef textext(expr str) =
if _trial_run_ :
image (
- draw unitsquare
- withprescript "tf"
- withpostscript str ;
+ _tt_n_ := _tt_n_ + 1 ;
+ _tt_p_ := image (
+ draw _tt_p_ ;
+ draw unitsquare withprescript "tf" withpostscript decimal _tt_n_ & ":" & str ;
+ ) ;
+ draw unitsquare ;
)
else :
image (
_tt_n_ := _tt_n_ + 1 ;
+ show _tt_n_ ;
draw unitsquare
xscaled _tt_w_[_tt_n_]
yscaled (_tt_h_[_tt_n_] + _tt_d_[_tt_n_])
withprescript "ts"
- withpostscript decimal _tt_n_ ;
+ withpostscript decimal _tt_n_ & ":" & str ;
)
fi
enddef ;
@@ -82,47 +91,35 @@ def withlinearshade (expr a, b, ca, cb) =
enddef ;
string _defined_cs_pre_[], _defined_cs_post_[] ; numeric _defined_cs_ ; _defined_cs_:= 0 ;
vardef define_circular_shade (expr a, b, ra, rb, ca, cb) =
- _defined_cs_ = _defined_cs_ + 1 ;
- _defined_cs_pre_ [_defined_cs_] = "cs" ;
- _defined_cs_post_[_defined_cs_] = "0 1 " & decimal shadefactor & " " &
+ _defined_cs_ := _defined_cs_ + 1 ;
+ _defined_cs_pre_ [_defined_cs_] := "cs" ;
+ _defined_cs_post_[_defined_cs_] := "0 1 " & decimal shadefactor & " " &
colordecimals ca & " " & ddecimal (a shifted shadeoffset) & " " & decimal ra & " " &
colordecimals cb & " " & ddecimal (b shifted shadeoffset) & " " & decimal rb ;
_defined_cs_
enddef ;
vardef define_linear_shade (expr a, b, ca, cb) =
- _defined_cs_ = _defined_cs_ + 1 ;
- _defined_cs_pre_ [_defined_cs_] = "ls" ;
- _defined_cs_post_[_defined_cs_] = "0 1 " & decimal shadefactor & " " &
- colordecimals ca & " " & ddecimal (a shifted shadeoffset) & " "
+ _defined_cs_ := _defined_cs_ + 1 ;
+ _defined_cs_pre_ [_defined_cs_] := "ls" ;
+ _defined_cs_post_[_defined_cs_] := "0 1 " & decimal shadefactor & " " &
+ colordecimals ca & " " & ddecimal (a shifted shadeoffset) & " " &
colordecimals cb & " " & ddecimal (b shifted shadeoffset) ;
_defined_cs_
enddef ;
-def withshade(expr sc) =
- withprescript _defined_cs_pre_[sc] withpostscript _defined_cs_post_[sc]
+primarydef p withshade sc =
+ p withprescript _defined_cs_pre_[sc] withpostscript _defined_cs_post_[sc]
enddef ;
def shadecolor(expr sc) = % obsolete
1 withprescript _defined_cs_pre_[sc] withpostscript _defined_cs_post_[sc]
enddef ;
-% def _graphic_text_f_(expr t) text rest =
-% draw unitsquare withprescript "gt" withpostscript t ;
-% enddef ;
-% def _graphic_text_s_(expr t) =
-% begingroup ;
-% save figurepicture ; picture figurepicture ;
-% figurepicture := currentpicture ; currentpicture := nullpicture ;
-% currentgraphictext := currentgraphictext + 1 ;
-% dofinishgraphictext
-% enddef ;
-
-vardef graphictext primary t =
- save next ;
+def graphictext primary t =
if _trial_run_ :
- let next = nographictext ;
+ let dographictextindeed = nographictext ;
else :
- let next = dographictext ;
+ let dographictextindeed = dographictext ;
fi
- next(t)
+ dographictextindeed(t)
enddef ;
def dographictext (expr t) =
begingroup ;
@@ -134,6 +131,10 @@ enddef ;
def nographictext (expr t) text rest =
draw unitsquare withprescript "gt" withpostscript t ;
enddef ;
+def savegraphictext (expr str) =
+enddef ;
+def erasegraphictextfile =
+enddef ;
def doexternalfigure (expr filename) text transformation =
draw unitsquare transformation withprescript "fg" withpostscript filename ;
diff --git a/scripts/context/lua/luatools.lua b/scripts/context/lua/luatools.lua
index 213922fb3..b092c5050 100644
--- a/scripts/context/lua/luatools.lua
+++ b/scripts/context/lua/luatools.lua
@@ -430,14 +430,16 @@ function lpeg.splitter(pattern, action)
return (((1-lpeg.P(pattern))^1)/action+1)^0
end
+local crlf = lpeg.P("\r\n")
+local cr = lpeg.P("\r")
+local lf = lpeg.P("\n")
+local space = lpeg.S(" \t\f\v")
+local newline = crlf + cr + lf
+local spacing = space^0 * newline
-local crlf = lpeg.P("\r\n")
-local cr = lpeg.P("\r")
-local lf = lpeg.P("\n")
-local space = lpeg.S(" \t\f\v")
-local newline = crlf + cr + lf
-local spacing = space^0 * newline
-local content = lpeg.Cs((1-spacing)^1) * spacing^-1 * (spacing * lpeg.Cc(""))^0
+local empty = spacing * lpeg.Cc("")
+local nonempty = lpeg.Cs((1-spacing)^1) * spacing^-1
+local content = (empty + nonempty)^1
local capture = lpeg.Ct(content^0)
@@ -1704,6 +1706,10 @@ end
file.readdata = io.loaddata
file.savedata = io.savedata
+function file.copy(oldname,newname)
+ file.savedata(newname,io.loaddata(oldname))
+end
+
-- filename : l-url.lua
-- author : Hans Hagen, PRAGMA-ADE, Hasselt NL
@@ -1939,21 +1945,27 @@ if lfs then do
P(1)
)^0 )
- local function glob(str)
- local split = pattern:match(str)
- if split then
- local t = { }
- local action = action or function(name) t[#t+1] = name end
- local root, path, base = split[1], split[2], split[3]
- local recurse = base:find("**")
- local start = root .. path
- local result = filter:match(start .. base)
---~ print(str, start, result)
---~ print(start, result)
- glob_pattern(start,result,recurse,action)
+ local function glob(str,t)
+ if type(str) == "table" then
+ local t = t or { }
+ for _, s in ipairs(str) do
+ glob(s,t)
+ end
return t
else
- return { }
+ local split = pattern:match(str)
+ if split then
+ local t = t or { }
+ local action = action or function(name) t[#t+1] = name end
+ local root, path, base = split[1], split[2], split[3]
+ local recurse = base:find("**")
+ local start = root .. path
+ local result = filter:match(start .. base)
+ glob_pattern(start,result,recurse,action)
+ return t
+ else
+ return { }
+ end
end
end
@@ -5615,14 +5627,24 @@ if texconfig and not texlua then
input.logger('= ' .. tag .. ' closer (' .. unicode.utfname[u] .. ')',filename)
input.show_close(filename)
end,
+--~ getline = function(n)
+--~ local line = t.lines[n]
+--~ if not line or line == "" then
+--~ return ""
+--~ else
+--~ local translator = input.filters.utf_translator
+--~ return (translator and translator(line)) or line
+--~ end
+--~ end,
reader = function(self)
self = self or t
local current, lines = self.current, self.lines
if current >= #lines then
return nil
else
- self.current = current + 1
- local line = lines[self.current]
+ current = current + 1
+ self.current = current
+ local line = lines[current]
if line == "" then
return ""
else
diff --git a/scripts/context/lua/mtx-chars.lua b/scripts/context/lua/mtx-chars.lua
index 77c74cf51..a05ab9f08 100644
--- a/scripts/context/lua/mtx-chars.lua
+++ b/scripts/context/lua/mtx-chars.lua
@@ -106,7 +106,7 @@ scripts.chars.banner_utf_2 = [[
scripts.chars.banner_utf_3 = [[
-% named characters mapped onto utf
+% named characters mapped onto utf (\\char is needed for accents)
]]
@@ -145,10 +145,15 @@ function scripts.chars.makeencoutf()
f:write(scripts.chars.banner_utf_3)
for i=1,#list do
local code = list[i]
- if code > 0x7F and code <= 0xFFFF then
+ if code > 0x5B and code <= 0xFFFF then
local chr = characters.data[code]
if chr.contextname then
- f:write(format("\\def\\%s{%s} %% %s\n", chr.contextname:rpadd(length," "), char(code),chr.description))
+ local ch = char(code)
+--~ if ch:find("[~#$%%^&{}\\]") then
+ f:write(format("\\def\\%s{\\char\"%04X } %% %s: %s\n", chr.contextname:rpadd(length," "), code, chr.description, ch))
+--~ else
+--~ f:write(format("\\def\\%s{%s} %% %s\n", chr.contextname:rpadd(length," "), ch,chr.description))
+--~ end
end
end
end
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index a2ea27a9b..ae0ee1b8e 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -40,9 +40,9 @@ function input.locate_format(name) -- move this to core / luat-xxx
if fmtname ~= "" then
barename = fmtname:gsub("%.%a+$","")
local luaname, lucname = barename .. ".lua", barename .. ".luc"
- if io.exists(lucname) then
+ if lfs.isfile(lucname) then
return barename, luaname
- elseif io.exists(luaname) then
+ elseif lfs.isfile(luaname) then
return barename, luaname
end
end
@@ -196,12 +196,12 @@ do
-- mtxrun should resolve kpse: and file:
local usedname = ctxdata.ctxname
- local found = io.exists(usedname)
+ local found = lfs.isfile(usedname)
if not found then
for _, path in pairs(ctxdata.locations) do
local fullname = file.join(path,ctxdata.ctxname)
- if io.exists(fullname) then
+ if lfs.isfile(fullname) then
usedname, found = fullname, true
break
end
@@ -344,7 +344,7 @@ do
end
end
end
- if io.exists(newfile) then
+ if lfs.isfile(newfile) then
file.syncmtimes(oldfile,newfile)
ctxdata.prepfiles[oldfile] = true
else
@@ -353,7 +353,7 @@ do
end
else
input.report("old file needs no preprocessing")
- ctxdata.prepfiles[oldfile] = io.exists(newfile)
+ ctxdata.prepfiles[oldfile] = lfs.isfile(newfile)
end
end
end
@@ -611,6 +611,68 @@ function scripts.context.ctx()
scripts.context.run(ctxdata)
end
+function scripts.context.version()
+ local name = input.find_file(instance,"context.tex")
+ if name ~= "" then
+ input.report(string.format("main context file: %s",name))
+ local data = io.loaddata(name)
+ if data then
+ local version = data:match("\\edef\\contextversion{(.-)}")
+ if version then
+ input.report(string.format("current version : %s",version))
+ else
+ input.report("context version: unknown, no timestamp found")
+ end
+ else
+ input.report("context version: unknown, load error")
+ end
+ else
+ input.report("main context file: unknown, 'context.tex' not found")
+ end
+end
+
+function scripts.context.touch()
+ if environment.argument("expert") then
+ local function touch(name,pattern)
+ local name = input.find_file(instance,name)
+ local olddata = io.loaddata(name)
+ if olddata then
+ local oldversion, newversion = "", os.date("%Y.%M.%d %H:%m")
+ local newdata, ok = olddata:gsub(pattern,function(pre,mid,post)
+ oldversion = mid
+ return pre .. newversion .. post
+ end)
+ if ok > 0 then
+ local backup = file.replacesuffix(name,"tmp")
+ os.remove(backup)
+ os.rename(name,backup)
+ io.savedata(name,newdata)
+ return true, oldversion, newversion, name
+ else
+ return false
+ end
+ end
+ end
+ local done, oldversion, newversion, foundname = touch("context.tex", "(\\edef\\contextversion{)(.-)(})")
+ if done then
+ input.report(string.format("old version : %s", oldversion))
+ input.report(string.format("new version : %s", newversion))
+ input.report(string.format("touched file: %s", foundname))
+ local ok, _, _, foundname = touch("cont-new.tex", "(\\newcontextversion{)(.-)(})")
+ if ok then
+ input.report(string.format("touched file: %s", foundname))
+ end
+ end
+ end
+end
+
+function scripts.context.timed(action)
+ input.starttiming(scripts.context)
+ action()
+ input.stoptiming(scripts.context)
+ input.report("total runtime: " .. input.elapsedtime(scripts.context))
+end
+
banner = banner .. " | context tools "
messages.help = [[
@@ -618,30 +680,41 @@ messages.help = [[
--make create context formats formats
--generate generate file database etc.
--ctx=name use ctx file
+--version report installed context version
--autopdf open pdf file afterwards
+
+--expert expert options
]]
-input.verbose = true
+messages.expert = [[
+expert options: also provide --expert
-input.starttiming(scripts.context)
+--touch update context version (remake needed afterwards)
+]]
+
+input.verbose = true
if environment.argument("once") then
scripts.context.multipass.nofruns = 1
end
if environment.argument("run") then
- scripts.context.run()
+ scripts.context.timed(scripts.context.run)
elseif environment.argument("make") then
- scripts.context.make()
+ scripts.context.timed(scripts.context.make)
elseif environment.argument("ctx") then
- scripts.context.ctx()
+ scripts.context.timed(scripts.context.ctx)
+elseif environment.argument("version") then
+ scripts.context.version()
+elseif environment.argument("touch") then
+ scripts.context.touch()
elseif environment.argument("help") then
input.help(banner,messages.help)
+elseif environment.argument("expert") then
+ input.help(banner,messages.expert)
elseif environment.files[1] then
- scripts.context.run()
+ scripts.context.timed(scripts.context.run)
else
input.help(banner,messages.help)
end
-input.stoptiming(scripts.context)
-input.report("total runtime: " .. input.elapsedtime(scripts.context))
diff --git a/scripts/context/lua/mtx-update.lua b/scripts/context/lua/mtx-update.lua
index 4908db4da..581774f1e 100644
--- a/scripts/context/lua/mtx-update.lua
+++ b/scripts/context/lua/mtx-update.lua
@@ -220,9 +220,9 @@ function scripts.update.synchronize()
local archives, command = table.concat(archive," "), ""
local normalflags, deleteflags = states.get("rsync.flags.normal"), states.get("rsync.flags.delete")
if true then -- environment.argument("keep") or destination:find("%.$") then
- command = string.format("%s %s %s'%s' %s", bin, normalflags, url, archives, destination)
+ command = string.format("%s %s %s'%s' '%s'", bin, normalflags, url, archives, destination)
else
- command = string.format("%s %s %s %s'%s' %s", bin, normalflags, deleteflags, url, archives, destination)
+ command = string.format("%s %s %s %s'%s' '%s'", bin, normalflags, deleteflags, url, archives, destination)
end
logs.report("mtx update", string.format("running command: %s",command))
if not fetched[command] then
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index de5f53975..63605b42f 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -444,14 +444,16 @@ function lpeg.splitter(pattern, action)
return (((1-lpeg.P(pattern))^1)/action+1)^0
end
+local crlf = lpeg.P("\r\n")
+local cr = lpeg.P("\r")
+local lf = lpeg.P("\n")
+local space = lpeg.S(" \t\f\v")
+local newline = crlf + cr + lf
+local spacing = space^0 * newline
-local crlf = lpeg.P("\r\n")
-local cr = lpeg.P("\r")
-local lf = lpeg.P("\n")
-local space = lpeg.S(" \t\f\v")
-local newline = crlf + cr + lf
-local spacing = space^0 * newline
-local content = lpeg.Cs((1-spacing)^1) * spacing^-1 * (spacing * lpeg.Cc(""))^0
+local empty = spacing * lpeg.Cc("")
+local nonempty = lpeg.Cs((1-spacing)^1) * spacing^-1
+local content = (empty + nonempty)^1
local capture = lpeg.Ct(content^0)
@@ -1718,6 +1720,10 @@ end
file.readdata = io.loaddata
file.savedata = io.savedata
+function file.copy(oldname,newname)
+ file.savedata(newname,io.loaddata(oldname))
+end
+
-- filename : l-dir.lua
-- comment : split off from luat-lib
@@ -1848,21 +1854,27 @@ if lfs then do
P(1)
)^0 )
- local function glob(str)
- local split = pattern:match(str)
- if split then
- local t = { }
- local action = action or function(name) t[#t+1] = name end
- local root, path, base = split[1], split[2], split[3]
- local recurse = base:find("**")
- local start = root .. path
- local result = filter:match(start .. base)
---~ print(str, start, result)
---~ print(start, result)
- glob_pattern(start,result,recurse,action)
+ local function glob(str,t)
+ if type(str) == "table" then
+ local t = t or { }
+ for _, s in ipairs(str) do
+ glob(s,t)
+ end
return t
else
- return { }
+ local split = pattern:match(str)
+ if split then
+ local t = t or { }
+ local action = action or function(name) t[#t+1] = name end
+ local root, path, base = split[1], split[2], split[3]
+ local recurse = base:find("**")
+ local start = root .. path
+ local result = filter:match(start .. base)
+ glob_pattern(start,result,recurse,action)
+ return t
+ else
+ return { }
+ end
end
end
@@ -2147,6 +2159,8 @@ if not modules then modules = { } end modules ['l-xml'] = {
-- RJ: key=value ... lpeg.Ca(lpeg.Cc({}) * (pattern-producing-key-and-value / rawset)^0)
+-- some code may move to l-xmlext
+
--[[ldx--
<p>The parser used here is inspired by the variant discussed in the lua book, but
handles comment and processing instructions, has a different structure, provides
@@ -2353,9 +2367,10 @@ do
end
local resolved = (namespace == "" and xmlns[#xmlns]) or nsremap[namespace] or namespace
top = stack[#stack]
- setmetatable(top, mt)
dt = top.dt
- dt[#dt+1] = { ns=namespace or "", rn=resolved, tg=tag, at=at, dt={}, __p__ = top }
+ local t = { ns=namespace or "", rn=resolved, tg=tag, at=at, dt={}, __p__ = top }
+ dt[#dt+1] = t
+ setmetatable(t, mt)
at = { }
if at.xmlns then
remove(xmlns)
@@ -2521,7 +2536,7 @@ do
return root and not root.error
end
- xml.error_handler = (logs and logs.report) or print
+ xml.error_handler = (logs and logs.report) or (input and input.report) or print
end
@@ -2699,7 +2714,7 @@ do
handle("<" .. ens .. ":" .. etg .. " " .. concat(ats," ") .. "/>")
else
-- handle(format("<%s:%s/>",ens,etg))
- handle("<" .. ens .. ":" .. "/>")
+ handle("<" .. ens .. ":" .. etg .. "/>")
end
end
else
@@ -2881,6 +2896,10 @@ will explain more about its usage in other documents.</p>
do
+ xml.functions = xml.functions or { }
+
+ local functions = xml.functions
+
local actions = {
[10] = "stay",
[11] = "parent",
@@ -2903,19 +2922,72 @@ do
[40] = "processing instruction",
}
- local function make_expression(str) --could also be an lpeg
- str = str:gsub("@([a-zA-Z%-_]+)", "(a['%1'] or '')")
- str = str:gsub("position%(%)", "i")
- str = str:gsub("text%(%)", "t")
- str = str:gsub("!=", "~=")
- str = str:gsub("([^=!~<>])=([^=!~<>])", "%1==%2")
- str = str:gsub("([a-zA-Z%-_]+)%(", "functions.%1(")
- return str, loadstring(format("return function(functions,i,a,t) return %s end", str))()
+ --~ local function make_expression(str) --could also be an lpeg
+ --~ str = str:gsub("@([a-zA-Z%-_]+)", "(a['%1'] or '')")
+ --~ str = str:gsub("position%(%)", "i")
+ --~ str = str:gsub("text%(%)", "t")
+ --~ str = str:gsub("!=", "~=")
+ --~ str = str:gsub("([^=!~<>])=([^=!~<>])", "%1==%2")
+ --~ str = str:gsub("([a-zA-Z%-_]+)%(", "functions.%1(")
+ --~ return str, loadstring(format("return function(functions,i,a,t) return %s end", str))()
+ --~ end
+
+ -- a rather dumb lpeg
+
+ local P, S, R, C, V, Cc = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.V, lpeg.Cc
+
+ local lp_position = P("position()") / "id"
+ local lp_text = P("text()") / "tx"
+ local lp_name = P("name()") / "((rt.ns~='' and rt.ns..':'..rt.tg) or '')"
+ local lp_tag = P("tag()") / "(rt.tg or '')"
+ local lp_ns = P("ns()") / "(rt.ns or '')"
+ local lp_noequal = P("!=") / "~=" + P("<=") + P(">=") + P("==")
+ local lp_doequal = P("=") / "=="
+ local lp_attribute = P("@") / "" * Cc("(at['") * R("az","AZ","--","__")^1 * Cc("'] or '')")
+
+ local lp_function = C(R("az","AZ","--","__")^1) * P("(") / function(t)
+ if functions[t] then
+ return "functions." .. t .. "("
+ else
+ return "functions.error("
+ end
end
- local map = { }
+ local lparent = lpeg.P("(")
+ local rparent = lpeg.P(")")
+ local noparent = 1 - (lparent+rparent)
+ local nested = lpeg.P{lparent * (noparent + lpeg.V(1))^0 * rparent}
+ local value = lpeg.P(lparent * lpeg.C((noparent + nested)^0) * rparent)
- local P, S, R, C, V = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.V
+--~ local value = P { "(" * C(((1 - S("()")) + V(1))^0) * ")" }
+
+ local lp_special = (C(P("name")+P("text")+P("tag"))) * value / function(t,s)
+ if functions[t] then
+ if s then
+ return "functions." .. t .. "(rt,k," .. s ..")"
+ else
+ return "functions." .. t .. "(rt,k)"
+ end
+ else
+ return "functions.error(" .. t .. ")"
+ end
+ end
+
+ local converter = lpeg.Cs ( (
+ lp_position +
+ lp_text + lp_name + -- fast one
+ lp_special +
+ lp_noequal + lp_doequal +
+ lp_attribute +
+ lp_function +
+ 1 )^1 )
+
+ local function make_expression(str)
+ str = converter:match(str)
+ return str, loadstring(format("return function(functions,id,at,tx,rt,k) return %s end", str))()
+ end
+
+ local map = { }
local space = S(' \r\n\t')
local squote = S("'")
@@ -2935,8 +3007,10 @@ do
local bar = P('|')
local hat = P('^')
local valid = R('az', 'AZ', '09') + S('_-')
- local name_yes = C(valid^1) * colon * C(valid^1 + star) -- permits ns:*
- local name_nop = C(P(true)) * C(valid^1)
+--~ local name_yes = C(valid^1 + star) * colon * C(valid^1 + star) -- permits ns:* *:tg *:*
+--~ local name_nop = C(P(true)) * C(valid^1)
+ local name_yes = C(valid^1 + star) * colon * C(valid^1 + star) -- permits ns:* *:tg *:*
+ local name_nop = Cc("*") * C(valid^1)
local name = name_yes + name_nop
local number = C((S('+-')^0 * R('09')^1)) / tonumber
local names = (bar^0 * name)^1
@@ -2998,8 +3072,10 @@ do
local expression = (is_one * is_expression)/ function(...) map[#map+1] = { 31, true, ... } end
local dont_expression = (is_none * is_expression)/ function(...) map[#map+1] = { 31, false, ... } end
- local self_expression = ( is_expression)/ function(...) map[#map+1] = { 31, true, "", "*", ... } end
- local dont_self_expression = (exclam * is_expression)/ function(...) map[#map+1] = { 31, true, "", "*", ... } end
+ local self_expression = ( is_expression) / function(...) if #map == 0 then map[#map+1] = { 11 } end
+ map[#map+1] = { 31, true, "*", "*", ... } end
+ local dont_self_expression = (exclam * is_expression) / function(...) if #map == 0 then map[#map+1] = { 11 } end
+ map[#map+1] = { 31, false, "*", "*", ... } end
local instruction = (instructiontag * text ) / function(...) map[#map+1] = { 40, ... } end
local nothing = (empty ) / function( ) map[#map+1] = { 15 } end -- 15 ?
@@ -3127,8 +3203,10 @@ do
function xml.xshow(e,...) -- also handy when report is given, use () to isolate first e
local t = { ... }
local report = (type(t[#t]) == "function" and t[#t]) or fallbackreport
- if not e then
+ if e == nil then
report("<!-- no element -->\n")
+ elseif type(e) ~= "table" then
+ report(tostring(e))
elseif e.tg then
report(tostring(e) .. "\n")
else
@@ -3155,8 +3233,6 @@ advance what we want to do with the found element the handle gets three argument
functions.</p>
--ldx]]--
-xml.functions = { }
-
do
local functions = xml.functions
@@ -3167,11 +3243,84 @@ do
functions.lower = string.lower
functions.number = tonumber
functions.boolean = toboolean
- functions.oneof = function(s,...) -- slow
+
+ functions.oneof = function(s,...) -- slow
local t = {...} for i=1,#t do if s == t[i] then return true end end return false
end
+ functions.error = function(str)
+ xml.error_handler("unknown function in lpath expression",str)
+ return false
+ end
+ functions.text = function(root,k,n) -- unchecked, maybe one deeper
+ local t = type(t)
+ if t == "string" then
+ return t
+ else -- todo n
+ local rdt = root.dt
+ return (rdt and rdt[k]) or root[k] or ""
+ end
+ end
+ functions.name = function(root,k,n)
+-- way too fuzzy
+ local found
+ if not k or not n then
+ local ns, tg = root.ns, root.tg
+ if not tg then
+ for i=1,#root do
+ local e = root[i]
+ if type(e) == "table" then
+ found = e
+ break
+ end
+ end
+ elseif ns == "" then
+ return tg
+ else
+ return ns .. ":" .. tg
+ end
+ elseif n == 0 then
+ local e = root[k]
+ if type(e) ~= "table" then
+ found = e
+ end
+ elseif n < 0 then
+ for i=k-1,1,-1 do
+ local e = root[i]
+ if type(e) == "table" then
+ if n == -1 then
+ found = e
+ break
+ else
+ n = n + 1
+ end
+ end
+ end
+ else
+ for i=k+1,#root,1 do
+ local e = root[i]
+ if type(e) == "table" then
+ if n == 1 then
+ found = e
+ break
+ else
+ n = n - 1
+ end
+ end
+ end
+ end
+ if found then
+ local ns, tg = found.ns, found.tg
+ if ns ~= "" then
+ return ns .. ":" .. tg
+ else
+ return tg
+ end
+ else
+ return ""
+ end
+ end
- local function traverse(root,pattern,handle,reverse,index,parent,wildcard)
+ local function traverse(root,pattern,handle,reverse,index,parent,wildcard) -- multiple only for tags, not for namespaces
if not root then -- error
return false
elseif pattern == false then -- root
@@ -3198,11 +3347,15 @@ do
local rootdt = root.dt
for k=1,#rootdt do
local e = rootdt[k]
- local ns, tg = (e.rn or e.ns), e.tg
- local matched = ns == action[3] and tg == action[4]
- if not action[2] then matched = not matched end
- if matched then
- if handle(root,rootdt,k) then return false end
+ local tg = e.tg
+ if e.tg then
+ local ns = e.rn or e.ns
+ local ns_a, tg_a = action[3], action[4]
+ local matched = (ns_a == "*" or ns == ns_a) and (tg_a == "*" or tg == tg_a)
+ if not action[2] then matched = not matched end
+ if matched then
+ if handle(root,rootdt,k) then return false end
+ end
end
end
elseif command == 11 then -- parent
@@ -3245,8 +3398,14 @@ do
if tg then
idx = idx + 1
if command == 30 then
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
+ local ns_a, tg_a = action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
if not action[2] then matched = not matched end
if matched then
n = n + dn
@@ -3264,57 +3423,102 @@ do
else
local matched, multiple = false, false
if command == 20 then -- match
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
+ local ns_a, tg_a = action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
if not action[2] then matched = not matched end
elseif command == 21 then -- match one of
multiple = true
for i=3,#action,2 do
- if ns == action[i] and tg == action[i+1] then matched = true break end
+ local ns_a, tg_a = action[i], action[i+1]
+ if (ns_a == "*" or ns == ns_a) and (tg == "*" or tg == tg_a) then
+ matched = true
+ break
+ end
end
if not action[2] then matched = not matched end
elseif command == 22 then -- eq
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
- if not action[2] then matched = not matched end
+ local ns_a, tg_a = action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
matched = matched and e.at[action[6]] == action[7]
elseif command == 23 then -- ne
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
+ local ns_a, tg_a = action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
if not action[2] then matched = not matched end
matched = mached and e.at[action[6]] ~= action[7]
elseif command == 24 then -- one of eq
multiple = true
for i=3,#action-2,2 do
- if ns == action[i] and tg == action[i+1] then matched = true break end
+ local ns_a, tg_a = action[i], action[i+1]
+ if (ns_a == "*" or ns == ns_a) and (tg == "*" or tg == tg_a) then
+ matched = true
+ break
+ end
end
if not action[2] then matched = not matched end
matched = matched and e.at[action[#action-1]] == action[#action]
elseif command == 25 then -- one of ne
multiple = true
for i=3,#action-2,2 do
- if ns == action[i] and tg == action[i+1] then matched = true break end
+ local ns_a, tg_a = action[i], action[i+1]
+ if (ns_a == "*" or ns == ns_a) and (tg == "*" or tg == tg_a) then
+ matched = true
+ break
+ end
end
if not action[2] then matched = not matched end
matched = matched and e.at[action[#action-1]] ~= action[#action]
elseif command == 27 then -- has attribute
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
+ local ns_a, tg_a = action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
if not action[2] then matched = not matched end
matched = matched and e.at[action[5]]
elseif command == 28 then -- has value
- local edt = e.dt
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
+ local edt, ns_a, tg_a = e.dt, action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
if not action[2] then matched = not matched end
matched = matched and edt and edt[1] == action[5]
elseif command == 31 then
- local edt = e.dt
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
+ local edt, ns_a, tg_a = e.dt, action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
if not action[2] then matched = not matched end
if matched then
- matched = action[6](functions,idx,e.at or { },edt[1])
+ matched = action[6](functions,idx,e.at or { },edt[1],rootdt,k)
end
end
if matched then -- combine tg test and at test
@@ -3490,7 +3694,7 @@ do
end
function xml.filters.text(root,pattern,arguments) -- ?? why index, tostring slow
local dtk, rt, dt, dk = xml.filters.index(root,pattern,arguments)
- if dtk then
+ if dtk then -- n
local dtkdt = dtk.dt
if not dtkdt then
return "", rt, dt, dk
@@ -3503,6 +3707,22 @@ do
return "", rt, dt, dk
end
end
+ function xml.filters.tag(root,pattern,n)
+ local tag = ""
+ xml.traverse(root, xml.lpath(pattern), function(r,d,k)
+ tag = xml.functions.tag(d,k,n and tonumber(n))
+ return true
+ end)
+ return tag
+ end
+ function xml.filters.name(root,pattern,n)
+ local tag = ""
+ xml.traverse(root, xml.lpath(pattern), function(r,d,k)
+ tag = xml.functions.name(d,k,n and tonumber(n))
+ return true
+ end)
+ return tag
+ end
--[[ldx--
<p>For splitting the filter function from the path specification, we can
@@ -3514,13 +3734,15 @@ do
local P, S, R, C, V, Cc = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.V, lpeg.Cc
- local name = (R("az","AZ")+R("_-"))^1
- local path = C(((1-P('/'))^0 * P('/'))^1)
+ local slash = P('/')
+ local name = (R("az","AZ","--","__"))^1
+ local path = C(((1-slash)^0 * slash)^1)
local argument = P { "(" * C(((1 - S("()")) + V(1))^0) * ")" }
local action = Cc(1) * path * C(name) * argument
local attribute = Cc(2) * path * P('@') * C(name)
+ local direct = Cc(3) * Cc("../*") * slash^0 * C(name) * argument
- local parser = action + attribute
+ local parser = direct + action + attribute
local filters = xml.filters
local attribute_filter = xml.filters.attributes
@@ -3528,7 +3750,7 @@ do
function xml.filter(root,pattern)
local kind, a, b, c = parser:match(pattern)
- if kind == 1 then
+ if kind == 1 or kind == 3 then
return (filters[b] or default_filter)(root,a,c)
elseif kind == 2 then
return attribute_filter(root,a,b)
@@ -3568,12 +3790,14 @@ do
<p>The following functions collect elements and texts.</p>
--ldx]]--
+ -- still somewhat bugged
+
function xml.collect_elements(root, pattern, ignorespaces)
local rr, dd = { }, { }
traverse(root, lpath(pattern), function(r,d,k)
local dk = d and d[k]
if dk then
- if ignorespaces and type(dk) == "string" and dk:find("^%s*$") then
+ if ignorespaces and type(dk) == "string" and dk:find("[^%S]") then
-- ignore
else
local n = #rr+1
@@ -3606,6 +3830,24 @@ do
return t
end
+ function xml.collect_tags(root, pattern, nonamespace)
+ local t = { }
+ xml.traverse(root, xml.lpath(pattern), function(r,d,k)
+ local dk = d and d[k]
+ if dk and type(dk) == "table" then
+ local ns, tg = e.ns, e.tg
+ if nonamespace then
+ t[#t+1] = tg -- if needed we can return an extra table
+ elseif ns == "" then
+ t[#t+1] = tg
+ else
+ t[#t+1] = ns .. ":" .. tg
+ end
+ end
+ end)
+ return #t > 0 and {}
+ end
+
--[[ldx--
<p>Often using an iterators looks nicer in the code than passing handler
functions. The <l n='lua'/> book describes how to use coroutines for that
@@ -4166,6 +4408,17 @@ end end
--~ </story>
--~ ]]
+--~ x = xml.convert([[
+--~ <a><b n='01'>01</b><b n='02'>02</b><x>xx</x><b n='03'>03</b><b n='04'>OK</b></a>
+--~ ]])
+--~ xml.xshow(xml.first(x,"b[tag(2) == 'x']"))
+--~ xml.xshow(xml.first(x,"b[tag(1) == 'x']"))
+--~ xml.xshow(xml.first(x,"b[tag(-1) == 'x']"))
+--~ xml.xshow(xml.first(x,"b[tag(-2) == 'x']"))
+
+--~ print(xml.filter(x,"b/tag(2)"))
+--~ print(xml.filter(x,"b/tag(1)"))
+
-- filename : l-utils.lua
-- comment : split off from luat-lib
diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb
index bf2f92547..582ff640c 100644
--- a/scripts/context/ruby/base/tex.rb
+++ b/scripts/context/ruby/base/tex.rb
@@ -930,7 +930,8 @@ end
case str.chomp
when /^\%/o then
# next
- when /\\(starttekst|stoptekst|startonderdeel|startdocument|startoverzicht)/o then
+ # when /\\(starttekst|stoptekst|startonderdeel|startdocument|startoverzicht)/o then
+ when /\\(starttekst|stoptekst|startonderdeel|startoverzicht)/o then
setvariable('texformats','nl') ; break
when /\\(stelle|verwende|umgebung|benutze)/o then
setvariable('texformats','de') ; break
diff --git a/scripts/context/stubs/unix/context b/scripts/context/stubs/unix/context
index a9d71ce9c..c7341904f 100755
--- a/scripts/context/stubs/unix/context
+++ b/scripts/context/stubs/unix/context
@@ -1,3 +1,3 @@
#!/bin/sh
-mtxrun --script context $@
+mtxrun --script context "$@"
diff --git a/tex/context/base/attr-ini.lua b/tex/context/base/attr-ini.lua
index a2e747902..2fd34a7e4 100644
--- a/tex/context/base/attr-ini.lua
+++ b/tex/context/base/attr-ini.lua
@@ -578,7 +578,7 @@ do
return backends.pdf.literal(format("/%s cs /%s CS %s SCN %s scn",n,n,p,p))
end
- local function rgbtocmyk(r,g,b)
+ local function rgbtocmyk(r,g,b) -- we could reduce
return 1-r, 1-g, 1-b, 0
end
@@ -610,7 +610,7 @@ do
-- default color space
function colors.gray(s)
- return { 2, s, s, s, s, 0, 0, 0, s }
+ return { 2, s, s, s, s, 0, 0, 0, 1-s }
end
function colors.rgb(r,g,b)
diff --git a/tex/context/base/char-def.lua b/tex/context/base/char-def.lua
index b4ca759bf..14c6e4bc4 100644
--- a/tex/context/base/char-def.lua
+++ b/tex/context/base/char-def.lua
@@ -279,6 +279,7 @@ characters.data={
["description"]="LEFT PARENTHESIS",
["linebreak"]="op",
["mathclass"]="open",
+ ["mathname"]="lparent",
["unicodeslot"]=0x0028, -- (
},
{
@@ -288,6 +289,7 @@ characters.data={
["description"]="RIGHT PARENTHESIS",
["linebreak"]="cl",
["mathclass"]="close",
+ ["mathname"]="rparent",
["unicodeslot"]=0x0029, -- )
},
{
@@ -1084,7 +1086,7 @@ characters.data={
["description"]="LEFT CURLY BRACKET",
["linebreak"]="op",
["mathclass"]="open",
- ["mathname"]=false,
+ ["mathname"]="lbrace",
["unicodeslot"]=0x007B, -- {
},
{
@@ -1106,7 +1108,7 @@ characters.data={
["description"]="RIGHT CURLY BRACKET",
["linebreak"]="cl",
["mathclass"]="close",
- ["mathname"]=false,
+ ["mathname"]="rbrace",
["unicodeslot"]=0x007D, -- }
},
{
@@ -42808,7 +42810,7 @@ characters.data={
["category"]="po",
["cjkwd"]="a",
["contextname"]="textbullet",
- ["mathclass"]="binary", -- ok?
+ ["mathclass"]="binary", -- ok? AM: yes
["mathname"] = "bullet",
["description"]="BULLET",
["linebreak"]="al",
@@ -43990,6 +43992,8 @@ characters.data={
["category"]="lu",
["description"]="BLACK-LETTER CAPITAL I",
["linebreak"]="al",
+ ["mathclass"]="variable",
+ ["mathname"]="Im",
["specials"]={ "font", 0x0049 },
["unicodeslot"]=0x2111, -- ℑ
},
@@ -44045,6 +44049,8 @@ characters.data={
["category"]="so",
["description"]="SCRIPT CAPITAL P",
["linebreak"]="al",
+ ["mathclass"]="variable",
+ ["mathname"]="wp",
["unicodeslot"]=0x2118, -- ℘
},
[0x2119]={
@@ -44073,6 +44079,8 @@ characters.data={
["category"]="lu",
["description"]="BLACK-LETTER CAPITAL R",
["linebreak"]="al",
+ ["mathclass"]="variable",
+ ["mathname"]="Re",
["specials"]={ "font", 0x0052 },
["unicodeslot"]=0x211C, -- ℜ
},
@@ -44898,6 +44906,8 @@ characters.data={
["cjkwd"]="a",
["description"]="UPWARDS ARROW",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="uparraow",
["unicodeslot"]=0x2191, -- ↑
},
[0x2192]={
@@ -44916,6 +44926,8 @@ characters.data={
["cjkwd"]="a",
["description"]="DOWNWARDS ARROW",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="downarrow",
["unicodeslot"]=0x2193, -- ↓
},
[0x2194]={
@@ -44934,6 +44946,8 @@ characters.data={
["cjkwd"]="a",
["description"]="UP DOWN ARROW",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="updownarrow",
["unicodeslot"]=0x2195, -- ↕
},
[0x2196]={
@@ -44941,6 +44955,8 @@ characters.data={
["cjkwd"]="a",
["description"]="NORTH WEST ARROW",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="nwarrow",
["unicodeslot"]=0x2196, -- ↖
},
[0x2197]={
@@ -44948,6 +44964,8 @@ characters.data={
["cjkwd"]="a",
["description"]="NORTH EAST ARROW",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="nearrow",
["unicodeslot"]=0x2197, -- ↗
},
[0x2198]={
@@ -44955,6 +44973,8 @@ characters.data={
["cjkwd"]="a",
["description"]="SOUTH EAST ARROW",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="searrow",
["unicodeslot"]=0x2198, -- ↘
},
[0x2199]={
@@ -44962,6 +44982,8 @@ characters.data={
["cjkwd"]="a",
["description"]="SOUTH WEST ARROW",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="swarrow",
["unicodeslot"]=0x2199, -- ↙
},
[0x219A]={
@@ -45605,6 +45627,8 @@ characters.data={
["category"]="sm",
["cjkwd"]="a",
["description"]="FOR ALL",
+ ["mathclass"]="ord",
+ ["mathname"]="forall",
["linebreak"]="ai",
["unicodeslot"]=0x2200, -- ∀
},
@@ -45620,6 +45644,8 @@ characters.data={
["cjkwd"]="a",
["description"]="PARTIAL DIFFERENTIAL",
["linebreak"]="ai",
+ ["mathclass"]="variable",
+ ["mathname"]="partial",
["unicodeslot"]=0x2202, -- ∂
},
[0x2203]={
@@ -45628,6 +45654,8 @@ characters.data={
["cjkwd"]="a",
["description"]="THERE EXISTS",
["linebreak"]="ai",
+ ["mathclass"]="ord",
+ ["mathname"]="exists",
["unicodeslot"]=0x2203, -- ∃
},
[0x2204]={
@@ -45642,6 +45670,8 @@ characters.data={
["category"]="sm",
["description"]="EMPTY SET",
["linebreak"]="al",
+ ["mathclass"]="variable",
+ ["mathname"]="emptyset",
["unicodeslot"]=0x2205, -- ∅
},
[0x2206]={
@@ -45656,6 +45686,8 @@ characters.data={
["category"]="sm",
["cjkwd"]="a",
["description"]="NABLA",
+ ["mathclass"]="variable",
+ ["mathname"]="nabla",
["linebreak"]="ai",
["unicodeslot"]=0x2207, -- ∇
},
@@ -45665,6 +45697,8 @@ characters.data={
["cjkwd"]="a",
["description"]="ELEMENT OF",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]=false, -- "in"
["unicodeslot"]=0x2208, -- ∈
},
[0x2209]={
@@ -45673,6 +45707,8 @@ characters.data={
["description"]="NOT AN ELEMENT OF",
["linebreak"]="al",
["specials"]={ "char", 0x2208, 0x0338 },
+ ["mathclass"]="relation",
+ ["mathname"]="ni",
["unicodeslot"]=0x2209, -- ∉
},
[0x220A]={
@@ -45722,6 +45758,8 @@ characters.data={
["category"]="sm",
["description"]="N-ARY COPRODUCT",
["linebreak"]="al",
+ ["mathclass"]="relation",
+ ["mathname"]="coprod",
["unicodeslot"]=0x2210, -- ∐
},
[0x2211]={
@@ -45746,6 +45784,8 @@ characters.data={
["category"]="sm",
["description"]="MINUS-OR-PLUS SIGN",
["linebreak"]="pr",
+ ["mathclass"]="binary",
+ ["mathname"]="mp",
["unicodeslot"]=0x2213, -- ∓
},
[0x2214]={
@@ -45765,6 +45805,8 @@ characters.data={
["category"]="sm",
["description"]="SET MINUS",
["linebreak"]="al",
+ ["mathclass"]="binary",
+ ["mathname"]="setminus",
["unicodeslot"]=0x2216, -- ∖
},
[0x2217]={
@@ -45772,18 +45814,24 @@ characters.data={
["category"]="sm",
["description"]="ASTERISK OPERATOR",
["linebreak"]="al",
+ ["mathclass"]="binary",
+ ["mathname"]="ast",
["unicodeslot"]=0x2217, -- ∗
},
[0x2218]={
["category"]="sm",
["description"]="RING OPERATOR",
["linebreak"]="al",
+ ["mathclass"]="binary",
+ ["mathname"]="circ",
["unicodeslot"]=0x2218, -- ∘
},
[0x2219]={
["category"]="sm",
["description"]="BULLET OPERATOR",
["linebreak"]="al",
+ ["mathclass"]="binary",
+ ["mathname"]="bullet",
["unicodeslot"]=0x2219, -- ∙
},
[0x221A]={
@@ -45811,6 +45859,8 @@ characters.data={
["category"]="sm",
["cjkwd"]="a",
["description"]="PROPORTIONAL TO",
+ ["mathclass"]="relation",
+ ["mathname"]="propto",
["linebreak"]="ai",
["unicodeslot"]=0x221D, -- ∝
},
@@ -45820,6 +45870,8 @@ characters.data={
["cjkwd"]="a",
["description"]="INFINITY",
["linebreak"]="ai",
+ ["mathclass"]="variable",
+ ["mathname"]="infty",
["unicodeslot"]=0x221E, -- ∞
},
[0x221F]={
@@ -45869,6 +45921,8 @@ characters.data={
["cjkwd"]="a",
["description"]="PARALLEL TO",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="parallel",
["unicodeslot"]=0x2225, -- ∥
},
[0x2226]={
@@ -45884,6 +45938,8 @@ characters.data={
["cjkwd"]="a",
["description"]="LOGICAL AND",
["linebreak"]="ai",
+ ["mathclass"]="limop",
+ ["mathname"]="wedge",
["unicodeslot"]=0x2227, -- ∧
},
[0x2228]={
@@ -45892,6 +45948,8 @@ characters.data={
["cjkwd"]="a",
["description"]="LOGICAL OR",
["linebreak"]="ai",
+ ["mathclass"]="limop",
+ ["mathname"]="vee",
["unicodeslot"]=0x2228, -- ∨
},
[0x2229]={
@@ -45900,6 +45958,8 @@ characters.data={
["cjkwd"]="a",
["description"]="INTERSECTION",
["linebreak"]="ai",
+ ["mathclass"]="limop",
+ ["mathname"]="cap",
["unicodeslot"]=0x2229, -- ∩
},
[0x222A]={
@@ -45908,6 +45968,8 @@ characters.data={
["cjkwd"]="a",
["description"]="UNION",
["linebreak"]="ai",
+ ["mathclass"]="limop",
+ ["mathname"]="cup",
["unicodeslot"]=0x222A, -- ∪
},
[0x222B]={
@@ -45994,6 +46056,8 @@ characters.data={
["cjkwd"]="a",
["description"]="RATIO",
["linebreak"]="ai",
+ ["mathclass"]="punctuation", -- AM: Not sure
+ ["mathname"]="colon",
["unicodeslot"]=0x2236, -- ∶
},
[0x2237]={
@@ -46033,6 +46097,8 @@ characters.data={
["cjkwd"]="a",
["description"]="TILDE OPERATOR",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="sim",
["unicodeslot"]=0x223C, -- ∼
},
[0x223D]={
@@ -46077,6 +46143,8 @@ characters.data={
["category"]="sm",
["description"]="ASYMPTOTICALLY EQUAL TO",
["linebreak"]="al",
+ ["mathclass"]="relation",
+ ["mathname"]="simeq",
["unicodeslot"]=0x2243, -- ≃
},
[0x2244]={
@@ -46112,6 +46180,8 @@ characters.data={
["cjkwd"]="a",
["description"]="ALMOST EQUAL TO",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="approx",
["unicodeslot"]=0x2248, -- ≈
},
[0x2249]={
@@ -46138,6 +46208,8 @@ characters.data={
["cjkwd"]="a",
["description"]="ALL EQUAL TO",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="equiv",
["unicodeslot"]=0x224C, -- ≌
},
[0x224D]={
@@ -46270,6 +46342,8 @@ characters.data={
["cjkwd"]="a",
["description"]="IDENTICAL TO",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="equiv",
["unicodeslot"]=0x2261, -- ≡
},
[0x2262]={
@@ -46291,6 +46365,8 @@ characters.data={
["cjkwd"]="a",
["description"]="LESS-THAN OR EQUAL TO",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="leq",
["unicodeslot"]=0x2264, -- ≤
},
[0x2265]={
@@ -46299,6 +46375,8 @@ characters.data={
["cjkwd"]="a",
["description"]="GREATER-THAN OR EQUAL TO",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="geq",
["unicodeslot"]=0x2265, -- ≥
},
[0x2266]={
@@ -46332,6 +46410,8 @@ characters.data={
["cjkwd"]="a",
["description"]="MUCH LESS-THAN",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="ll",
["unicodeslot"]=0x226A, -- ≪
},
[0x226B]={
@@ -46339,6 +46419,8 @@ characters.data={
["cjkwd"]="a",
["description"]="MUCH GREATER-THAN",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="gg",
["unicodeslot"]=0x226B, -- ≫
},
[0x226C]={
@@ -46439,13 +46521,21 @@ characters.data={
[0x227A]={
["category"]="sm",
["description"]="PRECEDES",
+ ["mathclass"]="relation",
+ ["mathname"]="prec",
["linebreak"]="al",
+ ["mathclass"]="relation",
+ ["mathname"]="prec",
["unicodeslot"]=0x227A, -- ≺
},
[0x227B]={
["category"]="sm",
["description"]="SUCCEEDS",
+ ["mathclass"]="relation",
+ ["mathname"]="succ",
["linebreak"]="al",
+ ["mathclass"]="relation",
+ ["mathname"]="succ",
["unicodeslot"]=0x227B, -- ≻
},
[0x227C]={
@@ -46492,6 +46582,8 @@ characters.data={
["cjkwd"]="a",
["description"]="SUBSET OF",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="subset",
["unicodeslot"]=0x2282, -- ⊂
},
[0x2283]={
@@ -46500,6 +46592,8 @@ characters.data={
["cjkwd"]="a",
["description"]="SUPERSET OF",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="supset",
["unicodeslot"]=0x2283, -- ⊃
},
[0x2284]={
@@ -46523,6 +46617,8 @@ characters.data={
["cjkwd"]="a",
["description"]="SUBSET OF OR EQUAL TO",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="subseteq",
["unicodeslot"]=0x2286, -- ⊆
},
[0x2287]={
@@ -46531,6 +46627,8 @@ characters.data={
["cjkwd"]="a",
["description"]="SUPERSET OF OR EQUAL TO",
["linebreak"]="ai",
+ ["mathclass"]="relation",
+ ["mathname"]="supseteq",
["unicodeslot"]=0x2287, -- ⊇
},
[0x2288]={
@@ -46605,12 +46703,16 @@ characters.data={
["category"]="sm",
["description"]="SQUARE CAP",
["linebreak"]="al",
+ ["mathclass"]="relation",
+ ["mathname"]="sqcap",
["unicodeslot"]=0x2293, -- ⊓
},
[0x2294]={
["category"]="sm",
["description"]="SQUARE CUP",
["linebreak"]="al",
+ ["mathclass"]="relation",
+ ["mathname"]="sqcup",
["unicodeslot"]=0x2294, -- ⊔
},
[0x2295]={
@@ -46619,12 +46721,16 @@ characters.data={
["cjkwd"]="a",
["description"]="CIRCLED PLUS",
["linebreak"]="ai",
+ ["mathclass"]="binary",
+ ["mathname"]="oplus",
["unicodeslot"]=0x2295, -- ⊕
},
[0x2296]={
["category"]="sm",
["description"]="CIRCLED MINUS",
["linebreak"]="al",
+ ["mathclass"]="binary",
+ ["mathname"]="ominus",
["unicodeslot"]=0x2296, -- ⊖
},
[0x2297]={
@@ -46632,12 +46738,16 @@ characters.data={
["category"]="sm",
["description"]="CIRCLED TIMES",
["linebreak"]="al",
+ ["mathclass"]="binary",
+ ["mathname"]="otimes",
["unicodeslot"]=0x2297, -- ⊗
},
[0x2298]={
["category"]="sm",
["description"]="CIRCLED DIVISION SLASH",
["linebreak"]="al",
+ ["mathclass"]="binary",
+ ["mathname"]="oslash",
["unicodeslot"]=0x2298, -- ⊘
},
[0x2299]={
@@ -46645,6 +46755,8 @@ characters.data={
["cjkwd"]="a",
["description"]="CIRCLED DOT OPERATOR",
["linebreak"]="ai",
+ ["mathclass"]="binary",
+ ["mathname"]="odot",
["unicodeslot"]=0x2299, -- ⊙
},
[0x229A]={
@@ -46711,6 +46823,8 @@ characters.data={
["category"]="sm",
["description"]="DOWN TACK",
["linebreak"]="al",
+ ["mathclass"]="variable",
+ ["mathname"]="bot",
["unicodeslot"]=0x22A4, -- ⊤
},
[0x22A5]={
@@ -46719,6 +46833,8 @@ characters.data={
["cjkwd"]="a",
["description"]="UP TACK",
["linebreak"]="ai",
+ ["mathclass"]="variable",
+ ["mathname"]="top",
["unicodeslot"]=0x22A5, -- ⊥
},
[0x22A6]={
@@ -46886,30 +47002,40 @@ characters.data={
["category"]="sm",
["description"]="N-ARY LOGICAL AND",
["linebreak"]="al",
+ ["mathclass"]="limop",
+ ["mathname"]="bigwedge",
["unicodeslot"]=0x22C0, -- ⋀
},
[0x22C1]={
["category"]="sm",
["description"]="N-ARY LOGICAL OR",
["linebreak"]="al",
+ ["mathclass"]="limop",
+ ["mathname"]="bigvee",
["unicodeslot"]=0x22C1, -- ⋁
},
[0x22C2]={
["category"]="sm",
["description"]="N-ARY INTERSECTION",
["linebreak"]="al",
+ ["mathclass"]="limop",
+ ["mathname"]="bigcap",
["unicodeslot"]=0x22C2, -- ⋂
},
[0x22C3]={
["category"]="sm",
["description"]="N-ARY UNION",
["linebreak"]="al",
+ ["mathclass"]="limop",
+ ["mathname"]="bigcup",
["unicodeslot"]=0x22C3, -- ⋃
},
[0x22C4]={
["category"]="sm",
["description"]="DIAMOND OPERATOR",
["linebreak"]="al",
+ ["mathclass"]="binary",
+ ["mathname"]="diamond",
["unicodeslot"]=0x22C4, -- ⋄
},
[0x22C5]={
@@ -58667,12 +58793,16 @@ characters.data={
[0x2AAF]={
["category"]="sm",
["description"]="PRECEDES ABOVE SINGLE-LINE EQUALS SIGN",
+ ["mathclass"]="relation",
+ ["mathname"]="preceq",
["linebreak"]="al",
["unicodeslot"]=0x2AAF, -- ⪯
},
[0x2AB0]={
["category"]="sm",
["description"]="SUCCEEDS ABOVE SINGLE-LINE EQUALS SIGN",
+ ["mathclass"]="relation",
+ ["mathname"]="succeq",
["linebreak"]="al",
["unicodeslot"]=0x2AB0, -- ⪰
},
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 37c9facfa..dcd1f0503 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{2008.04.18 14:17}
+\newcontextversion{2008.05.09 19:33}
%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.tex b/tex/context/base/context.tex
index f1c5dd750..c4eff5fe8 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -42,7 +42,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2008.04.18 14:17}
+\edef\contextversion{2008.05.09 19:33}
%D For those who want to use this:
diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex
index 336d8a1e0..17609da34 100644
--- a/tex/context/base/core-itm.tex
+++ b/tex/context/base/core-itm.tex
@@ -74,6 +74,7 @@
\newconditional\fittinglistitems \setfalse\fittinglistitems
\newcount\noflists
+\newcount\currentnoflists
\newcount\itemcolumndepth
\newcount\itemdepth
\newcount\maxitemdepth
@@ -94,10 +95,10 @@
\def\dolistreference
{\ifconditional\continuelistitems
- \savetaggedtwopassdata\s!list{\number\noflists}{\number\noflists}%
+ \savetaggedtwopassdata\s!list{\number\currentnoflists}{\number\currentnoflists}%
{\currentitemlevel:\noflistelements:c:\getitemparameter\currentitemlevel\c!maxwidth}%
\else
- \savetaggedtwopassdata\s!list{\number\noflists}{\number\noflists}%
+ \savetaggedtwopassdata\s!list{\number\currentnoflists}{\number\currentnoflists}%
{\currentitemlevel:\noflistelements:n:\getitemparameter\currentitemlevel\c!maxwidth}%
\fi}
@@ -109,7 +110,7 @@
{\edef\itemdatal{#1}\edef\itemdatan{#2}\edef\itemdatat{#3}\edef\itemdataw{#4}}
\def\checkcurrentnofitems
- {\splititemtwopassdata\noflists
+ {\splititemtwopassdata\currentnoflists
\iftwopassdatafound
\ifcase\itemdatan\relax % \scratchcounter
\let\currentnofitems \!!zerocount
@@ -120,7 +121,7 @@
\edef\currentnofitems{\the\scratchcounter}%
\let\currentitemtag\itemdatat
\doloop
- {\splititemtwopassdata{\numexpr\noflists+\recurselevel\relax}%
+ {\splititemtwopassdata{\numexpr\currentnoflists+\recurselevel\relax}%
\iftwopassdatafound
\ifnum\itemdatal=\currentitemlevel\relax
\doifelse{c}\itemdatat
@@ -134,7 +135,7 @@
\scratchcounter\zerocount
\doif{c}\currentitemtag
{\doloop
- {\splititemtwopassdata{\numexpr\noflists-\recurselevel\relax}%
+ {\splititemtwopassdata{\numexpr\currentnoflists-\recurselevel\relax}%
\iftwopassdatafound
\ifnum\itemdatal=\currentitemlevel\relax
\doifelse{c}\itemdatat
@@ -501,9 +502,22 @@
\def\startitemgroup
{\dotripleempty\dostartitemgroup}
+% \def\dostartitemgroup[#1][#2][#3]%
+% {\bgroup
+% \def\currentitemgroup{#1}%
+% \ifthirdargument
+% \dodostartitemgroup[#2][#3]%
+% \else
+% \doifassignmentelse{#2}
+% {\dodostartitemgroup[][#2]}
+% {\dodostartitemgroup[#2][]}%
+% \fi}
+
\def\dostartitemgroup[#1][#2][#3]%
{\bgroup
- \def\currentitemgroup{#1}%
+ \ifnum\currentitemlevel=\zerocount
+ \def\currentitemgroup{#1}% no nested mixing of itemgroups
+ \fi
\ifthirdargument
\dodostartitemgroup[#2][#3]%
\else
@@ -632,6 +646,7 @@
\doifinsetelse\v!continue{#1}{\settrue\continuelistitems}{\setfalse\continuelistitems}%
% == \doifinsetelse\v!intro{#1}\settrue\setfalse\introlistitem
\global\advance\noflists\plusone
+ \currentnoflists=\noflists
\newcounter\noflistelements
\setfalse\headlistitem
\setfalse\sublistitem
@@ -713,7 +728,7 @@
\c!align=\v!no]%
\fi\fi}%
\ifconditional\fittinglistitems
- \splititemtwopassdata\noflists
+ \splititemtwopassdata\currentnoflists
\ifdim\itemdataw sp>\zeropoint
\expanded{\setitemparameter{\currentitemlevel}{\c!width}{\itemdataw sp}}%
\fi
@@ -979,7 +994,7 @@
\ifdim\wd8>\getitemparameter\currentitemlevel\c!maxwidth sp\relax
\expanded{\global\noexpand\setitemparameter{\currentitemlevel}{\c!maxwidth}{\number\wd8}}%
\fi
- \splititemtwopassdata\noflists
+ \splititemtwopassdata\currentnoflists
\ifdim\itemdataw sp>\zeropoint
\setbox8\simplealignedbox{\getitemparameter\currentitemlevel\c!itemalign}{\itemdataw sp}{\box8}%
\fi
diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex
index 48bf85259..d094792ef 100644
--- a/tex/context/base/core-mis.tex
+++ b/tex/context/base/core-mis.tex
@@ -2634,17 +2634,34 @@
\unexpanded\def\rotate % \bgroup: \rotate kan argument zijn
{\bgroup\complexorsimpleempty\rotate}
+% \def\complexrotate[#1]% framed met diepte !
+% {\getparameters[\??ro][#1]%
+% \processaction
+% [\@@rolocation]
+% [ \v!depth=>\!!counta\plusthree\donefalse,% depth fit - raw box
+% \v!fit=>\!!counta\plustwo \donefalse,% depth tight - raw box
+% \v!broad=>\!!counta\plusone \donefalse,% nodepth fit - raw box
+% \v!high=>\!!counta\plusone \donetrue ,% nodepth fit - framed
+% \v!middle=>\!!counta\plusfour \donefalse,% centered, keep dimensions
+% \s!default=>\!!counta\plusthree\donetrue ,% depth fit - framed
+% \s!unknown=>\!!counta\plusthree\donetrue ]% depth fit - framed
+% \ifdone
+% \def\docommand{\localframed[\??ro][#1,\c!location=]}%
+% \else
+% \let\docommand\relax
+% \fi
+% \dowithnextbox{\dorotatenextbox\@@rorotation\!!counta\egroup}\vbox\docommand}
+
+\setvalue{\??ro::\c!location::\v!depth }{\!!counta\plusthree\donefalse} % depth fit - raw box
+\setvalue{\??ro::\c!location::\v!fit }{\!!counta\plustwo \donefalse} % depth tight - raw box
+\setvalue{\??ro::\c!location::\v!broad }{\!!counta\plusone \donefalse} % nodepth fit - raw box
+\setvalue{\??ro::\c!location::\v!high }{\!!counta\plusone \donetrue } % nodepth fit - framed
+\setvalue{\??ro::\c!location::\v!middle }{\!!counta\plusfour \donefalse} % centered, keep dimensions
+\setvalue{\??ro::\c!location::\v!default}{\!!counta\plusthree\donetrue } % depth fit - framed
+
\def\complexrotate[#1]% framed met diepte !
{\getparameters[\??ro][#1]%
- \processaction
- [\@@rolocation]
- [ \v!depth=>\!!counta\plusthree\donefalse,% depth fit - raw box
- \v!fit=>\!!counta\plustwo \donefalse,% depth tight - raw box
- \v!broad=>\!!counta\plusone \donefalse,% nodepth fit - raw box
- \v!high=>\!!counta\plusone \donetrue ,% nodepth fit - framed
- \v!middle=>\!!counta\plusfour \donefalse,% centered, keep dimensions
- \s!default=>\!!counta\plusthree\donetrue ,% depth fit - framed
- \s!unknown=>\!!counta\plusthree\donetrue ]% depth fit - framed
+ \executeifdefined{\??ro::\c!location::\@@rolocation}{\!!counta\plusthree\donetrue}%
\ifdone
\def\docommand{\localframed[\??ro][#1,\c!location=]}%
\else
diff --git a/tex/context/base/core-pgr.tex b/tex/context/base/core-pgr.tex
index c218842b0..658bd07d1 100644
--- a/tex/context/base/core-pgr.tex
+++ b/tex/context/base/core-pgr.tex
@@ -500,7 +500,7 @@
gridtype=0,
linetype=1,
filltype=1,
- dashtype=0,
+ dashtype=0, % 1 = dashed, 2 = dashed with background
%snaptops=true, % not that nice: true/false
gridcolor=red,
linecolor=blue,
diff --git a/tex/context/base/core-pos.lua b/tex/context/base/core-pos.lua
index 8fff3e350..b1235a0dc 100644
--- a/tex/context/base/core-pos.lua
+++ b/tex/context/base/core-pos.lua
@@ -88,7 +88,7 @@ function job.MPplus(id,n,default)
texprint((jpi and jpi[n]) or default)
end
-function job.MPrest(id,default) -- 7 or 8 ?
+function job.MPrest(id,default)
local jpi = positions[id]
- texprint((jpi and jpi[7]) or default)
+ texprint((jpi and jpi[8]) or default) -- was 7, bugged
end
diff --git a/tex/context/base/core-pos.tex b/tex/context/base/core-pos.tex
index ff88efdf8..bc311dbda 100644
--- a/tex/context/base/core-pos.tex
+++ b/tex/context/base/core-pos.tex
@@ -779,8 +779,8 @@
\loadmarkfile{core-pos}
-\let\MPv \MPplus
-\let\MPvv \MPrest
+\let\MPv \MPplus
+\let\MPvv\MPrest
\let\MPanchor\MPpos
diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex
index ebb624476..5ede142bb 100644
--- a/tex/context/base/core-rul.tex
+++ b/tex/context/base/core-rul.tex
@@ -1770,7 +1770,10 @@
\let\framedboxheight\!!zeropoint
\let\framedboxdepth \!!zeropoint
-\def\doreshapeframedbox % frozen
+\def\shapeboxstrut % put this in front if needed !
+ {\vrule\!!width\zeropoint\!!height\ht\shapebox\!!depth\dp\shapebox}
+
+\def\doreshapeframedbox % frozen, that is ... \shapeboxstrut added
{\beginofshapebox
\unvcopy\framebox
\endofshapebox
@@ -1781,7 +1784,7 @@
\resetshapeframebox
\reshapebox
{\setbox0\hbox
- {\strut\ifhbox\shapebox\unhbox\else\box\fi\shapebox}%
+ {\strut\ifhbox\shapebox\shapeboxstrut\unhbox\else\box\fi\shapebox}%
\global\advance\framednoflines \plusone
\ifdim\framedlastlength>\zeropoint\else
\global\framedlastlength\wd0
@@ -1797,14 +1800,14 @@
\ifboxhasheight
\setbox\framebox\vbox to \localheight
{\hsize\@@globalwidth
- \reshapebox{\hbox to \hsize{\ifhbox\shapebox\unhbox\else\box\fi\shapebox}}%
+ \reshapebox{\hbox to \hsize{\ifhbox\shapebox\shapeboxstrut\unhbox\else\box\fi\shapebox}}%
\dobeforeframedbox
\innerflushshapebox
\doafterframedbox}%
\else
- \setbox\framebox\vbox to \ht\framebox
+ \setbox\framebox\vbox to \framedboxheight % \ht\framebox
{\hsize\@@globalwidth
- \reshapebox{\hbox to \hsize{\ifhbox\shapebox\unhbox\else\box\fi\shapebox}}%
+ \reshapebox{\hbox to \hsize{\ifhbox\shapebox\shapeboxstrut\unhbox\else\box\fi\shapebox}}%
\ifcase\reshapeframeboxmethod
\or \innerflushshapebox \or \innerflushshapebox
\fi}%
diff --git a/tex/context/base/core-spa.lua b/tex/context/base/core-spa.lua
index 501ea28f2..6f950d22f 100644
--- a/tex/context/base/core-spa.lua
+++ b/tex/context/base/core-spa.lua
@@ -492,7 +492,7 @@ node.slide(head) -- hm, why
function nodes.handle_vbox_spacing(t)
if t and t.next then
-node.slide(t)
+ node.slide(t)
return collapser(t,'whole')
else
return t
diff --git a/tex/context/base/core-trf.tex b/tex/context/base/core-trf.tex
index 315f4e474..e31f8a33a 100644
--- a/tex/context/base/core-trf.tex
+++ b/tex/context/base/core-trf.tex
@@ -119,9 +119,10 @@
{11}%
\ifx\scaleboxstampa\empty
\ifx\scaleboxstampb\scaleboxstampc
- % no scaling, but still check; new
- \doifsomething{\scaleparameter\c!maxwidth }{\letvalue{\currentscaletag\c!factor}\v!fit}%
- \doifsomething{\scaleparameter\c!maxheight}{\letvalue{\currentscaletag\c!factor}\v!fit}%
+ % no scaling, but still check; new, gone again
+% wrong: scaled proportionally as side effect
+% \doifsomething{\scaleparameter\c!maxwidth }{\letvalue{\currentscaletag\c!factor}\v!fit}%
+% \doifsomething{\scaleparameter\c!maxheight}{\letvalue{\currentscaletag\c!factor}\v!fit}%
\insidefloattrue % trick
\dodoscaleboxcalculations
\else
diff --git a/tex/context/base/core-tsp.tex b/tex/context/base/core-tsp.tex
index ead8fde18..3046a1dda 100644
--- a/tex/context/base/core-tsp.tex
+++ b/tex/context/base/core-tsp.tex
@@ -123,6 +123,7 @@
\bgroup
\ifconditional\somenextplitofffloat
\settrue\retainfloatnumber
+\notesenabledfalse % best here, experimental, brrr; test with note in caption
\else
\setfalse\retainfloatnumber
\fi
diff --git a/tex/context/base/core-ver.mkiv b/tex/context/base/core-ver.mkiv
index 01e46f925..c1dc0c72a 100644
--- a/tex/context/base/core-ver.mkiv
+++ b/tex/context/base/core-ver.mkiv
@@ -181,7 +181,7 @@
\def\doverbatimbeginofline#1% linenumber
{\bgroup % due to pretty status
\iflinepar\else\EveryPar{}\fi
- \dontleavehmode % \leavevmode
+ \noindent % was wrong: \dontleavehmode
\xdef\dokeepverbatimlinedata % hm, still needed?
{\parindent \the\parindent
\hangindent\the\hangindent
diff --git a/tex/context/base/enco-utf.tex b/tex/context/base/enco-utf.tex
index f0be5b4d2..bfb427381 100644
--- a/tex/context/base/enco-utf.tex
+++ b/tex/context/base/enco-utf.tex
@@ -1985,1134 +1985,1142 @@
\setcclcucx FF59 FF59 FF39 % FULLWIDTH LATIN SMALL LETTER Y
\setcclcucx FF5A FF5A FF3A % FULLWIDTH LATIN SMALL LETTER Z
-% named characters mapped onto utf
+% named characters mapped onto utf (\\char is needed for accents)
-\def\nonbreakablespace { } % NO-BREAK SPACE
-\def\exclamdown {¡} % INVERTED EXCLAMATION MARK
-\def\textcent {¢} % CENT SIGN
-\def\textsterling {£} % POUND SIGN
-\def\textcurrency {¤} % CURRENCY SIGN
-\def\textyen {¥} % YEN SIGN
-\def\textbrokenbar {¦} % BROKEN BAR
-\def\sectionmark {§} % SECTION SIGN
-\def\textdiaeresis {¨} % DIAERESIS
-\def\copyright {©} % COPYRIGHT SIGN
-\def\ordfeminine {ª} % FEMININE ORDINAL INDICATOR
-\def\leftguillemot {«} % LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
-\def\textlognot {¬} % NOT SIGN
-\def\softhyphen {­} % SOFT HYPHEN
-\def\registered {®} % REGISTERED SIGN
-\def\textmacron {¯} % MACRON
-\def\textdegree {°} % DEGREE SIGN
-\def\textpm {±} % PLUS-MINUS SIGN
-\def\twosuperior {²} % SUPERSCRIPT TWO
-\def\threesuperior {³} % SUPERSCRIPT THREE
-\def\textacute {´} % ACUTE ACCENT
-\def\textmu {µ} % MICRO SIGN
-\def\paragraphmark {¶} % PILCROW SIGN
-\def\periodcentered {·} % MIDDLE DOT
-\def\textcedilla {¸} % CEDILLA
-\def\onesuperior {¹} % SUPERSCRIPT ONE
-\def\ordmasculine {º} % MASCULINE ORDINAL INDICATOR
-\def\rightguillemot {»} % RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
-\def\onequarter {¼} % VULGAR FRACTION ONE QUARTER
-\def\onehalf {½} % VULGAR FRACTION ONE HALF
-\def\threequarter {¾} % VULGAR FRACTION THREE QUARTERS
-\def\questiondown {¿} % INVERTED QUESTION MARK
-\def\Agrave {À} % LATIN CAPITAL LETTER A WITH GRAVE
-\def\Aacute {Á} % LATIN CAPITAL LETTER A WITH ACUTE
-\def\Acircumflex {Â} % LATIN CAPITAL LETTER A WITH CIRCUMFLEX
-\def\Atilde {Ã} % LATIN CAPITAL LETTER A WITH TILDE
-\def\Adiaeresis {Ä} % LATIN CAPITAL LETTER A WITH DIAERESIS
-\def\Aring {Å} % LATIN CAPITAL LETTER A WITH RING ABOVE
-\def\AEligature {Æ} % LATIN CAPITAL LETTER AE
-\def\Ccedilla {Ç} % LATIN CAPITAL LETTER C WITH CEDILLA
-\def\Egrave {È} % LATIN CAPITAL LETTER E WITH GRAVE
-\def\Eacute {É} % LATIN CAPITAL LETTER E WITH ACUTE
-\def\Ecircumflex {Ê} % LATIN CAPITAL LETTER E WITH CIRCUMFLEX
-\def\Ediaeresis {Ë} % LATIN CAPITAL LETTER E WITH DIAERESIS
-\def\Igrave {Ì} % LATIN CAPITAL LETTER I WITH GRAVE
-\def\Iacute {Í} % LATIN CAPITAL LETTER I WITH ACUTE
-\def\Icircumflex {Î} % LATIN CAPITAL LETTER I WITH CIRCUMFLEX
-\def\Idiaeresis {Ï} % LATIN CAPITAL LETTER I WITH DIAERESIS
-\def\Eth {Ð} % LATIN CAPITAL LETTER ETH
-\def\Ntilde {Ñ} % LATIN CAPITAL LETTER N WITH TILDE
-\def\Ograve {Ò} % LATIN CAPITAL LETTER O WITH GRAVE
-\def\Oacute {Ó} % LATIN CAPITAL LETTER O WITH ACUTE
-\def\Ocircumflex {Ô} % LATIN CAPITAL LETTER O WITH CIRCUMFLEX
-\def\Otilde {Õ} % LATIN CAPITAL LETTER O WITH TILDE
-\def\Odiaeresis {Ö} % LATIN CAPITAL LETTER O WITH DIAERESIS
-\def\textmultiply {×} % MULTIPLICATION SIGN
-\def\Ostroke {Ø} % LATIN CAPITAL LETTER O WITH STROKE
-\def\Ugrave {Ù} % LATIN CAPITAL LETTER U WITH GRAVE
-\def\Uacute {Ú} % LATIN CAPITAL LETTER U WITH ACUTE
-\def\Ucircumflex {Û} % LATIN CAPITAL LETTER U WITH CIRCUMFLEX
-\def\Udiaeresis {Ü} % LATIN CAPITAL LETTER U WITH DIAERESIS
-\def\Yacute {Ý} % LATIN CAPITAL LETTER Y WITH ACUTE
-\def\Thorn {Þ} % LATIN CAPITAL LETTER THORN
-\def\ssharp {ß} % LATIN SMALL LETTER SHARP S
-\def\agrave {à} % LATIN SMALL LETTER A WITH GRAVE
-\def\aacute {á} % LATIN SMALL LETTER A WITH ACUTE
-\def\acircumflex {â} % LATIN SMALL LETTER A WITH CIRCUMFLEX
-\def\atilde {ã} % LATIN SMALL LETTER A WITH TILDE
-\def\adiaeresis {ä} % LATIN SMALL LETTER A WITH DIAERESIS
-\def\aring {å} % LATIN SMALL LETTER A WITH RING ABOVE
-\def\aeligature {æ} % LATIN SMALL LETTER AE
-\def\ccedilla {ç} % LATIN SMALL LETTER C WITH CEDILLA
-\def\egrave {è} % LATIN SMALL LETTER E WITH GRAVE
-\def\eacute {é} % LATIN SMALL LETTER E WITH ACUTE
-\def\ecircumflex {ê} % LATIN SMALL LETTER E WITH CIRCUMFLEX
-\def\ediaeresis {ë} % LATIN SMALL LETTER E WITH DIAERESIS
-\def\igrave {ì} % LATIN SMALL LETTER I WITH GRAVE
-\def\iacute {í} % LATIN SMALL LETTER I WITH ACUTE
-\def\icircumflex {î} % LATIN SMALL LETTER I WITH CIRCUMFLEX
-\def\idiaeresis {ï} % LATIN SMALL LETTER I WITH DIAERESIS
-\def\eth {ð} % LATIN SMALL LETTER ETH
-\def\ntilde {ñ} % LATIN SMALL LETTER N WITH TILDE
-\def\ograve {ò} % LATIN SMALL LETTER O WITH GRAVE
-\def\oacute {ó} % LATIN SMALL LETTER O WITH ACUTE
-\def\ocircumflex {ô} % LATIN SMALL LETTER O WITH CIRCUMFLEX
-\def\otilde {õ} % LATIN SMALL LETTER O WITH TILDE
-\def\odiaeresis {ö} % LATIN SMALL LETTER O WITH DIAERESIS
-\def\textdiv {÷} % DIVISION SIGN
-\def\ostroke {ø} % LATIN SMALL LETTER O WITH STROKE
-\def\ugrave {ù} % LATIN SMALL LETTER U WITH GRAVE
-\def\uacute {ú} % LATIN SMALL LETTER U WITH ACUTE
-\def\ucircumflex {û} % LATIN SMALL LETTER U WITH CIRCUMFLEX
-\def\udiaeresis {ü} % LATIN SMALL LETTER U WITH DIAERESIS
-\def\yacute {ý} % LATIN SMALL LETTER Y WITH ACUTE
-\def\thorn {þ} % LATIN SMALL LETTER THORN
-\def\ydiaeresis {ÿ} % LATIN SMALL LETTER Y WITH DIAERESIS
-\def\Amacron {Ā} % LATIN CAPITAL LETTER A WITH MACRON
-\def\amacron {ā} % LATIN SMALL LETTER A WITH MACRON
-\def\Abreve {Ă} % LATIN CAPITAL LETTER A WITH BREVE
-\def\abreve {ă} % LATIN SMALL LETTER A WITH BREVE
-\def\Aogonek {Ą} % LATIN CAPITAL LETTER A WITH OGONEK
-\def\aogonek {ą} % LATIN SMALL LETTER A WITH OGONEK
-\def\Cacute {Ć} % LATIN CAPITAL LETTER C WITH ACUTE
-\def\cacute {ć} % LATIN SMALL LETTER C WITH ACUTE
-\def\Ccircumflex {Ĉ} % LATIN CAPITAL LETTER C WITH CIRCUMFLEX
-\def\ccircumflex {ĉ} % LATIN SMALL LETTER C WITH CIRCUMFLEX
-\def\Cdotaccent {Ċ} % LATIN CAPITAL LETTER C WITH DOT ABOVE
-\def\cdotaccent {ċ} % LATIN SMALL LETTER C WITH DOT ABOVE
-\def\Ccaron {Č} % LATIN CAPITAL LETTER C WITH CARON
-\def\ccaron {č} % LATIN SMALL LETTER C WITH CARON
-\def\Dcaron {Ď} % LATIN CAPITAL LETTER D WITH CARON
-\def\dcaron {ď} % LATIN SMALL LETTER D WITH CARON
-\def\Dstroke {Đ} % LATIN CAPITAL LETTER D WITH STROKE
-\def\dstroke {đ} % LATIN SMALL LETTER D WITH STROKE
-\def\Emacron {Ē} % LATIN CAPITAL LETTER E WITH MACRON
-\def\emacron {ē} % LATIN SMALL LETTER E WITH MACRON
-\def\Ebreve {Ĕ} % LATIN CAPITAL LETTER E WITH BREVE
-\def\ebreve {ĕ} % LATIN SMALL LETTER E WITH BREVE
-\def\Edotaccent {Ė} % LATIN CAPITAL LETTER E WITH DOT ABOVE
-\def\edotaccent {ė} % LATIN SMALL LETTER E WITH DOT ABOVE
-\def\Eogonek {Ę} % LATIN CAPITAL LETTER E WITH OGONEK
-\def\eogonek {ę} % LATIN SMALL LETTER E WITH OGONEK
-\def\Ecaron {Ě} % LATIN CAPITAL LETTER E WITH CARON
-\def\ecaron {ě} % LATIN SMALL LETTER E WITH CARON
-\def\Gcircumflex {Ĝ} % LATIN CAPITAL LETTER G WITH CIRCUMFLEX
-\def\gcircumflex {ĝ} % LATIN SMALL LETTER G WITH CIRCUMFLEX
-\def\Gbreve {Ğ} % LATIN CAPITAL LETTER G WITH BREVE
-\def\gbreve {ğ} % LATIN SMALL LETTER G WITH BREVE
-\def\Gdotaccent {Ġ} % LATIN CAPITAL LETTER G WITH DOT ABOVE
-\def\gdotaccent {ġ} % LATIN SMALL LETTER G WITH DOT ABOVE
-\def\Gcommaaccent {Ģ} % LATIN CAPITAL LETTER G WITH CEDILLA
-\def\gcommaaccent {ģ} % LATIN SMALL LETTER G WITH CEDILLA
-\def\Hcircumflex {Ĥ} % LATIN CAPITAL LETTER H WITH CIRCUMFLEX
-\def\hcircumflex {ĥ} % LATIN SMALL LETTER H WITH CIRCUMFLEX
-\def\Hstroke {Ħ} % LATIN CAPITAL LETTER H WITH STROKE
-\def\hstroke {ħ} % LATIN SMALL LETTER H WITH STROKE
-\def\Itilde {Ĩ} % LATIN CAPITAL LETTER I WITH TILDE
-\def\itilde {ĩ} % LATIN SMALL LETTER I WITH TILDE
-\def\Imacron {Ī} % LATIN CAPITAL LETTER I WITH MACRON
-\def\imacron {ī} % LATIN SMALL LETTER I WITH MACRON
-\def\Ibreve {Ĭ} % LATIN CAPITAL LETTER I WITH BREVE
-\def\ibreve {ĭ} % LATIN SMALL LETTER I WITH BREVE
-\def\Iogonek {Į} % LATIN CAPITAL LETTER I WITH OGONEK
-\def\iogonek {į} % LATIN SMALL LETTER I WITH OGONEK
-\def\Idotaccent {İ} % LATIN CAPITAL LETTER I WITH DOT ABOVE
-\def\dotlessi {ı} % LATIN SMALL LETTER DOTLESS I
-\def\IJligature {IJ} % LATIN CAPITAL LIGATURE IJ
-\def\ijligature {ij} % LATIN SMALL LIGATURE IJ
-\def\Jcircumflex {Ĵ} % LATIN CAPITAL LETTER J WITH CIRCUMFLEX
-\def\jcircumflex {ĵ} % LATIN SMALL LETTER J WITH CIRCUMFLEX
-\def\Kcommaaccent {Ķ} % LATIN CAPITAL LETTER K WITH CEDILLA
-\def\kcommaaccent {ķ} % LATIN SMALL LETTER K WITH CEDILLA
-\def\kkra {ĸ} % LATIN SMALL LETTER KRA
-\def\Lacute {Ĺ} % LATIN CAPITAL LETTER L WITH ACUTE
-\def\lacute {ĺ} % LATIN SMALL LETTER L WITH ACUTE
-\def\Lcommaaccent {Ļ} % LATIN CAPITAL LETTER L WITH CEDILLA
-\def\lcommaaccent {ļ} % LATIN SMALL LETTER L WITH CEDILLA
-\def\Lcaron {Ľ} % LATIN CAPITAL LETTER L WITH CARON
-\def\lcaron {ľ} % LATIN SMALL LETTER L WITH CARON
-\def\Ldotmiddle {Ŀ} % LATIN CAPITAL LETTER L WITH MIDDLE DOT
-\def\ldotmiddle {ŀ} % LATIN SMALL LETTER L WITH MIDDLE DOT
-\def\Lstroke {Ł} % LATIN CAPITAL LETTER L WITH STROKE
-\def\lstroke {ł} % LATIN SMALL LETTER L WITH STROKE
-\def\Nacute {Ń} % LATIN CAPITAL LETTER N WITH ACUTE
-\def\nacute {ń} % LATIN SMALL LETTER N WITH ACUTE
-\def\Ncommaaccent {Ņ} % LATIN CAPITAL LETTER N WITH CEDILLA
-\def\ncommaaccent {ņ} % LATIN SMALL LETTER N WITH CEDILLA
-\def\Ncaron {Ň} % LATIN CAPITAL LETTER N WITH CARON
-\def\ncaron {ň} % LATIN SMALL LETTER N WITH CARON
-\def\napostrophe {ʼn} % LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
-\def\Neng {Ŋ} % LATIN CAPITAL LETTER ENG
-\def\neng {ŋ} % LATIN SMALL LETTER ENG
-\def\Omacron {Ō} % LATIN CAPITAL LETTER O WITH MACRON
-\def\omacron {ō} % LATIN SMALL LETTER O WITH MACRON
-\def\Obreve {Ŏ} % LATIN CAPITAL LETTER O WITH BREVE
-\def\obreve {ŏ} % LATIN SMALL LETTER O WITH BREVE
-\def\Ohungarumlaut {Ő} % LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
-\def\ohungarumlaut {ő} % LATIN SMALL LETTER O WITH DOUBLE ACUTE
-\def\OEligature {Œ} % LATIN CAPITAL LIGATURE OE
-\def\oeligature {œ} % LATIN SMALL LIGATURE OE
-\def\Racute {Ŕ} % LATIN CAPITAL LETTER R WITH ACUTE
-\def\racute {ŕ} % LATIN SMALL LETTER R WITH ACUTE
-\def\Rcommaaccent {Ŗ} % LATIN CAPITAL LETTER R WITH CEDILLA
-\def\rcommaaccent {ŗ} % LATIN SMALL LETTER R WITH CEDILLA
-\def\Rcaron {Ř} % LATIN CAPITAL LETTER R WITH CARON
-\def\rcaron {ř} % LATIN SMALL LETTER R WITH CARON
-\def\Sacute {Ś} % LATIN CAPITAL LETTER S WITH ACUTE
-\def\sacute {ś} % LATIN SMALL LETTER S WITH ACUTE
-\def\Scircumflex {Ŝ} % LATIN CAPITAL LETTER S WITH CIRCUMFLEX
-\def\scircumflex {ŝ} % LATIN SMALL LETTER S WITH CIRCUMFLEX
-\def\Scedilla {Ş} % LATIN CAPITAL LETTER S WITH CEDILLA
-\def\scedilla {ş} % LATIN SMALL LETTER S WITH CEDILLA
-\def\Scaron {Š} % LATIN CAPITAL LETTER S WITH CARON
-\def\scaron {š} % LATIN SMALL LETTER S WITH CARON
-\def\Tcedilla {Ţ} % LATIN CAPITAL LETTER T WITH CEDILLA
-\def\tcedilla {ţ} % LATIN SMALL LETTER T WITH CEDILLA
-\def\Tcaron {Ť} % LATIN CAPITAL LETTER T WITH CARON
-\def\tcaron {ť} % LATIN SMALL LETTER T WITH CARON
-\def\Tstroke {Ŧ} % LATIN CAPITAL LETTER T WITH STROKE
-\def\tstroke {ŧ} % LATIN SMALL LETTER T WITH STROKE
-\def\Utilde {Ũ} % LATIN CAPITAL LETTER U WITH TILDE
-\def\utilde {ũ} % LATIN SMALL LETTER U WITH TILDE
-\def\Umacron {Ū} % LATIN CAPITAL LETTER U WITH MACRON
-\def\umacron {ū} % LATIN SMALL LETTER U WITH MACRON
-\def\Ubreve {Ŭ} % LATIN CAPITAL LETTER U WITH BREVE
-\def\ubreve {ŭ} % LATIN SMALL LETTER U WITH BREVE
-\def\Uring {Ů} % LATIN CAPITAL LETTER U WITH RING ABOVE
-\def\uring {ů} % LATIN SMALL LETTER U WITH RING ABOVE
-\def\Uhungarumlaut {Ű} % LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
-\def\uhungarumlaut {ű} % LATIN SMALL LETTER U WITH DOUBLE ACUTE
-\def\Uogonek {Ų} % LATIN CAPITAL LETTER U WITH OGONEK
-\def\uogonek {ų} % LATIN SMALL LETTER U WITH OGONEK
-\def\Wcircumflex {Ŵ} % LATIN CAPITAL LETTER W WITH CIRCUMFLEX
-\def\wcircumflex {ŵ} % LATIN SMALL LETTER W WITH CIRCUMFLEX
-\def\Ycircumflex {Ŷ} % LATIN CAPITAL LETTER Y WITH CIRCUMFLEX
-\def\ycircumflex {ŷ} % LATIN SMALL LETTER Y WITH CIRCUMFLEX
-\def\Ydiaeresis {Ÿ} % LATIN CAPITAL LETTER Y WITH DIAERESIS
-\def\Zacute {Ź} % LATIN CAPITAL LETTER Z WITH ACUTE
-\def\zacute {ź} % LATIN SMALL LETTER Z WITH ACUTE
-\def\Zdotaccent {Ż} % LATIN CAPITAL LETTER Z WITH DOT ABOVE
-\def\zdotaccent {ż} % LATIN SMALL LETTER Z WITH DOT ABOVE
-\def\Zcaron {Ž} % LATIN CAPITAL LETTER Z WITH CARON
-\def\zcaron {ž} % LATIN SMALL LETTER Z WITH CARON
-\def\slong {ſ} % LATIN SMALL LETTER LONG S
-\def\bstroke {ƀ} % LATIN SMALL LETTER B WITH STROKE
-\def\Bhook {Ɓ} % LATIN CAPITAL LETTER B WITH HOOK
-\def\Chook {Ƈ} % LATIN CAPITAL LETTER C WITH HOOK
-\def\chook {ƈ} % LATIN SMALL LETTER C WITH HOOK
-\def\Dafrican {Ɖ} % LATIN CAPITAL LETTER AFRICAN D
-\def\Dhook {Ɗ} % LATIN CAPITAL LETTER D WITH HOOK
-\def\Schwa {Ə} % LATIN CAPITAL LETTER SCHWA
-\def\Fhook {Ƒ} % LATIN CAPITAL LETTER F WITH HOOK
-\def\fhook {ƒ} % LATIN SMALL LETTER F WITH HOOK
-\def\Ghook {Ɠ} % LATIN CAPITAL LETTER G WITH HOOK
-\def\Istroke {Ɨ} % LATIN CAPITAL LETTER I WITH STROKE
-\def\Khook {Ƙ} % LATIN CAPITAL LETTER K WITH HOOK
-\def\khook {ƙ} % LATIN SMALL LETTER K WITH HOOK
-\def\lbar {ƚ} % LATIN SMALL LETTER L WITH BAR
-\def\Ohorn {Ơ} % LATIN CAPITAL LETTER O WITH HORN
-\def\ohorn {ơ} % LATIN SMALL LETTER O WITH HORN
-\def\Phook {Ƥ} % LATIN CAPITAL LETTER P WITH HOOK
-\def\phook {ƥ} % LATIN SMALL LETTER P WITH HOOK
-\def\Thook {Ƭ} % LATIN CAPITAL LETTER T WITH HOOK
-\def\thook {ƭ} % LATIN SMALL LETTER T WITH HOOK
-\def\Uhorn {Ư} % LATIN CAPITAL LETTER U WITH HORN
-\def\uhorn {ư} % LATIN SMALL LETTER U WITH HORN
-\def\Uhook {Ʋ} % LATIN CAPITAL LETTER V WITH HOOK
-\def\Yhook {Ƴ} % LATIN CAPITAL LETTER Y WITH HOOK
-\def\yhook {ƴ} % LATIN SMALL LETTER Y WITH HOOK
-\def\Zstroke {Ƶ} % LATIN CAPITAL LETTER Z WITH STROKE
-\def\zstroke {ƶ} % LATIN SMALL LETTER Z WITH STROKE
-\def\DZcaronligature {DŽ} % LATIN CAPITAL LETTER DZ WITH CARON
-\def\Dzcaronligature {Dž} % LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON
-\def\dzcaronligature {dž} % LATIN SMALL LETTER DZ WITH CARON
-\def\LJligature {LJ} % LATIN CAPITAL LETTER LJ
-\def\Ljligature {Lj} % LATIN CAPITAL LETTER L WITH SMALL LETTER J
-\def\ljligature {lj} % LATIN SMALL LETTER LJ
-\def\NJligature {NJ} % LATIN CAPITAL LETTER NJ
-\def\Njligature {Nj} % LATIN CAPITAL LETTER N WITH SMALL LETTER J
-\def\njligature {nj} % LATIN SMALL LETTER NJ
-\def\Acaron {Ǎ} % LATIN CAPITAL LETTER A WITH CARON
-\def\acaron {ǎ} % LATIN SMALL LETTER A WITH CARON
-\def\Icaron {Ǐ} % LATIN CAPITAL LETTER I WITH CARON
-\def\icaron {ǐ} % LATIN SMALL LETTER I WITH CARON
-\def\Ocaron {Ǒ} % LATIN CAPITAL LETTER O WITH CARON
-\def\ocaron {ǒ} % LATIN SMALL LETTER O WITH CARON
-\def\Ucaron {Ǔ} % LATIN CAPITAL LETTER U WITH CARON
-\def\ucaron {ǔ} % LATIN SMALL LETTER U WITH CARON
-\def\Udiaeresismacron {Ǖ} % LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON
-\def\udiaeresismacron {ǖ} % LATIN SMALL LETTER U WITH DIAERESIS AND MACRON
-\def\Udiaeresisacute {Ǘ} % LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE
-\def\udiaeresisacute {ǘ} % LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE
-\def\Udiaeresiscaron {Ǚ} % LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON
-\def\udiaeresiscaron {ǚ} % LATIN SMALL LETTER U WITH DIAERESIS AND CARON
-\def\Udiaeresisgrave {Ǜ} % LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE
-\def\udiaeresisgrave {ǜ} % LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE
-\def\Adiaeresismacron {Ǟ} % LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON
-\def\adiaeresismacron {ǟ} % LATIN SMALL LETTER A WITH DIAERESIS AND MACRON
-\def\Adotaccentmacron {Ǡ} % LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON
-\def\adotaccentmacron {ǡ} % LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON
-\def\AEmacron {Ǣ} % LATIN CAPITAL LETTER AE WITH MACRON
-\def\aemacron {ǣ} % LATIN SMALL LETTER AE WITH MACRON
-\def\Gstroke {Ǥ} % LATIN CAPITAL LETTER G WITH STROKE
-\def\gstroke {ǥ} % LATIN SMALL LETTER G WITH STROKE
-\def\Gcaron {Ǧ} % LATIN CAPITAL LETTER G WITH CARON
-\def\gcaron {ǧ} % LATIN SMALL LETTER G WITH CARON
-\def\Kcaron {Ǩ} % LATIN CAPITAL LETTER K WITH CARON
-\def\kcaron {ǩ} % LATIN SMALL LETTER K WITH CARON
-\def\Oogonek {Ǫ} % LATIN CAPITAL LETTER O WITH OGONEK
-\def\oogonek {ǫ} % LATIN SMALL LETTER O WITH OGONEK
-\def\Oogonekmacron {Ǭ} % LATIN CAPITAL LETTER O WITH OGONEK AND MACRON
-\def\oogonekmacron {ǭ} % LATIN SMALL LETTER O WITH OGONEK AND MACRON
-\def\jcaron {ǰ} % LATIN SMALL LETTER J WITH CARON
-\def\DZligature {DZ} % LATIN CAPITAL LETTER DZ
-\def\Dzligature {Dz} % LATIN CAPITAL LETTER D WITH SMALL LETTER Z
-\def\dzligature {dz} % LATIN SMALL LETTER DZ
-\def\Gacute {Ǵ} % LATIN CAPITAL LETTER G WITH ACUTE
-\def\gacute {ǵ} % LATIN SMALL LETTER G WITH ACUTE
-\def\Ngrave {Ǹ} % LATIN CAPITAL LETTER N WITH GRAVE
-\def\ngrave {ǹ} % LATIN SMALL LETTER N WITH GRAVE
-\def\Aringacute {Ǻ} % LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE
-\def\aringacute {ǻ} % LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE
-\def\AEacute {Ǽ} % LATIN CAPITAL LETTER AE WITH ACUTE
-\def\aeacute {ǽ} % LATIN SMALL LETTER AE WITH ACUTE
-\def\Ostrokeacute {Ǿ} % LATIN CAPITAL LETTER O WITH STROKE AND ACUTE
-\def\ostrokeacute {ǿ} % LATIN SMALL LETTER O WITH STROKE AND ACUTE
-\def\Adoublegrave {Ȁ} % LATIN CAPITAL LETTER A WITH DOUBLE GRAVE
-\def\adoublegrave {ȁ} % LATIN SMALL LETTER A WITH DOUBLE GRAVE
-\def\Ainvertedbreve {Ȃ} % LATIN CAPITAL LETTER A WITH INVERTED BREVE
-\def\ainvertedbreve {ȃ} % LATIN SMALL LETTER A WITH INVERTED BREVE
-\def\Edoublegrave {Ȅ} % LATIN CAPITAL LETTER E WITH DOUBLE GRAVE
-\def\edoublegrave {ȅ} % LATIN SMALL LETTER E WITH DOUBLE GRAVE
-\def\Einvertedbreve {Ȇ} % LATIN CAPITAL LETTER E WITH INVERTED BREVE
-\def\einvertedbreve {ȇ} % LATIN SMALL LETTER E WITH INVERTED BREVE
-\def\Idoublegrave {Ȉ} % LATIN CAPITAL LETTER I WITH DOUBLE GRAVE
-\def\idoublegrave {ȉ} % LATIN SMALL LETTER I WITH DOUBLE GRAVE
-\def\Iinvertedbreve {Ȋ} % LATIN CAPITAL LETTER I WITH INVERTED BREVE
-\def\iinvertedbreve {ȋ} % LATIN SMALL LETTER I WITH INVERTED BREVE
-\def\Odoublegrave {Ȍ} % LATIN CAPITAL LETTER O WITH DOUBLE GRAVE
-\def\odoublegrave {ȍ} % LATIN SMALL LETTER O WITH DOUBLE GRAVE
-\def\Oinvertedbreve {Ȏ} % LATIN CAPITAL LETTER O WITH INVERTED BREVE
-\def\oinvertedbreve {ȏ} % LATIN SMALL LETTER O WITH INVERTED BREVE
-\def\Rdoublegrave {Ȑ} % LATIN CAPITAL LETTER R WITH DOUBLE GRAVE
-\def\rdoublegrave {ȑ} % LATIN SMALL LETTER R WITH DOUBLE GRAVE
-\def\Rinvertedbreve {Ȓ} % LATIN CAPITAL LETTER R WITH INVERTED BREVE
-\def\rinvertedbreve {ȓ} % LATIN SMALL LETTER R WITH INVERTED BREVE
-\def\Udoublegrave {Ȕ} % LATIN CAPITAL LETTER U WITH DOUBLE GRAVE
-\def\udoublegrave {ȕ} % LATIN SMALL LETTER U WITH DOUBLE GRAVE
-\def\Uinvertedbreve {Ȗ} % LATIN CAPITAL LETTER U WITH INVERTED BREVE
-\def\uinvertedbreve {ȗ} % LATIN SMALL LETTER U WITH INVERTED BREVE
-\def\Scommaaccent {Ș} % LATIN CAPITAL LETTER S WITH COMMA BELOW
-\def\scommaaccent {ș} % LATIN SMALL LETTER S WITH COMMA BELOW
-\def\Tcommaaccent {Ț} % LATIN CAPITAL LETTER T WITH COMMA BELOW
-\def\tcommaaccent {ț} % LATIN SMALL LETTER T WITH COMMA BELOW
-\def\Hcaron {Ȟ} % LATIN CAPITAL LETTER H WITH CARON
-\def\hcaron {ȟ} % LATIN SMALL LETTER H WITH CARON
-\def\dcurl {ȡ} % LATIN SMALL LETTER D WITH CURL
-\def\Zhook {Ȥ} % LATIN CAPITAL LETTER Z WITH HOOK
-\def\zhook {ȥ} % LATIN SMALL LETTER Z WITH HOOK
-\def\Adotaccent {Ȧ} % LATIN CAPITAL LETTER A WITH DOT ABOVE
-\def\adotaccent {ȧ} % LATIN SMALL LETTER A WITH DOT ABOVE
-\def\Ecedilla {Ȩ} % LATIN CAPITAL LETTER E WITH CEDILLA
-\def\ecedilla {ȩ} % LATIN SMALL LETTER E WITH CEDILLA
-\def\Odiaeresismacron {Ȫ} % LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON
-\def\odiaeresismacron {ȫ} % LATIN SMALL LETTER O WITH DIAERESIS AND MACRON
-\def\Otildemacron {Ȭ} % LATIN CAPITAL LETTER O WITH TILDE AND MACRON
-\def\otildemacron {ȭ} % LATIN SMALL LETTER O WITH TILDE AND MACRON
-\def\Odotaccent {Ȯ} % LATIN CAPITAL LETTER O WITH DOT ABOVE
-\def\odotaccent {ȯ} % LATIN SMALL LETTER O WITH DOT ABOVE
-\def\Odotaccentmacron {Ȱ} % LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON
-\def\odotaccentmacron {ȱ} % LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON
-\def\Ymacron {Ȳ} % LATIN CAPITAL LETTER Y WITH MACRON
-\def\ymacron {ȳ} % LATIN SMALL LETTER Y WITH MACRON
-\def\lcurl {ȴ} % LATIN SMALL LETTER L WITH CURL
-\def\ncurl {ȵ} % LATIN SMALL LETTER N WITH CURL
-\def\tcurl {ȶ} % LATIN SMALL LETTER T WITH CURL
-\def\dotlessj {ȷ} % LATIN SMALL LETTER DOTLESS J
-\def\Astroke {Ⱥ} % LATIN CAPITAL LETTER A WITH STROKE
-\def\Cstroke {Ȼ} % LATIN CAPITAL LETTER C WITH STROKE
-\def\cstroke {ȼ} % LATIN SMALL LETTER C WITH STROKE
-\def\Lbar {Ƚ} % LATIN CAPITAL LETTER L WITH BAR
-\def\bhook {ɓ} % LATIN SMALL LETTER B WITH HOOK
-\def\ccurl {ɕ} % LATIN SMALL LETTER C WITH CURL
-\def\dtail {ɖ} % LATIN SMALL LETTER D WITH TAIL
-\def\dhook {ɗ} % LATIN SMALL LETTER D WITH HOOK
-\def\schwa {ə} % LATIN SMALL LETTER SCHWA
-\def\schwahook {ɚ} % LATIN SMALL LETTER SCHWA WITH HOOK
-\def\dotlessjstroke {ɟ} % LATIN SMALL LETTER DOTLESS J WITH STROKE
-\def\textcircumflex {ˆ} % MODIFIER LETTER CIRCUMFLEX ACCENT
-\def\textcaron {ˇ} % CARON
-\def\textbreve {˘} % BREVE
-\def\textdotaccent {˙} % DOT ABOVE
-\def\textring {˚} % RING ABOVE
-\def\textogonek {˛} % OGONEK
-\def\texttilde {˜} % SMALL TILDE
-\def\texthungarumlaut {˝} % DOUBLE ACUTE ACCENT
-\def\greektonos {΄} % GREEK TONOS
-\def\greekdialytikatonos {΅} % GREEK DIALYTIKA TONOS
-\def\greekAlphatonos {Ά} % GREEK CAPITAL LETTER ALPHA WITH TONOS
-\def\greekEpsilontonos {Έ} % GREEK CAPITAL LETTER EPSILON WITH TONOS
-\def\greekEtatonos {Ή} % GREEK CAPITAL LETTER ETA WITH TONOS
-\def\greekIotatonos {Ί} % GREEK CAPITAL LETTER IOTA WITH TONOS
-\def\greekOmicrontonos {Ό} % GREEK CAPITAL LETTER OMICRON WITH TONOS
-\def\greekUpsilontonos {Ύ} % GREEK CAPITAL LETTER UPSILON WITH TONOS
-\def\greekOmegatonos {Ώ} % GREEK CAPITAL LETTER OMEGA WITH TONOS
-\def\greekiotadialytikatonos {ΐ} % GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
-\def\greekAlpha {Α} % GREEK CAPITAL LETTER ALPHA
-\def\greekBeta {Β} % GREEK CAPITAL LETTER BETA
-\def\greekGamma {Γ} % GREEK CAPITAL LETTER GAMMA
-\def\greekDelta {Δ} % GREEK CAPITAL LETTER DELTA
-\def\greekEpsilon {Ε} % GREEK CAPITAL LETTER EPSILON
-\def\greekZeta {Ζ} % GREEK CAPITAL LETTER ZETA
-\def\greekEta {Η} % GREEK CAPITAL LETTER ETA
-\def\greekTheta {Θ} % GREEK CAPITAL LETTER THETA
-\def\greekIota {Ι} % GREEK CAPITAL LETTER IOTA
-\def\greekKappa {Κ} % GREEK CAPITAL LETTER KAPPA
-\def\greekLambda {Λ} % GREEK CAPITAL LETTER LAMDA
-\def\greekMu {Μ} % GREEK CAPITAL LETTER MU
-\def\greekNu {Ν} % GREEK CAPITAL LETTER NU
-\def\greekXi {Ξ} % GREEK CAPITAL LETTER XI
-\def\greekOmicron {Ο} % GREEK CAPITAL LETTER OMICRON
-\def\greekPi {Π} % GREEK CAPITAL LETTER PI
-\def\greekRho {Ρ} % GREEK CAPITAL LETTER RHO
-\def\greekSigma {Σ} % GREEK CAPITAL LETTER SIGMA
-\def\greekTau {Τ} % GREEK CAPITAL LETTER TAU
-\def\greekUpsilon {Υ} % GREEK CAPITAL LETTER UPSILON
-\def\greekPhi {Φ} % GREEK CAPITAL LETTER PHI
-\def\greekChi {Χ} % GREEK CAPITAL LETTER CHI
-\def\greekPsi {Ψ} % GREEK CAPITAL LETTER PSI
-\def\greekOmega {Ω} % GREEK CAPITAL LETTER OMEGA
-\def\greekIotadialytika {Ϊ} % GREEK CAPITAL LETTER IOTA WITH DIALYTIKA
-\def\greekUpsilondialytika {Ϋ} % GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
-\def\greekalphatonos {ά} % GREEK SMALL LETTER ALPHA WITH TONOS
-\def\greekepsilontonos {έ} % GREEK SMALL LETTER EPSILON WITH TONOS
-\def\greeketatonos {ή} % GREEK SMALL LETTER ETA WITH TONOS
-\def\greekiotatonos {ί} % GREEK SMALL LETTER IOTA WITH TONOS
-\def\greekupsilondialytikatonos {ΰ} % GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
-\def\greekalpha {α} % GREEK SMALL LETTER ALPHA
-\def\greekbeta {β} % GREEK SMALL LETTER BETA
-\def\greekgamma {γ} % GREEK SMALL LETTER GAMMA
-\def\greekdelta {δ} % GREEK SMALL LETTER DELTA
-\def\greekepsilon {ε} % GREEK SMALL LETTER EPSILON
-\def\greekzeta {ζ} % GREEK SMALL LETTER ZETA
-\def\greeketa {η} % GREEK SMALL LETTER ETA
-\def\greektheta {θ} % GREEK SMALL LETTER THETA
-\def\greekiota {ι} % GREEK SMALL LETTER IOTA
-\def\greekkappa {κ} % GREEK SMALL LETTER KAPPA
-\def\greeklambda {λ} % GREEK SMALL LETTER LAMDA
-\def\greekmu {μ} % GREEK SMALL LETTER MU
-\def\greeknu {ν} % GREEK SMALL LETTER NU
-\def\greekxi {ξ} % GREEK SMALL LETTER XI
-\def\greekomicron {ο} % GREEK SMALL LETTER OMICRON
-\def\greekpi {π} % GREEK SMALL LETTER PI
-\def\greekrho {ρ} % GREEK SMALL LETTER RHO
-\def\greekfinalsigma {ς} % GREEK SMALL LETTER FINAL SIGMA
-\def\greeksigma {σ} % GREEK SMALL LETTER SIGMA
-\def\greektau {τ} % GREEK SMALL LETTER TAU
-\def\greekupsilon {υ} % GREEK SMALL LETTER UPSILON
-\def\greekphi {φ} % GREEK SMALL LETTER PHI
-\def\greekchi {χ} % GREEK SMALL LETTER CHI
-\def\greekpsi {ψ} % GREEK SMALL LETTER PSI
-\def\greekomega {ω} % GREEK SMALL LETTER OMEGA
-\def\greekiotadialytika {ϊ} % GREEK SMALL LETTER IOTA WITH DIALYTIKA
-\def\greekupsilondiaeresis {ϋ} % GREEK SMALL LETTER UPSILON WITH DIALYTIKA
-\def\greekomicrontonos {ό} % GREEK SMALL LETTER OMICRON WITH TONOS
-\def\greekupsilontonos {ύ} % GREEK SMALL LETTER UPSILON WITH TONOS
-\def\greekomegatonos {ώ} % GREEK SMALL LETTER OMEGA WITH TONOS
-\def\greekthetaalt {ϑ} % GREEK THETA SYMBOL
-\def\greekphialt {ϕ} % GREEK PHI SYMBOL
-\def\greekpialt {ϖ} % GREEK PI SYMBOL
-\def\greekkoppa {ϙ} % GREEK SMALL LETTER ARCHAIC KOPPA
-\def\greekstigma {ϛ} % GREEK SMALL LETTER STIGMA
-\def\greekdigamma {ϝ} % GREEK SMALL LETTER DIGAMMA
-\def\greeknumkoppa {ϟ} % GREEK SMALL LETTER KOPPA
-\def\greeksampi {ϡ} % GREEK SMALL LETTER SAMPI
-\def\greekrhoalt {ϱ} % GREEK RHO SYMBOL
-\def\greeksigmalunate {ϲ} % GREEK LUNATE SIGMA SYMBOL
-\def\greekepsilonalt {ϵ} % GREEK LUNATE EPSILON SYMBOL
-\def\greekSigmalunate {Ϲ} % GREEK CAPITAL LUNATE SIGMA SYMBOL
-\def\cyrillicEgrave {Ѐ} % CYRILLIC CAPITAL LETTER IE WITH GRAVE
-\def\cyrillicYO {Ё} % CYRILLIC CAPITAL LETTER IO
-\def\cyrillicDJE {Ђ} % CYRILLIC CAPITAL LETTER DJE
-\def\cyrillicGJE {Ѓ} % CYRILLIC CAPITAL LETTER GJE
-\def\cyrillicIE {Є} % CYRILLIC CAPITAL LETTER UKRAINIAN IE
-\def\cyrillicDZE {Ѕ} % CYRILLIC CAPITAL LETTER DZE
-\def\cyrillicII {І} % CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
-\def\cyrillicYI {Ї} % CYRILLIC CAPITAL LETTER YI
-\def\cyrillicJE {Ј} % CYRILLIC CAPITAL LETTER JE
-\def\cyrillicLJE {Љ} % CYRILLIC CAPITAL LETTER LJE
-\def\cyrillicNJE {Њ} % CYRILLIC CAPITAL LETTER NJE
-\def\cyrillicTSHE {Ћ} % CYRILLIC CAPITAL LETTER TSHE
-\def\cyrillicKJE {Ќ} % CYRILLIC CAPITAL LETTER KJE
-\def\cyrillicIgrave {Ѝ} % CYRILLIC CAPITAL LETTER I WITH GRAVE
-\def\cyrillicUSHRT {Ў} % CYRILLIC CAPITAL LETTER SHORT U
-\def\cyrillicDZHE {Џ} % CYRILLIC CAPITAL LETTER DZHE
-\def\cyrillicA {А} % CYRILLIC CAPITAL LETTER A
-\def\cyrillicB {Б} % CYRILLIC CAPITAL LETTER BE
-\def\cyrillicV {В} % CYRILLIC CAPITAL LETTER VE
-\def\cyrillicG {Г} % CYRILLIC CAPITAL LETTER GHE
-\def\cyrillicD {Д} % CYRILLIC CAPITAL LETTER DE
-\def\cyrillicE {Е} % CYRILLIC CAPITAL LETTER IE
-\def\cyrillicZH {Ж} % CYRILLIC CAPITAL LETTER ZHE
-\def\cyrillicZ {З} % CYRILLIC CAPITAL LETTER ZE
-\def\cyrillicI {И} % CYRILLIC CAPITAL LETTER I
-\def\cyrillicISHRT {Й} % CYRILLIC CAPITAL LETTER SHORT I
-\def\cyrillicK {К} % CYRILLIC CAPITAL LETTER KA
-\def\cyrillicL {Л} % CYRILLIC CAPITAL LETTER EL
-\def\cyrillicM {М} % CYRILLIC CAPITAL LETTER EM
-\def\cyrillicN {Н} % CYRILLIC CAPITAL LETTER EN
-\def\cyrillicO {О} % CYRILLIC CAPITAL LETTER O
-\def\cyrillicP {П} % CYRILLIC CAPITAL LETTER PE
-\def\cyrillicR {Р} % CYRILLIC CAPITAL LETTER ER
-\def\cyrillicS {С} % CYRILLIC CAPITAL LETTER ES
-\def\cyrillicT {Т} % CYRILLIC CAPITAL LETTER TE
-\def\cyrillicU {У} % CYRILLIC CAPITAL LETTER U
-\def\cyrillicF {Ф} % CYRILLIC CAPITAL LETTER EF
-\def\cyrillicH {Х} % CYRILLIC CAPITAL LETTER HA
-\def\cyrillicC {Ц} % CYRILLIC CAPITAL LETTER TSE
-\def\cyrillicCH {Ч} % CYRILLIC CAPITAL LETTER CHE
-\def\cyrillicSH {Ш} % CYRILLIC CAPITAL LETTER SHA
-\def\cyrillicSHCH {Щ} % CYRILLIC CAPITAL LETTER SHCHA
-\def\cyrillicHRDSN {Ъ} % CYRILLIC CAPITAL LETTER HARD SIGN
-\def\cyrillicERY {Ы} % CYRILLIC CAPITAL LETTER YERU
-\def\cyrillicSFTSN {Ь} % CYRILLIC CAPITAL LETTER SOFT SIGN
-\def\cyrillicEREV {Э} % CYRILLIC CAPITAL LETTER E
-\def\cyrillicYU {Ю} % CYRILLIC CAPITAL LETTER YU
-\def\cyrillicYA {Я} % CYRILLIC CAPITAL LETTER YA
-\def\cyrillica {а} % CYRILLIC SMALL LETTER A
-\def\cyrillicb {б} % CYRILLIC SMALL LETTER BE
-\def\cyrillicv {в} % CYRILLIC SMALL LETTER VE
-\def\cyrillicg {г} % CYRILLIC SMALL LETTER GHE
-\def\cyrillicd {д} % CYRILLIC SMALL LETTER DE
-\def\cyrillice {е} % CYRILLIC SMALL LETTER IE
-\def\cyrilliczh {ж} % CYRILLIC SMALL LETTER ZHE
-\def\cyrillicz {з} % CYRILLIC SMALL LETTER ZE
-\def\cyrillici {и} % CYRILLIC SMALL LETTER I
-\def\cyrillicishrt {й} % CYRILLIC SMALL LETTER SHORT I
-\def\cyrillick {к} % CYRILLIC SMALL LETTER KA
-\def\cyrillicl {л} % CYRILLIC SMALL LETTER EL
-\def\cyrillicm {м} % CYRILLIC SMALL LETTER EM
-\def\cyrillicn {н} % CYRILLIC SMALL LETTER EN
-\def\cyrillico {о} % CYRILLIC SMALL LETTER O
-\def\cyrillicp {п} % CYRILLIC SMALL LETTER PE
-\def\cyrillicr {р} % CYRILLIC SMALL LETTER ER
-\def\cyrillics {с} % CYRILLIC SMALL LETTER ES
-\def\cyrillict {т} % CYRILLIC SMALL LETTER TE
-\def\cyrillicu {у} % CYRILLIC SMALL LETTER U
-\def\cyrillicf {ф} % CYRILLIC SMALL LETTER EF
-\def\cyrillich {х} % CYRILLIC SMALL LETTER HA
-\def\cyrillicc {ц} % CYRILLIC SMALL LETTER TSE
-\def\cyrillicch {ч} % CYRILLIC SMALL LETTER CHE
-\def\cyrillicsh {ш} % CYRILLIC SMALL LETTER SHA
-\def\cyrillicshch {щ} % CYRILLIC SMALL LETTER SHCHA
-\def\cyrillichrdsn {ъ} % CYRILLIC SMALL LETTER HARD SIGN
-\def\cyrillicery {ы} % CYRILLIC SMALL LETTER YERU
-\def\cyrillicsftsn {ь} % CYRILLIC SMALL LETTER SOFT SIGN
-\def\cyrillicerev {э} % CYRILLIC SMALL LETTER E
-\def\cyrillicyu {ю} % CYRILLIC SMALL LETTER YU
-\def\cyrillicya {я} % CYRILLIC SMALL LETTER YA
-\def\cyrillicegrave {ѐ} % CYRILLIC SMALL LETTER IE WITH GRAVE
-\def\cyrillicyo {ё} % CYRILLIC SMALL LETTER IO
-\def\cyrillicdje {ђ} % CYRILLIC SMALL LETTER DJE
-\def\cyrillicgje {ѓ} % CYRILLIC SMALL LETTER GJE
-\def\cyrillicie {є} % CYRILLIC SMALL LETTER UKRAINIAN IE
-\def\cyrillicdze {ѕ} % CYRILLIC SMALL LETTER DZE
-\def\cyrillicii {і} % CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
-\def\cyrillicyi {ї} % CYRILLIC SMALL LETTER YI
-\def\cyrillicje {ј} % CYRILLIC SMALL LETTER JE
-\def\cyrilliclje {љ} % CYRILLIC SMALL LETTER LJE
-\def\cyrillicnje {њ} % CYRILLIC SMALL LETTER NJE
-\def\cyrillictshe {ћ} % CYRILLIC SMALL LETTER TSHE
-\def\cyrillickje {ќ} % CYRILLIC SMALL LETTER KJE
-\def\cyrillicigrave {ѝ} % CYRILLIC SMALL LETTER I WITH GRAVE
-\def\cyrillicushrt {ў} % CYRILLIC SMALL LETTER SHORT U
-\def\cyrillicdzhe {џ} % CYRILLIC SMALL LETTER DZHE
-\def\cyrillicOMEGA {Ѡ} % CYRILLIC CAPITAL LETTER OMEGA
-\def\cyrillicomega {ѡ} % CYRILLIC SMALL LETTER OMEGA
-\def\cyrillicYAT {Ѣ} % CYRILLIC CAPITAL LETTER YAT
-\def\cyrillicyat {ѣ} % CYRILLIC SMALL LETTER YAT
-\def\cyrillicEiotified {Ѥ} % CYRILLIC CAPITAL LETTER IOTIFIED E
-\def\cyrilliceiotified {ѥ} % CYRILLIC SMALL LETTER IOTIFIED E
-\def\cyrillicLITTLEYUS {Ѧ} % CYRILLIC CAPITAL LETTER LITTLE YUS
-\def\cyrilliclittleyus {ѧ} % CYRILLIC SMALL LETTER LITTLE YUS
-\def\cyrillicLITTLEYUSiotified {Ѩ} % CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS
-\def\cyrilliclittleyusiotified {ѩ} % CYRILLIC SMALL LETTER IOTIFIED LITTLE YUS
-\def\cyrillicBIGYUS {Ѫ} % CYRILLIC CAPITAL LETTER BIG YUS
-\def\cyrillicbigyus {ѫ} % CYRILLIC SMALL LETTER BIG YUS
-\def\cyrillicBIGYUSiotified {Ѭ} % CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS
-\def\cyrillicbigyusiotified {ѭ} % CYRILLIC SMALL LETTER IOTIFIED BIG YUS
-\def\cyrillicKSI {Ѯ} % CYRILLIC CAPITAL LETTER KSI
-\def\cyrillicksi {ѯ} % CYRILLIC SMALL LETTER KSI
-\def\cyrillicPSI {Ѱ} % CYRILLIC CAPITAL LETTER PSI
-\def\cyrillicpsi {ѱ} % CYRILLIC SMALL LETTER PSI
-\def\cyrillicFITA {Ѳ} % CYRILLIC CAPITAL LETTER FITA
-\def\cyrillicfita {ѳ} % CYRILLIC SMALL LETTER FITA
-\def\cyrillicIZHITSA {Ѵ} % CYRILLIC CAPITAL LETTER IZHITSA
-\def\cyrillicizhitsa {ѵ} % CYRILLIC SMALL LETTER IZHITSA
-\def\cyrillicIZHITSAdoublegrave {Ѷ} % CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
-\def\cyrillicizhitsadoublegrave {ѷ} % CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
-\def\cyrillicUK {Ѹ} % CYRILLIC CAPITAL LETTER UK
-\def\cyrillicuk {ѹ} % CYRILLIC SMALL LETTER UK
-\def\cyrillicOMEGAround {Ѻ} % CYRILLIC CAPITAL LETTER ROUND OMEGA
-\def\cyrillicomegaround {ѻ} % CYRILLIC SMALL LETTER ROUND OMEGA
-\def\cyrillicOMEGAtitlo {Ѽ} % CYRILLIC CAPITAL LETTER OMEGA WITH TITLO
-\def\cyrillicomegatitlo {ѽ} % CYRILLIC SMALL LETTER OMEGA WITH TITLO
-\def\cyrillicOT {Ѿ} % CYRILLIC CAPITAL LETTER OT
-\def\cyrillicot {ѿ} % CYRILLIC SMALL LETTER OT
-\def\cyrillicKOPPA {Ҁ} % CYRILLIC CAPITAL LETTER KOPPA
-\def\cyrillickoppa {ҁ} % CYRILLIC SMALL LETTER KOPPA
-\def\cyrillicTITLO {҃} % COMBINING CYRILLIC TITLO
-\def\cyrillicPALATALIZATION {҄} % COMBINING CYRILLIC PALATALIZATION
-\def\cyrillicDASIAPNEUMATA {҅} % COMBINING CYRILLIC DASIA PNEUMATA
-\def\cyrillicPSILIPNEUMATA {҆} % COMBINING CYRILLIC PSILI PNEUMATA
-\def\cyrillicISHRTtail {Ҋ} % CYRILLIC CAPITAL LETTER SHORT I WITH TAIL
-\def\cyrillicishrttail {ҋ} % CYRILLIC SMALL LETTER SHORT I WITH TAIL
-\def\cyrillicSEMISOFT {Ҍ} % CYRILLIC CAPITAL LETTER SEMISOFT SIGN
-\def\cyrillicsemisoft {ҍ} % CYRILLIC SMALL LETTER SEMISOFT SIGN
-\def\cyrillicERtick {Ҏ} % CYRILLIC CAPITAL LETTER ER WITH TICK
-\def\cyrillicertick {ҏ} % CYRILLIC SMALL LETTER ER WITH TICK
-\def\cyrillicGHEupturn {Ґ} % CYRILLIC CAPITAL LETTER GHE WITH UPTURN
-\def\cyrillicgheupturn {ґ} % CYRILLIC SMALL LETTER GHE WITH UPTURN
-\def\cyrillicGHEstroke {Ғ} % CYRILLIC CAPITAL LETTER GHE WITH STROKE
-\def\cyrillicghestroke {ғ} % CYRILLIC SMALL LETTER GHE WITH STROKE
-\def\cyrillicGHEmidhook {Ҕ} % CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK
-\def\cyrillicghemidhook {ҕ} % CYRILLIC SMALL LETTER GHE WITH MIDDLE HOOK
-\def\cyrillicZHEdescender {Җ} % CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER
-\def\cyrilliczhedescender {җ} % CYRILLIC SMALL LETTER ZHE WITH DESCENDER
-\def\cyrillicZDSC {Ҙ} % CYRILLIC CAPITAL LETTER ZE WITH DESCENDER
-\def\cyrilliczdsc {ҙ} % CYRILLIC SMALL LETTER ZE WITH DESCENDER
-\def\cyrillicKADC {Қ} % CYRILLIC CAPITAL LETTER KA WITH DESCENDER
-\def\cyrillickadc {қ} % CYRILLIC SMALL LETTER KA WITH DESCENDER
-\def\cyrillicKAvertstroke {Ҝ} % CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE
-\def\cyrillickavertstroke {ҝ} % CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE
-\def\cyrillicKAstroke {Ҟ} % CYRILLIC CAPITAL LETTER KA WITH STROKE
-\def\cyrillickastroke {ҟ} % CYRILLIC SMALL LETTER KA WITH STROKE
-\def\cyrillicKAbashkir {Ҡ} % CYRILLIC CAPITAL LETTER BASHKIR KA
-\def\cyrillickabashkir {ҡ} % CYRILLIC SMALL LETTER BASHKIR KA
-\def\cyrillicENDC {Ң} % CYRILLIC CAPITAL LETTER EN WITH DESCENDER
-\def\cyrillicendc {ң} % CYRILLIC SMALL LETTER EN WITH DESCENDER
-\def\cyrillicENGHE {Ҥ} % CYRILLIC CAPITAL LIGATURE EN GHE
-\def\cyrillicenghe {ҥ} % CYRILLIC SMALL LIGATURE EN GHE
-\def\cyrillicPEmidhook {Ҧ} % CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK
-\def\cyrillicpemidhook {ҧ} % CYRILLIC SMALL LETTER PE WITH MIDDLE HOOK
-\def\cyrillicHA {Ҩ} % CYRILLIC CAPITAL LETTER ABKHASIAN HA
-\def\cyrillicha {ҩ} % CYRILLIC SMALL LETTER ABKHASIAN HA
-\def\cyrillicSDSC {Ҫ} % CYRILLIC CAPITAL LETTER ES WITH DESCENDER
-\def\cyrillicsdsc {ҫ} % CYRILLIC SMALL LETTER ES WITH DESCENDER
-\def\cyrillicTEDC {Ҭ} % CYRILLIC CAPITAL LETTER TE WITH DESCENDER
-\def\cyrillictedc {ҭ} % CYRILLIC SMALL LETTER TE WITH DESCENDER
-\def\cyrillicYstr {Ү} % CYRILLIC CAPITAL LETTER STRAIGHT U
-\def\cyrillicystr {ү} % CYRILLIC SMALL LETTER STRAIGHT U
-\def\cyrillicYstrstroke {Ұ} % CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE
-\def\cyrillicystrstroke {ұ} % CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE
-\def\cyrillicHADC {Ҳ} % CYRILLIC CAPITAL LETTER HA WITH DESCENDER
-\def\cyrillichadc {ҳ} % CYRILLIC SMALL LETTER HA WITH DESCENDER
-\def\cyrillicTETSE {Ҵ} % CYRILLIC CAPITAL LIGATURE TE TSE
-\def\cyrillictetse {ҵ} % CYRILLIC SMALL LIGATURE TE TSE
-\def\cyrillicCHEDC {Ҷ} % CYRILLIC CAPITAL LETTER CHE WITH DESCENDER
-\def\cyrillicchedc {ҷ} % CYRILLIC SMALL LETTER CHE WITH DESCENDER
-\def\cyrillicCHEvertstroke {Ҹ} % CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE
-\def\cyrillicchevertstroke {ҹ} % CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE
-\def\cyrillicSHHA {Һ} % CYRILLIC CAPITAL LETTER SHHA
-\def\cyrillicshha {һ} % CYRILLIC SMALL LETTER SHHA
-\def\cyrillicCHEabkhasian {Ҽ} % CYRILLIC CAPITAL LETTER ABKHASIAN CHE
-\def\cyrilliccheabkhasian {ҽ} % CYRILLIC SMALL LETTER ABKHASIAN CHE
-\def\cyrillicCHEDCabkhasian {Ҿ} % CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER
-\def\cyrillicchedcabkhasian {ҿ} % CYRILLIC SMALL LETTER ABKHASIAN CHE WITH DESCENDER
-\def\cyrillicPALOCHKA {Ӏ} % CYRILLIC LETTER PALOCHKA
-\def\cyrillicZHEbreve {Ӂ} % CYRILLIC CAPITAL LETTER ZHE WITH BREVE
-\def\cyrilliczhebreve {ӂ} % CYRILLIC SMALL LETTER ZHE WITH BREVE
-\def\cyrillicKAhook {Ӄ} % CYRILLIC CAPITAL LETTER KA WITH HOOK
-\def\cyrillickahook {ӄ} % CYRILLIC SMALL LETTER KA WITH HOOK
-\def\cyrillicELtail {Ӆ} % CYRILLIC CAPITAL LETTER EL WITH TAIL
-\def\cyrilliceltail {ӆ} % CYRILLIC SMALL LETTER EL WITH TAIL
-\def\cyrillicENhook {Ӈ} % CYRILLIC CAPITAL LETTER EN WITH HOOK
-\def\cyrillicenhook {ӈ} % CYRILLIC SMALL LETTER EN WITH HOOK
-\def\cyrillicENtail {Ӊ} % CYRILLIC CAPITAL LETTER EN WITH TAIL
-\def\cyrillicentail {ӊ} % CYRILLIC SMALL LETTER EN WITH TAIL
-\def\cyrillicCHEkhakassian {Ӌ} % CYRILLIC CAPITAL LETTER KHAKASSIAN CHE
-\def\cyrillicchekhakassian {ӌ} % CYRILLIC SMALL LETTER KHAKASSIAN CHE
-\def\cyrillicEMtail {Ӎ} % CYRILLIC CAPITAL LETTER EM WITH TAIL
-\def\cyrillicemtail {ӎ} % CYRILLIC SMALL LETTER EM WITH TAIL
-\def\cyrillicAbreve {Ӑ} % CYRILLIC CAPITAL LETTER A WITH BREVE
-\def\cyrillicabreve {ӑ} % CYRILLIC SMALL LETTER A WITH BREVE
-\def\cyrillicAdiaeresis {Ӓ} % CYRILLIC CAPITAL LETTER A WITH DIAERESIS
-\def\cyrillicadiaeresis {ӓ} % CYRILLIC SMALL LETTER A WITH DIAERESIS
-\def\cyrillicAE {Ӕ} % CYRILLIC CAPITAL LIGATURE A IE
-\def\cyrillicae {ӕ} % CYRILLIC SMALL LIGATURE A IE
-\def\cyrillicEbreve {Ӗ} % CYRILLIC CAPITAL LETTER IE WITH BREVE
-\def\cyrillicebreve {ӗ} % CYRILLIC SMALL LETTER IE WITH BREVE
-\def\cyrillicSCHWA {Ә} % CYRILLIC CAPITAL LETTER SCHWA
-\def\cyrillicschwa {ә} % CYRILLIC SMALL LETTER SCHWA
-\def\cyrillicSCHWAdiaeresis {Ӛ} % CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS
-\def\cyrillicschwadiaeresis {ӛ} % CYRILLIC SMALL LETTER SCHWA WITH DIAERESIS
-\def\cyrillicZHEdiaeresis {Ӝ} % CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS
-\def\cyrilliczhediaeresis {ӝ} % CYRILLIC SMALL LETTER ZHE WITH DIAERESIS
-\def\cyrillicZEdiaeresis {Ӟ} % CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS
-\def\cyrilliczediaeresis {ӟ} % CYRILLIC SMALL LETTER ZE WITH DIAERESIS
-\def\cyrillicDZEabkhasian {Ӡ} % CYRILLIC CAPITAL LETTER ABKHASIAN DZE
-\def\cyrillicdzeabkhasian {ӡ} % CYRILLIC SMALL LETTER ABKHASIAN DZE
-\def\cyrillicImacron {Ӣ} % CYRILLIC CAPITAL LETTER I WITH MACRON
-\def\cyrillicimacron {ӣ} % CYRILLIC SMALL LETTER I WITH MACRON
-\def\cyrillicIdiaeresis {Ӥ} % CYRILLIC CAPITAL LETTER I WITH DIAERESIS
-\def\cyrillicidiaeresis {ӥ} % CYRILLIC SMALL LETTER I WITH DIAERESIS
-\def\cyrillicOdiaeresis {Ӧ} % CYRILLIC CAPITAL LETTER O WITH DIAERESIS
-\def\cyrillicodiaeresis {ӧ} % CYRILLIC SMALL LETTER O WITH DIAERESIS
-\def\cyrillicObarred {Ө} % CYRILLIC CAPITAL LETTER BARRED O
-\def\cyrillicobarred {ө} % CYRILLIC SMALL LETTER BARRED O
-\def\cyrillicObarreddiaeresis {Ӫ} % CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS
-\def\cyrillicobarreddiaeresis {ӫ} % CYRILLIC SMALL LETTER BARRED O WITH DIAERESIS
-\def\cyrillicEdiaeresis {Ӭ} % CYRILLIC CAPITAL LETTER E WITH DIAERESIS
-\def\cyrillicediaeresis {ӭ} % CYRILLIC SMALL LETTER E WITH DIAERESIS
-\def\cyrillicUmacron {Ӯ} % CYRILLIC CAPITAL LETTER U WITH MACRON
-\def\cyrillicumacron {ӯ} % CYRILLIC SMALL LETTER U WITH MACRON
-\def\cyrillicUdiaeresis {Ӱ} % CYRILLIC CAPITAL LETTER U WITH DIAERESIS
-\def\cyrillicudiaeresis {ӱ} % CYRILLIC SMALL LETTER U WITH DIAERESIS
-\def\cyrillicUdoubleacute {Ӳ} % CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE
-\def\cyrillicudoubleacute {ӳ} % CYRILLIC SMALL LETTER U WITH DOUBLE ACUTE
-\def\cyrillicCHEdiaeresis {Ӵ} % CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS
-\def\cyrillicchediaeresis {ӵ} % CYRILLIC SMALL LETTER CHE WITH DIAERESIS
-\def\cyrillicYERUdiaeresis {Ӹ} % CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS
-\def\cyrillicyerudiaeresis {ӹ} % CYRILLIC SMALL LETTER YERU WITH DIAERESIS
-\def\hebrewAlef {א} % HEBREW LETTER ALEF
-\def\hebrewBet {ב} % HEBREW LETTER BET
-\def\hebrewGimel {ג} % HEBREW LETTER GIMEL
-\def\hebrewDalet {ד} % HEBREW LETTER DALET
-\def\hebrewHe {ה} % HEBREW LETTER HE
-\def\hebrewVav {ו} % HEBREW LETTER VAV
-\def\hebrewZayin {ז} % HEBREW LETTER ZAYIN
-\def\hebrewHet {ח} % HEBREW LETTER HET
-\def\hebrewTet {ט} % HEBREW LETTER TET
-\def\hebrewYod {י} % HEBREW LETTER YOD
-\def\hebrewKaffinal {ך} % HEBREW LETTER FINAL KAF
-\def\hebrewKaf {כ} % HEBREW LETTER KAF
-\def\hebrewLamed {ל} % HEBREW LETTER LAMED
-\def\hebrewMemfinal {ם} % HEBREW LETTER FINAL MEM
-\def\hebrewMem {מ} % HEBREW LETTER MEM
-\def\hebrewNunfinal {ן} % HEBREW LETTER FINAL NUN
-\def\hebrewNun {נ} % HEBREW LETTER NUN
-\def\hebrewSamekh {ס} % HEBREW LETTER SAMEKH
-\def\hebrewAyin {ע} % HEBREW LETTER AYIN
-\def\hebrewPefinal {ף} % HEBREW LETTER FINAL PE
-\def\hebrewPe {פ} % HEBREW LETTER PE
-\def\hebrewTsadifinal {ץ} % HEBREW LETTER FINAL TSADI
-\def\hebrewTsadi {צ} % HEBREW LETTER TSADI
-\def\hebrewQof {ק} % HEBREW LETTER QOF
-\def\hebrewResh {ר} % HEBREW LETTER RESH
-\def\hebrewShin {ש} % HEBREW LETTER SHIN
-\def\hebrewTav {ת} % HEBREW LETTER TAV
-\def\Adotbelow {Ạ} % LATIN CAPITAL LETTER A WITH DOT BELOW
-\def\adotbelow {ạ} % LATIN SMALL LETTER A WITH DOT BELOW
-\def\Ahook {Ả} % LATIN CAPITAL LETTER A WITH HOOK ABOVE
-\def\ahook {ả} % LATIN SMALL LETTER A WITH HOOK ABOVE
-\def\Acircumflexacute {Ấ} % LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE
-\def\acircumflexacute {ấ} % LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE
-\def\Acircumflexgrave {Ầ} % LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE
-\def\acircumflexgrave {ầ} % LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE
-\def\Acircumflexhook {Ẩ} % LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
-\def\acircumflexhook {ẩ} % LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
-\def\Acircumflextilde {Ẫ} % LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE
-\def\acircumflextilde {ẫ} % LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE
-\def\Acircumflexdotbelow {Ậ} % LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW
-\def\acircumflexdotbelow {ậ} % LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW
-\def\Abreveacute {Ắ} % LATIN CAPITAL LETTER A WITH BREVE AND ACUTE
-\def\abreveacute {ắ} % LATIN SMALL LETTER A WITH BREVE AND ACUTE
-\def\Abrevegrave {Ằ} % LATIN CAPITAL LETTER A WITH BREVE AND GRAVE
-\def\abrevegrave {ằ} % LATIN SMALL LETTER A WITH BREVE AND GRAVE
-\def\Abrevehook {Ẳ} % LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE
-\def\abrevehook {ẳ} % LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE
-\def\Abrevetilde {Ẵ} % LATIN CAPITAL LETTER A WITH BREVE AND TILDE
-\def\abrevetilde {ẵ} % LATIN SMALL LETTER A WITH BREVE AND TILDE
-\def\Abrevedotbelow {Ặ} % LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW
-\def\abrevedotbelow {ặ} % LATIN SMALL LETTER A WITH BREVE AND DOT BELOW
-\def\Edotbelow {Ẹ} % LATIN CAPITAL LETTER E WITH DOT BELOW
-\def\edotbelow {ẹ} % LATIN SMALL LETTER E WITH DOT BELOW
-\def\Ehook {Ẻ} % LATIN CAPITAL LETTER E WITH HOOK ABOVE
-\def\ehook {ẻ} % LATIN SMALL LETTER E WITH HOOK ABOVE
-\def\Etilde {Ẽ} % LATIN CAPITAL LETTER E WITH TILDE
-\def\etilde {ẽ} % LATIN SMALL LETTER E WITH TILDE
-\def\Ecircumflexacute {Ế} % LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE
-\def\ecircumflexacute {ế} % LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE
-\def\Ecircumflexgrave {Ề} % LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE
-\def\ecircumflexgrave {ề} % LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE
-\def\Ecircumflexhook {Ể} % LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
-\def\ecircumflexhook {ể} % LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
-\def\Ecircumflextilde {Ễ} % LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE
-\def\ecircumflextilde {ễ} % LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE
-\def\Ecircumflexdotbelow {Ệ} % LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW
-\def\ecircumflexdotbelow {ệ} % LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW
-\def\Ihook {Ỉ} % LATIN CAPITAL LETTER I WITH HOOK ABOVE
-\def\ihook {ỉ} % LATIN SMALL LETTER I WITH HOOK ABOVE
-\def\Idotbelow {Ị} % LATIN CAPITAL LETTER I WITH DOT BELOW
-\def\idotbelow {ị} % LATIN SMALL LETTER I WITH DOT BELOW
-\def\Odotbelow {Ọ} % LATIN CAPITAL LETTER O WITH DOT BELOW
-\def\odotbelow {ọ} % LATIN SMALL LETTER O WITH DOT BELOW
-\def\Ohook {Ỏ} % LATIN CAPITAL LETTER O WITH HOOK ABOVE
-\def\ohook {ỏ} % LATIN SMALL LETTER O WITH HOOK ABOVE
-\def\Ocircumflexacute {Ố} % LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE
-\def\ocircumflexacute {ố} % LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE
-\def\Ocircumflexgrave {Ồ} % LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE
-\def\ocircumflexgrave {ồ} % LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE
-\def\Ocircumflexhook {Ổ} % LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE
-\def\ocircumflexhook {ổ} % LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE
-\def\Ocircumflextilde {Ỗ} % LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE
-\def\ocircumflextilde {ỗ} % LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE
-\def\Ocircumflexdotbelow {Ộ} % LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW
-\def\ocircumflexdotbelow {ộ} % LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW
-\def\Ohornacute {Ớ} % LATIN CAPITAL LETTER O WITH HORN AND ACUTE
-\def\ohornacute {ớ} % LATIN SMALL LETTER O WITH HORN AND ACUTE
-\def\Ohorngrave {Ờ} % LATIN CAPITAL LETTER O WITH HORN AND GRAVE
-\def\ohorngrave {ờ} % LATIN SMALL LETTER O WITH HORN AND GRAVE
-\def\Ohornhook {Ở} % LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE
-\def\ohornhook {ở} % LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE
-\def\Ohorntilde {Ỡ} % LATIN CAPITAL LETTER O WITH HORN AND TILDE
-\def\ohorntilde {ỡ} % LATIN SMALL LETTER O WITH HORN AND TILDE
-\def\Ohorndotbelow {Ợ} % LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW
-\def\ohorndotbelow {ợ} % LATIN SMALL LETTER O WITH HORN AND DOT BELOW
-\def\Udotbelow {Ụ} % LATIN CAPITAL LETTER U WITH DOT BELOW
-\def\udotbelow {ụ} % LATIN SMALL LETTER U WITH DOT BELOW
-\def\Uhook {Ủ} % LATIN CAPITAL LETTER U WITH HOOK ABOVE
-\def\uhook {ủ} % LATIN SMALL LETTER U WITH HOOK ABOVE
-\def\Uhornacute {Ứ} % LATIN CAPITAL LETTER U WITH HORN AND ACUTE
-\def\uhornacute {ứ} % LATIN SMALL LETTER U WITH HORN AND ACUTE
-\def\Uhorngrave {Ừ} % LATIN CAPITAL LETTER U WITH HORN AND GRAVE
-\def\uhorngrave {ừ} % LATIN SMALL LETTER U WITH HORN AND GRAVE
-\def\Uhornhook {Ử} % LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE
-\def\uhornhook {ử} % LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE
-\def\Uhorntilde {Ữ} % LATIN CAPITAL LETTER U WITH HORN AND TILDE
-\def\uhorntilde {ữ} % LATIN SMALL LETTER U WITH HORN AND TILDE
-\def\Uhorndotbelow {Ự} % LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW
-\def\uhorndotbelow {ự} % LATIN SMALL LETTER U WITH HORN AND DOT BELOW
-\def\Ygrave {Ỳ} % LATIN CAPITAL LETTER Y WITH GRAVE
-\def\ygrave {ỳ} % LATIN SMALL LETTER Y WITH GRAVE
-\def\Ydotbelow {Ỵ} % LATIN CAPITAL LETTER Y WITH DOT BELOW
-\def\ydotbelow {ỵ} % LATIN SMALL LETTER Y WITH DOT BELOW
-\def\Yhook {Ỷ} % LATIN CAPITAL LETTER Y WITH HOOK ABOVE
-\def\yhook {ỷ} % LATIN SMALL LETTER Y WITH HOOK ABOVE
-\def\Ytilde {Ỹ} % LATIN CAPITAL LETTER Y WITH TILDE
-\def\ytilde {ỹ} % LATIN SMALL LETTER Y WITH TILDE
-\def\greekalphapsili {ἀ} % GREEK SMALL LETTER ALPHA WITH PSILI
-\def\greekalphadasia {ἁ} % GREEK SMALL LETTER ALPHA WITH DASIA
-\def\greekalphapsilivaria {ἂ} % GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA
-\def\greekalphadasiavaria {ἃ} % GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA
-\def\greekalphapsilitonos {ἄ} % GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA
-\def\greekalphadasiatonos {ἅ} % GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA
-\def\greekalphapsiliperispomeni {ἆ} % GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI
-\def\greekalphadasiaperispomeni {ἇ} % GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI
-\def\greekAlphapsili {Ἀ} % GREEK CAPITAL LETTER ALPHA WITH PSILI
-\def\greekAlphadasia {Ἁ} % GREEK CAPITAL LETTER ALPHA WITH DASIA
-\def\greekAlphapsilivaria {Ἂ} % GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA
-\def\greekAlphadasiavaria {Ἃ} % GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA
-\def\greekAlphapsilitonos {Ἄ} % GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA
-\def\greekAlphadasiatonos {Ἅ} % GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA
-\def\greekAlphapsiliperispomeni {Ἆ} % GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI
-\def\greekAlphadasiaperispomeni {Ἇ} % GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI
-\def\greekepsilonpsili {ἐ} % GREEK SMALL LETTER EPSILON WITH PSILI
-\def\greekepsilondasia {ἑ} % GREEK SMALL LETTER EPSILON WITH DASIA
-\def\greekepsilonpsilivaria {ἒ} % GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA
-\def\greekepsilondasiavaria {ἓ} % GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA
-\def\greekepsilonpsilitonos {ἔ} % GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA
-\def\greekepsilondasiatonos {ἕ} % GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA
-\def\greekEpsilonpsili {Ἐ} % GREEK CAPITAL LETTER EPSILON WITH PSILI
-\def\greekEpsilondasia {Ἑ} % GREEK CAPITAL LETTER EPSILON WITH DASIA
-\def\greekEpsilonpsilivaria {Ἒ} % GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA
-\def\greekEpsilondasiavaria {Ἓ} % GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA
-\def\greekEpsilonpsilitonos {Ἔ} % GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA
-\def\greekEpsilondasiatonos {Ἕ} % GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA
-\def\greeketapsili {ἠ} % GREEK SMALL LETTER ETA WITH PSILI
-\def\greeketadasia {ἡ} % GREEK SMALL LETTER ETA WITH DASIA
-\def\greeketapsilivaria {ἢ} % GREEK SMALL LETTER ETA WITH PSILI AND VARIA
-\def\greeketadasiavaria {ἣ} % GREEK SMALL LETTER ETA WITH DASIA AND VARIA
-\def\greeketapsilitonos {ἤ} % GREEK SMALL LETTER ETA WITH PSILI AND OXIA
-\def\greeketadasiatonos {ἥ} % GREEK SMALL LETTER ETA WITH DASIA AND OXIA
-\def\greeketapsiliperispomeni {ἦ} % GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI
-\def\greeketadasiaperispomeni {ἧ} % GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI
-\def\greekEtapsili {Ἠ} % GREEK CAPITAL LETTER ETA WITH PSILI
-\def\greekEtadasia {Ἡ} % GREEK CAPITAL LETTER ETA WITH DASIA
-\def\greekEtapsilivaria {Ἢ} % GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA
-\def\greekEtadasiavaria {Ἣ} % GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA
-\def\greekEtapsilitonos {Ἤ} % GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA
-\def\greekEtadasiatonos {Ἥ} % GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA
-\def\greekEtapsiliperispomeni {Ἦ} % GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI
-\def\greekEtadasiaperispomeni {Ἧ} % GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI
-\def\greekiotapsili {ἰ} % GREEK SMALL LETTER IOTA WITH PSILI
-\def\greekiotadasia {ἱ} % GREEK SMALL LETTER IOTA WITH DASIA
-\def\greekiotapsilivaria {ἲ} % GREEK SMALL LETTER IOTA WITH PSILI AND VARIA
-\def\greekiotadasiavaria {ἳ} % GREEK SMALL LETTER IOTA WITH DASIA AND VARIA
-\def\greekiotapsilitonos {ἴ} % GREEK SMALL LETTER IOTA WITH PSILI AND OXIA
-\def\greekiotadasiatonos {ἵ} % GREEK SMALL LETTER IOTA WITH DASIA AND OXIA
-\def\greekiotapsiliperispomeni {ἶ} % GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI
-\def\greekiotadasiaperispomeni {ἷ} % GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI
-\def\greekIotapsili {Ἰ} % GREEK CAPITAL LETTER IOTA WITH PSILI
-\def\greekIotadasia {Ἱ} % GREEK CAPITAL LETTER IOTA WITH DASIA
-\def\greekIotapsilivaria {Ἲ} % GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA
-\def\greekIotadasiavaria {Ἳ} % GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA
-\def\greekIotapsilitonos {Ἴ} % GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA
-\def\greekIotadasiatonos {Ἵ} % GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA
-\def\greekIotapsiliperispomeni {Ἶ} % GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI
-\def\greekIotadasiaperispomeni {Ἷ} % GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI
-\def\greekomicronpsili {ὀ} % GREEK SMALL LETTER OMICRON WITH PSILI
-\def\greekomicrondasia {ὁ} % GREEK SMALL LETTER OMICRON WITH DASIA
-\def\greekomicronpsilivaria {ὂ} % GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA
-\def\greekomicrondasiavaria {ὃ} % GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA
-\def\greekomicronpsilitonos {ὄ} % GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA
-\def\greekomicrondasiatonos {ὅ} % GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA
-\def\greekOmicronpsili {Ὀ} % GREEK CAPITAL LETTER OMICRON WITH PSILI
-\def\greekOmicrondasia {Ὁ} % GREEK CAPITAL LETTER OMICRON WITH DASIA
-\def\greekOmicronpsilivaria {Ὂ} % GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA
-\def\greekOmicrondasiavaria {Ὃ} % GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA
-\def\greekOmicronpsilitonos {Ὄ} % GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA
-\def\greekOmicrondasiatonos {Ὅ} % GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA
-\def\greekupsilonpsili {ὐ} % GREEK SMALL LETTER UPSILON WITH PSILI
-\def\greekupsilondasia {ὑ} % GREEK SMALL LETTER UPSILON WITH DASIA
-\def\greekupsilonpsilivaria {ὒ} % GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA
-\def\greekupsilondasiavaria {ὓ} % GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA
-\def\greekupsilonpsilitonos {ὔ} % GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA
-\def\greekupsilondasiatonos {ὕ} % GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA
-\def\greekupsilonpsiliperispomeni {ὖ} % GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI
-\def\greekupsilondasiaperispomeni {ὗ} % GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI
-\def\greekUpsilondasia {Ὑ} % GREEK CAPITAL LETTER UPSILON WITH DASIA
-\def\greekUpsilondasiavaria {Ὓ} % GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA
-\def\greekUpsilondasiatonos {Ὕ} % GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA
-\def\greekUpsilondasiaperispomeni {Ὗ} % GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI
-\def\greekomegapsili {ὠ} % GREEK SMALL LETTER OMEGA WITH PSILI
-\def\greekomegadasia {ὡ} % GREEK SMALL LETTER OMEGA WITH DASIA
-\def\greekomegapsilivaria {ὢ} % GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA
-\def\greekomegadasiavaria {ὣ} % GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA
-\def\greekomegapsilitonos {ὤ} % GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA
-\def\greekomegadasiatonos {ὥ} % GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA
-\def\greekomegapsiliperispomeni {ὦ} % GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI
-\def\greekomegadasiaperispomeni {ὧ} % GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI
-\def\greekOmegapsili {Ὠ} % GREEK CAPITAL LETTER OMEGA WITH PSILI
-\def\greekOmegadasia {Ὡ} % GREEK CAPITAL LETTER OMEGA WITH DASIA
-\def\greekOmegapsilivaria {Ὢ} % GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA
-\def\greekOmegadasiavaria {Ὣ} % GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA
-\def\greekOmegapsilitonos {Ὤ} % GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA
-\def\greekOmegadasiatonos {Ὥ} % GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA
-\def\greekOmegapsiliperispomeni {Ὦ} % GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI
-\def\greekOmegadasiaperispomeni {Ὧ} % GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI
-\def\greekalphavaria {ὰ} % GREEK SMALL LETTER ALPHA WITH VARIA
-\def\greekalphaoxia {ά} % GREEK SMALL LETTER ALPHA WITH OXIA
-\def\greekepsilonvaria {ὲ} % GREEK SMALL LETTER EPSILON WITH VARIA
-\def\greekepsilonoxia {έ} % GREEK SMALL LETTER EPSILON WITH OXIA
-\def\greeketavaria {ὴ} % GREEK SMALL LETTER ETA WITH VARIA
-\def\greeketaoxia {ή} % GREEK SMALL LETTER ETA WITH OXIA
-\def\greekiotavaria {ὶ} % GREEK SMALL LETTER IOTA WITH VARIA
-\def\greekiotaoxia {ί} % GREEK SMALL LETTER IOTA WITH OXIA
-\def\greekomicronvaria {ὸ} % GREEK SMALL LETTER OMICRON WITH VARIA
-\def\greekomicronoxia {ό} % GREEK SMALL LETTER OMICRON WITH OXIA
-\def\greekupsilonvaria {ὺ} % GREEK SMALL LETTER UPSILON WITH VARIA
-\def\greekupsilonoxia {ύ} % GREEK SMALL LETTER UPSILON WITH OXIA
-\def\greekomegavaria {ὼ} % GREEK SMALL LETTER OMEGA WITH VARIA
-\def\greekomegaoxia {ώ} % GREEK SMALL LETTER OMEGA WITH OXIA
-\def\greekalphaiotasubpsili {ᾀ} % GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI
-\def\greekalphaiotasubdasia {ᾁ} % GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI
-\def\greekalphaiotasubpsilivaria {ᾂ} % GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI
-\def\greekalphaiotasubdasiavaria {ᾃ} % GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI
-\def\greekalphaiotasubpsilitonos {ᾄ} % GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI
-\def\greekalphaiotasubdasiatonos {ᾅ} % GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI
-\def\greekalphaiotasubpsiliperispomeni{ᾆ} % GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
-\def\greekalphaiotasubdasiaperispomeni{ᾇ} % GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
-\def\greekAlphaiotasubpsili {ᾈ} % GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI
-\def\greekAlphaiotasubdasia {ᾉ} % GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI
-\def\greekAlphaiotasubpsilivaria {ᾊ} % GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI
-\def\greekAlphaiotasubdasiavaria {ᾋ} % GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI
-\def\greekAlphaiotasubpsilitonos {ᾌ} % GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI
-\def\greekAlphaiotasubdasiatonos {ᾍ} % GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI
-\def\greekAlphaiotasubpsiliperispomeni{ᾎ} % GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
-\def\greekAlphaiotasubdasiaperispomeni{ᾏ} % GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
-\def\greeketaiotasubpsili {ᾐ} % GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI
-\def\greeketaiotasubdasia {ᾑ} % GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI
-\def\greeketaiotasubpsilivaria {ᾒ} % GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI
-\def\greeketaiotasubdasiavaria {ᾓ} % GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI
-\def\greeketaiotasubpsilitonos {ᾔ} % GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI
-\def\greeketaiotasubdasiatonos {ᾕ} % GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI
-\def\greeketaiotasubpsiliperispomeni {ᾖ} % GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
-\def\greeketaiotasubdasiaperispomeni {ᾗ} % GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
-\def\greekEtaiotasubpsili {ᾘ} % GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI
-\def\greekEtaiotasubdasia {ᾙ} % GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI
-\def\greekEtaiotasubpsilivaria {ᾚ} % GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI
-\def\greekEtaiotasubdasiavaria {ᾛ} % GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI
-\def\greekEtaiotasubpsilitonos {ᾜ} % GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI
-\def\greekEtaiotasubdasiatonos {ᾝ} % GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI
-\def\greekEtaiotasubpsiliperispomeni {ᾞ} % GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
-\def\greekEtaiotasubdasiaperispomeni {ᾟ} % GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
-\def\greekomegaiotasubpsili {ᾠ} % GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI
-\def\greekomegaiotasubdasia {ᾡ} % GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI
-\def\greekomegaiotasubpsilivaria {ᾢ} % GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI
-\def\greekomegaiotasubdasiavaria {ᾣ} % GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI
-\def\greekomegaiotasubpsilitonos {ᾤ} % GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI
-\def\greekomegaiotasubdasiatonos {ᾥ} % GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI
-\def\greekomegaiotasubpsiliperispomeni{ᾦ} % GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
-\def\greekomegaiotasubdasiaperispomeni{ᾧ} % GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
-\def\greekOmegaiotasubpsili {ᾨ} % GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI
-\def\greekOmegaiotasubdasia {ᾩ} % GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI
-\def\greekOmegaiotasubpsilivaria {ᾪ} % GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI
-\def\greekOmegaiotasubdasiavaria {ᾫ} % GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI
-\def\greekOmegaiotasubpsilitonos {ᾬ} % GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI
-\def\greekOmegaiotasubdasiatonos {ᾭ} % GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI
-\def\greekOmegaiotasubpsiliperispomeni{ᾮ} % GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
-\def\greekOmegaiotasubdasiaperispomeni{ᾯ} % GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
-\def\greekalphavrachy {ᾰ} % GREEK SMALL LETTER ALPHA WITH VRACHY
-\def\greekalphamacron {ᾱ} % GREEK SMALL LETTER ALPHA WITH MACRON
-\def\greekalphaiotasubvaria {ᾲ} % GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI
-\def\greekalphaiotasub {ᾳ} % GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI
-\def\greekalphaiotasubtonos {ᾴ} % GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI
-\def\greekalphaperispomeni {ᾶ} % GREEK SMALL LETTER ALPHA WITH PERISPOMENI
-\def\greekalphaiotasubperispomeni {ᾷ} % GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI
-\def\greekAlphavrachy {Ᾰ} % GREEK CAPITAL LETTER ALPHA WITH VRACHY
-\def\greekAlphamacron {Ᾱ} % GREEK CAPITAL LETTER ALPHA WITH MACRON
-\def\greekAlphavaria {Ὰ} % GREEK CAPITAL LETTER ALPHA WITH VARIA
-\def\greekAlphatonos {Ά} % GREEK CAPITAL LETTER ALPHA WITH OXIA
-\def\greekAlphaiotasub {ᾼ} % GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI
-\def\greekCoronis {᾽} % GREEK KORONIS
-\def\greekprosgegrammeni {ι} % GREEK PROSGEGRAMMENI
-\def\greekpsili {᾿} % GREEK PSILI
-\def\greekperispomeni {῀} % GREEK PERISPOMENI
-\def\greekdialytikaperispomeni {῁} % GREEK DIALYTIKA AND PERISPOMENI
-\def\greeketaiotasubvaria {ῂ} % GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI
-\def\greeketaiotasub {ῃ} % GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI
-\def\greeketaiotasubtonos {ῄ} % GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI
-\def\greeketaperispomeni {ῆ} % GREEK SMALL LETTER ETA WITH PERISPOMENI
-\def\greeketaiotasubperispomeni {ῇ} % GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI
-\def\greekEpsilonvaria {Ὲ} % GREEK CAPITAL LETTER EPSILON WITH VARIA
-\def\greekEpsilontonos {Έ} % GREEK CAPITAL LETTER EPSILON WITH OXIA
-\def\greekEtavaria {Ὴ} % GREEK CAPITAL LETTER ETA WITH VARIA
-\def\greekEtatonos {Ή} % GREEK CAPITAL LETTER ETA WITH OXIA
-\def\greekEtaiotasub {ῌ} % GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI
-\def\greekpsilivaria {῍} % GREEK PSILI AND VARIA
-\def\greekpsilitonos {῎} % GREEK PSILI AND OXIA
-\def\greekpsiliperispomeni {῏} % GREEK PSILI AND PERISPOMENI
-\def\greekiotavrachy {ῐ} % GREEK SMALL LETTER IOTA WITH VRACHY
-\def\greekiotamacron {ῑ} % GREEK SMALL LETTER IOTA WITH MACRON
-\def\greekiotadialytikavaria {ῒ} % GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA
-\def\greekiotadialytikatonos {ΐ} % GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
-\def\greekiotaperispomeni {ῖ} % GREEK SMALL LETTER IOTA WITH PERISPOMENI
-\def\greekiotadialytikaperispomeni {ῗ} % GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI
-\def\greekIotavrachy {Ῐ} % GREEK CAPITAL LETTER IOTA WITH VRACHY
-\def\greekIotamacron {Ῑ} % GREEK CAPITAL LETTER IOTA WITH MACRON
-\def\greekIotavaria {Ὶ} % GREEK CAPITAL LETTER IOTA WITH VARIA
-\def\greekIotatonos {Ί} % GREEK CAPITAL LETTER IOTA WITH OXIA
-\def\greekdasiavaria {῝} % GREEK DASIA AND VARIA
-\def\greekdasiatonos {῞} % GREEK DASIA AND OXIA
-\def\greekdasiaperispomeni {῟} % GREEK DASIA AND PERISPOMENI
-\def\greekupsilonvrachy {ῠ} % GREEK SMALL LETTER UPSILON WITH VRACHY
-\def\greekupsilonmacron {ῡ} % GREEK SMALL LETTER UPSILON WITH MACRON
-\def\greekupsilondialytikavaria {ῢ} % GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA
-\def\greekupsilondialytikatonos {ΰ} % GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
-\def\greekrhopsili {ῤ} % GREEK SMALL LETTER RHO WITH PSILI
-\def\greekrhodasia {ῥ} % GREEK SMALL LETTER RHO WITH DASIA
-\def\greekupsilonperispomeni {ῦ} % GREEK SMALL LETTER UPSILON WITH PERISPOMENI
-\def\greekupsilondialytikaperispomeni {ῧ} % GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI
-\def\greekUpsilonvrachy {Ῠ} % GREEK CAPITAL LETTER UPSILON WITH VRACHY
-\def\greekUpsilonmacron {Ῡ} % GREEK CAPITAL LETTER UPSILON WITH MACRON
-\def\greekUpsilonvaria {Ὺ} % GREEK CAPITAL LETTER UPSILON WITH VARIA
-\def\greekUpsilontonos {Ύ} % GREEK CAPITAL LETTER UPSILON WITH OXIA
-\def\greekRhodasia {Ῥ} % GREEK CAPITAL LETTER RHO WITH DASIA
-\def\greekdialytikavaria {῭} % GREEK DIALYTIKA AND VARIA
-\def\greekdialytikatonos {΅} % GREEK DIALYTIKA AND OXIA
-\def\greekvaria {`} % GREEK VARIA
-\def\greekomegaiotasubvaria {ῲ} % GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI
-\def\greekomegaiotasub {ῳ} % GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI
-\def\greekomegaiotasubtonos {ῴ} % GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI
-\def\greekomegaperispomeni {ῶ} % GREEK SMALL LETTER OMEGA WITH PERISPOMENI
-\def\greekomegaiotasubperispomeni {ῷ} % GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI
-\def\greekOmicronvaria {Ὸ} % GREEK CAPITAL LETTER OMICRON WITH VARIA
-\def\greekOmicrontonos {Ό} % GREEK CAPITAL LETTER OMICRON WITH OXIA
-\def\greekOmegavaria {Ὼ} % GREEK CAPITAL LETTER OMEGA WITH VARIA
-\def\greekOmegatonos {Ώ} % GREEK CAPITAL LETTER OMEGA WITH OXIA
-\def\greekOmegaiotasub {ῼ} % GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI
-\def\greekoxia {´} % GREEK OXIA
-\def\greekdasia {῾} % GREEK DASIA
-\def\enspace { } % EN SPACE
-\def\emspace { } % EM SPACE
-\def\thinspace { } % THIN SPACE
-\def\hairspace { } % HAIR SPACE
-\def\textminus {‒} % FIGURE DASH
-\def\endash {–} % EN DASH
-\def\emdash {—} % EM DASH
-\def\texthorizontalbar {―} % HORIZONTAL BAR
-\def\quoteleft {‘} % LEFT SINGLE QUOTATION MARK
-\def\quoteright {’} % RIGHT SINGLE QUOTATION MARK
-\def\quotesinglebase {‚} % SINGLE LOW-0x0009 QUOTATION MARK
-\def\quotedblleft {“} % LEFT DOUBLE QUOTATION MARK
-\def\quotedblright {”} % RIGHT DOUBLE QUOTATION MARK
-\def\quotedblbase {„} % DOUBLE LOW-0x0009 QUOTATION MARK
-\def\textdag {†} % DAGGER
-\def\textddag {‡} % DOUBLE DAGGER
-\def\textbullet {•} % BULLET
-\def\textellipsis {…} % HORIZONTAL ELLIPSIS
-\def\perthousand {‰} % PER MILLE SIGN
-\def\guilsingleleft {‹} % SINGLE LEFT-POINTING ANGLE QUOTATION MARK
-\def\guilsingleright {›} % SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
-\def\textdong {₫} % DONG SIGN
-\def\texteuro {€} % EURO SIGN
-\def\textnumero {№} % NUMERO SIGN
-\def\trademark {™} % TRADE MARK SIGN
-\def\onethird {⅓} % VULGAR FRACTION ONE THIRD
-\def\twothirds {⅔} % VULGAR FRACTION TWO THIRDS
-\def\onefifth {⅕} % VULGAR FRACTION ONE FIFTH
-\def\twofifths {⅖} % VULGAR FRACTION TWO FIFTHS
-\def\threefifths {⅗} % VULGAR FRACTION THREE FIFTHS
-\def\fourfifths {⅘} % VULGAR FRACTION FOUR FIFTHS
-\def\onesixth {⅙} % VULGAR FRACTION ONE SIXTH
-\def\fivesixths {⅚} % VULGAR FRACTION FIVE SIXTHS
-\def\oneeighth {⅛} % VULGAR FRACTION ONE EIGHTH
-\def\threeeighths {⅜} % VULGAR FRACTION THREE EIGHTHS
-\def\fiveeighths {⅝} % VULGAR FRACTION FIVE EIGHTHS
-\def\seveneighths {⅞} % VULGAR FRACTION SEVEN EIGHTHS
-\def\romanI {Ⅰ} % ROMAN NUMERAL ONE
-\def\romanII {Ⅱ} % ROMAN NUMERAL TWO
-\def\romanIII {Ⅲ} % ROMAN NUMERAL THREE
-\def\romanIV {Ⅳ} % ROMAN NUMERAL FOUR
-\def\romanV {Ⅴ} % ROMAN NUMERAL FIVE
-\def\romanVI {Ⅵ} % ROMAN NUMERAL SIX
-\def\romanVII {Ⅶ} % ROMAN NUMERAL SEVEN
-\def\romanVIII {Ⅷ} % ROMAN NUMERAL EIGHT
-\def\romanIX {Ⅸ} % ROMAN NUMERAL NINE
-\def\romanX {Ⅹ} % ROMAN NUMERAL TEN
-\def\romanXI {Ⅺ} % ROMAN NUMERAL ELEVEN
-\def\romanXII {Ⅻ} % ROMAN NUMERAL TWELVE
-\def\romanL {Ⅼ} % ROMAN NUMERAL FIFTY
-\def\romanC {Ⅽ} % ROMAN NUMERAL ONE HUNDRED
-\def\romanD {Ⅾ} % ROMAN NUMERAL FIVE HUNDRED
-\def\romanM {Ⅿ} % ROMAN NUMERAL ONE THOUSAND
-\def\romani {ⅰ} % SMALL ROMAN NUMERAL ONE
-\def\romanii {ⅱ} % SMALL ROMAN NUMERAL TWO
-\def\romaniii {ⅲ} % SMALL ROMAN NUMERAL THREE
-\def\romaniv {ⅳ} % SMALL ROMAN NUMERAL FOUR
-\def\romanv {ⅴ} % SMALL ROMAN NUMERAL FIVE
-\def\romanvi {ⅵ} % SMALL ROMAN NUMERAL SIX
-\def\romanvii {ⅶ} % SMALL ROMAN NUMERAL SEVEN
-\def\romanviii {ⅷ} % SMALL ROMAN NUMERAL EIGHT
-\def\romanix {ⅸ} % SMALL ROMAN NUMERAL NINE
-\def\romanx {ⅹ} % SMALL ROMAN NUMERAL TEN
-\def\romanxi {ⅺ} % SMALL ROMAN NUMERAL ELEVEN
-\def\romanxii {ⅻ} % SMALL ROMAN NUMERAL TWELVE
-\def\romanl {ⅼ} % SMALL ROMAN NUMERAL FIFTY
-\def\romanc {ⅽ} % SMALL ROMAN NUMERAL ONE HUNDRED
-\def\romand {ⅾ} % SMALL ROMAN NUMERAL FIVE HUNDRED
-\def\romanm {ⅿ} % SMALL ROMAN NUMERAL ONE THOUSAND
-\def\ffligature {ff} % LATIN SMALL LIGATURE FF
-\def\filigature {fi} % LATIN SMALL LIGATURE FI
-\def\flligature {fl} % LATIN SMALL LIGATURE FL
-\def\ffiligature {ffi} % LATIN SMALL LIGATURE FFI
-\def\fflligature {ffl} % LATIN SMALL LIGATURE FFL
-\def\stligature {st} % LATIN SMALL LIGATURE ST
+\def\textbackslash {\char"005C } % REVERSE SOLIDUS: \
+\def\textasciicircum {\char"005E } % CIRCUMFLEX ACCENT: ^
+\def\textunderscore {\char"005F } % LOW LINE: _
+\def\textgrave {\char"0060 } % GRAVE ACCENT: `
+\def\textbraceleft {\char"007B } % LEFT CURLY BRACKET: {
+\def\textbar {\char"007C } % VERTICAL LINE: |
+\def\textbraceright {\char"007D } % RIGHT CURLY BRACKET: }
+\def\textasciitilde {\char"007E } % TILDE: ~
+\def\nonbreakablespace {\char"00A0 } % NO-BREAK SPACE:  
+\def\exclamdown {\char"00A1 } % INVERTED EXCLAMATION MARK: ¡
+\def\textcent {\char"00A2 } % CENT SIGN: ¢
+\def\textsterling {\char"00A3 } % POUND SIGN: £
+\def\textcurrency {\char"00A4 } % CURRENCY SIGN: ¤
+\def\textyen {\char"00A5 } % YEN SIGN: ¥
+\def\textbrokenbar {\char"00A6 } % BROKEN BAR: ¦
+\def\sectionmark {\char"00A7 } % SECTION SIGN: §
+\def\textdiaeresis {\char"00A8 } % DIAERESIS: ¨
+\def\copyright {\char"00A9 } % COPYRIGHT SIGN: ©
+\def\ordfeminine {\char"00AA } % FEMININE ORDINAL INDICATOR: ª
+\def\leftguillemot {\char"00AB } % LEFT-POINTING DOUBLE ANGLE QUOTATION MARK: «
+\def\textlognot {\char"00AC } % NOT SIGN: ¬
+\def\softhyphen {\char"00AD } % SOFT HYPHEN: ­
+\def\registered {\char"00AE } % REGISTERED SIGN: ®
+\def\textmacron {\char"00AF } % MACRON: ¯
+\def\textdegree {\char"00B0 } % DEGREE SIGN: °
+\def\textpm {\char"00B1 } % PLUS-MINUS SIGN: ±
+\def\twosuperior {\char"00B2 } % SUPERSCRIPT TWO: ²
+\def\threesuperior {\char"00B3 } % SUPERSCRIPT THREE: ³
+\def\textacute {\char"00B4 } % ACUTE ACCENT: ´
+\def\textmu {\char"00B5 } % MICRO SIGN: µ
+\def\paragraphmark {\char"00B6 } % PILCROW SIGN: ¶
+\def\periodcentered {\char"00B7 } % MIDDLE DOT: ·
+\def\textcedilla {\char"00B8 } % CEDILLA: ¸
+\def\onesuperior {\char"00B9 } % SUPERSCRIPT ONE: ¹
+\def\ordmasculine {\char"00BA } % MASCULINE ORDINAL INDICATOR: º
+\def\rightguillemot {\char"00BB } % RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK: »
+\def\onequarter {\char"00BC } % VULGAR FRACTION ONE QUARTER: ¼
+\def\onehalf {\char"00BD } % VULGAR FRACTION ONE HALF: ½
+\def\threequarter {\char"00BE } % VULGAR FRACTION THREE QUARTERS: ¾
+\def\questiondown {\char"00BF } % INVERTED QUESTION MARK: ¿
+\def\Agrave {\char"00C0 } % LATIN CAPITAL LETTER A WITH GRAVE: À
+\def\Aacute {\char"00C1 } % LATIN CAPITAL LETTER A WITH ACUTE: Á
+\def\Acircumflex {\char"00C2 } % LATIN CAPITAL LETTER A WITH CIRCUMFLEX: Â
+\def\Atilde {\char"00C3 } % LATIN CAPITAL LETTER A WITH TILDE: Ã
+\def\Adiaeresis {\char"00C4 } % LATIN CAPITAL LETTER A WITH DIAERESIS: Ä
+\def\Aring {\char"00C5 } % LATIN CAPITAL LETTER A WITH RING ABOVE: Å
+\def\AEligature {\char"00C6 } % LATIN CAPITAL LETTER AE: Æ
+\def\Ccedilla {\char"00C7 } % LATIN CAPITAL LETTER C WITH CEDILLA: Ç
+\def\Egrave {\char"00C8 } % LATIN CAPITAL LETTER E WITH GRAVE: È
+\def\Eacute {\char"00C9 } % LATIN CAPITAL LETTER E WITH ACUTE: É
+\def\Ecircumflex {\char"00CA } % LATIN CAPITAL LETTER E WITH CIRCUMFLEX: Ê
+\def\Ediaeresis {\char"00CB } % LATIN CAPITAL LETTER E WITH DIAERESIS: Ë
+\def\Igrave {\char"00CC } % LATIN CAPITAL LETTER I WITH GRAVE: Ì
+\def\Iacute {\char"00CD } % LATIN CAPITAL LETTER I WITH ACUTE: Í
+\def\Icircumflex {\char"00CE } % LATIN CAPITAL LETTER I WITH CIRCUMFLEX: Î
+\def\Idiaeresis {\char"00CF } % LATIN CAPITAL LETTER I WITH DIAERESIS: Ï
+\def\Eth {\char"00D0 } % LATIN CAPITAL LETTER ETH: Ð
+\def\Ntilde {\char"00D1 } % LATIN CAPITAL LETTER N WITH TILDE: Ñ
+\def\Ograve {\char"00D2 } % LATIN CAPITAL LETTER O WITH GRAVE: Ò
+\def\Oacute {\char"00D3 } % LATIN CAPITAL LETTER O WITH ACUTE: Ó
+\def\Ocircumflex {\char"00D4 } % LATIN CAPITAL LETTER O WITH CIRCUMFLEX: Ô
+\def\Otilde {\char"00D5 } % LATIN CAPITAL LETTER O WITH TILDE: Õ
+\def\Odiaeresis {\char"00D6 } % LATIN CAPITAL LETTER O WITH DIAERESIS: Ö
+\def\textmultiply {\char"00D7 } % MULTIPLICATION SIGN: ×
+\def\Ostroke {\char"00D8 } % LATIN CAPITAL LETTER O WITH STROKE: Ø
+\def\Ugrave {\char"00D9 } % LATIN CAPITAL LETTER U WITH GRAVE: Ù
+\def\Uacute {\char"00DA } % LATIN CAPITAL LETTER U WITH ACUTE: Ú
+\def\Ucircumflex {\char"00DB } % LATIN CAPITAL LETTER U WITH CIRCUMFLEX: Û
+\def\Udiaeresis {\char"00DC } % LATIN CAPITAL LETTER U WITH DIAERESIS: Ü
+\def\Yacute {\char"00DD } % LATIN CAPITAL LETTER Y WITH ACUTE: Ý
+\def\Thorn {\char"00DE } % LATIN CAPITAL LETTER THORN: Þ
+\def\ssharp {\char"00DF } % LATIN SMALL LETTER SHARP S: ß
+\def\agrave {\char"00E0 } % LATIN SMALL LETTER A WITH GRAVE: à
+\def\aacute {\char"00E1 } % LATIN SMALL LETTER A WITH ACUTE: á
+\def\acircumflex {\char"00E2 } % LATIN SMALL LETTER A WITH CIRCUMFLEX: â
+\def\atilde {\char"00E3 } % LATIN SMALL LETTER A WITH TILDE: ã
+\def\adiaeresis {\char"00E4 } % LATIN SMALL LETTER A WITH DIAERESIS: ä
+\def\aring {\char"00E5 } % LATIN SMALL LETTER A WITH RING ABOVE: å
+\def\aeligature {\char"00E6 } % LATIN SMALL LETTER AE: æ
+\def\ccedilla {\char"00E7 } % LATIN SMALL LETTER C WITH CEDILLA: ç
+\def\egrave {\char"00E8 } % LATIN SMALL LETTER E WITH GRAVE: è
+\def\eacute {\char"00E9 } % LATIN SMALL LETTER E WITH ACUTE: é
+\def\ecircumflex {\char"00EA } % LATIN SMALL LETTER E WITH CIRCUMFLEX: ê
+\def\ediaeresis {\char"00EB } % LATIN SMALL LETTER E WITH DIAERESIS: ë
+\def\igrave {\char"00EC } % LATIN SMALL LETTER I WITH GRAVE: ì
+\def\iacute {\char"00ED } % LATIN SMALL LETTER I WITH ACUTE: í
+\def\icircumflex {\char"00EE } % LATIN SMALL LETTER I WITH CIRCUMFLEX: î
+\def\idiaeresis {\char"00EF } % LATIN SMALL LETTER I WITH DIAERESIS: ï
+\def\eth {\char"00F0 } % LATIN SMALL LETTER ETH: ð
+\def\ntilde {\char"00F1 } % LATIN SMALL LETTER N WITH TILDE: ñ
+\def\ograve {\char"00F2 } % LATIN SMALL LETTER O WITH GRAVE: ò
+\def\oacute {\char"00F3 } % LATIN SMALL LETTER O WITH ACUTE: ó
+\def\ocircumflex {\char"00F4 } % LATIN SMALL LETTER O WITH CIRCUMFLEX: ô
+\def\otilde {\char"00F5 } % LATIN SMALL LETTER O WITH TILDE: õ
+\def\odiaeresis {\char"00F6 } % LATIN SMALL LETTER O WITH DIAERESIS: ö
+\def\textdiv {\char"00F7 } % DIVISION SIGN: ÷
+\def\ostroke {\char"00F8 } % LATIN SMALL LETTER O WITH STROKE: ø
+\def\ugrave {\char"00F9 } % LATIN SMALL LETTER U WITH GRAVE: ù
+\def\uacute {\char"00FA } % LATIN SMALL LETTER U WITH ACUTE: ú
+\def\ucircumflex {\char"00FB } % LATIN SMALL LETTER U WITH CIRCUMFLEX: û
+\def\udiaeresis {\char"00FC } % LATIN SMALL LETTER U WITH DIAERESIS: ü
+\def\yacute {\char"00FD } % LATIN SMALL LETTER Y WITH ACUTE: ý
+\def\thorn {\char"00FE } % LATIN SMALL LETTER THORN: þ
+\def\ydiaeresis {\char"00FF } % LATIN SMALL LETTER Y WITH DIAERESIS: ÿ
+\def\Amacron {\char"0100 } % LATIN CAPITAL LETTER A WITH MACRON: Ā
+\def\amacron {\char"0101 } % LATIN SMALL LETTER A WITH MACRON: ā
+\def\Abreve {\char"0102 } % LATIN CAPITAL LETTER A WITH BREVE: Ă
+\def\abreve {\char"0103 } % LATIN SMALL LETTER A WITH BREVE: ă
+\def\Aogonek {\char"0104 } % LATIN CAPITAL LETTER A WITH OGONEK: Ą
+\def\aogonek {\char"0105 } % LATIN SMALL LETTER A WITH OGONEK: ą
+\def\Cacute {\char"0106 } % LATIN CAPITAL LETTER C WITH ACUTE: Ć
+\def\cacute {\char"0107 } % LATIN SMALL LETTER C WITH ACUTE: ć
+\def\Ccircumflex {\char"0108 } % LATIN CAPITAL LETTER C WITH CIRCUMFLEX: Ĉ
+\def\ccircumflex {\char"0109 } % LATIN SMALL LETTER C WITH CIRCUMFLEX: ĉ
+\def\Cdotaccent {\char"010A } % LATIN CAPITAL LETTER C WITH DOT ABOVE: Ċ
+\def\cdotaccent {\char"010B } % LATIN SMALL LETTER C WITH DOT ABOVE: ċ
+\def\Ccaron {\char"010C } % LATIN CAPITAL LETTER C WITH CARON: Č
+\def\ccaron {\char"010D } % LATIN SMALL LETTER C WITH CARON: č
+\def\Dcaron {\char"010E } % LATIN CAPITAL LETTER D WITH CARON: Ď
+\def\dcaron {\char"010F } % LATIN SMALL LETTER D WITH CARON: ď
+\def\Dstroke {\char"0110 } % LATIN CAPITAL LETTER D WITH STROKE: Đ
+\def\dstroke {\char"0111 } % LATIN SMALL LETTER D WITH STROKE: đ
+\def\Emacron {\char"0112 } % LATIN CAPITAL LETTER E WITH MACRON: Ē
+\def\emacron {\char"0113 } % LATIN SMALL LETTER E WITH MACRON: ē
+\def\Ebreve {\char"0114 } % LATIN CAPITAL LETTER E WITH BREVE: Ĕ
+\def\ebreve {\char"0115 } % LATIN SMALL LETTER E WITH BREVE: ĕ
+\def\Edotaccent {\char"0116 } % LATIN CAPITAL LETTER E WITH DOT ABOVE: Ė
+\def\edotaccent {\char"0117 } % LATIN SMALL LETTER E WITH DOT ABOVE: ė
+\def\Eogonek {\char"0118 } % LATIN CAPITAL LETTER E WITH OGONEK: Ę
+\def\eogonek {\char"0119 } % LATIN SMALL LETTER E WITH OGONEK: ę
+\def\Ecaron {\char"011A } % LATIN CAPITAL LETTER E WITH CARON: Ě
+\def\ecaron {\char"011B } % LATIN SMALL LETTER E WITH CARON: ě
+\def\Gcircumflex {\char"011C } % LATIN CAPITAL LETTER G WITH CIRCUMFLEX: Ĝ
+\def\gcircumflex {\char"011D } % LATIN SMALL LETTER G WITH CIRCUMFLEX: ĝ
+\def\Gbreve {\char"011E } % LATIN CAPITAL LETTER G WITH BREVE: Ğ
+\def\gbreve {\char"011F } % LATIN SMALL LETTER G WITH BREVE: ğ
+\def\Gdotaccent {\char"0120 } % LATIN CAPITAL LETTER G WITH DOT ABOVE: Ġ
+\def\gdotaccent {\char"0121 } % LATIN SMALL LETTER G WITH DOT ABOVE: ġ
+\def\Gcommaaccent {\char"0122 } % LATIN CAPITAL LETTER G WITH CEDILLA: Ģ
+\def\gcommaaccent {\char"0123 } % LATIN SMALL LETTER G WITH CEDILLA: ģ
+\def\Hcircumflex {\char"0124 } % LATIN CAPITAL LETTER H WITH CIRCUMFLEX: Ĥ
+\def\hcircumflex {\char"0125 } % LATIN SMALL LETTER H WITH CIRCUMFLEX: ĥ
+\def\Hstroke {\char"0126 } % LATIN CAPITAL LETTER H WITH STROKE: Ħ
+\def\hstroke {\char"0127 } % LATIN SMALL LETTER H WITH STROKE: ħ
+\def\Itilde {\char"0128 } % LATIN CAPITAL LETTER I WITH TILDE: Ĩ
+\def\itilde {\char"0129 } % LATIN SMALL LETTER I WITH TILDE: ĩ
+\def\Imacron {\char"012A } % LATIN CAPITAL LETTER I WITH MACRON: Ī
+\def\imacron {\char"012B } % LATIN SMALL LETTER I WITH MACRON: ī
+\def\Ibreve {\char"012C } % LATIN CAPITAL LETTER I WITH BREVE: Ĭ
+\def\ibreve {\char"012D } % LATIN SMALL LETTER I WITH BREVE: ĭ
+\def\Iogonek {\char"012E } % LATIN CAPITAL LETTER I WITH OGONEK: Į
+\def\iogonek {\char"012F } % LATIN SMALL LETTER I WITH OGONEK: į
+\def\Idotaccent {\char"0130 } % LATIN CAPITAL LETTER I WITH DOT ABOVE: İ
+\def\dotlessi {\char"0131 } % LATIN SMALL LETTER DOTLESS I: ı
+\def\IJligature {\char"0132 } % LATIN CAPITAL LIGATURE IJ: IJ
+\def\ijligature {\char"0133 } % LATIN SMALL LIGATURE IJ: ij
+\def\Jcircumflex {\char"0134 } % LATIN CAPITAL LETTER J WITH CIRCUMFLEX: Ĵ
+\def\jcircumflex {\char"0135 } % LATIN SMALL LETTER J WITH CIRCUMFLEX: ĵ
+\def\Kcommaaccent {\char"0136 } % LATIN CAPITAL LETTER K WITH CEDILLA: Ķ
+\def\kcommaaccent {\char"0137 } % LATIN SMALL LETTER K WITH CEDILLA: ķ
+\def\kkra {\char"0138 } % LATIN SMALL LETTER KRA: ĸ
+\def\Lacute {\char"0139 } % LATIN CAPITAL LETTER L WITH ACUTE: Ĺ
+\def\lacute {\char"013A } % LATIN SMALL LETTER L WITH ACUTE: ĺ
+\def\Lcommaaccent {\char"013B } % LATIN CAPITAL LETTER L WITH CEDILLA: Ļ
+\def\lcommaaccent {\char"013C } % LATIN SMALL LETTER L WITH CEDILLA: ļ
+\def\Lcaron {\char"013D } % LATIN CAPITAL LETTER L WITH CARON: Ľ
+\def\lcaron {\char"013E } % LATIN SMALL LETTER L WITH CARON: ľ
+\def\Ldotmiddle {\char"013F } % LATIN CAPITAL LETTER L WITH MIDDLE DOT: Ŀ
+\def\ldotmiddle {\char"0140 } % LATIN SMALL LETTER L WITH MIDDLE DOT: ŀ
+\def\Lstroke {\char"0141 } % LATIN CAPITAL LETTER L WITH STROKE: Ł
+\def\lstroke {\char"0142 } % LATIN SMALL LETTER L WITH STROKE: ł
+\def\Nacute {\char"0143 } % LATIN CAPITAL LETTER N WITH ACUTE: Ń
+\def\nacute {\char"0144 } % LATIN SMALL LETTER N WITH ACUTE: ń
+\def\Ncommaaccent {\char"0145 } % LATIN CAPITAL LETTER N WITH CEDILLA: Ņ
+\def\ncommaaccent {\char"0146 } % LATIN SMALL LETTER N WITH CEDILLA: ņ
+\def\Ncaron {\char"0147 } % LATIN CAPITAL LETTER N WITH CARON: Ň
+\def\ncaron {\char"0148 } % LATIN SMALL LETTER N WITH CARON: ň
+\def\napostrophe {\char"0149 } % LATIN SMALL LETTER N PRECEDED BY APOSTROPHE: ʼn
+\def\Neng {\char"014A } % LATIN CAPITAL LETTER ENG: Ŋ
+\def\neng {\char"014B } % LATIN SMALL LETTER ENG: ŋ
+\def\Omacron {\char"014C } % LATIN CAPITAL LETTER O WITH MACRON: Ō
+\def\omacron {\char"014D } % LATIN SMALL LETTER O WITH MACRON: ō
+\def\Obreve {\char"014E } % LATIN CAPITAL LETTER O WITH BREVE: Ŏ
+\def\obreve {\char"014F } % LATIN SMALL LETTER O WITH BREVE: ŏ
+\def\Ohungarumlaut {\char"0150 } % LATIN CAPITAL LETTER O WITH DOUBLE ACUTE: Ő
+\def\ohungarumlaut {\char"0151 } % LATIN SMALL LETTER O WITH DOUBLE ACUTE: ő
+\def\OEligature {\char"0152 } % LATIN CAPITAL LIGATURE OE: Œ
+\def\oeligature {\char"0153 } % LATIN SMALL LIGATURE OE: œ
+\def\Racute {\char"0154 } % LATIN CAPITAL LETTER R WITH ACUTE: Ŕ
+\def\racute {\char"0155 } % LATIN SMALL LETTER R WITH ACUTE: ŕ
+\def\Rcommaaccent {\char"0156 } % LATIN CAPITAL LETTER R WITH CEDILLA: Ŗ
+\def\rcommaaccent {\char"0157 } % LATIN SMALL LETTER R WITH CEDILLA: ŗ
+\def\Rcaron {\char"0158 } % LATIN CAPITAL LETTER R WITH CARON: Ř
+\def\rcaron {\char"0159 } % LATIN SMALL LETTER R WITH CARON: ř
+\def\Sacute {\char"015A } % LATIN CAPITAL LETTER S WITH ACUTE: Ś
+\def\sacute {\char"015B } % LATIN SMALL LETTER S WITH ACUTE: ś
+\def\Scircumflex {\char"015C } % LATIN CAPITAL LETTER S WITH CIRCUMFLEX: Ŝ
+\def\scircumflex {\char"015D } % LATIN SMALL LETTER S WITH CIRCUMFLEX: ŝ
+\def\Scedilla {\char"015E } % LATIN CAPITAL LETTER S WITH CEDILLA: Ş
+\def\scedilla {\char"015F } % LATIN SMALL LETTER S WITH CEDILLA: ş
+\def\Scaron {\char"0160 } % LATIN CAPITAL LETTER S WITH CARON: Š
+\def\scaron {\char"0161 } % LATIN SMALL LETTER S WITH CARON: š
+\def\Tcedilla {\char"0162 } % LATIN CAPITAL LETTER T WITH CEDILLA: Ţ
+\def\tcedilla {\char"0163 } % LATIN SMALL LETTER T WITH CEDILLA: ţ
+\def\Tcaron {\char"0164 } % LATIN CAPITAL LETTER T WITH CARON: Ť
+\def\tcaron {\char"0165 } % LATIN SMALL LETTER T WITH CARON: ť
+\def\Tstroke {\char"0166 } % LATIN CAPITAL LETTER T WITH STROKE: Ŧ
+\def\tstroke {\char"0167 } % LATIN SMALL LETTER T WITH STROKE: ŧ
+\def\Utilde {\char"0168 } % LATIN CAPITAL LETTER U WITH TILDE: Ũ
+\def\utilde {\char"0169 } % LATIN SMALL LETTER U WITH TILDE: ũ
+\def\Umacron {\char"016A } % LATIN CAPITAL LETTER U WITH MACRON: Ū
+\def\umacron {\char"016B } % LATIN SMALL LETTER U WITH MACRON: ū
+\def\Ubreve {\char"016C } % LATIN CAPITAL LETTER U WITH BREVE: Ŭ
+\def\ubreve {\char"016D } % LATIN SMALL LETTER U WITH BREVE: ŭ
+\def\Uring {\char"016E } % LATIN CAPITAL LETTER U WITH RING ABOVE: Ů
+\def\uring {\char"016F } % LATIN SMALL LETTER U WITH RING ABOVE: ů
+\def\Uhungarumlaut {\char"0170 } % LATIN CAPITAL LETTER U WITH DOUBLE ACUTE: Ű
+\def\uhungarumlaut {\char"0171 } % LATIN SMALL LETTER U WITH DOUBLE ACUTE: ű
+\def\Uogonek {\char"0172 } % LATIN CAPITAL LETTER U WITH OGONEK: Ų
+\def\uogonek {\char"0173 } % LATIN SMALL LETTER U WITH OGONEK: ų
+\def\Wcircumflex {\char"0174 } % LATIN CAPITAL LETTER W WITH CIRCUMFLEX: Ŵ
+\def\wcircumflex {\char"0175 } % LATIN SMALL LETTER W WITH CIRCUMFLEX: ŵ
+\def\Ycircumflex {\char"0176 } % LATIN CAPITAL LETTER Y WITH CIRCUMFLEX: Ŷ
+\def\ycircumflex {\char"0177 } % LATIN SMALL LETTER Y WITH CIRCUMFLEX: ŷ
+\def\Ydiaeresis {\char"0178 } % LATIN CAPITAL LETTER Y WITH DIAERESIS: Ÿ
+\def\Zacute {\char"0179 } % LATIN CAPITAL LETTER Z WITH ACUTE: Ź
+\def\zacute {\char"017A } % LATIN SMALL LETTER Z WITH ACUTE: ź
+\def\Zdotaccent {\char"017B } % LATIN CAPITAL LETTER Z WITH DOT ABOVE: Ż
+\def\zdotaccent {\char"017C } % LATIN SMALL LETTER Z WITH DOT ABOVE: ż
+\def\Zcaron {\char"017D } % LATIN CAPITAL LETTER Z WITH CARON: Ž
+\def\zcaron {\char"017E } % LATIN SMALL LETTER Z WITH CARON: ž
+\def\slong {\char"017F } % LATIN SMALL LETTER LONG S: ſ
+\def\bstroke {\char"0180 } % LATIN SMALL LETTER B WITH STROKE: ƀ
+\def\Bhook {\char"0181 } % LATIN CAPITAL LETTER B WITH HOOK: Ɓ
+\def\Chook {\char"0187 } % LATIN CAPITAL LETTER C WITH HOOK: Ƈ
+\def\chook {\char"0188 } % LATIN SMALL LETTER C WITH HOOK: ƈ
+\def\Dafrican {\char"0189 } % LATIN CAPITAL LETTER AFRICAN D: Ɖ
+\def\Dhook {\char"018A } % LATIN CAPITAL LETTER D WITH HOOK: Ɗ
+\def\Schwa {\char"018F } % LATIN CAPITAL LETTER SCHWA: Ə
+\def\Fhook {\char"0191 } % LATIN CAPITAL LETTER F WITH HOOK: Ƒ
+\def\fhook {\char"0192 } % LATIN SMALL LETTER F WITH HOOK: ƒ
+\def\Ghook {\char"0193 } % LATIN CAPITAL LETTER G WITH HOOK: Ɠ
+\def\Istroke {\char"0197 } % LATIN CAPITAL LETTER I WITH STROKE: Ɨ
+\def\Khook {\char"0198 } % LATIN CAPITAL LETTER K WITH HOOK: Ƙ
+\def\khook {\char"0199 } % LATIN SMALL LETTER K WITH HOOK: ƙ
+\def\lbar {\char"019A } % LATIN SMALL LETTER L WITH BAR: ƚ
+\def\Ohorn {\char"01A0 } % LATIN CAPITAL LETTER O WITH HORN: Ơ
+\def\ohorn {\char"01A1 } % LATIN SMALL LETTER O WITH HORN: ơ
+\def\Phook {\char"01A4 } % LATIN CAPITAL LETTER P WITH HOOK: Ƥ
+\def\phook {\char"01A5 } % LATIN SMALL LETTER P WITH HOOK: ƥ
+\def\Thook {\char"01AC } % LATIN CAPITAL LETTER T WITH HOOK: Ƭ
+\def\thook {\char"01AD } % LATIN SMALL LETTER T WITH HOOK: ƭ
+\def\Uhorn {\char"01AF } % LATIN CAPITAL LETTER U WITH HORN: Ư
+\def\uhorn {\char"01B0 } % LATIN SMALL LETTER U WITH HORN: ư
+\def\Uhook {\char"01B2 } % LATIN CAPITAL LETTER V WITH HOOK: Ʋ
+\def\Yhook {\char"01B3 } % LATIN CAPITAL LETTER Y WITH HOOK: Ƴ
+\def\yhook {\char"01B4 } % LATIN SMALL LETTER Y WITH HOOK: ƴ
+\def\Zstroke {\char"01B5 } % LATIN CAPITAL LETTER Z WITH STROKE: Ƶ
+\def\zstroke {\char"01B6 } % LATIN SMALL LETTER Z WITH STROKE: ƶ
+\def\DZcaronligature {\char"01C4 } % LATIN CAPITAL LETTER DZ WITH CARON: DŽ
+\def\Dzcaronligature {\char"01C5 } % LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON: Dž
+\def\dzcaronligature {\char"01C6 } % LATIN SMALL LETTER DZ WITH CARON: dž
+\def\LJligature {\char"01C7 } % LATIN CAPITAL LETTER LJ: LJ
+\def\Ljligature {\char"01C8 } % LATIN CAPITAL LETTER L WITH SMALL LETTER J: Lj
+\def\ljligature {\char"01C9 } % LATIN SMALL LETTER LJ: lj
+\def\NJligature {\char"01CA } % LATIN CAPITAL LETTER NJ: NJ
+\def\Njligature {\char"01CB } % LATIN CAPITAL LETTER N WITH SMALL LETTER J: Nj
+\def\njligature {\char"01CC } % LATIN SMALL LETTER NJ: nj
+\def\Acaron {\char"01CD } % LATIN CAPITAL LETTER A WITH CARON: Ǎ
+\def\acaron {\char"01CE } % LATIN SMALL LETTER A WITH CARON: ǎ
+\def\Icaron {\char"01CF } % LATIN CAPITAL LETTER I WITH CARON: Ǐ
+\def\icaron {\char"01D0 } % LATIN SMALL LETTER I WITH CARON: ǐ
+\def\Ocaron {\char"01D1 } % LATIN CAPITAL LETTER O WITH CARON: Ǒ
+\def\ocaron {\char"01D2 } % LATIN SMALL LETTER O WITH CARON: ǒ
+\def\Ucaron {\char"01D3 } % LATIN CAPITAL LETTER U WITH CARON: Ǔ
+\def\ucaron {\char"01D4 } % LATIN SMALL LETTER U WITH CARON: ǔ
+\def\Udiaeresismacron {\char"01D5 } % LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON: Ǖ
+\def\udiaeresismacron {\char"01D6 } % LATIN SMALL LETTER U WITH DIAERESIS AND MACRON: ǖ
+\def\Udiaeresisacute {\char"01D7 } % LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE: Ǘ
+\def\udiaeresisacute {\char"01D8 } % LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE: ǘ
+\def\Udiaeresiscaron {\char"01D9 } % LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON: Ǚ
+\def\udiaeresiscaron {\char"01DA } % LATIN SMALL LETTER U WITH DIAERESIS AND CARON: ǚ
+\def\Udiaeresisgrave {\char"01DB } % LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE: Ǜ
+\def\udiaeresisgrave {\char"01DC } % LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE: ǜ
+\def\Adiaeresismacron {\char"01DE } % LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON: Ǟ
+\def\adiaeresismacron {\char"01DF } % LATIN SMALL LETTER A WITH DIAERESIS AND MACRON: ǟ
+\def\Adotaccentmacron {\char"01E0 } % LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON: Ǡ
+\def\adotaccentmacron {\char"01E1 } % LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON: ǡ
+\def\AEmacron {\char"01E2 } % LATIN CAPITAL LETTER AE WITH MACRON: Ǣ
+\def\aemacron {\char"01E3 } % LATIN SMALL LETTER AE WITH MACRON: ǣ
+\def\Gstroke {\char"01E4 } % LATIN CAPITAL LETTER G WITH STROKE: Ǥ
+\def\gstroke {\char"01E5 } % LATIN SMALL LETTER G WITH STROKE: ǥ
+\def\Gcaron {\char"01E6 } % LATIN CAPITAL LETTER G WITH CARON: Ǧ
+\def\gcaron {\char"01E7 } % LATIN SMALL LETTER G WITH CARON: ǧ
+\def\Kcaron {\char"01E8 } % LATIN CAPITAL LETTER K WITH CARON: Ǩ
+\def\kcaron {\char"01E9 } % LATIN SMALL LETTER K WITH CARON: ǩ
+\def\Oogonek {\char"01EA } % LATIN CAPITAL LETTER O WITH OGONEK: Ǫ
+\def\oogonek {\char"01EB } % LATIN SMALL LETTER O WITH OGONEK: ǫ
+\def\Oogonekmacron {\char"01EC } % LATIN CAPITAL LETTER O WITH OGONEK AND MACRON: Ǭ
+\def\oogonekmacron {\char"01ED } % LATIN SMALL LETTER O WITH OGONEK AND MACRON: ǭ
+\def\jcaron {\char"01F0 } % LATIN SMALL LETTER J WITH CARON: ǰ
+\def\DZligature {\char"01F1 } % LATIN CAPITAL LETTER DZ: DZ
+\def\Dzligature {\char"01F2 } % LATIN CAPITAL LETTER D WITH SMALL LETTER Z: Dz
+\def\dzligature {\char"01F3 } % LATIN SMALL LETTER DZ: dz
+\def\Gacute {\char"01F4 } % LATIN CAPITAL LETTER G WITH ACUTE: Ǵ
+\def\gacute {\char"01F5 } % LATIN SMALL LETTER G WITH ACUTE: ǵ
+\def\Ngrave {\char"01F8 } % LATIN CAPITAL LETTER N WITH GRAVE: Ǹ
+\def\ngrave {\char"01F9 } % LATIN SMALL LETTER N WITH GRAVE: ǹ
+\def\Aringacute {\char"01FA } % LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE: Ǻ
+\def\aringacute {\char"01FB } % LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE: ǻ
+\def\AEacute {\char"01FC } % LATIN CAPITAL LETTER AE WITH ACUTE: Ǽ
+\def\aeacute {\char"01FD } % LATIN SMALL LETTER AE WITH ACUTE: ǽ
+\def\Ostrokeacute {\char"01FE } % LATIN CAPITAL LETTER O WITH STROKE AND ACUTE: Ǿ
+\def\ostrokeacute {\char"01FF } % LATIN SMALL LETTER O WITH STROKE AND ACUTE: ǿ
+\def\Adoublegrave {\char"0200 } % LATIN CAPITAL LETTER A WITH DOUBLE GRAVE: Ȁ
+\def\adoublegrave {\char"0201 } % LATIN SMALL LETTER A WITH DOUBLE GRAVE: ȁ
+\def\Ainvertedbreve {\char"0202 } % LATIN CAPITAL LETTER A WITH INVERTED BREVE: Ȃ
+\def\ainvertedbreve {\char"0203 } % LATIN SMALL LETTER A WITH INVERTED BREVE: ȃ
+\def\Edoublegrave {\char"0204 } % LATIN CAPITAL LETTER E WITH DOUBLE GRAVE: Ȅ
+\def\edoublegrave {\char"0205 } % LATIN SMALL LETTER E WITH DOUBLE GRAVE: ȅ
+\def\Einvertedbreve {\char"0206 } % LATIN CAPITAL LETTER E WITH INVERTED BREVE: Ȇ
+\def\einvertedbreve {\char"0207 } % LATIN SMALL LETTER E WITH INVERTED BREVE: ȇ
+\def\Idoublegrave {\char"0208 } % LATIN CAPITAL LETTER I WITH DOUBLE GRAVE: Ȉ
+\def\idoublegrave {\char"0209 } % LATIN SMALL LETTER I WITH DOUBLE GRAVE: ȉ
+\def\Iinvertedbreve {\char"020A } % LATIN CAPITAL LETTER I WITH INVERTED BREVE: Ȋ
+\def\iinvertedbreve {\char"020B } % LATIN SMALL LETTER I WITH INVERTED BREVE: ȋ
+\def\Odoublegrave {\char"020C } % LATIN CAPITAL LETTER O WITH DOUBLE GRAVE: Ȍ
+\def\odoublegrave {\char"020D } % LATIN SMALL LETTER O WITH DOUBLE GRAVE: ȍ
+\def\Oinvertedbreve {\char"020E } % LATIN CAPITAL LETTER O WITH INVERTED BREVE: Ȏ
+\def\oinvertedbreve {\char"020F } % LATIN SMALL LETTER O WITH INVERTED BREVE: ȏ
+\def\Rdoublegrave {\char"0210 } % LATIN CAPITAL LETTER R WITH DOUBLE GRAVE: Ȑ
+\def\rdoublegrave {\char"0211 } % LATIN SMALL LETTER R WITH DOUBLE GRAVE: ȑ
+\def\Rinvertedbreve {\char"0212 } % LATIN CAPITAL LETTER R WITH INVERTED BREVE: Ȓ
+\def\rinvertedbreve {\char"0213 } % LATIN SMALL LETTER R WITH INVERTED BREVE: ȓ
+\def\Udoublegrave {\char"0214 } % LATIN CAPITAL LETTER U WITH DOUBLE GRAVE: Ȕ
+\def\udoublegrave {\char"0215 } % LATIN SMALL LETTER U WITH DOUBLE GRAVE: ȕ
+\def\Uinvertedbreve {\char"0216 } % LATIN CAPITAL LETTER U WITH INVERTED BREVE: Ȗ
+\def\uinvertedbreve {\char"0217 } % LATIN SMALL LETTER U WITH INVERTED BREVE: ȗ
+\def\Scommaaccent {\char"0218 } % LATIN CAPITAL LETTER S WITH COMMA BELOW: Ș
+\def\scommaaccent {\char"0219 } % LATIN SMALL LETTER S WITH COMMA BELOW: ș
+\def\Tcommaaccent {\char"021A } % LATIN CAPITAL LETTER T WITH COMMA BELOW: Ț
+\def\tcommaaccent {\char"021B } % LATIN SMALL LETTER T WITH COMMA BELOW: ț
+\def\Hcaron {\char"021E } % LATIN CAPITAL LETTER H WITH CARON: Ȟ
+\def\hcaron {\char"021F } % LATIN SMALL LETTER H WITH CARON: ȟ
+\def\dcurl {\char"0221 } % LATIN SMALL LETTER D WITH CURL: ȡ
+\def\Zhook {\char"0224 } % LATIN CAPITAL LETTER Z WITH HOOK: Ȥ
+\def\zhook {\char"0225 } % LATIN SMALL LETTER Z WITH HOOK: ȥ
+\def\Adotaccent {\char"0226 } % LATIN CAPITAL LETTER A WITH DOT ABOVE: Ȧ
+\def\adotaccent {\char"0227 } % LATIN SMALL LETTER A WITH DOT ABOVE: ȧ
+\def\Ecedilla {\char"0228 } % LATIN CAPITAL LETTER E WITH CEDILLA: Ȩ
+\def\ecedilla {\char"0229 } % LATIN SMALL LETTER E WITH CEDILLA: ȩ
+\def\Odiaeresismacron {\char"022A } % LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON: Ȫ
+\def\odiaeresismacron {\char"022B } % LATIN SMALL LETTER O WITH DIAERESIS AND MACRON: ȫ
+\def\Otildemacron {\char"022C } % LATIN CAPITAL LETTER O WITH TILDE AND MACRON: Ȭ
+\def\otildemacron {\char"022D } % LATIN SMALL LETTER O WITH TILDE AND MACRON: ȭ
+\def\Odotaccent {\char"022E } % LATIN CAPITAL LETTER O WITH DOT ABOVE: Ȯ
+\def\odotaccent {\char"022F } % LATIN SMALL LETTER O WITH DOT ABOVE: ȯ
+\def\Odotaccentmacron {\char"0230 } % LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON: Ȱ
+\def\odotaccentmacron {\char"0231 } % LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON: ȱ
+\def\Ymacron {\char"0232 } % LATIN CAPITAL LETTER Y WITH MACRON: Ȳ
+\def\ymacron {\char"0233 } % LATIN SMALL LETTER Y WITH MACRON: ȳ
+\def\lcurl {\char"0234 } % LATIN SMALL LETTER L WITH CURL: ȴ
+\def\ncurl {\char"0235 } % LATIN SMALL LETTER N WITH CURL: ȵ
+\def\tcurl {\char"0236 } % LATIN SMALL LETTER T WITH CURL: ȶ
+\def\dotlessj {\char"0237 } % LATIN SMALL LETTER DOTLESS J: ȷ
+\def\Astroke {\char"023A } % LATIN CAPITAL LETTER A WITH STROKE: Ⱥ
+\def\Cstroke {\char"023B } % LATIN CAPITAL LETTER C WITH STROKE: Ȼ
+\def\cstroke {\char"023C } % LATIN SMALL LETTER C WITH STROKE: ȼ
+\def\Lbar {\char"023D } % LATIN CAPITAL LETTER L WITH BAR: Ƚ
+\def\bhook {\char"0253 } % LATIN SMALL LETTER B WITH HOOK: ɓ
+\def\ccurl {\char"0255 } % LATIN SMALL LETTER C WITH CURL: ɕ
+\def\dtail {\char"0256 } % LATIN SMALL LETTER D WITH TAIL: ɖ
+\def\dhook {\char"0257 } % LATIN SMALL LETTER D WITH HOOK: ɗ
+\def\schwa {\char"0259 } % LATIN SMALL LETTER SCHWA: ə
+\def\schwahook {\char"025A } % LATIN SMALL LETTER SCHWA WITH HOOK: ɚ
+\def\dotlessjstroke {\char"025F } % LATIN SMALL LETTER DOTLESS J WITH STROKE: ɟ
+\def\textcircumflex {\char"02C6 } % MODIFIER LETTER CIRCUMFLEX ACCENT: ˆ
+\def\textcaron {\char"02C7 } % CARON: ˇ
+\def\textbreve {\char"02D8 } % BREVE: ˘
+\def\textdotaccent {\char"02D9 } % DOT ABOVE: ˙
+\def\textring {\char"02DA } % RING ABOVE: ˚
+\def\textogonek {\char"02DB } % OGONEK: ˛
+\def\texttilde {\char"02DC } % SMALL TILDE: ˜
+\def\texthungarumlaut {\char"02DD } % DOUBLE ACUTE ACCENT: ˝
+\def\greektonos {\char"0384 } % GREEK TONOS: ΄
+\def\greekdialytikatonos {\char"0385 } % GREEK DIALYTIKA TONOS: ΅
+\def\greekAlphatonos {\char"0386 } % GREEK CAPITAL LETTER ALPHA WITH TONOS: Ά
+\def\greekEpsilontonos {\char"0388 } % GREEK CAPITAL LETTER EPSILON WITH TONOS: Έ
+\def\greekEtatonos {\char"0389 } % GREEK CAPITAL LETTER ETA WITH TONOS: Ή
+\def\greekIotatonos {\char"038A } % GREEK CAPITAL LETTER IOTA WITH TONOS: Ί
+\def\greekOmicrontonos {\char"038C } % GREEK CAPITAL LETTER OMICRON WITH TONOS: Ό
+\def\greekUpsilontonos {\char"038E } % GREEK CAPITAL LETTER UPSILON WITH TONOS: Ύ
+\def\greekOmegatonos {\char"038F } % GREEK CAPITAL LETTER OMEGA WITH TONOS: Ώ
+\def\greekiotadialytikatonos {\char"0390 } % GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS: ΐ
+\def\greekAlpha {\char"0391 } % GREEK CAPITAL LETTER ALPHA: Α
+\def\greekBeta {\char"0392 } % GREEK CAPITAL LETTER BETA: Β
+\def\greekGamma {\char"0393 } % GREEK CAPITAL LETTER GAMMA: Γ
+\def\greekDelta {\char"0394 } % GREEK CAPITAL LETTER DELTA: Δ
+\def\greekEpsilon {\char"0395 } % GREEK CAPITAL LETTER EPSILON: Ε
+\def\greekZeta {\char"0396 } % GREEK CAPITAL LETTER ZETA: Ζ
+\def\greekEta {\char"0397 } % GREEK CAPITAL LETTER ETA: Η
+\def\greekTheta {\char"0398 } % GREEK CAPITAL LETTER THETA: Θ
+\def\greekIota {\char"0399 } % GREEK CAPITAL LETTER IOTA: Ι
+\def\greekKappa {\char"039A } % GREEK CAPITAL LETTER KAPPA: Κ
+\def\greekLambda {\char"039B } % GREEK CAPITAL LETTER LAMDA: Λ
+\def\greekMu {\char"039C } % GREEK CAPITAL LETTER MU: Μ
+\def\greekNu {\char"039D } % GREEK CAPITAL LETTER NU: Ν
+\def\greekXi {\char"039E } % GREEK CAPITAL LETTER XI: Ξ
+\def\greekOmicron {\char"039F } % GREEK CAPITAL LETTER OMICRON: Ο
+\def\greekPi {\char"03A0 } % GREEK CAPITAL LETTER PI: Π
+\def\greekRho {\char"03A1 } % GREEK CAPITAL LETTER RHO: Ρ
+\def\greekSigma {\char"03A3 } % GREEK CAPITAL LETTER SIGMA: Σ
+\def\greekTau {\char"03A4 } % GREEK CAPITAL LETTER TAU: Τ
+\def\greekUpsilon {\char"03A5 } % GREEK CAPITAL LETTER UPSILON: Υ
+\def\greekPhi {\char"03A6 } % GREEK CAPITAL LETTER PHI: Φ
+\def\greekChi {\char"03A7 } % GREEK CAPITAL LETTER CHI: Χ
+\def\greekPsi {\char"03A8 } % GREEK CAPITAL LETTER PSI: Ψ
+\def\greekOmega {\char"03A9 } % GREEK CAPITAL LETTER OMEGA: Ω
+\def\greekIotadialytika {\char"03AA } % GREEK CAPITAL LETTER IOTA WITH DIALYTIKA: Ϊ
+\def\greekUpsilondialytika {\char"03AB } % GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA: Ϋ
+\def\greekalphatonos {\char"03AC } % GREEK SMALL LETTER ALPHA WITH TONOS: ά
+\def\greekepsilontonos {\char"03AD } % GREEK SMALL LETTER EPSILON WITH TONOS: έ
+\def\greeketatonos {\char"03AE } % GREEK SMALL LETTER ETA WITH TONOS: ή
+\def\greekiotatonos {\char"03AF } % GREEK SMALL LETTER IOTA WITH TONOS: ί
+\def\greekupsilondialytikatonos {\char"03B0 } % GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS: ΰ
+\def\greekalpha {\char"03B1 } % GREEK SMALL LETTER ALPHA: α
+\def\greekbeta {\char"03B2 } % GREEK SMALL LETTER BETA: β
+\def\greekgamma {\char"03B3 } % GREEK SMALL LETTER GAMMA: γ
+\def\greekdelta {\char"03B4 } % GREEK SMALL LETTER DELTA: δ
+\def\greekepsilon {\char"03B5 } % GREEK SMALL LETTER EPSILON: ε
+\def\greekzeta {\char"03B6 } % GREEK SMALL LETTER ZETA: ζ
+\def\greeketa {\char"03B7 } % GREEK SMALL LETTER ETA: η
+\def\greektheta {\char"03B8 } % GREEK SMALL LETTER THETA: θ
+\def\greekiota {\char"03B9 } % GREEK SMALL LETTER IOTA: ι
+\def\greekkappa {\char"03BA } % GREEK SMALL LETTER KAPPA: κ
+\def\greeklambda {\char"03BB } % GREEK SMALL LETTER LAMDA: λ
+\def\greekmu {\char"03BC } % GREEK SMALL LETTER MU: μ
+\def\greeknu {\char"03BD } % GREEK SMALL LETTER NU: ν
+\def\greekxi {\char"03BE } % GREEK SMALL LETTER XI: ξ
+\def\greekomicron {\char"03BF } % GREEK SMALL LETTER OMICRON: ο
+\def\greekpi {\char"03C0 } % GREEK SMALL LETTER PI: π
+\def\greekrho {\char"03C1 } % GREEK SMALL LETTER RHO: ρ
+\def\greekfinalsigma {\char"03C2 } % GREEK SMALL LETTER FINAL SIGMA: ς
+\def\greeksigma {\char"03C3 } % GREEK SMALL LETTER SIGMA: σ
+\def\greektau {\char"03C4 } % GREEK SMALL LETTER TAU: τ
+\def\greekupsilon {\char"03C5 } % GREEK SMALL LETTER UPSILON: υ
+\def\greekphi {\char"03C6 } % GREEK SMALL LETTER PHI: φ
+\def\greekchi {\char"03C7 } % GREEK SMALL LETTER CHI: χ
+\def\greekpsi {\char"03C8 } % GREEK SMALL LETTER PSI: ψ
+\def\greekomega {\char"03C9 } % GREEK SMALL LETTER OMEGA: ω
+\def\greekiotadialytika {\char"03CA } % GREEK SMALL LETTER IOTA WITH DIALYTIKA: ϊ
+\def\greekupsilondiaeresis {\char"03CB } % GREEK SMALL LETTER UPSILON WITH DIALYTIKA: ϋ
+\def\greekomicrontonos {\char"03CC } % GREEK SMALL LETTER OMICRON WITH TONOS: ό
+\def\greekupsilontonos {\char"03CD } % GREEK SMALL LETTER UPSILON WITH TONOS: ύ
+\def\greekomegatonos {\char"03CE } % GREEK SMALL LETTER OMEGA WITH TONOS: ώ
+\def\greekthetaalt {\char"03D1 } % GREEK THETA SYMBOL: ϑ
+\def\greekphialt {\char"03D5 } % GREEK PHI SYMBOL: ϕ
+\def\greekpialt {\char"03D6 } % GREEK PI SYMBOL: ϖ
+\def\greekkoppa {\char"03D9 } % GREEK SMALL LETTER ARCHAIC KOPPA: ϙ
+\def\greekstigma {\char"03DB } % GREEK SMALL LETTER STIGMA: ϛ
+\def\greekdigamma {\char"03DD } % GREEK SMALL LETTER DIGAMMA: ϝ
+\def\greeknumkoppa {\char"03DF } % GREEK SMALL LETTER KOPPA: ϟ
+\def\greeksampi {\char"03E1 } % GREEK SMALL LETTER SAMPI: ϡ
+\def\greekrhoalt {\char"03F1 } % GREEK RHO SYMBOL: ϱ
+\def\greeksigmalunate {\char"03F2 } % GREEK LUNATE SIGMA SYMBOL: ϲ
+\def\greekepsilonalt {\char"03F5 } % GREEK LUNATE EPSILON SYMBOL: ϵ
+\def\greekSigmalunate {\char"03F9 } % GREEK CAPITAL LUNATE SIGMA SYMBOL: Ϲ
+\def\cyrillicEgrave {\char"0400 } % CYRILLIC CAPITAL LETTER IE WITH GRAVE: Ѐ
+\def\cyrillicYO {\char"0401 } % CYRILLIC CAPITAL LETTER IO: Ё
+\def\cyrillicDJE {\char"0402 } % CYRILLIC CAPITAL LETTER DJE: Ђ
+\def\cyrillicGJE {\char"0403 } % CYRILLIC CAPITAL LETTER GJE: Ѓ
+\def\cyrillicIE {\char"0404 } % CYRILLIC CAPITAL LETTER UKRAINIAN IE: Є
+\def\cyrillicDZE {\char"0405 } % CYRILLIC CAPITAL LETTER DZE: Ѕ
+\def\cyrillicII {\char"0406 } % CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I: І
+\def\cyrillicYI {\char"0407 } % CYRILLIC CAPITAL LETTER YI: Ї
+\def\cyrillicJE {\char"0408 } % CYRILLIC CAPITAL LETTER JE: Ј
+\def\cyrillicLJE {\char"0409 } % CYRILLIC CAPITAL LETTER LJE: Љ
+\def\cyrillicNJE {\char"040A } % CYRILLIC CAPITAL LETTER NJE: Њ
+\def\cyrillicTSHE {\char"040B } % CYRILLIC CAPITAL LETTER TSHE: Ћ
+\def\cyrillicKJE {\char"040C } % CYRILLIC CAPITAL LETTER KJE: Ќ
+\def\cyrillicIgrave {\char"040D } % CYRILLIC CAPITAL LETTER I WITH GRAVE: Ѝ
+\def\cyrillicUSHRT {\char"040E } % CYRILLIC CAPITAL LETTER SHORT U: Ў
+\def\cyrillicDZHE {\char"040F } % CYRILLIC CAPITAL LETTER DZHE: Џ
+\def\cyrillicA {\char"0410 } % CYRILLIC CAPITAL LETTER A: А
+\def\cyrillicB {\char"0411 } % CYRILLIC CAPITAL LETTER BE: Б
+\def\cyrillicV {\char"0412 } % CYRILLIC CAPITAL LETTER VE: В
+\def\cyrillicG {\char"0413 } % CYRILLIC CAPITAL LETTER GHE: Г
+\def\cyrillicD {\char"0414 } % CYRILLIC CAPITAL LETTER DE: Д
+\def\cyrillicE {\char"0415 } % CYRILLIC CAPITAL LETTER IE: Е
+\def\cyrillicZH {\char"0416 } % CYRILLIC CAPITAL LETTER ZHE: Ж
+\def\cyrillicZ {\char"0417 } % CYRILLIC CAPITAL LETTER ZE: З
+\def\cyrillicI {\char"0418 } % CYRILLIC CAPITAL LETTER I: И
+\def\cyrillicISHRT {\char"0419 } % CYRILLIC CAPITAL LETTER SHORT I: Й
+\def\cyrillicK {\char"041A } % CYRILLIC CAPITAL LETTER KA: К
+\def\cyrillicL {\char"041B } % CYRILLIC CAPITAL LETTER EL: Л
+\def\cyrillicM {\char"041C } % CYRILLIC CAPITAL LETTER EM: М
+\def\cyrillicN {\char"041D } % CYRILLIC CAPITAL LETTER EN: Н
+\def\cyrillicO {\char"041E } % CYRILLIC CAPITAL LETTER O: О
+\def\cyrillicP {\char"041F } % CYRILLIC CAPITAL LETTER PE: П
+\def\cyrillicR {\char"0420 } % CYRILLIC CAPITAL LETTER ER: Р
+\def\cyrillicS {\char"0421 } % CYRILLIC CAPITAL LETTER ES: С
+\def\cyrillicT {\char"0422 } % CYRILLIC CAPITAL LETTER TE: Т
+\def\cyrillicU {\char"0423 } % CYRILLIC CAPITAL LETTER U: У
+\def\cyrillicF {\char"0424 } % CYRILLIC CAPITAL LETTER EF: Ф
+\def\cyrillicH {\char"0425 } % CYRILLIC CAPITAL LETTER HA: Х
+\def\cyrillicC {\char"0426 } % CYRILLIC CAPITAL LETTER TSE: Ц
+\def\cyrillicCH {\char"0427 } % CYRILLIC CAPITAL LETTER CHE: Ч
+\def\cyrillicSH {\char"0428 } % CYRILLIC CAPITAL LETTER SHA: Ш
+\def\cyrillicSHCH {\char"0429 } % CYRILLIC CAPITAL LETTER SHCHA: Щ
+\def\cyrillicHRDSN {\char"042A } % CYRILLIC CAPITAL LETTER HARD SIGN: Ъ
+\def\cyrillicERY {\char"042B } % CYRILLIC CAPITAL LETTER YERU: Ы
+\def\cyrillicSFTSN {\char"042C } % CYRILLIC CAPITAL LETTER SOFT SIGN: Ь
+\def\cyrillicEREV {\char"042D } % CYRILLIC CAPITAL LETTER E: Э
+\def\cyrillicYU {\char"042E } % CYRILLIC CAPITAL LETTER YU: Ю
+\def\cyrillicYA {\char"042F } % CYRILLIC CAPITAL LETTER YA: Я
+\def\cyrillica {\char"0430 } % CYRILLIC SMALL LETTER A: а
+\def\cyrillicb {\char"0431 } % CYRILLIC SMALL LETTER BE: б
+\def\cyrillicv {\char"0432 } % CYRILLIC SMALL LETTER VE: в
+\def\cyrillicg {\char"0433 } % CYRILLIC SMALL LETTER GHE: г
+\def\cyrillicd {\char"0434 } % CYRILLIC SMALL LETTER DE: д
+\def\cyrillice {\char"0435 } % CYRILLIC SMALL LETTER IE: е
+\def\cyrilliczh {\char"0436 } % CYRILLIC SMALL LETTER ZHE: ж
+\def\cyrillicz {\char"0437 } % CYRILLIC SMALL LETTER ZE: з
+\def\cyrillici {\char"0438 } % CYRILLIC SMALL LETTER I: и
+\def\cyrillicishrt {\char"0439 } % CYRILLIC SMALL LETTER SHORT I: й
+\def\cyrillick {\char"043A } % CYRILLIC SMALL LETTER KA: к
+\def\cyrillicl {\char"043B } % CYRILLIC SMALL LETTER EL: л
+\def\cyrillicm {\char"043C } % CYRILLIC SMALL LETTER EM: м
+\def\cyrillicn {\char"043D } % CYRILLIC SMALL LETTER EN: н
+\def\cyrillico {\char"043E } % CYRILLIC SMALL LETTER O: о
+\def\cyrillicp {\char"043F } % CYRILLIC SMALL LETTER PE: п
+\def\cyrillicr {\char"0440 } % CYRILLIC SMALL LETTER ER: р
+\def\cyrillics {\char"0441 } % CYRILLIC SMALL LETTER ES: с
+\def\cyrillict {\char"0442 } % CYRILLIC SMALL LETTER TE: т
+\def\cyrillicu {\char"0443 } % CYRILLIC SMALL LETTER U: у
+\def\cyrillicf {\char"0444 } % CYRILLIC SMALL LETTER EF: ф
+\def\cyrillich {\char"0445 } % CYRILLIC SMALL LETTER HA: х
+\def\cyrillicc {\char"0446 } % CYRILLIC SMALL LETTER TSE: ц
+\def\cyrillicch {\char"0447 } % CYRILLIC SMALL LETTER CHE: ч
+\def\cyrillicsh {\char"0448 } % CYRILLIC SMALL LETTER SHA: ш
+\def\cyrillicshch {\char"0449 } % CYRILLIC SMALL LETTER SHCHA: щ
+\def\cyrillichrdsn {\char"044A } % CYRILLIC SMALL LETTER HARD SIGN: ъ
+\def\cyrillicery {\char"044B } % CYRILLIC SMALL LETTER YERU: ы
+\def\cyrillicsftsn {\char"044C } % CYRILLIC SMALL LETTER SOFT SIGN: ь
+\def\cyrillicerev {\char"044D } % CYRILLIC SMALL LETTER E: э
+\def\cyrillicyu {\char"044E } % CYRILLIC SMALL LETTER YU: ю
+\def\cyrillicya {\char"044F } % CYRILLIC SMALL LETTER YA: я
+\def\cyrillicegrave {\char"0450 } % CYRILLIC SMALL LETTER IE WITH GRAVE: ѐ
+\def\cyrillicyo {\char"0451 } % CYRILLIC SMALL LETTER IO: ё
+\def\cyrillicdje {\char"0452 } % CYRILLIC SMALL LETTER DJE: ђ
+\def\cyrillicgje {\char"0453 } % CYRILLIC SMALL LETTER GJE: ѓ
+\def\cyrillicie {\char"0454 } % CYRILLIC SMALL LETTER UKRAINIAN IE: є
+\def\cyrillicdze {\char"0455 } % CYRILLIC SMALL LETTER DZE: ѕ
+\def\cyrillicii {\char"0456 } % CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I: і
+\def\cyrillicyi {\char"0457 } % CYRILLIC SMALL LETTER YI: ї
+\def\cyrillicje {\char"0458 } % CYRILLIC SMALL LETTER JE: ј
+\def\cyrilliclje {\char"0459 } % CYRILLIC SMALL LETTER LJE: љ
+\def\cyrillicnje {\char"045A } % CYRILLIC SMALL LETTER NJE: њ
+\def\cyrillictshe {\char"045B } % CYRILLIC SMALL LETTER TSHE: ћ
+\def\cyrillickje {\char"045C } % CYRILLIC SMALL LETTER KJE: ќ
+\def\cyrillicigrave {\char"045D } % CYRILLIC SMALL LETTER I WITH GRAVE: ѝ
+\def\cyrillicushrt {\char"045E } % CYRILLIC SMALL LETTER SHORT U: ў
+\def\cyrillicdzhe {\char"045F } % CYRILLIC SMALL LETTER DZHE: џ
+\def\cyrillicOMEGA {\char"0460 } % CYRILLIC CAPITAL LETTER OMEGA: Ѡ
+\def\cyrillicomega {\char"0461 } % CYRILLIC SMALL LETTER OMEGA: ѡ
+\def\cyrillicYAT {\char"0462 } % CYRILLIC CAPITAL LETTER YAT: Ѣ
+\def\cyrillicyat {\char"0463 } % CYRILLIC SMALL LETTER YAT: ѣ
+\def\cyrillicEiotified {\char"0464 } % CYRILLIC CAPITAL LETTER IOTIFIED E: Ѥ
+\def\cyrilliceiotified {\char"0465 } % CYRILLIC SMALL LETTER IOTIFIED E: ѥ
+\def\cyrillicLITTLEYUS {\char"0466 } % CYRILLIC CAPITAL LETTER LITTLE YUS: Ѧ
+\def\cyrilliclittleyus {\char"0467 } % CYRILLIC SMALL LETTER LITTLE YUS: ѧ
+\def\cyrillicLITTLEYUSiotified {\char"0468 } % CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS: Ѩ
+\def\cyrilliclittleyusiotified {\char"0469 } % CYRILLIC SMALL LETTER IOTIFIED LITTLE YUS: ѩ
+\def\cyrillicBIGYUS {\char"046A } % CYRILLIC CAPITAL LETTER BIG YUS: Ѫ
+\def\cyrillicbigyus {\char"046B } % CYRILLIC SMALL LETTER BIG YUS: ѫ
+\def\cyrillicBIGYUSiotified {\char"046C } % CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS: Ѭ
+\def\cyrillicbigyusiotified {\char"046D } % CYRILLIC SMALL LETTER IOTIFIED BIG YUS: ѭ
+\def\cyrillicKSI {\char"046E } % CYRILLIC CAPITAL LETTER KSI: Ѯ
+\def\cyrillicksi {\char"046F } % CYRILLIC SMALL LETTER KSI: ѯ
+\def\cyrillicPSI {\char"0470 } % CYRILLIC CAPITAL LETTER PSI: Ѱ
+\def\cyrillicpsi {\char"0471 } % CYRILLIC SMALL LETTER PSI: ѱ
+\def\cyrillicFITA {\char"0472 } % CYRILLIC CAPITAL LETTER FITA: Ѳ
+\def\cyrillicfita {\char"0473 } % CYRILLIC SMALL LETTER FITA: ѳ
+\def\cyrillicIZHITSA {\char"0474 } % CYRILLIC CAPITAL LETTER IZHITSA: Ѵ
+\def\cyrillicizhitsa {\char"0475 } % CYRILLIC SMALL LETTER IZHITSA: ѵ
+\def\cyrillicIZHITSAdoublegrave {\char"0476 } % CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT: Ѷ
+\def\cyrillicizhitsadoublegrave {\char"0477 } % CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT: ѷ
+\def\cyrillicUK {\char"0478 } % CYRILLIC CAPITAL LETTER UK: Ѹ
+\def\cyrillicuk {\char"0479 } % CYRILLIC SMALL LETTER UK: ѹ
+\def\cyrillicOMEGAround {\char"047A } % CYRILLIC CAPITAL LETTER ROUND OMEGA: Ѻ
+\def\cyrillicomegaround {\char"047B } % CYRILLIC SMALL LETTER ROUND OMEGA: ѻ
+\def\cyrillicOMEGAtitlo {\char"047C } % CYRILLIC CAPITAL LETTER OMEGA WITH TITLO: Ѽ
+\def\cyrillicomegatitlo {\char"047D } % CYRILLIC SMALL LETTER OMEGA WITH TITLO: ѽ
+\def\cyrillicOT {\char"047E } % CYRILLIC CAPITAL LETTER OT: Ѿ
+\def\cyrillicot {\char"047F } % CYRILLIC SMALL LETTER OT: ѿ
+\def\cyrillicKOPPA {\char"0480 } % CYRILLIC CAPITAL LETTER KOPPA: Ҁ
+\def\cyrillickoppa {\char"0481 } % CYRILLIC SMALL LETTER KOPPA: ҁ
+\def\cyrillicTITLO {\char"0483 } % COMBINING CYRILLIC TITLO: ҃
+\def\cyrillicPALATALIZATION {\char"0484 } % COMBINING CYRILLIC PALATALIZATION: ҄
+\def\cyrillicDASIAPNEUMATA {\char"0485 } % COMBINING CYRILLIC DASIA PNEUMATA: ҅
+\def\cyrillicPSILIPNEUMATA {\char"0486 } % COMBINING CYRILLIC PSILI PNEUMATA: ҆
+\def\cyrillicISHRTtail {\char"048A } % CYRILLIC CAPITAL LETTER SHORT I WITH TAIL: Ҋ
+\def\cyrillicishrttail {\char"048B } % CYRILLIC SMALL LETTER SHORT I WITH TAIL: ҋ
+\def\cyrillicSEMISOFT {\char"048C } % CYRILLIC CAPITAL LETTER SEMISOFT SIGN: Ҍ
+\def\cyrillicsemisoft {\char"048D } % CYRILLIC SMALL LETTER SEMISOFT SIGN: ҍ
+\def\cyrillicERtick {\char"048E } % CYRILLIC CAPITAL LETTER ER WITH TICK: Ҏ
+\def\cyrillicertick {\char"048F } % CYRILLIC SMALL LETTER ER WITH TICK: ҏ
+\def\cyrillicGHEupturn {\char"0490 } % CYRILLIC CAPITAL LETTER GHE WITH UPTURN: Ґ
+\def\cyrillicgheupturn {\char"0491 } % CYRILLIC SMALL LETTER GHE WITH UPTURN: ґ
+\def\cyrillicGHEstroke {\char"0492 } % CYRILLIC CAPITAL LETTER GHE WITH STROKE: Ғ
+\def\cyrillicghestroke {\char"0493 } % CYRILLIC SMALL LETTER GHE WITH STROKE: ғ
+\def\cyrillicGHEmidhook {\char"0494 } % CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK: Ҕ
+\def\cyrillicghemidhook {\char"0495 } % CYRILLIC SMALL LETTER GHE WITH MIDDLE HOOK: ҕ
+\def\cyrillicZHEdescender {\char"0496 } % CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER: Җ
+\def\cyrilliczhedescender {\char"0497 } % CYRILLIC SMALL LETTER ZHE WITH DESCENDER: җ
+\def\cyrillicZDSC {\char"0498 } % CYRILLIC CAPITAL LETTER ZE WITH DESCENDER: Ҙ
+\def\cyrilliczdsc {\char"0499 } % CYRILLIC SMALL LETTER ZE WITH DESCENDER: ҙ
+\def\cyrillicKADC {\char"049A } % CYRILLIC CAPITAL LETTER KA WITH DESCENDER: Қ
+\def\cyrillickadc {\char"049B } % CYRILLIC SMALL LETTER KA WITH DESCENDER: қ
+\def\cyrillicKAvertstroke {\char"049C } % CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE: Ҝ
+\def\cyrillickavertstroke {\char"049D } % CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE: ҝ
+\def\cyrillicKAstroke {\char"049E } % CYRILLIC CAPITAL LETTER KA WITH STROKE: Ҟ
+\def\cyrillickastroke {\char"049F } % CYRILLIC SMALL LETTER KA WITH STROKE: ҟ
+\def\cyrillicKAbashkir {\char"04A0 } % CYRILLIC CAPITAL LETTER BASHKIR KA: Ҡ
+\def\cyrillickabashkir {\char"04A1 } % CYRILLIC SMALL LETTER BASHKIR KA: ҡ
+\def\cyrillicENDC {\char"04A2 } % CYRILLIC CAPITAL LETTER EN WITH DESCENDER: Ң
+\def\cyrillicendc {\char"04A3 } % CYRILLIC SMALL LETTER EN WITH DESCENDER: ң
+\def\cyrillicENGHE {\char"04A4 } % CYRILLIC CAPITAL LIGATURE EN GHE: Ҥ
+\def\cyrillicenghe {\char"04A5 } % CYRILLIC SMALL LIGATURE EN GHE: ҥ
+\def\cyrillicPEmidhook {\char"04A6 } % CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK: Ҧ
+\def\cyrillicpemidhook {\char"04A7 } % CYRILLIC SMALL LETTER PE WITH MIDDLE HOOK: ҧ
+\def\cyrillicHA {\char"04A8 } % CYRILLIC CAPITAL LETTER ABKHASIAN HA: Ҩ
+\def\cyrillicha {\char"04A9 } % CYRILLIC SMALL LETTER ABKHASIAN HA: ҩ
+\def\cyrillicSDSC {\char"04AA } % CYRILLIC CAPITAL LETTER ES WITH DESCENDER: Ҫ
+\def\cyrillicsdsc {\char"04AB } % CYRILLIC SMALL LETTER ES WITH DESCENDER: ҫ
+\def\cyrillicTEDC {\char"04AC } % CYRILLIC CAPITAL LETTER TE WITH DESCENDER: Ҭ
+\def\cyrillictedc {\char"04AD } % CYRILLIC SMALL LETTER TE WITH DESCENDER: ҭ
+\def\cyrillicYstr {\char"04AE } % CYRILLIC CAPITAL LETTER STRAIGHT U: Ү
+\def\cyrillicystr {\char"04AF } % CYRILLIC SMALL LETTER STRAIGHT U: ү
+\def\cyrillicYstrstroke {\char"04B0 } % CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE: Ұ
+\def\cyrillicystrstroke {\char"04B1 } % CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE: ұ
+\def\cyrillicHADC {\char"04B2 } % CYRILLIC CAPITAL LETTER HA WITH DESCENDER: Ҳ
+\def\cyrillichadc {\char"04B3 } % CYRILLIC SMALL LETTER HA WITH DESCENDER: ҳ
+\def\cyrillicTETSE {\char"04B4 } % CYRILLIC CAPITAL LIGATURE TE TSE: Ҵ
+\def\cyrillictetse {\char"04B5 } % CYRILLIC SMALL LIGATURE TE TSE: ҵ
+\def\cyrillicCHEDC {\char"04B6 } % CYRILLIC CAPITAL LETTER CHE WITH DESCENDER: Ҷ
+\def\cyrillicchedc {\char"04B7 } % CYRILLIC SMALL LETTER CHE WITH DESCENDER: ҷ
+\def\cyrillicCHEvertstroke {\char"04B8 } % CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE: Ҹ
+\def\cyrillicchevertstroke {\char"04B9 } % CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE: ҹ
+\def\cyrillicSHHA {\char"04BA } % CYRILLIC CAPITAL LETTER SHHA: Һ
+\def\cyrillicshha {\char"04BB } % CYRILLIC SMALL LETTER SHHA: һ
+\def\cyrillicCHEabkhasian {\char"04BC } % CYRILLIC CAPITAL LETTER ABKHASIAN CHE: Ҽ
+\def\cyrilliccheabkhasian {\char"04BD } % CYRILLIC SMALL LETTER ABKHASIAN CHE: ҽ
+\def\cyrillicCHEDCabkhasian {\char"04BE } % CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER: Ҿ
+\def\cyrillicchedcabkhasian {\char"04BF } % CYRILLIC SMALL LETTER ABKHASIAN CHE WITH DESCENDER: ҿ
+\def\cyrillicPALOCHKA {\char"04C0 } % CYRILLIC LETTER PALOCHKA: Ӏ
+\def\cyrillicZHEbreve {\char"04C1 } % CYRILLIC CAPITAL LETTER ZHE WITH BREVE: Ӂ
+\def\cyrilliczhebreve {\char"04C2 } % CYRILLIC SMALL LETTER ZHE WITH BREVE: ӂ
+\def\cyrillicKAhook {\char"04C3 } % CYRILLIC CAPITAL LETTER KA WITH HOOK: Ӄ
+\def\cyrillickahook {\char"04C4 } % CYRILLIC SMALL LETTER KA WITH HOOK: ӄ
+\def\cyrillicELtail {\char"04C5 } % CYRILLIC CAPITAL LETTER EL WITH TAIL: Ӆ
+\def\cyrilliceltail {\char"04C6 } % CYRILLIC SMALL LETTER EL WITH TAIL: ӆ
+\def\cyrillicENhook {\char"04C7 } % CYRILLIC CAPITAL LETTER EN WITH HOOK: Ӈ
+\def\cyrillicenhook {\char"04C8 } % CYRILLIC SMALL LETTER EN WITH HOOK: ӈ
+\def\cyrillicENtail {\char"04C9 } % CYRILLIC CAPITAL LETTER EN WITH TAIL: Ӊ
+\def\cyrillicentail {\char"04CA } % CYRILLIC SMALL LETTER EN WITH TAIL: ӊ
+\def\cyrillicCHEkhakassian {\char"04CB } % CYRILLIC CAPITAL LETTER KHAKASSIAN CHE: Ӌ
+\def\cyrillicchekhakassian {\char"04CC } % CYRILLIC SMALL LETTER KHAKASSIAN CHE: ӌ
+\def\cyrillicEMtail {\char"04CD } % CYRILLIC CAPITAL LETTER EM WITH TAIL: Ӎ
+\def\cyrillicemtail {\char"04CE } % CYRILLIC SMALL LETTER EM WITH TAIL: ӎ
+\def\cyrillicAbreve {\char"04D0 } % CYRILLIC CAPITAL LETTER A WITH BREVE: Ӑ
+\def\cyrillicabreve {\char"04D1 } % CYRILLIC SMALL LETTER A WITH BREVE: ӑ
+\def\cyrillicAdiaeresis {\char"04D2 } % CYRILLIC CAPITAL LETTER A WITH DIAERESIS: Ӓ
+\def\cyrillicadiaeresis {\char"04D3 } % CYRILLIC SMALL LETTER A WITH DIAERESIS: ӓ
+\def\cyrillicAE {\char"04D4 } % CYRILLIC CAPITAL LIGATURE A IE: Ӕ
+\def\cyrillicae {\char"04D5 } % CYRILLIC SMALL LIGATURE A IE: ӕ
+\def\cyrillicEbreve {\char"04D6 } % CYRILLIC CAPITAL LETTER IE WITH BREVE: Ӗ
+\def\cyrillicebreve {\char"04D7 } % CYRILLIC SMALL LETTER IE WITH BREVE: ӗ
+\def\cyrillicSCHWA {\char"04D8 } % CYRILLIC CAPITAL LETTER SCHWA: Ә
+\def\cyrillicschwa {\char"04D9 } % CYRILLIC SMALL LETTER SCHWA: ә
+\def\cyrillicSCHWAdiaeresis {\char"04DA } % CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS: Ӛ
+\def\cyrillicschwadiaeresis {\char"04DB } % CYRILLIC SMALL LETTER SCHWA WITH DIAERESIS: ӛ
+\def\cyrillicZHEdiaeresis {\char"04DC } % CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS: Ӝ
+\def\cyrilliczhediaeresis {\char"04DD } % CYRILLIC SMALL LETTER ZHE WITH DIAERESIS: ӝ
+\def\cyrillicZEdiaeresis {\char"04DE } % CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS: Ӟ
+\def\cyrilliczediaeresis {\char"04DF } % CYRILLIC SMALL LETTER ZE WITH DIAERESIS: ӟ
+\def\cyrillicDZEabkhasian {\char"04E0 } % CYRILLIC CAPITAL LETTER ABKHASIAN DZE: Ӡ
+\def\cyrillicdzeabkhasian {\char"04E1 } % CYRILLIC SMALL LETTER ABKHASIAN DZE: ӡ
+\def\cyrillicImacron {\char"04E2 } % CYRILLIC CAPITAL LETTER I WITH MACRON: Ӣ
+\def\cyrillicimacron {\char"04E3 } % CYRILLIC SMALL LETTER I WITH MACRON: ӣ
+\def\cyrillicIdiaeresis {\char"04E4 } % CYRILLIC CAPITAL LETTER I WITH DIAERESIS: Ӥ
+\def\cyrillicidiaeresis {\char"04E5 } % CYRILLIC SMALL LETTER I WITH DIAERESIS: ӥ
+\def\cyrillicOdiaeresis {\char"04E6 } % CYRILLIC CAPITAL LETTER O WITH DIAERESIS: Ӧ
+\def\cyrillicodiaeresis {\char"04E7 } % CYRILLIC SMALL LETTER O WITH DIAERESIS: ӧ
+\def\cyrillicObarred {\char"04E8 } % CYRILLIC CAPITAL LETTER BARRED O: Ө
+\def\cyrillicobarred {\char"04E9 } % CYRILLIC SMALL LETTER BARRED O: ө
+\def\cyrillicObarreddiaeresis {\char"04EA } % CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS: Ӫ
+\def\cyrillicobarreddiaeresis {\char"04EB } % CYRILLIC SMALL LETTER BARRED O WITH DIAERESIS: ӫ
+\def\cyrillicEdiaeresis {\char"04EC } % CYRILLIC CAPITAL LETTER E WITH DIAERESIS: Ӭ
+\def\cyrillicediaeresis {\char"04ED } % CYRILLIC SMALL LETTER E WITH DIAERESIS: ӭ
+\def\cyrillicUmacron {\char"04EE } % CYRILLIC CAPITAL LETTER U WITH MACRON: Ӯ
+\def\cyrillicumacron {\char"04EF } % CYRILLIC SMALL LETTER U WITH MACRON: ӯ
+\def\cyrillicUdiaeresis {\char"04F0 } % CYRILLIC CAPITAL LETTER U WITH DIAERESIS: Ӱ
+\def\cyrillicudiaeresis {\char"04F1 } % CYRILLIC SMALL LETTER U WITH DIAERESIS: ӱ
+\def\cyrillicUdoubleacute {\char"04F2 } % CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE: Ӳ
+\def\cyrillicudoubleacute {\char"04F3 } % CYRILLIC SMALL LETTER U WITH DOUBLE ACUTE: ӳ
+\def\cyrillicCHEdiaeresis {\char"04F4 } % CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS: Ӵ
+\def\cyrillicchediaeresis {\char"04F5 } % CYRILLIC SMALL LETTER CHE WITH DIAERESIS: ӵ
+\def\cyrillicYERUdiaeresis {\char"04F8 } % CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS: Ӹ
+\def\cyrillicyerudiaeresis {\char"04F9 } % CYRILLIC SMALL LETTER YERU WITH DIAERESIS: ӹ
+\def\hebrewAlef {\char"05D0 } % HEBREW LETTER ALEF: א
+\def\hebrewBet {\char"05D1 } % HEBREW LETTER BET: ב
+\def\hebrewGimel {\char"05D2 } % HEBREW LETTER GIMEL: ג
+\def\hebrewDalet {\char"05D3 } % HEBREW LETTER DALET: ד
+\def\hebrewHe {\char"05D4 } % HEBREW LETTER HE: ה
+\def\hebrewVav {\char"05D5 } % HEBREW LETTER VAV: ו
+\def\hebrewZayin {\char"05D6 } % HEBREW LETTER ZAYIN: ז
+\def\hebrewHet {\char"05D7 } % HEBREW LETTER HET: ח
+\def\hebrewTet {\char"05D8 } % HEBREW LETTER TET: ט
+\def\hebrewYod {\char"05D9 } % HEBREW LETTER YOD: י
+\def\hebrewKaffinal {\char"05DA } % HEBREW LETTER FINAL KAF: ך
+\def\hebrewKaf {\char"05DB } % HEBREW LETTER KAF: כ
+\def\hebrewLamed {\char"05DC } % HEBREW LETTER LAMED: ל
+\def\hebrewMemfinal {\char"05DD } % HEBREW LETTER FINAL MEM: ם
+\def\hebrewMem {\char"05DE } % HEBREW LETTER MEM: מ
+\def\hebrewNunfinal {\char"05DF } % HEBREW LETTER FINAL NUN: ן
+\def\hebrewNun {\char"05E0 } % HEBREW LETTER NUN: נ
+\def\hebrewSamekh {\char"05E1 } % HEBREW LETTER SAMEKH: ס
+\def\hebrewAyin {\char"05E2 } % HEBREW LETTER AYIN: ע
+\def\hebrewPefinal {\char"05E3 } % HEBREW LETTER FINAL PE: ף
+\def\hebrewPe {\char"05E4 } % HEBREW LETTER PE: פ
+\def\hebrewTsadifinal {\char"05E5 } % HEBREW LETTER FINAL TSADI: ץ
+\def\hebrewTsadi {\char"05E6 } % HEBREW LETTER TSADI: צ
+\def\hebrewQof {\char"05E7 } % HEBREW LETTER QOF: ק
+\def\hebrewResh {\char"05E8 } % HEBREW LETTER RESH: ר
+\def\hebrewShin {\char"05E9 } % HEBREW LETTER SHIN: ש
+\def\hebrewTav {\char"05EA } % HEBREW LETTER TAV: ת
+\def\Adotbelow {\char"1EA0 } % LATIN CAPITAL LETTER A WITH DOT BELOW: Ạ
+\def\adotbelow {\char"1EA1 } % LATIN SMALL LETTER A WITH DOT BELOW: ạ
+\def\Ahook {\char"1EA2 } % LATIN CAPITAL LETTER A WITH HOOK ABOVE: Ả
+\def\ahook {\char"1EA3 } % LATIN SMALL LETTER A WITH HOOK ABOVE: ả
+\def\Acircumflexacute {\char"1EA4 } % LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE: Ấ
+\def\acircumflexacute {\char"1EA5 } % LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE: ấ
+\def\Acircumflexgrave {\char"1EA6 } % LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE: Ầ
+\def\acircumflexgrave {\char"1EA7 } % LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE: ầ
+\def\Acircumflexhook {\char"1EA8 } % LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE: Ẩ
+\def\acircumflexhook {\char"1EA9 } % LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE: ẩ
+\def\Acircumflextilde {\char"1EAA } % LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE: Ẫ
+\def\acircumflextilde {\char"1EAB } % LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE: ẫ
+\def\Acircumflexdotbelow {\char"1EAC } % LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW: Ậ
+\def\acircumflexdotbelow {\char"1EAD } % LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW: ậ
+\def\Abreveacute {\char"1EAE } % LATIN CAPITAL LETTER A WITH BREVE AND ACUTE: Ắ
+\def\abreveacute {\char"1EAF } % LATIN SMALL LETTER A WITH BREVE AND ACUTE: ắ
+\def\Abrevegrave {\char"1EB0 } % LATIN CAPITAL LETTER A WITH BREVE AND GRAVE: Ằ
+\def\abrevegrave {\char"1EB1 } % LATIN SMALL LETTER A WITH BREVE AND GRAVE: ằ
+\def\Abrevehook {\char"1EB2 } % LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE: Ẳ
+\def\abrevehook {\char"1EB3 } % LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE: ẳ
+\def\Abrevetilde {\char"1EB4 } % LATIN CAPITAL LETTER A WITH BREVE AND TILDE: Ẵ
+\def\abrevetilde {\char"1EB5 } % LATIN SMALL LETTER A WITH BREVE AND TILDE: ẵ
+\def\Abrevedotbelow {\char"1EB6 } % LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW: Ặ
+\def\abrevedotbelow {\char"1EB7 } % LATIN SMALL LETTER A WITH BREVE AND DOT BELOW: ặ
+\def\Edotbelow {\char"1EB8 } % LATIN CAPITAL LETTER E WITH DOT BELOW: Ẹ
+\def\edotbelow {\char"1EB9 } % LATIN SMALL LETTER E WITH DOT BELOW: ẹ
+\def\Ehook {\char"1EBA } % LATIN CAPITAL LETTER E WITH HOOK ABOVE: Ẻ
+\def\ehook {\char"1EBB } % LATIN SMALL LETTER E WITH HOOK ABOVE: ẻ
+\def\Etilde {\char"1EBC } % LATIN CAPITAL LETTER E WITH TILDE: Ẽ
+\def\etilde {\char"1EBD } % LATIN SMALL LETTER E WITH TILDE: ẽ
+\def\Ecircumflexacute {\char"1EBE } % LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE: Ế
+\def\ecircumflexacute {\char"1EBF } % LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE: ế
+\def\Ecircumflexgrave {\char"1EC0 } % LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE: Ề
+\def\ecircumflexgrave {\char"1EC1 } % LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE: ề
+\def\Ecircumflexhook {\char"1EC2 } % LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE: Ể
+\def\ecircumflexhook {\char"1EC3 } % LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE: ể
+\def\Ecircumflextilde {\char"1EC4 } % LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE: Ễ
+\def\ecircumflextilde {\char"1EC5 } % LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE: ễ
+\def\Ecircumflexdotbelow {\char"1EC6 } % LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW: Ệ
+\def\ecircumflexdotbelow {\char"1EC7 } % LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW: ệ
+\def\Ihook {\char"1EC8 } % LATIN CAPITAL LETTER I WITH HOOK ABOVE: Ỉ
+\def\ihook {\char"1EC9 } % LATIN SMALL LETTER I WITH HOOK ABOVE: ỉ
+\def\Idotbelow {\char"1ECA } % LATIN CAPITAL LETTER I WITH DOT BELOW: Ị
+\def\idotbelow {\char"1ECB } % LATIN SMALL LETTER I WITH DOT BELOW: ị
+\def\Odotbelow {\char"1ECC } % LATIN CAPITAL LETTER O WITH DOT BELOW: Ọ
+\def\odotbelow {\char"1ECD } % LATIN SMALL LETTER O WITH DOT BELOW: ọ
+\def\Ohook {\char"1ECE } % LATIN CAPITAL LETTER O WITH HOOK ABOVE: Ỏ
+\def\ohook {\char"1ECF } % LATIN SMALL LETTER O WITH HOOK ABOVE: ỏ
+\def\Ocircumflexacute {\char"1ED0 } % LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE: Ố
+\def\ocircumflexacute {\char"1ED1 } % LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE: ố
+\def\Ocircumflexgrave {\char"1ED2 } % LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE: Ồ
+\def\ocircumflexgrave {\char"1ED3 } % LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE: ồ
+\def\Ocircumflexhook {\char"1ED4 } % LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE: Ổ
+\def\ocircumflexhook {\char"1ED5 } % LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE: ổ
+\def\Ocircumflextilde {\char"1ED6 } % LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE: Ỗ
+\def\ocircumflextilde {\char"1ED7 } % LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE: ỗ
+\def\Ocircumflexdotbelow {\char"1ED8 } % LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW: Ộ
+\def\ocircumflexdotbelow {\char"1ED9 } % LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW: ộ
+\def\Ohornacute {\char"1EDA } % LATIN CAPITAL LETTER O WITH HORN AND ACUTE: Ớ
+\def\ohornacute {\char"1EDB } % LATIN SMALL LETTER O WITH HORN AND ACUTE: ớ
+\def\Ohorngrave {\char"1EDC } % LATIN CAPITAL LETTER O WITH HORN AND GRAVE: Ờ
+\def\ohorngrave {\char"1EDD } % LATIN SMALL LETTER O WITH HORN AND GRAVE: ờ
+\def\Ohornhook {\char"1EDE } % LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE: Ở
+\def\ohornhook {\char"1EDF } % LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE: ở
+\def\Ohorntilde {\char"1EE0 } % LATIN CAPITAL LETTER O WITH HORN AND TILDE: Ỡ
+\def\ohorntilde {\char"1EE1 } % LATIN SMALL LETTER O WITH HORN AND TILDE: ỡ
+\def\Ohorndotbelow {\char"1EE2 } % LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW: Ợ
+\def\ohorndotbelow {\char"1EE3 } % LATIN SMALL LETTER O WITH HORN AND DOT BELOW: ợ
+\def\Udotbelow {\char"1EE4 } % LATIN CAPITAL LETTER U WITH DOT BELOW: Ụ
+\def\udotbelow {\char"1EE5 } % LATIN SMALL LETTER U WITH DOT BELOW: ụ
+\def\Uhook {\char"1EE6 } % LATIN CAPITAL LETTER U WITH HOOK ABOVE: Ủ
+\def\uhook {\char"1EE7 } % LATIN SMALL LETTER U WITH HOOK ABOVE: ủ
+\def\Uhornacute {\char"1EE8 } % LATIN CAPITAL LETTER U WITH HORN AND ACUTE: Ứ
+\def\uhornacute {\char"1EE9 } % LATIN SMALL LETTER U WITH HORN AND ACUTE: ứ
+\def\Uhorngrave {\char"1EEA } % LATIN CAPITAL LETTER U WITH HORN AND GRAVE: Ừ
+\def\uhorngrave {\char"1EEB } % LATIN SMALL LETTER U WITH HORN AND GRAVE: ừ
+\def\Uhornhook {\char"1EEC } % LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE: Ử
+\def\uhornhook {\char"1EED } % LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE: ử
+\def\Uhorntilde {\char"1EEE } % LATIN CAPITAL LETTER U WITH HORN AND TILDE: Ữ
+\def\uhorntilde {\char"1EEF } % LATIN SMALL LETTER U WITH HORN AND TILDE: ữ
+\def\Uhorndotbelow {\char"1EF0 } % LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW: Ự
+\def\uhorndotbelow {\char"1EF1 } % LATIN SMALL LETTER U WITH HORN AND DOT BELOW: ự
+\def\Ygrave {\char"1EF2 } % LATIN CAPITAL LETTER Y WITH GRAVE: Ỳ
+\def\ygrave {\char"1EF3 } % LATIN SMALL LETTER Y WITH GRAVE: ỳ
+\def\Ydotbelow {\char"1EF4 } % LATIN CAPITAL LETTER Y WITH DOT BELOW: Ỵ
+\def\ydotbelow {\char"1EF5 } % LATIN SMALL LETTER Y WITH DOT BELOW: ỵ
+\def\Yhook {\char"1EF6 } % LATIN CAPITAL LETTER Y WITH HOOK ABOVE: Ỷ
+\def\yhook {\char"1EF7 } % LATIN SMALL LETTER Y WITH HOOK ABOVE: ỷ
+\def\Ytilde {\char"1EF8 } % LATIN CAPITAL LETTER Y WITH TILDE: Ỹ
+\def\ytilde {\char"1EF9 } % LATIN SMALL LETTER Y WITH TILDE: ỹ
+\def\greekalphapsili {\char"1F00 } % GREEK SMALL LETTER ALPHA WITH PSILI: ἀ
+\def\greekalphadasia {\char"1F01 } % GREEK SMALL LETTER ALPHA WITH DASIA: ἁ
+\def\greekalphapsilivaria {\char"1F02 } % GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA: ἂ
+\def\greekalphadasiavaria {\char"1F03 } % GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA: ἃ
+\def\greekalphapsilitonos {\char"1F04 } % GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA: ἄ
+\def\greekalphadasiatonos {\char"1F05 } % GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA: ἅ
+\def\greekalphapsiliperispomeni {\char"1F06 } % GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI: ἆ
+\def\greekalphadasiaperispomeni {\char"1F07 } % GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI: ἇ
+\def\greekAlphapsili {\char"1F08 } % GREEK CAPITAL LETTER ALPHA WITH PSILI: Ἀ
+\def\greekAlphadasia {\char"1F09 } % GREEK CAPITAL LETTER ALPHA WITH DASIA: Ἁ
+\def\greekAlphapsilivaria {\char"1F0A } % GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA: Ἂ
+\def\greekAlphadasiavaria {\char"1F0B } % GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA: Ἃ
+\def\greekAlphapsilitonos {\char"1F0C } % GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA: Ἄ
+\def\greekAlphadasiatonos {\char"1F0D } % GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA: Ἅ
+\def\greekAlphapsiliperispomeni {\char"1F0E } % GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI: Ἆ
+\def\greekAlphadasiaperispomeni {\char"1F0F } % GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI: Ἇ
+\def\greekepsilonpsili {\char"1F10 } % GREEK SMALL LETTER EPSILON WITH PSILI: ἐ
+\def\greekepsilondasia {\char"1F11 } % GREEK SMALL LETTER EPSILON WITH DASIA: ἑ
+\def\greekepsilonpsilivaria {\char"1F12 } % GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA: ἒ
+\def\greekepsilondasiavaria {\char"1F13 } % GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA: ἓ
+\def\greekepsilonpsilitonos {\char"1F14 } % GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA: ἔ
+\def\greekepsilondasiatonos {\char"1F15 } % GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA: ἕ
+\def\greekEpsilonpsili {\char"1F18 } % GREEK CAPITAL LETTER EPSILON WITH PSILI: Ἐ
+\def\greekEpsilondasia {\char"1F19 } % GREEK CAPITAL LETTER EPSILON WITH DASIA: Ἑ
+\def\greekEpsilonpsilivaria {\char"1F1A } % GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA: Ἒ
+\def\greekEpsilondasiavaria {\char"1F1B } % GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA: Ἓ
+\def\greekEpsilonpsilitonos {\char"1F1C } % GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA: Ἔ
+\def\greekEpsilondasiatonos {\char"1F1D } % GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA: Ἕ
+\def\greeketapsili {\char"1F20 } % GREEK SMALL LETTER ETA WITH PSILI: ἠ
+\def\greeketadasia {\char"1F21 } % GREEK SMALL LETTER ETA WITH DASIA: ἡ
+\def\greeketapsilivaria {\char"1F22 } % GREEK SMALL LETTER ETA WITH PSILI AND VARIA: ἢ
+\def\greeketadasiavaria {\char"1F23 } % GREEK SMALL LETTER ETA WITH DASIA AND VARIA: ἣ
+\def\greeketapsilitonos {\char"1F24 } % GREEK SMALL LETTER ETA WITH PSILI AND OXIA: ἤ
+\def\greeketadasiatonos {\char"1F25 } % GREEK SMALL LETTER ETA WITH DASIA AND OXIA: ἥ
+\def\greeketapsiliperispomeni {\char"1F26 } % GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI: ἦ
+\def\greeketadasiaperispomeni {\char"1F27 } % GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI: ἧ
+\def\greekEtapsili {\char"1F28 } % GREEK CAPITAL LETTER ETA WITH PSILI: Ἠ
+\def\greekEtadasia {\char"1F29 } % GREEK CAPITAL LETTER ETA WITH DASIA: Ἡ
+\def\greekEtapsilivaria {\char"1F2A } % GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA: Ἢ
+\def\greekEtadasiavaria {\char"1F2B } % GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA: Ἣ
+\def\greekEtapsilitonos {\char"1F2C } % GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA: Ἤ
+\def\greekEtadasiatonos {\char"1F2D } % GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA: Ἥ
+\def\greekEtapsiliperispomeni {\char"1F2E } % GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI: Ἦ
+\def\greekEtadasiaperispomeni {\char"1F2F } % GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI: Ἧ
+\def\greekiotapsili {\char"1F30 } % GREEK SMALL LETTER IOTA WITH PSILI: ἰ
+\def\greekiotadasia {\char"1F31 } % GREEK SMALL LETTER IOTA WITH DASIA: ἱ
+\def\greekiotapsilivaria {\char"1F32 } % GREEK SMALL LETTER IOTA WITH PSILI AND VARIA: ἲ
+\def\greekiotadasiavaria {\char"1F33 } % GREEK SMALL LETTER IOTA WITH DASIA AND VARIA: ἳ
+\def\greekiotapsilitonos {\char"1F34 } % GREEK SMALL LETTER IOTA WITH PSILI AND OXIA: ἴ
+\def\greekiotadasiatonos {\char"1F35 } % GREEK SMALL LETTER IOTA WITH DASIA AND OXIA: ἵ
+\def\greekiotapsiliperispomeni {\char"1F36 } % GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI: ἶ
+\def\greekiotadasiaperispomeni {\char"1F37 } % GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI: ἷ
+\def\greekIotapsili {\char"1F38 } % GREEK CAPITAL LETTER IOTA WITH PSILI: Ἰ
+\def\greekIotadasia {\char"1F39 } % GREEK CAPITAL LETTER IOTA WITH DASIA: Ἱ
+\def\greekIotapsilivaria {\char"1F3A } % GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA: Ἲ
+\def\greekIotadasiavaria {\char"1F3B } % GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA: Ἳ
+\def\greekIotapsilitonos {\char"1F3C } % GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA: Ἴ
+\def\greekIotadasiatonos {\char"1F3D } % GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA: Ἵ
+\def\greekIotapsiliperispomeni {\char"1F3E } % GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI: Ἶ
+\def\greekIotadasiaperispomeni {\char"1F3F } % GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI: Ἷ
+\def\greekomicronpsili {\char"1F40 } % GREEK SMALL LETTER OMICRON WITH PSILI: ὀ
+\def\greekomicrondasia {\char"1F41 } % GREEK SMALL LETTER OMICRON WITH DASIA: ὁ
+\def\greekomicronpsilivaria {\char"1F42 } % GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA: ὂ
+\def\greekomicrondasiavaria {\char"1F43 } % GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA: ὃ
+\def\greekomicronpsilitonos {\char"1F44 } % GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA: ὄ
+\def\greekomicrondasiatonos {\char"1F45 } % GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA: ὅ
+\def\greekOmicronpsili {\char"1F48 } % GREEK CAPITAL LETTER OMICRON WITH PSILI: Ὀ
+\def\greekOmicrondasia {\char"1F49 } % GREEK CAPITAL LETTER OMICRON WITH DASIA: Ὁ
+\def\greekOmicronpsilivaria {\char"1F4A } % GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA: Ὂ
+\def\greekOmicrondasiavaria {\char"1F4B } % GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA: Ὃ
+\def\greekOmicronpsilitonos {\char"1F4C } % GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA: Ὄ
+\def\greekOmicrondasiatonos {\char"1F4D } % GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA: Ὅ
+\def\greekupsilonpsili {\char"1F50 } % GREEK SMALL LETTER UPSILON WITH PSILI: ὐ
+\def\greekupsilondasia {\char"1F51 } % GREEK SMALL LETTER UPSILON WITH DASIA: ὑ
+\def\greekupsilonpsilivaria {\char"1F52 } % GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA: ὒ
+\def\greekupsilondasiavaria {\char"1F53 } % GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA: ὓ
+\def\greekupsilonpsilitonos {\char"1F54 } % GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA: ὔ
+\def\greekupsilondasiatonos {\char"1F55 } % GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA: ὕ
+\def\greekupsilonpsiliperispomeni {\char"1F56 } % GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI: ὖ
+\def\greekupsilondasiaperispomeni {\char"1F57 } % GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI: ὗ
+\def\greekUpsilondasia {\char"1F59 } % GREEK CAPITAL LETTER UPSILON WITH DASIA: Ὑ
+\def\greekUpsilondasiavaria {\char"1F5B } % GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA: Ὓ
+\def\greekUpsilondasiatonos {\char"1F5D } % GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA: Ὕ
+\def\greekUpsilondasiaperispomeni {\char"1F5F } % GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI: Ὗ
+\def\greekomegapsili {\char"1F60 } % GREEK SMALL LETTER OMEGA WITH PSILI: ὠ
+\def\greekomegadasia {\char"1F61 } % GREEK SMALL LETTER OMEGA WITH DASIA: ὡ
+\def\greekomegapsilivaria {\char"1F62 } % GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA: ὢ
+\def\greekomegadasiavaria {\char"1F63 } % GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA: ὣ
+\def\greekomegapsilitonos {\char"1F64 } % GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA: ὤ
+\def\greekomegadasiatonos {\char"1F65 } % GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA: ὥ
+\def\greekomegapsiliperispomeni {\char"1F66 } % GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI: ὦ
+\def\greekomegadasiaperispomeni {\char"1F67 } % GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI: ὧ
+\def\greekOmegapsili {\char"1F68 } % GREEK CAPITAL LETTER OMEGA WITH PSILI: Ὠ
+\def\greekOmegadasia {\char"1F69 } % GREEK CAPITAL LETTER OMEGA WITH DASIA: Ὡ
+\def\greekOmegapsilivaria {\char"1F6A } % GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA: Ὢ
+\def\greekOmegadasiavaria {\char"1F6B } % GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA: Ὣ
+\def\greekOmegapsilitonos {\char"1F6C } % GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA: Ὤ
+\def\greekOmegadasiatonos {\char"1F6D } % GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA: Ὥ
+\def\greekOmegapsiliperispomeni {\char"1F6E } % GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI: Ὦ
+\def\greekOmegadasiaperispomeni {\char"1F6F } % GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI: Ὧ
+\def\greekalphavaria {\char"1F70 } % GREEK SMALL LETTER ALPHA WITH VARIA: ὰ
+\def\greekalphaoxia {\char"1F71 } % GREEK SMALL LETTER ALPHA WITH OXIA: ά
+\def\greekepsilonvaria {\char"1F72 } % GREEK SMALL LETTER EPSILON WITH VARIA: ὲ
+\def\greekepsilonoxia {\char"1F73 } % GREEK SMALL LETTER EPSILON WITH OXIA: έ
+\def\greeketavaria {\char"1F74 } % GREEK SMALL LETTER ETA WITH VARIA: ὴ
+\def\greeketaoxia {\char"1F75 } % GREEK SMALL LETTER ETA WITH OXIA: ή
+\def\greekiotavaria {\char"1F76 } % GREEK SMALL LETTER IOTA WITH VARIA: ὶ
+\def\greekiotaoxia {\char"1F77 } % GREEK SMALL LETTER IOTA WITH OXIA: ί
+\def\greekomicronvaria {\char"1F78 } % GREEK SMALL LETTER OMICRON WITH VARIA: ὸ
+\def\greekomicronoxia {\char"1F79 } % GREEK SMALL LETTER OMICRON WITH OXIA: ό
+\def\greekupsilonvaria {\char"1F7A } % GREEK SMALL LETTER UPSILON WITH VARIA: ὺ
+\def\greekupsilonoxia {\char"1F7B } % GREEK SMALL LETTER UPSILON WITH OXIA: ύ
+\def\greekomegavaria {\char"1F7C } % GREEK SMALL LETTER OMEGA WITH VARIA: ὼ
+\def\greekomegaoxia {\char"1F7D } % GREEK SMALL LETTER OMEGA WITH OXIA: ώ
+\def\greekalphaiotasubpsili {\char"1F80 } % GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI: ᾀ
+\def\greekalphaiotasubdasia {\char"1F81 } % GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI: ᾁ
+\def\greekalphaiotasubpsilivaria {\char"1F82 } % GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI: ᾂ
+\def\greekalphaiotasubdasiavaria {\char"1F83 } % GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI: ᾃ
+\def\greekalphaiotasubpsilitonos {\char"1F84 } % GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI: ᾄ
+\def\greekalphaiotasubdasiatonos {\char"1F85 } % GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI: ᾅ
+\def\greekalphaiotasubpsiliperispomeni{\char"1F86 } % GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI: ᾆ
+\def\greekalphaiotasubdasiaperispomeni{\char"1F87 } % GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI: ᾇ
+\def\greekAlphaiotasubpsili {\char"1F88 } % GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI: ᾈ
+\def\greekAlphaiotasubdasia {\char"1F89 } % GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI: ᾉ
+\def\greekAlphaiotasubpsilivaria {\char"1F8A } % GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI: ᾊ
+\def\greekAlphaiotasubdasiavaria {\char"1F8B } % GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI: ᾋ
+\def\greekAlphaiotasubpsilitonos {\char"1F8C } % GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI: ᾌ
+\def\greekAlphaiotasubdasiatonos {\char"1F8D } % GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI: ᾍ
+\def\greekAlphaiotasubpsiliperispomeni{\char"1F8E } % GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI: ᾎ
+\def\greekAlphaiotasubdasiaperispomeni{\char"1F8F } % GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI: ᾏ
+\def\greeketaiotasubpsili {\char"1F90 } % GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI: ᾐ
+\def\greeketaiotasubdasia {\char"1F91 } % GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI: ᾑ
+\def\greeketaiotasubpsilivaria {\char"1F92 } % GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI: ᾒ
+\def\greeketaiotasubdasiavaria {\char"1F93 } % GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI: ᾓ
+\def\greeketaiotasubpsilitonos {\char"1F94 } % GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI: ᾔ
+\def\greeketaiotasubdasiatonos {\char"1F95 } % GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI: ᾕ
+\def\greeketaiotasubpsiliperispomeni {\char"1F96 } % GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI: ᾖ
+\def\greeketaiotasubdasiaperispomeni {\char"1F97 } % GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI: ᾗ
+\def\greekEtaiotasubpsili {\char"1F98 } % GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI: ᾘ
+\def\greekEtaiotasubdasia {\char"1F99 } % GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI: ᾙ
+\def\greekEtaiotasubpsilivaria {\char"1F9A } % GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI: ᾚ
+\def\greekEtaiotasubdasiavaria {\char"1F9B } % GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI: ᾛ
+\def\greekEtaiotasubpsilitonos {\char"1F9C } % GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI: ᾜ
+\def\greekEtaiotasubdasiatonos {\char"1F9D } % GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI: ᾝ
+\def\greekEtaiotasubpsiliperispomeni {\char"1F9E } % GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI: ᾞ
+\def\greekEtaiotasubdasiaperispomeni {\char"1F9F } % GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI: ᾟ
+\def\greekomegaiotasubpsili {\char"1FA0 } % GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI: ᾠ
+\def\greekomegaiotasubdasia {\char"1FA1 } % GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI: ᾡ
+\def\greekomegaiotasubpsilivaria {\char"1FA2 } % GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI: ᾢ
+\def\greekomegaiotasubdasiavaria {\char"1FA3 } % GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI: ᾣ
+\def\greekomegaiotasubpsilitonos {\char"1FA4 } % GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI: ᾤ
+\def\greekomegaiotasubdasiatonos {\char"1FA5 } % GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI: ᾥ
+\def\greekomegaiotasubpsiliperispomeni{\char"1FA6 } % GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI: ᾦ
+\def\greekomegaiotasubdasiaperispomeni{\char"1FA7 } % GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI: ᾧ
+\def\greekOmegaiotasubpsili {\char"1FA8 } % GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI: ᾨ
+\def\greekOmegaiotasubdasia {\char"1FA9 } % GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI: ᾩ
+\def\greekOmegaiotasubpsilivaria {\char"1FAA } % GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI: ᾪ
+\def\greekOmegaiotasubdasiavaria {\char"1FAB } % GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI: ᾫ
+\def\greekOmegaiotasubpsilitonos {\char"1FAC } % GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI: ᾬ
+\def\greekOmegaiotasubdasiatonos {\char"1FAD } % GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI: ᾭ
+\def\greekOmegaiotasubpsiliperispomeni{\char"1FAE } % GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI: ᾮ
+\def\greekOmegaiotasubdasiaperispomeni{\char"1FAF } % GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI: ᾯ
+\def\greekalphavrachy {\char"1FB0 } % GREEK SMALL LETTER ALPHA WITH VRACHY: ᾰ
+\def\greekalphamacron {\char"1FB1 } % GREEK SMALL LETTER ALPHA WITH MACRON: ᾱ
+\def\greekalphaiotasubvaria {\char"1FB2 } % GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI: ᾲ
+\def\greekalphaiotasub {\char"1FB3 } % GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI: ᾳ
+\def\greekalphaiotasubtonos {\char"1FB4 } % GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI: ᾴ
+\def\greekalphaperispomeni {\char"1FB6 } % GREEK SMALL LETTER ALPHA WITH PERISPOMENI: ᾶ
+\def\greekalphaiotasubperispomeni {\char"1FB7 } % GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI: ᾷ
+\def\greekAlphavrachy {\char"1FB8 } % GREEK CAPITAL LETTER ALPHA WITH VRACHY: Ᾰ
+\def\greekAlphamacron {\char"1FB9 } % GREEK CAPITAL LETTER ALPHA WITH MACRON: Ᾱ
+\def\greekAlphavaria {\char"1FBA } % GREEK CAPITAL LETTER ALPHA WITH VARIA: Ὰ
+\def\greekAlphatonos {\char"1FBB } % GREEK CAPITAL LETTER ALPHA WITH OXIA: Ά
+\def\greekAlphaiotasub {\char"1FBC } % GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI: ᾼ
+\def\greekCoronis {\char"1FBD } % GREEK KORONIS: ᾽
+\def\greekprosgegrammeni {\char"1FBE } % GREEK PROSGEGRAMMENI: ι
+\def\greekpsili {\char"1FBF } % GREEK PSILI: ᾿
+\def\greekperispomeni {\char"1FC0 } % GREEK PERISPOMENI: ῀
+\def\greekdialytikaperispomeni {\char"1FC1 } % GREEK DIALYTIKA AND PERISPOMENI: ῁
+\def\greeketaiotasubvaria {\char"1FC2 } % GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI: ῂ
+\def\greeketaiotasub {\char"1FC3 } % GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI: ῃ
+\def\greeketaiotasubtonos {\char"1FC4 } % GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI: ῄ
+\def\greeketaperispomeni {\char"1FC6 } % GREEK SMALL LETTER ETA WITH PERISPOMENI: ῆ
+\def\greeketaiotasubperispomeni {\char"1FC7 } % GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI: ῇ
+\def\greekEpsilonvaria {\char"1FC8 } % GREEK CAPITAL LETTER EPSILON WITH VARIA: Ὲ
+\def\greekEpsilontonos {\char"1FC9 } % GREEK CAPITAL LETTER EPSILON WITH OXIA: Έ
+\def\greekEtavaria {\char"1FCA } % GREEK CAPITAL LETTER ETA WITH VARIA: Ὴ
+\def\greekEtatonos {\char"1FCB } % GREEK CAPITAL LETTER ETA WITH OXIA: Ή
+\def\greekEtaiotasub {\char"1FCC } % GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI: ῌ
+\def\greekpsilivaria {\char"1FCD } % GREEK PSILI AND VARIA: ῍
+\def\greekpsilitonos {\char"1FCE } % GREEK PSILI AND OXIA: ῎
+\def\greekpsiliperispomeni {\char"1FCF } % GREEK PSILI AND PERISPOMENI: ῏
+\def\greekiotavrachy {\char"1FD0 } % GREEK SMALL LETTER IOTA WITH VRACHY: ῐ
+\def\greekiotamacron {\char"1FD1 } % GREEK SMALL LETTER IOTA WITH MACRON: ῑ
+\def\greekiotadialytikavaria {\char"1FD2 } % GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA: ῒ
+\def\greekiotadialytikatonos {\char"1FD3 } % GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA: ΐ
+\def\greekiotaperispomeni {\char"1FD6 } % GREEK SMALL LETTER IOTA WITH PERISPOMENI: ῖ
+\def\greekiotadialytikaperispomeni {\char"1FD7 } % GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI: ῗ
+\def\greekIotavrachy {\char"1FD8 } % GREEK CAPITAL LETTER IOTA WITH VRACHY: Ῐ
+\def\greekIotamacron {\char"1FD9 } % GREEK CAPITAL LETTER IOTA WITH MACRON: Ῑ
+\def\greekIotavaria {\char"1FDA } % GREEK CAPITAL LETTER IOTA WITH VARIA: Ὶ
+\def\greekIotatonos {\char"1FDB } % GREEK CAPITAL LETTER IOTA WITH OXIA: Ί
+\def\greekdasiavaria {\char"1FDD } % GREEK DASIA AND VARIA: ῝
+\def\greekdasiatonos {\char"1FDE } % GREEK DASIA AND OXIA: ῞
+\def\greekdasiaperispomeni {\char"1FDF } % GREEK DASIA AND PERISPOMENI: ῟
+\def\greekupsilonvrachy {\char"1FE0 } % GREEK SMALL LETTER UPSILON WITH VRACHY: ῠ
+\def\greekupsilonmacron {\char"1FE1 } % GREEK SMALL LETTER UPSILON WITH MACRON: ῡ
+\def\greekupsilondialytikavaria {\char"1FE2 } % GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA: ῢ
+\def\greekupsilondialytikatonos {\char"1FE3 } % GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA: ΰ
+\def\greekrhopsili {\char"1FE4 } % GREEK SMALL LETTER RHO WITH PSILI: ῤ
+\def\greekrhodasia {\char"1FE5 } % GREEK SMALL LETTER RHO WITH DASIA: ῥ
+\def\greekupsilonperispomeni {\char"1FE6 } % GREEK SMALL LETTER UPSILON WITH PERISPOMENI: ῦ
+\def\greekupsilondialytikaperispomeni {\char"1FE7 } % GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI: ῧ
+\def\greekUpsilonvrachy {\char"1FE8 } % GREEK CAPITAL LETTER UPSILON WITH VRACHY: Ῠ
+\def\greekUpsilonmacron {\char"1FE9 } % GREEK CAPITAL LETTER UPSILON WITH MACRON: Ῡ
+\def\greekUpsilonvaria {\char"1FEA } % GREEK CAPITAL LETTER UPSILON WITH VARIA: Ὺ
+\def\greekUpsilontonos {\char"1FEB } % GREEK CAPITAL LETTER UPSILON WITH OXIA: Ύ
+\def\greekRhodasia {\char"1FEC } % GREEK CAPITAL LETTER RHO WITH DASIA: Ῥ
+\def\greekdialytikavaria {\char"1FED } % GREEK DIALYTIKA AND VARIA: ῭
+\def\greekdialytikatonos {\char"1FEE } % GREEK DIALYTIKA AND OXIA: ΅
+\def\greekvaria {\char"1FEF } % GREEK VARIA: `
+\def\greekomegaiotasubvaria {\char"1FF2 } % GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI: ῲ
+\def\greekomegaiotasub {\char"1FF3 } % GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI: ῳ
+\def\greekomegaiotasubtonos {\char"1FF4 } % GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI: ῴ
+\def\greekomegaperispomeni {\char"1FF6 } % GREEK SMALL LETTER OMEGA WITH PERISPOMENI: ῶ
+\def\greekomegaiotasubperispomeni {\char"1FF7 } % GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI: ῷ
+\def\greekOmicronvaria {\char"1FF8 } % GREEK CAPITAL LETTER OMICRON WITH VARIA: Ὸ
+\def\greekOmicrontonos {\char"1FF9 } % GREEK CAPITAL LETTER OMICRON WITH OXIA: Ό
+\def\greekOmegavaria {\char"1FFA } % GREEK CAPITAL LETTER OMEGA WITH VARIA: Ὼ
+\def\greekOmegatonos {\char"1FFB } % GREEK CAPITAL LETTER OMEGA WITH OXIA: Ώ
+\def\greekOmegaiotasub {\char"1FFC } % GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI: ῼ
+\def\greekoxia {\char"1FFD } % GREEK OXIA: ´
+\def\greekdasia {\char"1FFE } % GREEK DASIA: ῾
+\def\enspace {\char"2002 } % EN SPACE:  
+\def\emspace {\char"2003 } % EM SPACE:  
+\def\thinspace {\char"2009 } % THIN SPACE:  
+\def\hairspace {\char"200A } % HAIR SPACE:  
+\def\textminus {\char"2012 } % FIGURE DASH: ‒
+\def\endash {\char"2013 } % EN DASH: –
+\def\emdash {\char"2014 } % EM DASH: —
+\def\texthorizontalbar {\char"2015 } % HORIZONTAL BAR: ―
+\def\quoteleft {\char"2018 } % LEFT SINGLE QUOTATION MARK: ‘
+\def\quoteright {\char"2019 } % RIGHT SINGLE QUOTATION MARK: ’
+\def\quotesinglebase {\char"201A } % SINGLE LOW-0x0009 QUOTATION MARK: ‚
+\def\quotedblleft {\char"201C } % LEFT DOUBLE QUOTATION MARK: “
+\def\quotedblright {\char"201D } % RIGHT DOUBLE QUOTATION MARK: ”
+\def\quotedblbase {\char"201E } % DOUBLE LOW-0x0009 QUOTATION MARK: „
+\def\textdag {\char"2020 } % DAGGER: †
+\def\textddag {\char"2021 } % DOUBLE DAGGER: ‡
+\def\textbullet {\char"2022 } % BULLET: •
+\def\textellipsis {\char"2026 } % HORIZONTAL ELLIPSIS: …
+\def\perthousand {\char"2030 } % PER MILLE SIGN: ‰
+\def\guilsingleleft {\char"2039 } % SINGLE LEFT-POINTING ANGLE QUOTATION MARK: ‹
+\def\guilsingleright {\char"203A } % SINGLE RIGHT-POINTING ANGLE QUOTATION MARK: ›
+\def\textdong {\char"20AB } % DONG SIGN: ₫
+\def\texteuro {\char"20AC } % EURO SIGN: €
+\def\textnumero {\char"2116 } % NUMERO SIGN: №
+\def\trademark {\char"2122 } % TRADE MARK SIGN: ™
+\def\onethird {\char"2153 } % VULGAR FRACTION ONE THIRD: ⅓
+\def\twothirds {\char"2154 } % VULGAR FRACTION TWO THIRDS: ⅔
+\def\onefifth {\char"2155 } % VULGAR FRACTION ONE FIFTH: ⅕
+\def\twofifths {\char"2156 } % VULGAR FRACTION TWO FIFTHS: ⅖
+\def\threefifths {\char"2157 } % VULGAR FRACTION THREE FIFTHS: ⅗
+\def\fourfifths {\char"2158 } % VULGAR FRACTION FOUR FIFTHS: ⅘
+\def\onesixth {\char"2159 } % VULGAR FRACTION ONE SIXTH: ⅙
+\def\fivesixths {\char"215A } % VULGAR FRACTION FIVE SIXTHS: ⅚
+\def\oneeighth {\char"215B } % VULGAR FRACTION ONE EIGHTH: ⅛
+\def\threeeighths {\char"215C } % VULGAR FRACTION THREE EIGHTHS: ⅜
+\def\fiveeighths {\char"215D } % VULGAR FRACTION FIVE EIGHTHS: ⅝
+\def\seveneighths {\char"215E } % VULGAR FRACTION SEVEN EIGHTHS: ⅞
+\def\romanI {\char"2160 } % ROMAN NUMERAL ONE: Ⅰ
+\def\romanII {\char"2161 } % ROMAN NUMERAL TWO: Ⅱ
+\def\romanIII {\char"2162 } % ROMAN NUMERAL THREE: Ⅲ
+\def\romanIV {\char"2163 } % ROMAN NUMERAL FOUR: Ⅳ
+\def\romanV {\char"2164 } % ROMAN NUMERAL FIVE: Ⅴ
+\def\romanVI {\char"2165 } % ROMAN NUMERAL SIX: Ⅵ
+\def\romanVII {\char"2166 } % ROMAN NUMERAL SEVEN: Ⅶ
+\def\romanVIII {\char"2167 } % ROMAN NUMERAL EIGHT: Ⅷ
+\def\romanIX {\char"2168 } % ROMAN NUMERAL NINE: Ⅸ
+\def\romanX {\char"2169 } % ROMAN NUMERAL TEN: Ⅹ
+\def\romanXI {\char"216A } % ROMAN NUMERAL ELEVEN: Ⅺ
+\def\romanXII {\char"216B } % ROMAN NUMERAL TWELVE: Ⅻ
+\def\romanL {\char"216C } % ROMAN NUMERAL FIFTY: Ⅼ
+\def\romanC {\char"216D } % ROMAN NUMERAL ONE HUNDRED: Ⅽ
+\def\romanD {\char"216E } % ROMAN NUMERAL FIVE HUNDRED: Ⅾ
+\def\romanM {\char"216F } % ROMAN NUMERAL ONE THOUSAND: Ⅿ
+\def\romani {\char"2170 } % SMALL ROMAN NUMERAL ONE: ⅰ
+\def\romanii {\char"2171 } % SMALL ROMAN NUMERAL TWO: ⅱ
+\def\romaniii {\char"2172 } % SMALL ROMAN NUMERAL THREE: ⅲ
+\def\romaniv {\char"2173 } % SMALL ROMAN NUMERAL FOUR: ⅳ
+\def\romanv {\char"2174 } % SMALL ROMAN NUMERAL FIVE: ⅴ
+\def\romanvi {\char"2175 } % SMALL ROMAN NUMERAL SIX: ⅵ
+\def\romanvii {\char"2176 } % SMALL ROMAN NUMERAL SEVEN: ⅶ
+\def\romanviii {\char"2177 } % SMALL ROMAN NUMERAL EIGHT: ⅷ
+\def\romanix {\char"2178 } % SMALL ROMAN NUMERAL NINE: ⅸ
+\def\romanx {\char"2179 } % SMALL ROMAN NUMERAL TEN: ⅹ
+\def\romanxi {\char"217A } % SMALL ROMAN NUMERAL ELEVEN: ⅺ
+\def\romanxii {\char"217B } % SMALL ROMAN NUMERAL TWELVE: ⅻ
+\def\romanl {\char"217C } % SMALL ROMAN NUMERAL FIFTY: ⅼ
+\def\romanc {\char"217D } % SMALL ROMAN NUMERAL ONE HUNDRED: ⅽ
+\def\romand {\char"217E } % SMALL ROMAN NUMERAL FIVE HUNDRED: ⅾ
+\def\romanm {\char"217F } % SMALL ROMAN NUMERAL ONE THOUSAND: ⅿ
+\def\ffligature {\char"FB00 } % LATIN SMALL LIGATURE FF: ff
+\def\filigature {\char"FB01 } % LATIN SMALL LIGATURE FI: fi
+\def\flligature {\char"FB02 } % LATIN SMALL LIGATURE FL: fl
+\def\ffiligature {\char"FB03 } % LATIN SMALL LIGATURE FFI: ffi
+\def\fflligature {\char"FB04 } % LATIN SMALL LIGATURE FFL: ffl
+\def\stligature {\char"FB06 } % LATIN SMALL LIGATURE ST: st
\endinput
diff --git a/tex/context/base/font-afm.lua b/tex/context/base/font-afm.lua
index d31b1d155..0bed489d8 100644
--- a/tex/context/base/font-afm.lua
+++ b/tex/context/base/font-afm.lua
@@ -19,7 +19,7 @@ away.</p>
fonts = fonts or { }
fonts.afm = fonts.afm or { }
-fonts.afm.version = 1.24 -- incrementing this number one up will force a re-cache
+fonts.afm.version = 1.25 -- incrementing this number one up will force a re-cache
fonts.afm.syncspace = true -- when true, nicer stretch values
fonts.afm.enhance_data = true -- best leave this set to true
fonts.afm.trace_features = false
@@ -432,13 +432,13 @@ function fonts.afm.copy_to_tfm(data)
spaceunits, tfm.spacer = data.charwidth, "charwidth variable"
end
spaceunits = tonumber(spaceunits)
- parameters[1] = 0 -- slant
- parameters[2] = spaceunits -- space
- parameters[3] = 500 -- space_stretch
- parameters[4] = 333 -- space_shrink
- parameters[5] = 400 -- x_height
- parameters[6] = 1000 -- quad
- parameters[7] = 0 -- extra_space (todo)
+ parameters.slant = 0
+ parameters.space = spaceunits
+ parameters.space_stretch = 500
+ parameters.space_shrink = 333
+ parameters.x_height = 400
+ parameters.quad = 1000
+ parameters.extra_space = 0
if spaceunits < 200 then
-- todo: warning
end
@@ -446,19 +446,19 @@ function fonts.afm.copy_to_tfm(data)
tfm.ascender = math.abs(data.ascender or 0)
tfm.descender = math.abs(data.descender or 0)
if data.italicangle then
- parameters[1] = parameters[1] - math.round(math.tan(data.italicangle*math.pi/180))
+ parameters.slant = parameters.slant - math.round(math.tan(data.italicangle*math.pi/180))
end
if data.isfixedpitch then
- parameters[3] = 0
- parameters[4] = 0
+ parameters.space_stretch = 0
+ parameters.space_shrink = 0
elseif fonts.afm.syncspace then
- parameters[3] = spaceunits/2 -- space_stretch
- parameters[4] = spaceunits/3 -- space_shrink
+ parameters.space_stretch = spaceunits/2
+ parameters.space_shrink = spaceunits/3
end
if data.xheight and data.xheight > 0 then
- parameters[5] = data.xheight
+ parameters.x_height = data.xheight
elseif afmcharacters['x'] and afmcharacters['x'].height then
- parameters[5] = afmcharacters['x'].height or 0
+ parameters.x_height = afmcharacters['x'].height or 0
end
local fd = data.fontdimens
if fd and fd[8] and fd[9] and fd[10] then -- math
diff --git a/tex/context/base/font-ext.lua b/tex/context/base/font-ext.lua
index 28d96057e..2b360c57c 100644
--- a/tex/context/base/font-ext.lua
+++ b/tex/context/base/font-ext.lua
@@ -185,7 +185,7 @@ function fonts.initializers.common.protrusion(tfmdata,value)
if vector then
local factor = class.factor or 1
local data = characters.data
- local emwidth = tfmdata.parameters[6]
+ local emwidth = tfmdata.parameters.quad
for i, chr in pairs(tfmdata.characters) do
local v, pl, pr = vector[i], nil, nil
if v then
diff --git a/tex/context/base/font-ini.lua b/tex/context/base/font-ini.lua
index 1e01c67d8..0cfc7a3f4 100644
--- a/tex/context/base/font-ini.lua
+++ b/tex/context/base/font-ini.lua
@@ -31,7 +31,8 @@ fonts.initializers = {
fonts.triggers = {
'mode',
'language',
- 'script'
+ 'script',
+ 'strategy',
}
fonts.manipulators = {
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index 486bb413c..9efa88e50 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -88,7 +88,7 @@ number by one when there's a fix in the <l n='fontforge'/> library or
fonts = fonts or { }
fonts.otf = fonts.otf or { }
-fonts.otf.version = 2.08
+fonts.otf.version = 2.09
fonts.otf.pack = true
fonts.otf.tables = fonts.otf.tables or { }
fonts.otf.meanings = fonts.otf.meanings or { }
@@ -794,7 +794,7 @@ do
if type(v) == "string" then
local b = v:is_boolean()
if type(b) == "nil" then
- v = v:lower() -- gsub("[^a-z0-9%-]") -- too dangerous, e.g. featurefiles
+ v = tonumber(v) or v:lower() -- gsub("[^a-z0-9%-]") -- too dangerous, e.g. featurefiles
else
v = b
end
@@ -1864,13 +1864,13 @@ function fonts.otf.copy_to_tfm(data) -- we can save a copy when we reorder the t
end
end
spaceunits = tonumber(spaceunits) or tfm.units/2 -- 500 -- brrr
- parameters[1] = 0 -- slant
- parameters[2] = spaceunits -- space
- parameters[3] = tfm.units/2 -- 500 -- space_stretch
- parameters[4] = 2*tfm.units/3 -- 333 -- space_shrink
- parameters[5] = 4*tfm.units/5 -- 400 -- x_height
- parameters[6] = tfm.units -- 1000 -- quad
- parameters[7] = 0 -- extra_space (todo)
+ parameters.slant = 0
+ parameters.space = spaceunits
+ parameters.space_stretch = tfm.units/2 -- 500
+ parameters.space_shrink = 2*tfm.units/3 -- 333
+ parameters.x_height = 4*tfm.units/5 -- 400
+ parameters.quad = tfm.units -- 1000
+ parameters.extra_space = 0
if spaceunits < 2*tfm.units/5 then
-- todo: warning
end
@@ -1878,21 +1878,21 @@ function fonts.otf.copy_to_tfm(data) -- we can save a copy when we reorder the t
tfm.ascender = math.abs(data.ascent or 0)
tfm.descender = math.abs(data.descent or 0)
if data.italicangle then -- maybe also in afm _
- parameters[1] = parameters[1] - math.round(math.tan(data.italicangle*math.pi/180))
+ parameters.slant = parameters.slant - math.round(math.tan(data.italicangle*math.pi/180))
end
if data.isfixedpitch then
- parameters[3] = 0
- parameters[4] = 0
+ parameters.space_stretch = 0
+ parameters.space_shrink = 0
elseif fonts.otf.syncspace then --
- parameters[3] = spaceunits/2 -- space_stretch
- parameters[4] = spaceunits/3 -- space_shrink
+ parameters.space_stretch = spaceunits/2
+ parameters.space_shrink = spaceunits/3
end
if data.pfminfo and data.pfminfo.os2_xheight and data.pfminfo.os2_xheight > 0 then
- parameters[5] = data.pfminfo.os2_xheight
+ parameters.x_height = data.pfminfo.os2_xheight
else
local x = characters[unicodes['x']]
if x then
- parameters[5] = x.description.height
+ parameters.x_height = x.description.height
end
end
-- [6]
@@ -2527,17 +2527,21 @@ do
local featuredata = tfmdata.shared.featuredata[kind]
local anchors = featuredata[lookupname]
if not anchors then
- featuredata[lookupname] = { }
- anchors = featuredata[lookupname]
+ anchors = { }
+ featuredata[lookupname] = anchors
local otfdata = tfmdata.shared.otfdata
local unicodes = otfdata.luatex.unicodes
local validanchors = { }
local glyphs = otfdata.glyphs
+ local trace = fonts.otf.trace_features
if otfdata.anchor_classes then
local classes = otfdata.anchor_classes
for k=1,#classes do
local class = classes[k]
if class.lookup == lookupname then
+ if trace then
+ logs.report("define otf",string.format("%s:%s anchor -> %s",kind,lookupname,class.name))
+ end
validanchors[class.name] = true
end
end
@@ -2566,6 +2570,7 @@ do
end
end
end
+--~ if kind == "mkmk" then print(lookupname,table.serialize(anchors)) end
return anchors
end
@@ -2803,17 +2808,17 @@ do
marks = otfdata.luatex.marks
glyphs = otfdata.glyphs
currentfont = font
- local script, language
+ local script, language, strategy
if attr and attr > 0 then
local features = context_setups[context_numbers[attr]]
- language, script = features.language or "dflt", features.script or "dflt"
+ language, script, strategy = features.language or "dflt", features.script or "dflt", features.strategy or fonts.otf.strategy
else
- language, script = tfmdata.language or "dflt", tfmdata.script or "dflt"
+ language, script, strategy = tfmdata.language or "dflt", tfmdata.script or "dflt", tfmdata.strategy or fonts.otf.strategy
end
local fullkind = kind .. script .. language
local lookuptable = shared.lookuptable[fullkind]
if lookuptable then
- local strategy = fonts.otf.strategy
+ -- local strategy = fonts.otf.strategy
local types = otfdata.luatex.name_to_type
local start, done, ok = head, false, false
local processes = shared.processes[fullkind]
@@ -3195,21 +3200,30 @@ do
end
function fonts.otf.features.process.gpos_mark2mark(start,kind,lookupname,b_anchors,m_anchors)
- local markchar = start,char
- if marks[markchar] then
+ local basemarkchar = start.char
+--~ print(lookupname)
+ if marks[basemarkchar] then
+--~ print('')
+--~ print('basemarkchar',basemarkchar)
+--~ print('basemarkanchors', table.serialize(b_anchors))
local baseanchors = b_anchors['basemark']
if baseanchors then
local component = start.next
while component and component.id == glyph and component.subtype<256 and component.font == currentfont do
- local basechar = component.char
- if not marks[basechar] then
+ local markchar = component.char
+ if not marks[markchar] then
break
else
- local markattr = has_attribute(start, marknumber) or 1
- local baseattr = has_attribute(component,marknumber) or 1
- if baseattr == markattr then -- still needed?
- local markanchors = m_anchors[basechar]
+--~ print('markchar',markchar)
+ local basemarkattr = has_attribute(start, marknumber) or 1
+ local markattr = has_attribute(component,marknumber) or 1
+--~ print(basemarkattr,markattr)
+ if basemarkattr == markattr then -- still needed?
+--~ print('markanchors *', table.serialize(m_anchors))
+
+ local markanchors = m_anchors[markchar]
if markanchors then
+--~ print('markanchors')
local markanchor = markanchors['mark']
if markanchor then
for anchor,ma in pairs(markanchor) do
@@ -3220,7 +3234,7 @@ do
component.xoffset, component.yoffset = start.xoffset - dx, start.yoffset + dy
if fonts.otf.trace_anchors then
report("otf process",format("%s:%s:%s anchoring mark 0x%04X to basemark 0x%04X => (%s,%s) => (%s,%s)",
- kind,anchor,markattr,markchar,basechar,dx,dy,component.xoffset,component.yoffset))
+ kind,anchor,markattr,markchar,basemarkchar,dx,dy,component.xoffset,component.yoffset))
end
return start, true
end
@@ -3231,7 +3245,6 @@ do
end
end
end
- return start, done
end
end
return start, false
@@ -4126,31 +4139,39 @@ function fonts.otf.features.mode(tfmdata,value)
end
end
+function fonts.otf.features.strategy(tfmdata,value)
+ if value then
+ tfmdata.strategy = tonumber(value) or fonts.otf.strategy
+ end
+end
+
fonts.initializers.base.otf.language = fonts.otf.features.language
fonts.initializers.base.otf.script = fonts.otf.features.script
fonts.initializers.base.otf.mode = fonts.otf.features.mode
fonts.initializers.base.otf.method = fonts.otf.features.mode
+fonts.initializers.base.otf.strategy = fonts.otf.features.strategy -- not needed
fonts.initializers.node.otf.language = fonts.otf.features.language
fonts.initializers.node.otf.script = fonts.otf.features.script
fonts.initializers.node.otf.mode = fonts.otf.features.mode
fonts.initializers.node.otf.method = fonts.otf.features.mode
+fonts.initializers.node.otf.strategy = fonts.otf.features.strategy
do
local tlig_list = {
endash = "hyphen hyphen",
emdash = "hyphen hyphen hyphen",
- quotedblleft = "quoteleft quoteleft",
- quotedblright = "quoteright quoteright",
- quotedblleft = "grave grave",
- quotedblright = "quotesingle quotesingle",
- quotedblbase = "comma comma",
+--~ quotedblleft = "quoteleft quoteleft",
+--~ quotedblright = "quoteright quoteright",
+--~ quotedblleft = "grave grave",
+--~ quotedblright = "quotesingle quotesingle",
+--~ quotedblbase = "comma comma",
}
local trep_list = {
- [0x0022] = 0x201D,
+--~ [0x0022] = 0x201D,
[0x0027] = 0x2019,
- [0x0060] = 0x2018,
+--~ [0x0060] = 0x2018,
}
local tlig_feature = {
@@ -4692,7 +4713,7 @@ do
local characters = fontdata[font].characters
local current, done, stretch, prevclass = head, false, 0, 0
if fonts.analyzers.methods.stretch_hang then
- stretch = fontdata[font].parameters[6]
+ stretch = fontdata[font].parameters.quad
end
-- penalty before break
local interspecialskip = - stretch * hang_data.inter_char_half_factor
diff --git a/tex/context/base/font-syn.lua b/tex/context/base/font-syn.lua
index ec62048a7..24456e7eb 100644
--- a/tex/context/base/font-syn.lua
+++ b/tex/context/base/font-syn.lua
@@ -172,11 +172,10 @@ function fonts.names.identify()
local pathlist = fonts.names.getpaths(texmf.instance) -- input.expanded_path_list(texmf.instance,"osfontdir")
if pathlist then
for _, path in ipairs(pathlist) do
- -- not that much needed
- -- path = input.clean_path(path .. "/")
- -- path = path:gsub("/+","/")
+ path = input.clean_path(path .. "/")
+ path = path:gsub("/+","/")
local pattern = path .. "*." .. suffix
- logs.info("fontnames", "globbing path " .. pattern)
+ logs.report("fontnames", "globbing path " .. pattern)
local t = dir.glob(pattern)
for _, name in pairs(t) do -- ipairs
local mode = lfs.attributes(name,'mode')
diff --git a/tex/context/base/font-tfm.lua b/tex/context/base/font-tfm.lua
index 4acdc2c8b..175dd6d10 100644
--- a/tex/context/base/font-tfm.lua
+++ b/tex/context/base/font-tfm.lua
@@ -191,20 +191,21 @@ function fonts.tfm.do_scale(tfmtable, scaledpoints)
for k,v in pairs(tfmtable) do
t[k] = (type(v) == "table" and { }) or v
end
--- new
-if tfmtable.fonts then
- t.fonts = table.fastcopy(tfmtable.fonts)
-end
- -- local zerobox = { 0, 0, 0, 0 }
- local tp = t.parameters
- for k,v in pairs(tfmtable.parameters) do
- if k == 1 then
- tp[k] = v
- else
- tp[k] = v*delta
- end
+ -- new
+ if tfmtable.fonts then
+ t.fonts = table.fastcopy(tfmtable.fonts)
end
- local protrusionfactor = 1000/tp[6] -- emwidth
+ -- local zerobox = { 0, 0, 0, 0 }
+ local tp = t.parameters
+ local tfmp = tfmtable.parameters -- let's check for indexes
+ tp.slant = (tfmp.slant or tfmp[1] or 0)
+ tp.space = (tfmp.space or tfmp[2] or 0)*delta
+ tp.space_stretch = (tfmp.space_stretch or tfmp[3] or 0)*delta
+ tp.space_shrink = (tfmp.space_shrink or tfmp[4] or 0)*delta
+ tp.x_height = (tfmp.x_height or tfmp[5] or 0)*delta
+ tp.quad = (tfmp.quad or tfmp[6] or 0)*delta
+ tp.extra_space = (tfmp.extra_space or tfmp[7] or 0)*delta
+ local protrusionfactor = (tp.quad ~= 0 and 1000/tp.quad) or 0
local tc = t.characters
for k,v in pairs(tfmtable.characters) do
local description = v.description or v -- shared data
@@ -681,9 +682,9 @@ function fonts.tfm.replacements(tfm,value)
--~ tfm.characters[0x0022] = table.fastcopy(tfm.characters[0x201D])
--~ tfm.characters[0x0027] = table.fastcopy(tfm.characters[0x2019])
--~ tfm.characters[0x0060] = table.fastcopy(tfm.characters[0x2018])
- tfm.characters[0x0022] = tfm.characters[0x201D]
+--~ tfm.characters[0x0022] = tfm.characters[0x201D]
tfm.characters[0x0027] = tfm.characters[0x2019]
- tfm.characters[0x0060] = tfm.characters[0x2018]
+--~ tfm.characters[0x0060] = tfm.characters[0x2018]
end
-- auto complete font with missing composed characters
diff --git a/tex/context/base/l-dir.lua b/tex/context/base/l-dir.lua
index b6c70d264..d24eb33a9 100644
--- a/tex/context/base/l-dir.lua
+++ b/tex/context/base/l-dir.lua
@@ -127,21 +127,27 @@ if lfs then do
P(1)
)^0 )
- local function glob(str)
- local split = pattern:match(str)
- if split then
- local t = { }
- local action = action or function(name) t[#t+1] = name end
- local root, path, base = split[1], split[2], split[3]
- local recurse = base:find("**")
- local start = root .. path
- local result = filter:match(start .. base)
---~ print(str, start, result)
---~ print(start, result)
- glob_pattern(start,result,recurse,action)
+ local function glob(str,t)
+ if type(str) == "table" then
+ local t = t or { }
+ for _, s in ipairs(str) do
+ glob(s,t)
+ end
return t
else
- return { }
+ local split = pattern:match(str)
+ if split then
+ local t = t or { }
+ local action = action or function(name) t[#t+1] = name end
+ local root, path, base = split[1], split[2], split[3]
+ local recurse = base:find("**")
+ local start = root .. path
+ local result = filter:match(start .. base)
+ glob_pattern(start,result,recurse,action)
+ return t
+ else
+ return { }
+ end
end
end
diff --git a/tex/context/base/l-file.lua b/tex/context/base/l-file.lua
index 8795bf03f..91998532b 100644
--- a/tex/context/base/l-file.lua
+++ b/tex/context/base/l-file.lua
@@ -152,3 +152,7 @@ end
file.readdata = io.loaddata
file.savedata = io.savedata
+
+function file.copy(oldname,newname)
+ file.savedata(newname,io.loaddata(oldname))
+end
diff --git a/tex/context/base/l-xml.lua b/tex/context/base/l-xml.lua
index 06f527cad..752ff3f74 100644
--- a/tex/context/base/l-xml.lua
+++ b/tex/context/base/l-xml.lua
@@ -8,6 +8,8 @@ if not modules then modules = { } end modules ['l-xml'] = {
-- RJ: key=value ... lpeg.Ca(lpeg.Cc({}) * (pattern-producing-key-and-value / rawset)^0)
+-- some code may move to l-xmlext
+
--[[ldx--
<p>The parser used here is inspired by the variant discussed in the lua book, but
handles comment and processing instructions, has a different structure, provides
@@ -154,7 +156,7 @@ do
local remove, nsremap, resolvens = table.remove, xml.xmlns, xml.resolvens
- local stack, top, dt, at, xmlns, errorstr = {}, {}, {}, {}, {}, nil
+ local stack, top, dt, at, xmlns, errorstr, entities = {}, {}, {}, {}, {}, nil, {}
local mt = { __tostring = xml.text }
@@ -214,9 +216,10 @@ do
end
local resolved = (namespace == "" and xmlns[#xmlns]) or nsremap[namespace] or namespace
top = stack[#stack]
- setmetatable(top, mt)
dt = top.dt
- dt[#dt+1] = { ns=namespace or "", rn=resolved, tg=tag, at=at, dt={}, __p__ = top }
+ local t = { ns=namespace or "", rn=resolved, tg=tag, at=at, dt={}, __p__ = top }
+ dt[#dt+1] = t
+ setmetatable(t, mt)
at = { }
if at.xmlns then
remove(xmlns)
@@ -229,14 +232,6 @@ do
dt[#dt+1] = text
end
end
- --~ local function add_special(what, spacing, text)
- --~ if #spacing > 0 then
- --~ dt[#dt+1] = spacing
- --~ end
- --~ top = stack[#stack] -- hm, left over 1
- --~ setmetatable(top, mt) -- hm, left over 2
- --~ dt[#dt+1] = { special=true, ns="", tg=what, dt={text} }
- --~ end
local function add_special(what, spacing, text)
if #spacing > 0 then
dt[#dt+1] = spacing
@@ -296,12 +291,20 @@ do
local somecomment = C((1 - endcomment )^0)
local somecdata = C((1 - endcdata )^0)
+ function entity(k,v) entities[k] = v end
+
local begindoctype = open * P("!DOCTYPE")
local enddoctype = close
- local publicdoctype = P("PUBLIC") * somespace * value * somespace * value * somespace * balanced^0
- local systemdoctype = P("SYSTEM") * somespace * value * somespace * balanced^0
- local simpledoctype = (1-close)^1 * balanced^0
- local somedoctype = C((somespace * P(publicdoctype + systemdoctype + simpledoctype) * optionalspace)^0)
+ local beginset = P("[")
+ local endset = P("]")
+ local doctypename = C((1-somespace)^0)
+ local elementdoctype = optionalspace * P("<!ELEMENT") * (1-close)^0 * close
+ local entitydoctype = optionalspace * P("<!ENTITY") * somespace * (doctypename * somespace * value)/entity * optionalspace * close
+ local publicdoctype = doctypename * somespace * P("PUBLIC") * somespace * value * somespace * value * somespace
+ local systemdoctype = doctypename * somespace * P("SYSTEM") * somespace * value * somespace
+ local definitiondoctype= doctypename * somespace * beginset * P(elementdoctype + entitydoctype)^0 * optionalspace * endset
+ local simpledoctype = (1-close)^1 -- * balanced^0
+ local somedoctype = C((somespace * (publicdoctype + systemdoctype + definitiondoctype + simpledoctype) * optionalspace)^0)
local instruction = (spacing * begininstruction * someinstruction * endinstruction) / function(...) add_special("@pi@",...) end
local comment = (spacing * begincomment * somecomment * endcomment ) / function(...) add_special("@cm@",...) end
@@ -327,9 +330,11 @@ do
children = text + V("parent") + emptyelement + comment + cdata + instruction,
}
- function xml.convert(data, no_root, strip_cm_and_dt)
+ -- todo: xml.new + properties like entities and strip and such (store in root)
+
+ function xml.convert(data, no_root, strip_cm_and_dt, given_entities) -- maybe use table met k/v (given_entities may disapear)
strip = strip_cm_and_dt or xml.strip_cm_and_dt
- stack, top, at, xmlns, errorstr, result = {}, {}, {}, {}, nil, nil
+ stack, top, at, xmlns, errorstr, result, entities = {}, {}, {}, {}, nil, nil, given_entities or {}
stack[#stack+1] = top
top.dt = { }
dt = top.dt
@@ -348,7 +353,7 @@ do
result = stack[1]
end
if not no_root then
- result = { special = true, ns = "", tg = '@rt@', dt = result.dt, at={} }
+ result = { special = true, ns = "", tg = '@rt@', dt = result.dt, at={}, entities = entities }
setmetatable(result, mt)
local rdt = result.dt
for k=1,#rdt do
@@ -382,7 +387,7 @@ do
return root and not root.error
end
- xml.error_handler = (logs and logs.report) or print
+ xml.error_handler = (logs and logs.report) or (input and input.report) or print
end
@@ -560,7 +565,7 @@ do
handle("<" .. ens .. ":" .. etg .. " " .. concat(ats," ") .. "/>")
else
-- handle(format("<%s:%s/>",ens,etg))
- handle("<" .. ens .. ":" .. "/>")
+ handle("<" .. ens .. ":" .. etg .. "/>")
end
end
else
@@ -742,6 +747,10 @@ will explain more about its usage in other documents.</p>
do
+ xml.functions = xml.functions or { }
+
+ local functions = xml.functions
+
local actions = {
[10] = "stay",
[11] = "parent",
@@ -764,19 +773,72 @@ do
[40] = "processing instruction",
}
- local function make_expression(str) --could also be an lpeg
- str = str:gsub("@([a-zA-Z%-_]+)", "(a['%1'] or '')")
- str = str:gsub("position%(%)", "i")
- str = str:gsub("text%(%)", "t")
- str = str:gsub("!=", "~=")
- str = str:gsub("([^=!~<>])=([^=!~<>])", "%1==%2")
- str = str:gsub("([a-zA-Z%-_]+)%(", "functions.%1(")
- return str, loadstring(format("return function(functions,i,a,t) return %s end", str))()
+ --~ local function make_expression(str) --could also be an lpeg
+ --~ str = str:gsub("@([a-zA-Z%-_]+)", "(a['%1'] or '')")
+ --~ str = str:gsub("position%(%)", "i")
+ --~ str = str:gsub("text%(%)", "t")
+ --~ str = str:gsub("!=", "~=")
+ --~ str = str:gsub("([^=!~<>])=([^=!~<>])", "%1==%2")
+ --~ str = str:gsub("([a-zA-Z%-_]+)%(", "functions.%1(")
+ --~ return str, loadstring(format("return function(functions,i,a,t) return %s end", str))()
+ --~ end
+
+ -- a rather dumb lpeg
+
+ local P, S, R, C, V, Cc = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.V, lpeg.Cc
+
+ local lp_position = P("position()") / "id"
+ local lp_text = P("text()") / "tx"
+ local lp_name = P("name()") / "((rt.ns~='' and rt.ns..':'..rt.tg) or '')"
+ local lp_tag = P("tag()") / "(rt.tg or '')"
+ local lp_ns = P("ns()") / "(rt.ns or '')"
+ local lp_noequal = P("!=") / "~=" + P("<=") + P(">=") + P("==")
+ local lp_doequal = P("=") / "=="
+ local lp_attribute = P("@") / "" * Cc("(at['") * R("az","AZ","--","__")^1 * Cc("'] or '')")
+
+ local lp_function = C(R("az","AZ","--","__")^1) * P("(") / function(t)
+ if functions[t] then
+ return "functions." .. t .. "("
+ else
+ return "functions.error("
+ end
end
- local map = { }
+ local lparent = lpeg.P("(")
+ local rparent = lpeg.P(")")
+ local noparent = 1 - (lparent+rparent)
+ local nested = lpeg.P{lparent * (noparent + lpeg.V(1))^0 * rparent}
+ local value = lpeg.P(lparent * lpeg.C((noparent + nested)^0) * rparent)
- local P, S, R, C, V = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.V
+--~ local value = P { "(" * C(((1 - S("()")) + V(1))^0) * ")" }
+
+ local lp_special = (C(P("name")+P("text")+P("tag"))) * value / function(t,s)
+ if functions[t] then
+ if s then
+ return "functions." .. t .. "(rt,k," .. s ..")"
+ else
+ return "functions." .. t .. "(rt,k)"
+ end
+ else
+ return "functions.error(" .. t .. ")"
+ end
+ end
+
+ local converter = lpeg.Cs ( (
+ lp_position +
+ lp_text + lp_name + -- fast one
+ lp_special +
+ lp_noequal + lp_doequal +
+ lp_attribute +
+ lp_function +
+ 1 )^1 )
+
+ local function make_expression(str)
+ str = converter:match(str)
+ return str, loadstring(format("return function(functions,id,at,tx,rt,k) return %s end", str))()
+ end
+
+ local map = { }
local space = S(' \r\n\t')
local squote = S("'")
@@ -796,8 +858,10 @@ do
local bar = P('|')
local hat = P('^')
local valid = R('az', 'AZ', '09') + S('_-')
- local name_yes = C(valid^1) * colon * C(valid^1 + star) -- permits ns:*
- local name_nop = C(P(true)) * C(valid^1)
+--~ local name_yes = C(valid^1 + star) * colon * C(valid^1 + star) -- permits ns:* *:tg *:*
+--~ local name_nop = C(P(true)) * C(valid^1)
+ local name_yes = C(valid^1 + star) * colon * C(valid^1 + star) -- permits ns:* *:tg *:*
+ local name_nop = Cc("*") * C(valid^1)
local name = name_yes + name_nop
local number = C((S('+-')^0 * R('09')^1)) / tonumber
local names = (bar^0 * name)^1
@@ -859,8 +923,10 @@ do
local expression = (is_one * is_expression)/ function(...) map[#map+1] = { 31, true, ... } end
local dont_expression = (is_none * is_expression)/ function(...) map[#map+1] = { 31, false, ... } end
- local self_expression = ( is_expression)/ function(...) map[#map+1] = { 31, true, "", "*", ... } end
- local dont_self_expression = (exclam * is_expression)/ function(...) map[#map+1] = { 31, true, "", "*", ... } end
+ local self_expression = ( is_expression) / function(...) if #map == 0 then map[#map+1] = { 11 } end
+ map[#map+1] = { 31, true, "*", "*", ... } end
+ local dont_self_expression = (exclam * is_expression) / function(...) if #map == 0 then map[#map+1] = { 11 } end
+ map[#map+1] = { 31, false, "*", "*", ... } end
local instruction = (instructiontag * text ) / function(...) map[#map+1] = { 40, ... } end
local nothing = (empty ) / function( ) map[#map+1] = { 15 } end -- 15 ?
@@ -988,8 +1054,10 @@ do
function xml.xshow(e,...) -- also handy when report is given, use () to isolate first e
local t = { ... }
local report = (type(t[#t]) == "function" and t[#t]) or fallbackreport
- if not e then
+ if e == nil then
report("<!-- no element -->\n")
+ elseif type(e) ~= "table" then
+ report(tostring(e))
elseif e.tg then
report(tostring(e) .. "\n")
else
@@ -1016,8 +1084,6 @@ advance what we want to do with the found element the handle gets three argument
functions.</p>
--ldx]]--
-xml.functions = { }
-
do
local functions = xml.functions
@@ -1028,11 +1094,85 @@ do
functions.lower = string.lower
functions.number = tonumber
functions.boolean = toboolean
- functions.oneof = function(s,...) -- slow
+
+ functions.oneof = function(s,...) -- slow
local t = {...} for i=1,#t do if s == t[i] then return true end end return false
end
+ functions.error = function(str)
+ xml.error_handler("unknown function in lpath expression",str)
+ return false
+ end
+ functions.text = function(root,k,n) -- unchecked, maybe one deeper
+ local t = type(t)
+ if t == "string" then
+ return t
+ else -- todo n
+ local rdt = root.dt
+ return (rdt and rdt[k]) or root[k] or ""
+ end
+ end
+ functions.name = function(root,k,n)
+ -- way too fuzzy
+ local found
+ if not k or not n then
+ local ns, tg = root.ns, root.tg
+ if not tg then
+ for i=1,#root do
+ local e = root[i]
+ if type(e) == "table" then
+ found = e
+ break
+ end
+ end
+ elseif ns == "" then
+ return tg
+ else
+ return ns .. ":" .. tg
+ end
+ elseif n == 0 then
+ local e = root[k]
+ if type(e) ~= "table" then
+ found = e
+ end
+ elseif n < 0 then
+ for i=k-1,1,-1 do
+ local e = root[i]
+ if type(e) == "table" then
+ if n == -1 then
+ found = e
+ break
+ else
+ n = n + 1
+ end
+ end
+ end
+ else
+--~ print(k,n,#root)
+ for i=k+1,#root,1 do
+ local e = root[i]
+ if type(e) == "table" then
+ if n == 1 then
+ found = e
+ break
+ else
+ n = n - 1
+ end
+ end
+ end
+ end
+ if found then
+ local ns, tg = found.ns, found.tg
+ if ns ~= "" then
+ return ns .. ":" .. tg
+ else
+ return tg
+ end
+ else
+ return ""
+ end
+ end
- local function traverse(root,pattern,handle,reverse,index,parent,wildcard)
+ local function traverse(root,pattern,handle,reverse,index,parent,wildcard) -- multiple only for tags, not for namespaces
if not root then -- error
return false
elseif pattern == false then -- root
@@ -1059,11 +1199,15 @@ do
local rootdt = root.dt
for k=1,#rootdt do
local e = rootdt[k]
- local ns, tg = (e.rn or e.ns), e.tg
- local matched = ns == action[3] and tg == action[4]
- if not action[2] then matched = not matched end
- if matched then
- if handle(root,rootdt,k) then return false end
+ local tg = e.tg
+ if e.tg then
+ local ns = e.rn or e.ns
+ local ns_a, tg_a = action[3], action[4]
+ local matched = (ns_a == "*" or ns == ns_a) and (tg_a == "*" or tg == tg_a)
+ if not action[2] then matched = not matched end
+ if matched then
+ if handle(root,rootdt,k) then return false end
+ end
end
end
elseif command == 11 then -- parent
@@ -1106,8 +1250,14 @@ do
if tg then
idx = idx + 1
if command == 30 then
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
+ local ns_a, tg_a = action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
if not action[2] then matched = not matched end
if matched then
n = n + dn
@@ -1125,57 +1275,102 @@ do
else
local matched, multiple = false, false
if command == 20 then -- match
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
+ local ns_a, tg_a = action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
if not action[2] then matched = not matched end
elseif command == 21 then -- match one of
multiple = true
for i=3,#action,2 do
- if ns == action[i] and tg == action[i+1] then matched = true break end
+ local ns_a, tg_a = action[i], action[i+1]
+ if (ns_a == "*" or ns == ns_a) and (tg == "*" or tg == tg_a) then
+ matched = true
+ break
+ end
end
if not action[2] then matched = not matched end
elseif command == 22 then -- eq
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
- if not action[2] then matched = not matched end
+ local ns_a, tg_a = action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
matched = matched and e.at[action[6]] == action[7]
elseif command == 23 then -- ne
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
+ local ns_a, tg_a = action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
if not action[2] then matched = not matched end
matched = mached and e.at[action[6]] ~= action[7]
elseif command == 24 then -- one of eq
multiple = true
for i=3,#action-2,2 do
- if ns == action[i] and tg == action[i+1] then matched = true break end
+ local ns_a, tg_a = action[i], action[i+1]
+ if (ns_a == "*" or ns == ns_a) and (tg == "*" or tg == tg_a) then
+ matched = true
+ break
+ end
end
if not action[2] then matched = not matched end
matched = matched and e.at[action[#action-1]] == action[#action]
elseif command == 25 then -- one of ne
multiple = true
for i=3,#action-2,2 do
- if ns == action[i] and tg == action[i+1] then matched = true break end
+ local ns_a, tg_a = action[i], action[i+1]
+ if (ns_a == "*" or ns == ns_a) and (tg == "*" or tg == tg_a) then
+ matched = true
+ break
+ end
end
if not action[2] then matched = not matched end
matched = matched and e.at[action[#action-1]] ~= action[#action]
elseif command == 27 then -- has attribute
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
+ local ns_a, tg_a = action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
if not action[2] then matched = not matched end
matched = matched and e.at[action[5]]
elseif command == 28 then -- has value
- local edt = e.dt
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
+ local edt, ns_a, tg_a = e.dt, action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
if not action[2] then matched = not matched end
matched = matched and edt and edt[1] == action[5]
elseif command == 31 then
- local edt = e.dt
- local tg_a = action[4]
- if tg == tg_a then matched = ns == action[3] elseif tg_a == '*' then matched, multiple = ns == action[3], true else matched = false end
+ local edt, ns_a, tg_a = e.dt, action[3], action[4]
+ if tg == tg_a then
+ matched = ns_a == "*" or ns == ns_a
+ elseif tg_a == '*' then
+ matched, multiple = ns_a == "*" or ns == ns_a, true
+ else
+ matched = false
+ end
if not action[2] then matched = not matched end
if matched then
- matched = action[6](functions,idx,e.at or { },edt[1])
+ matched = action[6](functions,idx,e.at or { },edt[1],rootdt,k)
end
end
if matched then -- combine tg test and at test
@@ -1351,7 +1546,7 @@ do
end
function xml.filters.text(root,pattern,arguments) -- ?? why index, tostring slow
local dtk, rt, dt, dk = xml.filters.index(root,pattern,arguments)
- if dtk then
+ if dtk then -- n
local dtkdt = dtk.dt
if not dtkdt then
return "", rt, dt, dk
@@ -1364,6 +1559,22 @@ do
return "", rt, dt, dk
end
end
+ function xml.filters.tag(root,pattern,n)
+ local tag = ""
+ traverse(root, lpath(pattern), function(r,d,k)
+ tag = xml.functions.tag(d,k,n and tonumber(n))
+ return true
+ end)
+ return tag
+ end
+ function xml.filters.name(root,pattern,n)
+ local tag = ""
+ traverse(root, lpath(pattern), function(r,d,k)
+ tag = xml.functions.name(d,k,n and tonumber(n))
+ return true
+ end)
+ return tag
+ end
--[[ldx--
<p>For splitting the filter function from the path specification, we can
@@ -1375,21 +1586,28 @@ do
local P, S, R, C, V, Cc = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.V, lpeg.Cc
- local name = (R("az","AZ")+R("_-"))^1
- local path = C(((1-P('/'))^0 * P('/'))^1)
+ local slash = P('/')
+ local name = (R("az","AZ","--","__"))^1
+ local path = C(((1-slash)^0 * slash)^1)
local argument = P { "(" * C(((1 - S("()")) + V(1))^0) * ")" }
local action = Cc(1) * path * C(name) * argument
local attribute = Cc(2) * path * P('@') * C(name)
+ local direct = Cc(3) * Cc("../*") * slash^0 * C(name) * argument
- local parser = action + attribute
+ local parser = direct + action + attribute
local filters = xml.filters
local attribute_filter = xml.filters.attributes
local default_filter = xml.filters.default
+ -- todo: also hash, could be gc'd
+
function xml.filter(root,pattern)
local kind, a, b, c = parser:match(pattern)
- if kind == 1 then
+--~ if xml.trace_lpath then
+--~ print(pattern,kind,a,b,c)
+--~ end
+ if kind == 1 or kind == 3 then
return (filters[b] or default_filter)(root,a,c)
elseif kind == 2 then
return attribute_filter(root,a,b)
@@ -1429,12 +1647,14 @@ do
<p>The following functions collect elements and texts.</p>
--ldx]]--
+ -- still somewhat bugged
+
function xml.collect_elements(root, pattern, ignorespaces)
local rr, dd = { }, { }
traverse(root, lpath(pattern), function(r,d,k)
local dk = d and d[k]
if dk then
- if ignorespaces and type(dk) == "string" and dk:find("^%s*$") then
+ if ignorespaces and type(dk) == "string" and dk:find("[^%S]") then
-- ignore
else
local n = #rr+1
@@ -1467,6 +1687,24 @@ do
return t
end
+ function xml.collect_tags(root, pattern, nonamespace)
+ local t = { }
+ xml.traverse(root, xml.lpath(pattern), function(r,d,k)
+ local dk = d and d[k]
+ if dk and type(dk) == "table" then
+ local ns, tg = e.ns, e.tg
+ if nonamespace then
+ t[#t+1] = tg -- if needed we can return an extra table
+ elseif ns == "" then
+ t[#t+1] = tg
+ else
+ t[#t+1] = ns .. ":" .. tg
+ end
+ end
+ end)
+ return #t > 0 and {}
+ end
+
--[[ldx--
<p>Often using an iterators looks nicer in the code than passing handler
functions. The <l n='lua'/> book describes how to use coroutines for that
@@ -1920,6 +2158,8 @@ do if unicode and unicode.utf8 then
return char(tonumber(s,16))
end
+ local entities = xml.entities -- global entities
+
function utfize(root)
local d = root.dt
for k=1,#d do
@@ -1937,8 +2177,6 @@ do if unicode and unicode.utf8 then
xml.utfize = utfize
- local entities = xml.entities
-
local function resolve(e) -- hex encoded always first, just to avoid mkii fallbacks
if e:find("#x") then
return char(tonumber(e:sub(3),16))
@@ -1953,20 +2191,24 @@ do if unicode and unicode.utf8 then
end
end
- function xml.resolve_entities(root)
- local d = root.dt
- for k=1,#d do
- local dk = d[k]
- if type(dk) == "string" then
- if dk:find("&.-;") then
- d[k] = dk:gsub("&(.-);",resolve)
+ local function resolve_entities(root)
+ if not root.special or root.tg == "@rt@" then
+ local d = root.dt
+ for k=1,#d do
+ local dk = d[k]
+ if type(dk) == "string" then
+ if dk:find("&.-;") then
+ d[k] = dk:gsub("&(.-);",resolve)
+ end
+ else
+ resolve_entities(dk)
end
- else
- utfize(dk)
end
end
end
+ xml.resolve_entities = resolve_entities
+
function xml.utfize_text(str)
if str:find("&#") then
return (str:gsub("&#x(.-);",toutf))
@@ -1991,6 +2233,18 @@ do if unicode and unicode.utf8 then
end
end
+ -- experimental, this will be done differently
+
+ function xml.merge_entities(root)
+ local documententities = root.entities
+ local allentities = xml.entities
+ if documententities then
+ for k, v in pairs(documententities) do
+ allentities[k] = v
+ end
+ end
+ end
+
end end
-- xml.set_text_cleanup(xml.show_text_entities)
@@ -2026,3 +2280,14 @@ end end
--~ <windows>my secret</mouse>
--~ </story>
--~ ]]
+
+--~ x = xml.convert([[
+--~ <a><b n='01'>01</b><b n='02'>02</b><x>xx</x><b n='03'>03</b><b n='04'>OK</b></a>
+--~ ]])
+--~ xml.xshow(xml.first(x,"b[tag(2) == 'x']"))
+--~ xml.xshow(xml.first(x,"b[tag(1) == 'x']"))
+--~ xml.xshow(xml.first(x,"b[tag(-1) == 'x']"))
+--~ xml.xshow(xml.first(x,"b[tag(-2) == 'x']"))
+
+--~ print(xml.filter(x,"b/tag(2)"))
+--~ print(xml.filter(x,"b/tag(1)"))
diff --git a/tex/context/base/lang-url.lua b/tex/context/base/lang-url.lua
index d3b4848a9..fc78783be 100644
--- a/tex/context/base/lang-url.lua
+++ b/tex/context/base/lang-url.lua
@@ -79,4 +79,12 @@ do
tex.sprint(tex.ctxcatcodes,str)
end
-end
+ -- todo, no interface in mkiv yet
+
+ function commands.hyphenatedurl.setcharacters(str,value) -- 1, 2 == before, after
+ for ch in utf.gmatch(".") do
+ chars[ch] = value or 1
+ end
+ end
+
+ -- commands.hyphenatedurl.setcharacters("')]}",2)
diff --git a/tex/context/base/lxml-ini.lua b/tex/context/base/lxml-ini.lua
index 800328ba4..38f692553 100644
--- a/tex/context/base/lxml-ini.lua
+++ b/tex/context/base/lxml-ini.lua
@@ -56,16 +56,6 @@ do
content / texsprint
)^0
---~ local function sprint(root)
---~ if not root then
---~ -- quit
---~ elseif type(root) == 'string' then
---~ capture:match(root)
---~ elseif next(root) then
---~ serialize(root,sprint,nil,nil,specialhandler)
---~ end
---~ end
-
local function sprint(root)
if not root then
-- quit
@@ -84,8 +74,13 @@ do
function xml.tprint(root) -- we can move sprint inline
local tr = type(root)
if tr == "table" then
- for i=1,#root do
- sprint(root[i])
+ local n = #root
+ if n == 0 then
+ sprint("") -- empty element, else no setup triggered (check this! )
+ else
+ for i=1,n do
+ sprint(root[i])
+ end
end
elseif tr == "string" then
sprint(root)
@@ -207,7 +202,7 @@ function lxml.utfize(id)
end
local xmlfilter, xmlfirst, xmllast, xmlall = xml.filter, xml.first, xml.last, xml.all
-local xmlcollect, xmlcontent, xmlcollect_texts = xml.collect, xml.content, xml.collect_texts
+local xmlcollect, xmlcontent, xmlcollect_texts, xmlcollect_tags = xml.collect, xml.content, xml.collect_texts, xml.collect_tags
local xmlattribute, xmlindex = xml.filters.attribute, xml.filters.index
local xmlelements = xml.elements
@@ -221,8 +216,11 @@ function lxml.last(id,pattern)
xmlsprint(xmllast(get_id(id),pattern))
end
function lxml.all(id,pattern)
- xmltprint(xmlcollect(get_id(id),pattern))
+xmltprint(xmlcollect(get_id(id),pattern))
+--~ faster, no intermediate table, we need to clean up l-xml
+--~ xml.traverse(get_id(id), xml.lpath(pattern), function(r,d,k) xmlsprint(d[k]) return false end)
end
+
function lxml.nonspace(id,pattern)
xmltprint(xmlcollect(get_id(id),pattern,true))
end
@@ -238,6 +236,13 @@ function lxml.text(id,pattern)
xmltprint(xmlcollect_texts(get_id(id),pattern) or {})
end
+function lxml.tags(id,pattern)
+ local tags = xmlcollect_tags(get_id(id),pattern)
+ if tags then
+ texsprint(concat(tags,","))
+ end
+end
+
function lxml.raw(id,pattern) -- the content, untouched by commands
local c = xmlfilter(get_id(id),pattern)
if c then
@@ -245,6 +250,14 @@ function lxml.raw(id,pattern) -- the content, untouched by commands
end
end
+function lxml.snippet(id,i)
+ local e = lxml.id(id)
+ if e then
+ local edt = e.dt
+ xmlsprint((edt and edt[i]) or "")
+ end
+end
+
function lxml.stripped(id,pattern)
local str = xmlcontent(get_id(id),pattern) or ""
xmlsprint((str:gsub("^%s*(.-)%s*$","%1")))
@@ -253,6 +266,9 @@ end
function lxml.flush(id)
xmlsprint(get_id(id).dt)
end
+function lxml.direct(id)
+ xmlsprint(get_id(id))
+end
function lxml.index(id,pattern,i)
xmlsprint((xmlindex(get_id(id),pattern,i)))
@@ -266,7 +282,7 @@ end
function lxml.count(id,pattern)
texsprint(xml.count(get_id(id),pattern) or 0)
end
-function lxml.name(id) -- or remapped name?
+function lxml.name(id) -- or remapped name? -> lxml.info, combine
local r = get_id(id)
if r.ns then
texsprint(r.ns .. ":" .. r.tg)
@@ -274,7 +290,7 @@ function lxml.name(id) -- or remapped name?
texsprint(r.tg)
end
end
-function lxml.tag(id)
+function lxml.tag(id) -- tag vs name -> also in l-xml tag->name
texsprint(get_id(id).tg or "")
end
function lxml.namespace(id) -- or remapped name?
@@ -286,22 +302,28 @@ end
--~ texsprint(concat(xml.collect_texts(get_id(id),what,true),separator or ""))
--~ end
-function lxml.concat(id,what,separator,lastseparator)
- local t = xmlcollect_texts(get_id(id),what,true)
+function lxml.concatrange(id,what,start,stop,separator,lastseparator) -- test this on mml
+ local t = xml.collect_elements(lxml.id(id),what,true) -- ignorespaces
local separator = separator or ""
local lastseparator = lastseparator or separator or ""
- for i=1,#t do
- texsprint(t[i])
+ start, stop = (start == "" and 1) or start or 1, (stop == "" and #t) or stop or #t
+ if stop < 0 then stop = #t + stop end -- -1 == last-1
+ for i=start,stop do
+ xmlsprint(t[i])
if i == #t then
-- nothing
elseif i == #t-1 and lastseparator ~= "" then
- texsprint(tex.ctxcatcodes,lastseparator)
+ tex.sprint(tex.ctxcatcodes,lastseparator)
elseif separator ~= "" then
- texsprint(tex.ctxcatcodes,separator)
+ tex.sprint(tex.ctxcatcodes,separator)
end
end
end
+function lxml.concat(id,what,separator,lastseparator)
+ lxml.concatrange(id,what,false,false,separator,lastseparator)
+end
+
-- string : setup
-- true : text (no <self></self>)
-- false : ignore
@@ -327,10 +349,7 @@ function xml.command(root, command)
command(root)
elseif command == true then
-- text (no <self></self>) / so, no mkii fallback then
---~ local n = #myself + 1
---~ myself[n] = root
---~ texsprint(tex.ctxcatcodes,format("\\ctxlua{lxml.flush(%s)}",n)) -- hm, efficient?
-xmltprint(root.dt)
+ xmltprint(root.dt)
elseif command == false then
-- ignore
else
@@ -425,7 +444,7 @@ function lxml.setsetup(id,pattern,setup)
end
end
-function lxml.idx(id,pattern,i)
+function lxml.idx(id,pattern,i) -- hm, hashed, needed?
local r = get_id(id)
if r then
local rp = r.patterns
@@ -443,23 +462,39 @@ function lxml.idx(id,pattern,i)
end
end
+function lxml.info(id)
+ id = get_id(id)
+ local ns, tg = id.ns, id.tg
+ if ns and ns ~= "" then -- best make a function
+ tg = ns .. ":" .. tg
+ else
+ tg = tg or "?"
+ end
+ texsprint(tg)
+end
+
do
local traverse = xml.traverse
local lpath = xml.lpath
- function xml.filters.command(root,pattern,command) -- met zonder ''
- command = command:gsub("^([\'\"])(.-)%1$", "%2")
+ local function command(root,pattern,cmd) -- met zonder ''
+ cmd = cmd:gsub("^([\'\"])(.-)%1$", "%2")
traverse(root, lpath(pattern), function(r,d,k)
-- this can become pretty large
+ local m = (d and d[k]) or r -- brrr this r, maybe away
+if type(m) == "table" then -- probbaly a bug
local n = #myself + 1
- myself[n] = (d and d[k]) or r
- texsprint(tex.ctxcatcodes,format("\\xmlsetup{%s}{%s}",n,command))
+ myself[n] = m
+ texsprint(tex.ctxcatcodes,format("\\xmlsetup{%s}{%s}",n,cmd))
+end
end)
end
- function lxml.command(id,pattern,command)
- xml.filters.command(get_id(id),pattern,command)
+ xml.filters.command = command
+
+ function lxml.command(id,pattern,cmd)
+ command(get_id(id),pattern,cmd)
end
end
@@ -662,6 +697,8 @@ do
end
end
+ -- can be made faster: just recurse over whole table, todo
+
function lxml.set_command_to_text(id)
xml.with_elements_only(get_id(id),to_text)
end
diff --git a/tex/context/base/lxml-ini.tex b/tex/context/base/lxml-ini.tex
index 93ab1b704..654808b19 100644
--- a/tex/context/base/lxml-ini.tex
+++ b/tex/context/base/lxml-ini.tex
@@ -17,56 +17,62 @@
\unprotect
-\def\xmlload #1#2{\ctxlua{lxml.load("#1","#2")}}
-\def\xmlloadbuffer #1#2{\ctxlua{lxml.loadbuffer("#1","#2")}}
-\def\xmlutfize #1{\ctxlua{lxml.utfize("#1")}}
-\def\xmlfirst #1#2{\ctxlua{lxml.first("#1","#2")}}
-\def\xmllast #1#2{\ctxlua{lxml.last("#1","#2")}}
-\def\xmlall #1#2{\ctxlua{lxml.all("#1","#2")}}
-\def\xmlfilter #1#2{\ctxlua{lxml.filter("#1","#2")}}
-\def\xmlcommand #1#2#3{\ctxlua{lxml.command("#1","#2","#3")}}
-\def\xmlnonspace #1#2{\ctxlua{lxml.nonspace("#1","#2")}}
-\def\xmltext #1#2{\ctxlua{lxml.text("#1","#2")}}
-\def\xmlcontent #1#2{\ctxlua{lxml.content("#1","#2")}}
-\def\xmlraw #1#2{\ctxlua{lxml.raw("#1","#2")}}
-\def\xmlstripped #1#2{\ctxlua{lxml.stripped("#1","#2")}}
-\def\xmlstrip #1#2{\ctxlua{lxml.strip("#1","#2")}}
-\def\xmlflush #1{\ctxlua{lxml.flush("#1")}}
-\def\xmlindex #1#2#3{\ctxlua{lxml.index("#1","#2",\number#3)}}
-\def\xmlidx #1#2#3{\ctxlua{lxml.idx("#1","#2",\number#3)}}
-\def\xmlcount #1#2{\ctxlua{lxml.count("#1","#2")}}
-\def\xmlname #1{\ctxlua{lxml.name("#1")}}
-\def\xmlnamespace #1{\ctxlua{lxml.namespace("#1")}}
-\def\xmltag #1{\ctxlua{lxml.tag("#1")}}
-\def\xmlattribute #1#2#3{\ctxlua{lxml.attribute("#1","#2","#3")}}
-\def\xmlattributedef#1#2#3#4{\ctxlua{lxml.attribute("#1","#2","#3","#4")}}
-\def\xmlatt #1#2{\ctxlua{lxml.attribute("#1","/","#2")}}
-\def\xmlattdef #1#2#3{\ctxlua{lxml.attribute("#1","/","#2","#3")}}
-\def\xmlconcat #1#2#3{\ctxlua{lxml.concat("#1","#2",[[\detokenize{#3}]])}}
-\def\xmlsetsetup #1#2#3{\ctxlua{lxml.setsetup("#1","#2","#3")}}
-\def\xmlsetfunction #1#2#3{\ctxlua{lxml.setaction("#1","#2",#3)}}
-\def\xmlloaddirectives #1{\ctxlua{lxml.directives.load("#1")}}
-\def\xmldirectives #1{\ctxlua{lxml.directives.setups("#1")}}
-\def\xmlregisterns #1#2{\ctxlua{xml.registerns("#1","#2")}} % document
-\def\xmlchecknamespace#1#2#3{\ctxlua{xml.check_namespace(lxml.id("#1"),"#2","#3")}} % element
-\def\xmlremapname #1#2#3#4{\ctxlua{xml.remapname(lxml.id("#1"),"#2","#3","#4")}} % element
-\def\xmlremapnamespace#1#2#3{\ctxlua{xml.rename_space(lxml.id("#1"),"#2","#3")}} % document
-\def\xmldelete #1#2{\ctxlua{xml.delete(lxml.id("#1"),"#2")}}
-\def\xmlinclude #1#2#3{\ctxlua{lxml.include("#1","#2","#3",true)}}
-\def\xmlverbatim #1{\ctxlua{lxml.verbatim("#1")}}
-
-%def\xmldoifelse #1#2{\ctxlua{cs.testcase(xml.found(lxml.id("#1"),"#2",false))}}
-%def\xmldoifelsetext #1#2{\ctxlua{cs.testcase(xml.found(lxml.id("#1"),"#2",true ))}}
-
-\def\xmldoifelse #1#2{\ctxlua{commands.doifelse(xml.found(lxml.id("#1"),"#2",false))}}
-\def\xmldoifelsetext #1#2{\ctxlua{commands.doifelse(xml.found(lxml.id("#1"),"#2",true ))}}
-\def\xmldoif #1#2{\ctxlua{commands.doif (xml.found(lxml.id("#1"),"#2",false))}}
-\def\xmldoiftext #1#2{\ctxlua{commands.doif (xml.found(lxml.id("#1"),"#2",true ))}}
-\def\xmldoifnot #1#2{\ctxlua{commands.doifnot (xml.found(lxml.id("#1"),"#2",false))}}
-\def\xmldoifnottext #1#2{\ctxlua{commands.doifnot (xml.found(lxml.id("#1"),"#2",true ))}}
-
-\def\xmldefaulttotext #1{\ifcase\xmlprocessingmode\or\or \ctxlua{lxml.set_command_to_text("#1")}\fi}
-\def\xmldefaulttonone #1{\ifcase\xmlprocessingmode\or\or\or\ctxlua{lxml.set_command_to_none("#1")}\fi}
+\def\xmlall #1#2{\ctxlua{lxml.all("#1","#2")}}
+\def\xmlatt #1#2{\ctxlua{lxml.attribute("#1","/","#2")}}
+\def\xmlattdef #1#2#3{\ctxlua{lxml.attribute("#1","/","#2","#3")}}
+\def\xmlattribute #1#2#3{\ctxlua{lxml.attribute("#1","#2","#3")}}
+\def\xmlattributedef #1#2#3#4{\ctxlua{lxml.attribute("#1","#2","#3","#4")}}
+\def\xmlchecknamespace #1#2#3{\ctxlua{xml.check_namespace(lxml.id("#1"),"#2","#3")}} % element
+\def\xmlcommand #1#2#3{\ctxlua{lxml.command("#1","#2","#3")}}
+\def\xmlconcat #1#2#3{\ctxlua{lxml.concat("#1","#2",[[\detokenize{#3}]])}}
+\def\xmlconcatrange#1#2#3#4#5{\ctxlua{lxml.concatrange("#1","#2","#3","#4",[[\detokenize{#5}]])}}
+\def\xmlcontent #1#2{\ctxlua{lxml.content("#1","#2")}}
+\def\xmlcount #1#2{\ctxlua{lxml.count("#1","#2")}}
+\def\xmldelete #1#2{\ctxlua{xml.delete(lxml.id("#1"),"#2")}}
+\def\xmldirectives #1{\ctxlua{lxml.directives.setups("#1")}}
+\def\xmlfilter #1#2{\ctxlua{lxml.filter("#1","#2")}}
+\def\xmlfirst #1#2{\ctxlua{lxml.first("#1","#2")}}
+\def\xmlflush #1{\ctxlua{lxml.flush("#1")}}
+\def\xmldirect #1{\ctxlua{lxml.direct("#1")}} % in loops, not dt but root
+\def\xmlidx #1#2#3{\ctxlua{lxml.idx("#1","#2",\number#3)}}
+\def\xmlinclude #1#2#3{\ctxlua{lxml.include("#1","#2","#3",true)}}
+\def\xmlindex #1#2#3{\ctxlua{lxml.index("#1","#2",\number#3)}}
+\def\xmlinfo #1{\hbox{\ttxx[\ctxlua{lxml.info("#1")}]}}
+\def\xmlshow #1{\startpacked\ttx\xmlverbatim{#1}\stoppacked}
+\def\xmllast #1#2{\ctxlua{lxml.last("#1","#2")}}
+\def\xmlload #1#2{\ctxlua{lxml.load("#1","#2")}}
+\def\xmlloadbuffer #1#2{\ctxlua{lxml.loadbuffer("#1","#2")}}
+\def\xmlloaddirectives #1{\ctxlua{lxml.directives.load("#1")}}
+\def\xmlname #1{\ctxlua{lxml.name("#1")}}
+\def\xmlnamespace #1{\ctxlua{lxml.namespace("#1")}}
+\def\xmlnonspace #1#2{\ctxlua{lxml.nonspace("#1","#2")}}
+\def\xmlraw #1#2{\ctxlua{lxml.raw("#1","#2")}}
+\def\xmlsnippet #1#2{\ctxlua{lxml.snippet("#1",#2)}}
+\def\xmlregisterns #1#2{\ctxlua{xml.registerns("#1","#2")}} % document
+\def\xmlremapname #1#2#3#4{\ctxlua{xml.remapname(lxml.id("#1"),"#2","#3","#4")}} % element
+\def\xmlremapnamespace #1#2#3{\ctxlua{xml.rename_space(lxml.id("#1"),"#2","#3")}} % document
+\def\xmlsetfunction #1#2#3{\ctxlua{lxml.setaction("#1","#2",#3)}}
+\def\xmlsetsetup #1#2#3{\ctxlua{lxml.setsetup("#1","#2","#3")}}
+\def\xmlstrip #1#2{\ctxlua{lxml.strip("#1","#2")}}
+\def\xmlstripped #1#2{\ctxlua{lxml.stripped("#1","#2")}}
+\def\xmltag #1{\ctxlua{lxml.tag("#1")}}
+\def\xmltext #1#2{\ctxlua{lxml.text("#1","#2")}}
+\def\xmltags #1#2{\ctxlua{lxml.tags("#1","#2")}}
+\def\xmlutfize #1{\ctxlua{lxml.utfize("#1")}}
+\def\xmlverbatim #1{\ctxlua{lxml.verbatim("#1")}}
+
+%def\xmldoifelse #1#2{\ctxlua{cs.testcase(xml.found(lxml.id("#1"),"#2",false))}}
+%def\xmldoifelsetext #1#2{\ctxlua{cs.testcase(xml.found(lxml.id("#1"),"#2",true ))}}
+
+\def\xmldoifelse #1#2{\ctxlua{commands.doifelse(xml.found(lxml.id("#1"),"#2",false))}}
+\def\xmldoifelsetext #1#2{\ctxlua{commands.doifelse(xml.found(lxml.id("#1"),"#2",true ))}}
+\def\xmldoif #1#2{\ctxlua{commands.doif (xml.found(lxml.id("#1"),"#2",false))}}
+\def\xmldoiftext #1#2{\ctxlua{commands.doif (xml.found(lxml.id("#1"),"#2",true ))}}
+\def\xmldoifnot #1#2{\ctxlua{commands.doifnot (xml.found(lxml.id("#1"),"#2",false))}}
+\def\xmldoifnottext #1#2{\ctxlua{commands.doifnot (xml.found(lxml.id("#1"),"#2",true ))}}
+
+\def\xmldefaulttotext #1{\ifcase\xmlprocessingmode\or\or \ctxlua{lxml.set_command_to_text("#1")}\fi}
+\def\xmldefaulttonone #1{\ifcase\xmlprocessingmode\or\or\or\ctxlua{lxml.set_command_to_none("#1")}\fi}
% \startxmlsetups xml:include
% \xmlinclude{main}{include}{filename|href}
@@ -90,6 +96,7 @@
\def\xmlregisteredsetups
{\xmlstarttiming
\the\registeredxmlsetups\registeredxmlsetups\emptytoks
+ \xmldefaulttotext\xmldocument % after include
\xmlstoptiming}
\chardef\xmlprocessingmode=0 % 0=mixed, 1=mkivonly, 2=mkivonly-default-text, 3=mkivonly-default-none
@@ -103,10 +110,9 @@
#1{#2}{#3}%
\ifcase\xmlprocessingmode
\enableXML
+ \else
+ \setcatcodetable\notcatcodes
\fi
- \xmlstarttiming
- \xmldefaulttotext\xmldocument
- \xmlstoptiming
\doifelsenothing{#4}
{\directsetup{xml:process}}
{\directsetup{#4}}%
@@ -124,7 +130,7 @@
{\def\xmli##1##2{\xmlidx{#1}{#2/##1}{##2}}%
\dorecurse{\xmlcount{#1}{#2}}{#3}}
-\long\def\xmlconnect#1#2#3%
+\long\def\xmlconnect#1#2#3% inefficient
{\scratchcounter\xmlcount{#1}{#2}\relax
\ifcase\scratchcounter \or
\xmlall{#1}{#2}%
@@ -284,4 +290,3 @@
% \starttext
% \xmlprocessbuffer{main}{section}{}
% \stoptext
-
diff --git a/tex/context/base/m-timing.tex b/tex/context/base/m-timing.tex
index e86e34ab4..792cc67f4 100644
--- a/tex/context/base/m-timing.tex
+++ b/tex/context/base/m-timing.tex
@@ -212,7 +212,7 @@ end
p := \ctxlua{tex.sprint(document.progress.path("#1","#2"))} ;
if bbwidth(p) > 1 :
h := 100 ; w := 2 * h ;
- w := \the\textwidth ;
+ w := \the\textwidth-3pt ; % correct for pen
p := p xstretched w ;
b := boundingbox (llcorner p -- llcorner p shifted (w,h)) ;
pickup pencircle scaled 3pt ; linecap := butt ;
diff --git a/tex/context/base/math-ini.lua b/tex/context/base/math-ini.lua
index 60a91071f..1d11745a6 100644
--- a/tex/context/base/math-ini.lua
+++ b/tex/context/base/math-ini.lua
@@ -107,14 +107,20 @@ function mathematics.setmathsymbol(name,class,family,slot,largefamily,largeslot,
if largefamily and largeslot then
largefamily = mathematics.families[largefamily] or largefamily
if class == classes.radical then
- tex.sprint(("\\xdef\\%s{%s\\relax}"):format(name,mathematics.radical(class,family,slot,largefamily,largeslot)))
+ tex.sprint(("\\unexpanded\\xdef\\%s{%s }"):format(name,mathematics.radical(class,family,slot,largefamily,largeslot)))
elseif class == classes.open or class == classes.close then
- tex.sprint(("\\xdef\\%s{%s\\relax}"):format(name,mathematics.delimiter(class,family,slot,largefamily,largeslot)))
+ tex.sprint(("\\unexpanded\\xdef\\%s{%s}"):format(name,mathematics.delimiter(class,family,slot,largefamily,largeslot)))
end
elseif class == classes.accent then
- tex.sprint(("\\xdef\\%s{%s\\relax}"):format(name,mathematics.mathaccent(class,family,slot)))
+ tex.sprint(("\\unexpanded\\xdef\\%s{%s }"):format(name,mathematics.mathaccent(class,family,slot)))
elseif unicode then
- tex.sprint(("\\xdef\\%s{%s}"):format(name,utf.char(unicode)))
+ -- beware, open/close and other specials should not end up here
+ local ch = utf.char(unicode)
+ if characters.filters.utf.private.escapes[ch] then
+ tex.sprint(("\\xdef\\%s{\\char%s }"):format(name,unicode))
+ else
+ tex.sprint(("\\xdef\\%s{%s}"):format(name,ch))
+ end
else
tex.sprint(mathematics.mathchardef(name,class,family,slot))
end
@@ -135,9 +141,7 @@ end
-- definitions (todo: expand commands to utf instead of codes)
-mathematics.trace = false
-
-
+mathematics.trace = false --
function mathematics.define()
local slots = mathematics.slots.current
@@ -218,56 +222,56 @@ end
mathematics.slots.traditional = {
- [0x03B1] = { "lcgreek", 0x0B },
- [0x03B2] = { "lcgreek", 0x0C },
- [0x03B3] = { "lcgreek", 0x0D },
- [0x03B4] = { "lcgreek", 0x0E },
+ [0x03B1] = { "lcgreek", 0x0B }, -- alpha
+ [0x03B2] = { "lcgreek", 0x0C }, -- beta
+ [0x03B3] = { "lcgreek", 0x0D }, -- gamma
+ [0x03B4] = { "lcgreek", 0x0E }, -- delta
[0x03B5] = { "lcgreek", 0x0F }, -- epsilon
- [0x03B6] = { "lcgreek", 0x10 },
- [0x03B7] = { "lcgreek", 0x11 },
- [0x03B8] = { "lcgreek", 0x12 },
- [0x03B9] = { "lcgreek", 0x13 },
- [0x03BA] = { "lcgreek", 0x14 },
- [0x03BB] = { "lcgreek", 0x15 },
- [0x03BC] = { "lcgreek", 0x16 },
- [0x03BD] = { "lcgreek", 0x17 },
- [0x03BE] = { "lcgreek", 0x18 },
- [0x03BF] = { "lcgreek", 0x6F },
- [0x03C0] = { "lcgreek", 0x19 },
- [0x03C1] = { "lcgreek", 0x1A },
+ [0x03B6] = { "lcgreek", 0x10 }, -- zeta
+ [0x03B7] = { "lcgreek", 0x11 }, -- eta
+ [0x03B8] = { "lcgreek", 0x12 }, -- theta
+ [0x03B9] = { "lcgreek", 0x13 }, -- iota
+ [0x03BA] = { "lcgreek", 0x14 }, -- kappa
+ [0x03BB] = { "lcgreek", 0x15 }, -- lambda
+ [0x03BC] = { "lcgreek", 0x16 }, -- mu
+ [0x03BD] = { "lcgreek", 0x17 }, -- nu
+ [0x03BE] = { "lcgreek", 0x18 }, -- xi
+ [0x03BF] = { "lcgreek", 0x6F }, -- omicron
+ [0x03C0] = { "lcgreek", 0x19 }, -- po
+ [0x03C1] = { "lcgreek", 0x1A }, -- rho
-- [0x03C2] = { "lcgreek", 0x00 }, -- varsigma
- [0x03C3] = { "lcgreek", 0x1B },
- [0x03C4] = { "lcgreek", 0x1C },
- [0x03C5] = { "lcgreek", 0x1D },
+ [0x03C3] = { "lcgreek", 0x1B }, -- sigma
+ [0x03C4] = { "lcgreek", 0x1C }, -- tau
+ [0x03C5] = { "lcgreek", 0x1D }, -- upsilon
-- [0x03C6] = { "lcgreek", 0x1E }, -- varphi
- [0x03C7] = { "lcgreek", 0x1F },
- [0x03C8] = { "lcgreek", 0x20 },
- [0x03C9] = { "lcgreek", 0x21 },
-
- [0x0391] = { "ucgreek", 0x41 },
- [0x0392] = { "ucgreek", 0x42 },
- [0x0393] = { "ucgreek", 0x00 },
- [0x0394] = { "ucgreek", 0x01 },
- [0x0395] = { "ucgreek", 0x45 },
- [0x0396] = { "ucgreek", 0x5A },
- [0x0397] = { "ucgreek", 0x48 },
- [0x0398] = { "ucgreek", 0x02 },
- [0x0399] = { "ucgreek", 0x49 },
- [0x039A] = { "ucgreek", 0x4B },
- [0x039B] = { "ucgreek", 0x03 },
- [0x039C] = { "ucgreek", 0x4D },
- [0x039D] = { "ucgreek", 0x4E },
- [0x039E] = { "ucgreek", 0x04 },
- [0x039F] = { "ucgreek", 0x4F },
- [0x03A0] = { "ucgreek", 0x05 },
- [0x03A1] = { "ucgreek", 0x52 },
- [0x03A3] = { "ucgreek", 0x06 },
- [0x03A4] = { "ucgreek", 0x54 },
- [0x03A5] = { "ucgreek", 0x07 },
- [0x03A6] = { "ucgreek", 0x08 },
- [0x03A7] = { "ucgreek", 0x58 },
- [0x03A8] = { "ucgreek", 0x09 },
- [0x03A9] = { "ucgreek", 0x0A },
+ [0x03C7] = { "lcgreek", 0x1F }, -- chi
+ [0x03C8] = { "lcgreek", 0x20 }, -- psi
+ [0x03C9] = { "lcgreek", 0x21 }, -- omega
+
+ [0x0391] = { "ucgreek", 0x41 }, -- Alpha
+ [0x0392] = { "ucgreek", 0x42 }, -- Beta
+ [0x0393] = { "ucgreek", 0x00 }, -- Gamma
+ [0x0394] = { "ucgreek", 0x01 }, -- Delta
+ [0x0395] = { "ucgreek", 0x45 }, -- Epsilon
+ [0x0396] = { "ucgreek", 0x5A }, -- Zeta
+ [0x0397] = { "ucgreek", 0x48 }, -- Eta
+ [0x0398] = { "ucgreek", 0x02 }, -- Theta
+ [0x0399] = { "ucgreek", 0x49 }, -- Iota
+ [0x039A] = { "ucgreek", 0x4B }, -- Kappa
+ [0x039B] = { "ucgreek", 0x03 }, -- Lambda
+ [0x039C] = { "ucgreek", 0x4D }, -- Mu
+ [0x039D] = { "ucgreek", 0x4E }, -- Nu
+ [0x039E] = { "ucgreek", 0x04 }, -- Xi
+ [0x039F] = { "ucgreek", 0x4F }, -- Omicron
+ [0x03A0] = { "ucgreek", 0x05 }, -- Pi
+ [0x03A1] = { "ucgreek", 0x52 }, -- Rho
+ [0x03A3] = { "ucgreek", 0x06 }, -- Sigma
+ [0x03A4] = { "ucgreek", 0x54 }, -- Tau
+ [0x03A5] = { "ucgreek", 0x07 }, -- Upsilon
+ [0x03A6] = { "ucgreek", 0x08 }, -- Phi
+ [0x03A7] = { "ucgreek", 0x58 }, -- Chi
+ [0x03A8] = { "ucgreek", 0x09 }, -- Psi
+ [0x03A9] = { "ucgreek", 0x0A }, -- Omega
[0x03F5] = { "vargreek", 0x22 }, -- varepsilon
[0x03D1] = { "vargreek", 0x23 }, -- vartheta
@@ -306,15 +310,92 @@ mathematics.slots.traditional = {
[0x00B7] = { "sy", 0x01 }, -- cdot
[0x00D7] = { "sy", 0x02 }, -- times
[0x2022] = { "sy", 0x0F }, -- bullet
+ [0x2111] = { "sy", 0x3D }, -- Im
+ [0x2118] = { "mi", 0x7D }, -- wp
+ [0x211C] = { "sy", 0x3C }, -- Re
[0x2190] = { "sy", 0x20 }, -- leftarrow
+ [0x2191] = { "sy", 0x22, "ex", 0x78 }, -- uparrow
[0x2192] = { "sy", 0x21 }, -- rightarrow
+ [0x2193] = { "sy", 0x23, "ex", 0x79 }, -- downarrow
[0x2194] = { "sy", 0x24 }, -- leftrightarrow
+ [0x2195] = { "sy", 0x6C, "ex", 0x3F }, -- updownarrow
+ [0x2196] = { "sy", 0x2D }, -- nwarrow
+ [0x2197] = { "sy", 0x25 }, -- nearrow
+ [0x2198] = { "sy", 0x2E }, -- swarrow
+ [0x2199] = { "sy", 0x26 }, -- searrow
[0x21D0] = { "sy", 0x28 }, -- Leftarrow
+ [0x21D1] = { "sy", 0x6C, "ex", 0x7E }, -- Uparrow
[0x21D2] = { "sy", 0x29 }, -- Rightarrow
+ [0x21D3] = { "sy", 0x2B, "ex", 0x7F }, -- Downarrow
[0x21D4] = { "sy", 0x2C }, -- Leftrightarrow
+ [0x21D5] = { "sy", 0x6D, "ex", 0x77 }, -- Updownarrow
[0x2135] = { "sy", 0x40 }, -- aleph
[0x2113] = { "mi", 0x60 }, -- ell
+-- ...
+ [0x2200] = { "sy", 0x38 }, -- forall
+-- [0x2201] = { "sy", 0x00 }, -- complement
+ [0x2202] = { "mi", 0x40 }, -- partial
+ [0x2203] = { "sy", 0x39 }, -- exists
+-- [0x2204] = { "sy", 0x00 }, -- not exists
+ [0x2205] = { "sy", 0x3B }, -- empty set
+-- [0x2206] = { "sy", 0x00 }, -- increment
+ [0x2207] = { "sy", 0x72 }, -- nabla
+ [0x2208] = { "sy", 0x32 }, -- in
+ [0x2209] = { "sy", 0x33 }, -- ni
+ [0x220F] = { "ex", 0x51 }, -- prod
+ [0x2210] = { "ex", 0x60 }, -- coprod
+ [0x2211] = { "ex", 0x50 }, -- sum
+-- [0x2212] = { "sy", 0x00 }, -- -
+ [0x2213] = { "sy", 0x07 }, -- mp
+ [0x2215] = { "sy", 0x3D }, -- / AM: Not sure
+ [0x2216] = { "sy", 0x6E }, -- setminus
+ [0x2217] = { "sy", 0x03 }, -- *
+ [0x2218] = { "sy", 0x0E }, -- circ
+ [0x2219] = { "sy", 0x0F }, -- bullet
+-- [0x221A] = { "sy", 0x70, "ex", 0x70 }, -- sqrt. AM: Check surd??
+-- ...
+ [0x221D] = { "sy", 0x2F }, -- propto
+ [0x221E] = { "sy", 0x31 }, -- infty
+ [0x2225] = { "sy", 0x6B }, -- parallel
+ [0x2227] = { "sy", 0x5E }, -- wedge
+ [0x2228] = { "sy", 0x5F }, -- vee
+ [0x2229] = { "sy", 0x5C }, -- cap
+ [0x222A] = { "sy", 0x5B }, -- cup
+ [0x222B] = { "ex", 0x52 }, -- intop
+-- ... other integrals
+ [0x2236] = { "mr", 0x3A }, -- colon
+ [0x223C] = { "sy", 0x18 }, -- sim
+ [0x2243] = { "sy", 0x27 }, -- simeq
+ [0x2248] = { "sy", 0x19 }, -- approx
+ [0x2261] = { "sy", 0x11 }, -- equiv
+ [0x2264] = { "sy", 0x14 }, -- leq
+ [0x2265] = { "sy", 0x15 }, -- geq
+ [0x226A] = { "sy", 0x1C }, -- ll
+ [0x226B] = { "sy", 0x1D }, -- gg
+ [0x227A] = { "sy", 0x1E }, -- prec
+ [0x227B] = { "sy", 0x1F }, -- succ
+-- [0x227C] = { "sy", 0x16 }, -- preceq, AM:No see 2AAF
+-- [0x227D] = { "sy", 0x17 }, -- succeq, AM:No see 2AB0
+ [0x2282] = { "sy", 0x1A }, -- subset
+ [0x2283] = { "sy", 0x1B }, -- supset
+ [0x2286] = { "sy", 0x12 }, -- subseteq
+ [0x2287] = { "sy", 0x13 }, -- supseteq
+ [0x2293] = { "sy", 0x75 }, -- sqcap
+ [0x2294] = { "sy", 0x74 }, -- sqcup
+ [0x2295] = { "sy", 0x08 }, -- oplus
+ [0x2296] = { "sy", 0x09 }, -- ominus
+ [0x2297] = { "sy", 0x0A }, -- otimes
+ [0x2298] = { "sy", 0x0B }, -- oslash
+ [0x2299] = { "sy", 0x0C }, -- odot
+ [0x22A4] = { "sy", 0x3E }, -- top
+ [0x22A5] = { "sy", 0x3F }, -- bop
+ [0x22C0] = { "ex", 0x56 }, -- bigwedge
+ [0x22C1] = { "ex", 0x57 }, -- bigvee
+ [0x22C2] = { "ex", 0x54 }, -- bigcap
+ [0x22C3] = { "ex", 0x53 }, -- bigcup
+ [0x22C4] = { "sy", 0x05 }, -- diamond
[0x22C5] = { "sy", 0x01 }, -- cdot
+ [0x22C6] = { "sy", 0x3F }, -- star
[0x25B3] = { "sy", 0x34 }, -- triangle up
[0x1D6A4] = { "mi", 0x7B }, -- imath
@@ -329,35 +410,19 @@ mathematics.slots.traditional = {
[0x005D] = { "mr", 0x5D, "ex", 0x03 }, -- ]
[0x007C] = { "sy", 0x6A, "ex", 0x0C }, -- |
[0x005C] = { "sy", 0x6E, "ex", 0x0F }, -- \
+ [0x007B] = { "sy", 0x66, "ex", 0x08 }, -- {
+ [0x007D] = { "sy", 0x67, "ex", 0x09 }, -- }
- [0x220F] = { "ex", 0x51 }, -- prod
- [0x2211] = { "ex", 0x50 }, -- sum
- [0x222B] = { "ex", 0x52 }, -- intop
[0x005E] = { "mr", 0x5E, "ex", 0x62 }, -- widehat
[0x007E] = { "mr", 0x7E, "ex", 0x65 }, -- widetilde
+ [0x2AAF] = { "sy", 0x16 }, -- preceq
+ [0x2AB0] = { "sy", 0x17 }, -- succeq
+
}
mathematics.slots.current = mathematics.slots.traditional
---~ already obsolete
---~
---~ do
---~ local template = "\\catcode%s=13\\gdef %s{\\%s}\\global\\mathcode%s=\"8000\\relax"
---~ function mathematics.traditional()
---~ tex.sprint(tex.ctxcatcodes,"\\begingroup")
---~ for k, v in pairs(mathematics.data) do
---~ if not v.ignore then
---~ local c = v.contextname
---~ if c then
---~ tex.sprint(template:format(k,utf.char(k),c,k))
---~ end
---~ end
---~ end
---~ tex.sprint(tex.ctxcatcodes,"\\endgroup")
---~ end
---~ end
-
function mathematics.utfmathclass(chr, default)
local cd = characters.data[utf.byte(chr)]
return (cd and cd.mathclass) or default or "unknown"
diff --git a/tex/context/base/math-tex.tex b/tex/context/base/math-tex.tex
index 291bad93f..752f113b7 100644
--- a/tex/context/base/math-tex.tex
+++ b/tex/context/base/math-tex.tex
@@ -486,14 +486,14 @@
\definemathsymbol [Downarrow] [rel] [sy] ["2B] [ex] ["7F]
\definemathsymbol [Updownarrow] [rel] [sy] ["6D] [ex] ["77]
\definemathsymbol [backslash] [nothing] [sy] ["6E] [ex] ["0F]
-\definemathsymbol [rangle] [close] [sy] ["69] [ex] ["0B]
\definemathsymbol [langle] [open] [sy] ["68] [ex] ["0A]
-\definemathsymbol [rbrace] [close] [sy] ["67] [ex] ["09]
+\definemathsymbol [rangle] [close] [sy] ["69] [ex] ["0B]
\definemathsymbol [lbrace] [open] [sy] ["66] [ex] ["08]
-\definemathsymbol [rceil] [close] [sy] ["65] [ex] ["07]
+\definemathsymbol [rbrace] [close] [sy] ["67] [ex] ["09]
\definemathsymbol [lceil] [open] [sy] ["64] [ex] ["06]
-\definemathsymbol [rfloor] [close] [sy] ["63] [ex] ["05]
+\definemathsymbol [rceil] [close] [sy] ["65] [ex] ["07]
\definemathsymbol [lfloor] [open] [sy] ["62] [ex] ["04]
+\definemathsymbol [rfloor] [close] [sy] ["63] [ex] ["05]
\definemathsymbol [sqrt] [radical] [sy] ["70] [ex] ["70]
diff --git a/tex/context/base/meta-ini.mkii b/tex/context/base/meta-ini.mkii
index 302bdff99..b62059827 100644
--- a/tex/context/base/meta-ini.mkii
+++ b/tex/context/base/meta-ini.mkii
@@ -585,7 +585,7 @@
\def\useMPenvironmentbuffer[#1]%
{\expanded{\startMPenvironment\noexpand\readfile{\TEXbufferfile{\jobname}}{}{}}\stopMPenvironment}
-\useMPenvironmentbuffer[mp]
+% \useMPenvironmentbuffer[mp] % what was this?
%D This command takes \type {[reset]} as optional
%D argument.
diff --git a/tex/context/base/meta-ini.mkiv b/tex/context/base/meta-ini.mkiv
index 8793e6e20..96636d1dd 100644
--- a/tex/context/base/meta-ini.mkiv
+++ b/tex/context/base/meta-ini.mkiv
@@ -272,10 +272,10 @@
%D In order to support fancy text features (like outline
%D fonts), we set:
-\startMPextensions
- graphictextformat:="context";
- graphictextdirective "\the\everyMPTEXgraphic";
-\stopMPextensions
+% \startMPextensions
+% graphictextformat:="context";
+% graphictextdirective "\the\everyMPTEXgraphic";
+% \stopMPextensions
%D A signal that we're in combines \CONTEXT||\METAFUN mode:
@@ -662,31 +662,43 @@
%D A more general way of passing environments is:
+% \def\startMPenvironment % second arg gobbles spaces, so that reset gives \emptytoks
+% {\bgroup
+% \catcode`\^^M=\@@space
+% \dodoubleempty\dostartMPenvironment}
+
+% \long\def\dostartMPenvironment[#1][#2]#3\stopMPenvironment
+% {\egroup
+% \doif{#1}\s!reset\resetMPenvironment % reset mp toks
+% \doif{#1}\v!global{#3}% % use in main doc too
+% \doif{#1}+{#3}% % use in main doc too
+% \defconvertedargument\ascii{#3}%
+% \expandafter\appendtoks\ascii\to\everyMPTEXgraphic}
+
+% \def\resetMPenvironment
+% {\everyMPTEXgraphic\emptytoks % = is really needed !
+% \startMPenvironment
+% \global\loadfontfileoncetrue
+% \stopMPenvironment}
+
\def\startMPenvironment % second arg gobbles spaces, so that reset gives \emptytoks
- {\bgroup
- \catcode`\^^M=\@@space
- \dodoubleempty\dostartMPenvironment}
+ {\dodoubleempty\dostartMPenvironment}
\long\def\dostartMPenvironment[#1][#2]#3\stopMPenvironment
- {\egroup
- \doif{#1}\s!reset\resetMPenvironment % reset mp toks
+ {\doif{#1}\s!reset\resetMPenvironment % reset mp toks
\doif{#1}\v!global{#3}% % use in main doc too
\doif{#1}+{#3}% % use in main doc too
- \defconvertedargument\ascii{#3}%
- \expandafter\appendtoks\ascii\to\everyMPTEXgraphic}
+ \ctxlua{metapost.tex.set(\!!bs\detokenize{#3}\!!es)}}
\def\resetMPenvironment
- {\everyMPTEXgraphic\emptytoks % = is really needed !
- \startMPenvironment
- \global\loadfontfileoncetrue
- \stopMPenvironment}
+ {\ctxlua{metapost.tex.reset()}}
\resetMPenvironment
\def\useMPenvironmentbuffer[#1]%
- {\expanded{\startMPenvironment\noexpand\readfile{\TEXbufferfile{\jobname}}{}{}}\stopMPenvironment}
+ {\ctxlua{metapost.tex.set(buffers.content("#1"))}}
-\useMPenvironmentbuffer[mp]
+% \useMPenvironmentbuffer[mp] % hm, what is this?
%D This command takes \type {[reset]} as optional
%D argument.
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua
index f4b784455..a9b6c7965 100644
--- a/tex/context/base/mlib-pps.lua
+++ b/tex/context/base/mlib-pps.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['mlib-pps'] = { -- prescript, pos
license = "see context related readme files",
}
-local format, join, round = string.format, table.concat, math.round
+local format, concat, round = string.format, table.concat, math.round
local sprint = tex.sprint
colors = colors or { }
@@ -346,18 +346,27 @@ local current_format, current_graphic
--~ metapost.first_box, metapost.last_box = 1000, 1100
metapost.textext_current = metapost.first_box
+metapost.trace_texttexts = false
function metapost.specials.tf(specification,object)
--~ print("setting", metapost.textext_current)
- sprint(tex.ctxcatcodes,format("\\MPLIBsettext{%s}{%s}",metapost.textext_current,specification))
+ local n, str = specification:match("^(%d+):(.+)$")
if metapost.textext_current < metapost.last_box then
- metapost.textext_current = metapost.textext_current + 1
+ metapost.textext_current = metapost.first_box + n - 1
end
+ if metapost.trace_texttexts then
+ print("metapost", format("first pass: order %s, box %s",n,metapost.textext_current))
+ end
+ sprint(tex.ctxcatcodes,format("\\MPLIBsettext{%s}{%s}",metapost.textext_current,str))
return { }, nil, nil, nil
end
function metapost.specials.ts(specification,object,result,flusher)
-- print("getting", metapost.textext_current)
+ local n, str = specification:match("^(%d+):(.+)$")
+ if metapost.trace_texttexts then
+ print("metapost", format("second pass: order %s, box %s",n,metapost.textext_current))
+ end
local op = object.path
local first, second, fourth = op[1], op[2], op[4]
local tx, ty = first.x_coord , first.y_coord
@@ -365,18 +374,18 @@ function metapost.specials.ts(specification,object,result,flusher)
local rx, ry = second.y_coord - ty, fourth.x_coord - tx
if sx == 0 then sx = 0.00001 end
if sy == 0 then sy = 0.00001 end
- local before = function()
+ local before = function() -- no need for function
--~ flusher.flushfigure(result)
--~ sprint(tex.ctxcatcodes,format("\\MPLIBgettext{%f}{%f}{%f}{%f}{%f}{%f}{%s}",sx,rx,ry,sy,tx,ty,metapost.textext_current))
--~ result = { }
result[#result+1] = format("q %f %f %f %f %f %f cm", sx,rx,ry,sy,tx,ty)
flusher.flushfigure(result)
+ if metapost.textext_current < metapost.last_box then
+ metapost.textext_current = metapost.first_box + n - 1
+ end
local b = metapost.textext_current
sprint(tex.ctxcatcodes,format("\\MPLIBgettextscaled{%s}{%s}{%s}",b, metapost.sxsy(tex.wd[b],tex.ht[b],tex.dp[b])))
result = { "Q" }
- if metapost.textext_current < metapost.last_box then
- metapost.textext_current = metapost.textext_current + 1
- end
return object, result
end
return { }, before, nil, nil -- replace { } by object for tracing
@@ -458,7 +467,7 @@ end
metapost.reducetogray = true
-function metapost.colorconverter()
+function metapost.colorconverter() -- rather generic pdf, so use this elsewhere too
-- it no longer pays off to distinguish between outline and fill
-- (we now have both too, e.g. in arrows)
local model = colors.model
@@ -466,54 +475,114 @@ function metapost.colorconverter()
if model == "all" then
return function(cr)
local n = #cr
- if reduce and n == 3 then if cr[1] == cr[2] and cr[1] == cr[3] then n = 1 end end
- if n == 1 then
+ if reduce then
+ if n == 1 then
+ local s = cr[1]
+ return format("%.3f g %.3f G",s,s)
+ elseif n == 3 then
+ local r, g, b = cr[1], cr[2], cr[3]
+ if r == g and g == b then
+ return format("%.3f g %.3f G",r,r)
+ else
+ return format("%.3f %.3f %.3f rg %.3f %.3f %.3f RG",r,g,b,r,g,b)
+ end
+ else
+ local c, m, y, k = cr[1], cr[2], cr[3], cr[4]
+ if c == m and m == y and y == 0 then
+ k = 1 - k
+ return format("%.3f g %.3f G",k,k)
+ else
+ return format("%.3f %.3f %.3f %.3f k %.3f %.3f %.3f %.3f K",c,m,y,k,c,m,y,k)
+ end
+ end
+ elseif n == 1 then
local s = cr[1]
return format("%.3f g %.3f G",s,s)
- elseif n == 4 then
- local c, m, y, k = cr[1], cr[2], cr[3], cr[4]
- return format("%.3f %.3f %.3f %.3f k %.3f %.3f %.3f %.3f K",c,m,y,k,c,m,y,k)
- else
+ elseif n == 3 then
local r, g, b = cr[1], cr[2], cr[3]
return format("%.3f %.3f %.3f rg %.3f %.3f %.3f RG",r,g,b,r,g,b)
+ else
+ local c, m, y, k = cr[1], cr[2], cr[3], cr[4]
+ return format("%.3f %.3f %.3f %.3f k %.3f %.3f %.3f %.3f K",c,m,y,k,c,m,y,k)
end
end
elseif model == "rgb" then
return function(cr)
local n = #cr
- if reduce and n == 3 then if cr[1] == cr[2] and cr[1] == cr[3] then n = 1 end end
- if n == 1 then
+ if reduce then
+ if n == 1 then
+ local s = cr[1]
+ return format("%.3f g %.3f G",s,s)
+ elseif n == 3 then
+ local r, g, b = cr[1], cr[2], cr[3]
+ if r == g and g == b then
+ return format("%.3f g %.3f G",r,r)
+ else
+ return format("%.3f %.3f %.3f rg %.3f %.3f %.3f RG",r,g,b,r,g,b)
+ end
+ else
+ local c, m, y, k = cr[1], cr[2], cr[3], cr[4]
+ if c == m and m == y and y == 0 then
+ k = 1 - k
+ return format("%.3f g %.3f G",k,k)
+ else
+ local r, g, b = cmyktorgb(c,m,y,k)
+ return format("%.3f %.3f %.3f rg %.3f %.3f %.3f RG",r,g,b,r,g,b)
+ end
+ end
+ elseif n == 1 then
local s = cr[1]
return format("%.3f g %.3f G",s,s)
- end
- local r, g, b
- if n == 4 then
- r, g, b = cmyktorgb(cr[1],cr[2],cr[3],cr[4])
else
- r, g, b = cr[1],cr[2],cr[3]
+ local r, g, b
+ if n == 3 then
+ r, g, b = cmyktorgb(cr[1],cr[2],cr[3],cr[4])
+ else
+ r, g, b = cr[1], cr[2], cr[3]
+ end
+ return format("%.3f %.3f %.3f rg %.3f %.3f %.3f RG",r,g,b,r,g,b)
end
- return format("%.3f %.3f %.3f rg %.3f %.3f %.3f RG",r,g,b,r,g,b)
end
elseif model == "cmyk" then
return function(cr)
local n = #cr
- if reduce and n == 3 then if cr[1] == cr[2] and cr[1] == cr[3] then n = 1 end end
- if n == 1 then
+ if reduce then
+ if n == 1 then
+ local s = cr[1]
+ return format("%.3f g %.3f G",s,s)
+ elseif n == 3 then
+ local r, g, b = cr[1], cr[2], cr[3]
+ if r == g and g == b then
+ return format("%.3f g %.3f G",r,r)
+ else
+ local c, m, y, k = rgbtocmyk(r,g,b)
+ return format("%.3f %.3f %.3f %.3f k %.3f %.3f %.3f %.3f K",c,m,y,k,c,m,y,k)
+ end
+ else
+ local c, m, y, k = cr[1], cr[2], cr[3], cr[4]
+ if c == m and m == y and y == 0 then
+ k = 1 - k
+ return format("%.3f g %.3f G",k,k)
+ else
+ return format("%.3f %.3f %.3f %.3f k %.3f %.3f %.3f %.3f K",c,m,y,k,c,m,y,k)
+ end
+ end
+ elseif n == 1 then
local s = cr[1]
return format("%.3f g %.3f G",s,s)
- end
- local c, m, y, k
- if n == 4 then
- c, m, y, k = cr[1], cr[2], cr[3], cr[4]
else
- c, m, y, k = rgbtocmyk(cr[1],cr[2],cr[3])
+ local c, m, y, k
+ if n == 3 then
+ c, m, y, k = rgbtocmyk(cr[1],cr[2],cr[3])
+ else
+ c, m, y, k = cr[1], cr[2], cr[3], cr[4]
+ end
+ return format("%.3f %.3f %.3f %.3f k %.3f %.3f %.3f %.3f K",c,m,y,k,c,m,y,k)
end
- return format("%.3f %.3f %.3f %.3f k %.3f %.3f %.3f %.3f K",c,m,y,k,c,m,y,k)
end
else
return function(cr)
- local n = #cr
- if reduce and n == 3 then if cr[1] == cr[2] and cr[1] == cr[3] then n = 1 end end
+ local n, s = #cr, 0
if n == 4 then
s = cmyktogray(cr[1],cr[2],cr[3],cr[4])
elseif n == 3 then
@@ -709,6 +778,9 @@ function metapost.text_texts_data()
local t, n = { }, 0
for i = metapost.first_box, metapost.last_box do
n = n + 1
+ if metapost.trace_texttexts then
+ print("metapost", format("passed data: order %s, box %s",n,i))
+ end
if tex.box[i] then
t[#t+1] = format("_tt_w_[%i]:=%f;_tt_h_[%i]:=%f;_tt_d_[%i]:=%f;", n,tex.wd[i]/factor, n,tex.ht[i]/factor, n,tex.dp[i]/factor)
else
@@ -746,6 +818,7 @@ function metapost.graphic_base_pass(mpsformat,str,preamble)
preamble or "",
"beginfig(1); ",
"_trial_run_ := false ;",
+ "resettextexts;",
str,
"endfig ;"
} )
@@ -757,8 +830,8 @@ function metapost.graphic_extra_pass()
metapost.process(current_format, {
"beginfig(0); ",
"_trial_run_ := false ;",
- "_tt_n_ := 0 ;", -- resettextexts
- join(metapost.text_texts_data()," ;\n"),
+ "resettextexts;",
+ concat(metapost.text_texts_data()," ;\n"),
current_graphic,
"endfig ;"
})
@@ -782,11 +855,29 @@ function metapost.getclippath(data)
end
end
+metapost.tex = metapost.tex or { }
+
+do -- only used in graphictexts
+
+ local environments = { }
+
+ function metapost.tex.set(str)
+ environments[#environments+1] = str
+ end
+ function metapost.tex.reset()
+ environments = { }
+ end
+ function metapost.tex.get()
+ return concat(environments,"\n")
+ end
+
+end
+
do -- not that beautiful but ok, we could save a md5 hash in the tui file !
local graphics = { }
local start = [[\starttext]]
- local preamble = [[\def\MPLIBgraphictext#1{\startTEXpage[scale=10000]#1\stopTEXpage}]]
+ local preamble = [[\long\def\MPLIBgraphictext#1{\startTEXpage[scale=10000]#1\stopTEXpage}]]
local stop = [[\stoptext]]
function metapost.specials.gt(specification,object) -- number, so that we can reorder
@@ -801,7 +892,7 @@ do -- not that beautiful but ok, we could save a md5 hash in the tui file !
local mpyfile = file.replacesuffix(mpofile,"mpy")
local pdffile = file.replacesuffix(mpofile,"pdf")
local texfile = file.replacesuffix(mpofile,"tex")
- io.savedata(texfile, { start, preamble, join(graphics,"\n"), stop }, "\n")
+ io.savedata(texfile, { start, preamble, metapost.tex.get(), concat(graphics,"\n"), stop }, "\n")
os.execute(format("context --once %s", texfile))
if io.exists(pdffile) then
os.execute(format("pstoedit -ssp -dt -f mpost %s %s", pdffile, mpyfile))
@@ -811,7 +902,7 @@ do -- not that beautiful but ok, we could save a md5 hash in the tui file !
for figure in data:gmatch("beginfig(.-)endfig") do
result[#result+1] = format("begingraphictextfig%sendgraphictextfig ;\n", figure)
end
- io.savedata(mpyfile,join(result,""))
+ io.savedata(mpyfile,concat(result,""))
end
end
graphics = { }
diff --git a/tex/context/base/mlib-run.lua b/tex/context/base/mlib-run.lua
index 0e60c9639..3dedb2e21 100644
--- a/tex/context/base/mlib-run.lua
+++ b/tex/context/base/mlib-run.lua
@@ -198,22 +198,35 @@ function metapost.process(mpx, data, trialrun, flusher)
result = mpx:execute(d)
input.stoptiming(metapost.exectime)
if not result then
- metapost.report("error", "no result object returned")
+ metapost.report("mp error", "no result object returned")
elseif result.status > 0 then
- metapost.report("error",(result.term or "no-term") .. "\n" .. (result.error or "no-error"))
+ local t, e, l = result.term, result.error, result.log
+ if t then
+ metapost.report("mp terminal",t)
+ end
+ if e then
+ metapost.report("mp error",e)
+--~ metapost.reset(mpx)
+ end
+ if not t and not e and l then
+ metapost.report("mp log",l)
+ else
+ metapost.report("mp error","unknown, no error, terminal or log messages")
+ end
elseif metapost.showlog then
- metapost.report("info",result.term or "no-term")
+ metapost.report("mp info",result.term or "no terminal output")
elseif result.fig then
metapost.convert(result, trialrun, flusher)
end
else
- metapost.report("error", "invalid graphic component " .. i)
+ metapost.report("mp error", "invalid graphic component " .. i)
end
end
else
input.starttiming(metapost.exectime)
result = mpx:execute(data)
input.stoptiming(metapost.exectime)
+ -- todo: error message
if not result then
metapost.report("error", "no result object returned")
elseif result.status > 0 then
diff --git a/tex/context/base/s-sys-01.tex b/tex/context/base/s-sys-01.tex
index b982be649..77d3410c4 100644
--- a/tex/context/base/s-sys-01.tex
+++ b/tex/context/base/s-sys-01.tex
@@ -19,16 +19,22 @@ function showmath()
local escape = characters.filters.utf.private.escape
local data = characters.data
tex.sprint(tex.ctxcatcodes,"\\starttabulate[|T|c|T|T|T|T||||]")
+ local texsprint = tex.sprint
+% -- function texsprint(a,b) print(b) end
for _, v in ipairs(table.sortedkeys(slots)) do
local t, d, u = slots[v], data[v], escape(utf.char(v))
+ local class, name, description = d.mathclass or "", d.mathname or "" , d.description or ""
+ if class == "accent" then
+ u = ""
+ end
if t[3] and t[4] then
- tex.sprint(tex.ctxcatcodes,string.format(
+ texsprint(tex.ctxcatcodes,string.format(
"\\NC 0x%04X\\NC $%s$\\NC %s\\NC 0x%04X\\NC %s\\NC 0x%04X\\NC %s\\NC %s\\NC %s\\NC\\NR",
- v,u,t[1],t[2],t[3],t[4],d.mathclass or "",d.mathname or "",d.description))
+ v,u,t[1],t[2],t[3],t[4],class,name,description))
else
- tex.sprint(tex.ctxcatcodes,string.format(
+ texsprint(tex.ctxcatcodes,string.format(
"\\NC 0x%04X\\NC $%s$\\NC %s\\NC 0x%04X\\NC\\NC\\NC %s\\NC %s\\NC %s\\NC\\NR",
- v,u,t[1],t[2],d.mathclass or "",d.mathname or "",d.description))
+ v,u,t[1],t[2],class,name,description))
end
end
tex.sprint(tex.ctxcatcodes,"\\stoptabulate")
@@ -51,5 +57,5 @@ end
[math characters -- \pagenumber]
\starttext
- \ctxlua{showmath()}
+\ctxlua{showmath()}
\stoptext
diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex
index 1ba55b21e..69035d45f 100644
--- a/tex/context/base/supp-box.tex
+++ b/tex/context/base/supp-box.tex
@@ -829,6 +829,9 @@
\def\restoreshapebox % compensates for the signal
{\global\setbox\tmpshapebox\vbox{\vskip-\lineheight\unvcopy\oldshapebox}}
+\def\shapeboxstrut % put this in front if needed !
+ {\vrule\!!width\zeropoint\!!height\ht\shapebox\!!depth\dp\shapebox}
+
\def\dodoreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip
{\ifzeropt\lastskip % \ifdim\lastskip=\zeropoint\relax
\ifzeropt\lastkern % \ifdim\lastkern=\zeropoint\relax
diff --git a/tex/context/base/syst-cat.tex b/tex/context/base/syst-cat.tex
index 5f75ea2e7..d5424342c 100644
--- a/tex/context/base/syst-cat.tex
+++ b/tex/context/base/syst-cat.tex
@@ -116,6 +116,7 @@
\ifx\nilcatcodes \undefined \newcatcodetable \nilcatcodes \fi
\ifx\texcatcodes \undefined \newcatcodetable \texcatcodes \fi
\ifx\ctxcatcodes \undefined \newcatcodetable \ctxcatcodes \fi
+\ifx\notcatcodes \undefined \newcatcodetable \notcatcodes \fi
\ifx\vrbcatcodes \undefined \newcatcodetable \vrbcatcodes \fi
\ifx\prtcatcodes \undefined \newcatcodetable \prtcatcodes \fi
\ifx\mthcatcodes \undefined \newcatcodetable \mthcatcodes \fi % math, not used, too tricky
@@ -178,6 +179,30 @@
\catcode`\| = 13
\stopcatcodetable
+\startcatcodetable \notcatcodes
+ \catcode`\^^I = 10 % ascii tab is a blank space
+ \catcode`\^^M = 5 % ascii return is end-line
+ \catcode`\^^L = 5 % ascii form-feed
+ \catcode`\ = 10 % ascii space is blank space
+ \catcode`\^^Z = 9 % ascii eof is ignored
+ \catcode`\~ = 12
+ \catcode`\# = 12 % probably too much, in principle
+ \catcode`\$ = 12 % nilcatcodes would be ok too
+ \catcode`\% = 12
+ \catcode`\^ = 12
+ \catcode`\& = 12
+ \catcode`\_ = 12
+ \catcode`\< = 12
+ \catcode`\> = 12
+ \catcode`\{ = 12
+ \catcode`\} = 12
+ \catcode`\" = 12
+ \catcode`\' = 12
+ \catcode`\/ = 12
+ \catcode`\\ = 12
+ \catcode`\| = 12
+\stopcatcodetable
+
\startcatcodetable \mthcatcodes
\catcode`\^^I = 10
\catcode`\^^M = 5
diff --git a/tex/context/base/type-buy.tex b/tex/context/base/type-buy.tex
index 555535388..4e6eb3064 100644
--- a/tex/context/base/type-buy.tex
+++ b/tex/context/base/type-buy.tex
@@ -197,12 +197,12 @@
\stoptypescript
\starttypescript [lucida,lucidabfm] [texnansi,ec,8r,uc]
- \definetypeface [lucida] [rm] [serif] [lucida] [default] [encoding=\typescripttwo]
- \definetypeface [lucida] [ss] [sans] [lucida] [default] [encoding=\typescripttwo]
- \definetypeface [lucida] [tt] [mono] [lucida] [default] [encoding=\typescripttwo]
- \definetypeface [lucida] [hw] [handwriting] [lucida] [default] [encoding=\typescripttwo]
- \definetypeface [lucida] [cg] [calligraphy] [lucida] [default] [encoding=\typescripttwo]
- \loadmapfile [\typescriptthree-bh-lucida.map]
+ \definetypeface [\typescriptone] [rm] [serif] [lucida] [default] [encoding=\typescripttwo]
+ \definetypeface [\typescriptone] [ss] [sans] [lucida] [default] [encoding=\typescripttwo]
+ \definetypeface [\typescriptone] [tt] [mono] [lucida] [default] [encoding=\typescripttwo]
+ \definetypeface [\typescriptone] [hw] [handwriting] [lucida] [default] [encoding=\typescripttwo]
+ \definetypeface [\typescriptone] [cg] [calligraphy] [lucida] [default] [encoding=\typescripttwo]
+ \loadmapfile [\typescripttwo-bh-lucida.map]
\stoptypescript
\starttypescript [lucida] [texnansi,ec,8r]
diff --git a/tex/context/base/x-cals.mkiv b/tex/context/base/x-cals.mkiv
index eba39cf64..314ec5bb9 100644
--- a/tex/context/base/x-cals.mkiv
+++ b/tex/context/base/x-cals.mkiv
@@ -124,11 +124,11 @@ do
valign = valignments[valign]
end
local width = widths[col]
- if s or m or halign or valign or width then
+ if s or m or halign or valign or width then -- only english interface !
texsprint(tex.ctxcatcodes,format("\\bTD[nx=%s,ny=%s,align={%s,%s},width=%s]",
s or 1, (m or 0)+1, halign or "flushleft", valign or "high", width or "fit"))
else
- texsprint(tex.ctxcatcodes,"\\bTD")
+ texsprint(tex.ctxcatcodes,"\\bTD[align={flushleft,high},width=fit]") -- else problems with vertical material
end
-- xmlsprint(dk)
xmlcprint(dk)
diff --git a/tex/context/base/x-mmb.mkiv b/tex/context/base/x-mmb.mkiv
new file mode 100644
index 000000000..85da90c45
--- /dev/null
+++ b/tex/context/base/x-mmb.mkiv
@@ -0,0 +1,256 @@
+%D \module
+%D [ file=x-mmb,
+%D version=2007.09.04,
+%D title=\CONTEXT\ XML Modules,
+%D subtitle=Base of MathML Renderer,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% \defineXMLentity [mathematicald] {d}
+
+% \defineXMLentity [imaginaryi] {{\rm i}}
+% \defineXMLentity [differentiald] {\partial}
+% \defineXMLentity [exponentiale] {{\rm e}}
+% \defineXMLentity [capitaldifferentiald] {D}
+
+% \defineXMLentity [ii] {\getXMLentity{imaginaryi}}
+% \defineXMLentity [dd] {\getXMLentity{differentiald}}
+% \defineXMLentity [ee] {\getXMLentity{exponentiale}}
+% \defineXMLentity [DD] {\getMMLentity{capitaldifferentiald}}
+
+% \defineXMLentity [ImaginaryI] {\getXMLentity{imaginaryi}}
+% \defineXMLentity [DifferentialD] {\getXMLentity{differentiald}}
+% \defineXMLentity [ExponentialE] {\getXMLentity{exponentiale}}
+% \defineXMLentity [CapitalDifferentialD] {\getXMLentity{differentiald}}
+
+% \defineXMLentity [NaN] {\getXMLentity{notanumber}}
+% \defineXMLentity [NotANumber] {\getXMLentity{notanumber}}
+
+% \defineXMLentity [and] {\wedge}
+% \defineXMLentity [exists] {\exists}
+% \defineXMLentity [forall] {\forall}
+% \defineXMLentity [implies] {\Rightarrow}
+% \defineXMLentity [not] {\neg}
+% \defineXMLentity [or] {\vee}
+% \defineXMLentity [xor] {\mathopnolimits{xor}}
+
+% \defineXMLentity [imaginary] {\Im}
+% \defineXMLentity [real] {\Re}
+
+% \defineXMLentity [lceiling] {\lceil}
+% \defineXMLentity [rceiling] {\rceil}
+% \defineXMLentity [lfloor] {\lfloor}
+% \defineXMLentity [rfloor] {\rfloor}
+
+% \defineXMLentity [ne] {\neq}
+% \defineXMLentity [neq] {\neq}
+% \defineXMLentity [gt] {>}
+% \defineXMLentity [lt] {<}
+% \defineXMLentity [ge] {\geq}
+% \defineXMLentity [geq] {\geq}
+% \defineXMLentity [le] {\leq}
+% \defineXMLentity [leq] {\leq}
+% \defineXMLentity [equivalent] {\equiv}
+% \defineXMLentity [equiv] {\equiv}
+% \defineXMLentity [approx] {\approx}
+
+% \defineXMLentity [factorof] {\mid}
+% \defineXMLentity [mapsto] {\mapsto}
+
+% \defineXMLentity [int] {\int}
+% \defineXMLentity [prime] {\prime}
+% \defineXMLentity [laplacian] {\nabla^2}
+% \defineXMLentity [partial] {\partial}
+
+% \defineXMLentity [union] {\cup}
+% \defineXMLentity [intersect] {\cap}
+% \defineXMLentity [in] {\in}
+% \defineXMLentity [notin] {\not\in}
+% \defineXMLentity [subset] {\subset}
+% \defineXMLentity [prsubset] {\subseteq}
+% \defineXMLentity [notsubset] {\not\subset}
+% \defineXMLentity [notprsubset] {\not\subseteq}
+% \defineXMLentity [setdiff] {\setminus}
+
+% \defineXMLentity [card] {\vert}
+% \defineXMLentity [cartesianproduct] {\times}
+
+% \defineXMLentity [sum] {\sum}
+% \defineXMLentity [prod] {\prod}
+% \defineXMLentity [product] {\prod}
+% \defineXMLentity [lim] {\lim}
+
+% \defineXMLentity [transpose] {^{\rm T}}
+
+% \defineXMLentity [plusminus] {\mathematics{\pm}}
+% \defineXMLentity [minusplus] {\mathematics{\mp}}
+
+% \defineXMLentity [vectorproduct] {\times}
+% \defineXMLentity [scalarproduct] {\cdot}
+% \defineXMLentity [outerproduct] {\otimes}
+
+% \defineXMLentity [integers] {\integers}
+% \defineXMLentity [reals] {\reals}
+% \defineXMLentity [rationals] {\rationals}
+% \defineXMLentity [naturalnumbers] {\naturalnumbers}
+% \defineXMLentity [complexes] {\complexes}
+% \defineXMLentity [primes] {\primes}
+
+% \defineXMLentity [emptyset] {\emptyset}
+% \defineXMLentity [pi] {\pi}
+% \defineXMLentity [eulergamma] {\gamma}
+% \defineXMLentity [infinity] {\mathematics{\infty}}
+
+% \defineXMLentity [InvisibleTimes] {}
+% \defineXMLentity [InvisibleComma] {}
+% \defineXMLentity [ApplyFunction] {}
+
+% \defineXMLentity [it] {\getXMLentity{InvisibleTines}}
+% \defineXMLentity [ic] {\getXMLentity{InvisibleComma}}
+% \defineXMLentity [af] {\getXMLentity{ApplyFunction}}
+
+% \defineXMLentity [PlusMinus] {\getXMLentity{plusminus}}
+
+% \defineXMLentity [infin] {\getXMLentity{infinity}}
+% \defineXMLentity [infty] {\getXMLentity{infinity}}
+% \defineXMLentity [part] {\getXMLentity{differentiald}}
+
+% \defineXMLentity [RightArrow] {\normalorfiller\rightarrow\rightarrowfill}
+% \defineXMLentity [LeftArrow] {\normalorfiller\leftarrow\leftarrowfill}
+% \defineXMLentity [UnderBrace] {\normalorfiller\empty\upbracefill}
+% \defineXMLentity [OverBrace] {\normalorfiller\empty\downbracefill}
+% \defineXMLentity [UnderBar] {\normalorfiller\hrule\hrulefill}
+% \defineXMLentity [OverBar] {\normalorfiller\hrule\hrulefill}
+% \defineXMLentity [Hat] {\normalorfiller\empty\empty} % todo
+
+% \defineXMLentity [downarrow] {\mathortext\downarrow\empty}
+% \defineXMLentity [uparrow] {\mathortext\uparrow\empty}
+
+% \defineXMLentity [Tab] {\hskip4em}
+% \defineXMLentity [NewLine] {\mathortext\empty\crlf}
+% \defineXMLentity [IndentingNewLine] {\mathortext\empty\crlf}
+
+% \defineXMLentity [NoBreak] {\nobreak}
+% \defineXMLentity [GoodBreak] {\goodbreak}
+% \defineXMLentity [BadBreak] {\nobreak}
+
+% \defineXMLentity [Space] {\getXMLentity{MediumSpace}}
+% \defineXMLentity [NonBreakingSpace] {\getXMLentity{MediumSpace}}
+% \defineXMLentity [ZeroWidthSpace] {}
+
+% \def\somespaceentity#1#2%
+% {\mathortext
+% {\mskip#1mu}
+% {\ifvmode\dontleavehmode\else\unskip\fi\hskip#2em\strut\hskip\zeropoint\ignorespaces}%
+% \relax}
+
+% \defineXMLentity [VeryThinSpace] {\somespaceentity {2}{.125}}
+% \defineXMLentity [ThinSpace] {\somespaceentity {3}{.25}}
+% \defineXMLentity [MediumSpace] {\somespaceentity {4}{.5}}
+% \defineXMLentity [ThickSpace] {\somespaceentity {5}{1}}
+% \defineXMLentity [NegativeVeryThinSpace] {\somespaceentity{-2}{-.125}}
+% \defineXMLentity [NegativeThinSpace] {\somespaceentity{-3}{-.25}}
+% \defineXMLentity [NegativeMediumSpace] {\somespaceentity{-4}{-.5}}
+% \defineXMLentity [NegativeThickSpace] {\somespaceentity{-5}{-1}}
+
+% \defineXMLentity [NegVeryThinSpace] {\getXMLentity{NegativeVeryThinSpace}}
+% \defineXMLentity [NegThinSpace] {\getXMLentity{NegativeThinSpace}}
+% \defineXMLentity [NegMediumSpace] {\getXMLentity{NegativeMediumSpace}}
+% \defineXMLentity [NegThickSpace] {\getXMLentity{NegativeThickSpace}}
+
+% \defineXMLentity [nbsp] {\getXMLentity{NonBreakingSpace}}
+% \defineXMLentity [thinsp] {\getXMLentity{ThinSpace}}
+% \defineXMLentity [medsp] {\getXMLentity{MediumSpace}}
+% \defineXMLentity [thicksp] {\getXMLentity{ThickSpace}}
+
+% \defineXMLentity [larr] {\getXMLentity{LeftArrow}}
+% \defineXMLentity [rarr] {\getXMLentity{RightArrow}}
+
+
+% \defineXMLentity [lbrace] {\normalordelimiter{\{}{\MMLleft \{}}
+% \defineXMLentity [rbrace] {\normalordelimiter{\}}{\MMLright\}}}
+% \defineXMLentity [lbracket] {\normalordelimiter{[}{\MMLleft [}}
+% \defineXMLentity [rbracket] {\normalordelimiter{]}{\MMLright]}}
+% \defineXMLentity [lparenthesis] {\normalordelimiter{(}{\MMLleft (}}
+% \defineXMLentity [rparenthesis] {\normalordelimiter{)}{\MMLright)}}
+% \defineXMLentity [langle] {\normalordelimiter{\langle}{\MMLleft \langle}}
+% \defineXMLentity [rangle] {\normalordelimiter{\rangle}{\MMLright\rangle}}
+
+% \defineXMLentity [lang] {\getXMLentity{langle}}
+% \defineXMLentity [rang] {\getXMLentity{rangle}}
+% \defineXMLentity [lbrack] {\getXMLentity{lbracket}}
+% \defineXMLentity [rbrack] {\getXMLentity{rbracket}}
+% \defineXMLentity [lparent] {\getXMLentity{lparenthesis}}
+% \defineXMLentity [rparent] {\getXMLentity{rparenthesis}}
+
+% \defineXMLentity [\letterleftbrace ] {\getXMLentity{lbrace}}
+% \defineXMLentity [\letterrightbrace] {\getXMLentity{rbrace}}
+
+% \defineXMLentity [times] {\mathematics{\times}}
+% \defineXMLentity [minus] {\mathematics{-}}
+% \defineXMLentity [plus] {\mathematics{+}}
+% \defineXMLentity [plusmn] {\mathematics{\pm}}
+
+% \defineXMLentity [nabla] {\nabla}
+
+% \def\myspecialnormalvert {\mathematics{\vert}}
+% \def\myspecialstretchvert{\;\vrule\;}
+
+% \defineXMLentity [,] {{,}}
+% \defineXMLentity [.] {{.}}
+% \defineXMLentity [+] {+}
+% \defineXMLentity [-] {-}
+% \defineXMLentity [|] {\myspecialnormalvert}
+% \defineXMLentity [/] {/}
+% \defineXMLentity [*] {\times}
+% \defineXMLentity [=] {=}
+
+% \defineXMLentity [++] {++}
+% \defineXMLentity [--] {--}
+% \defineXMLentity [//] {//}
+% \defineXMLentity [**] {\times\times}
+% \defineXMLentity [==] {==}
+% \defineXMLentity [...] {\cdots}
+
+% \defineXMLentity [quot] {"}
+
+% \defineXMLentity [triangle] {\mathematics\triangle}
+% \defineXMLentity [otimes] {\mathematics\otimes}
+% \defineXMLentity [oplus] {\mathematics\oplus}
+% \defineXMLentity [cup] {\mathematics\cup}
+% \defineXMLentity [cap] {\mathematics\cap}
+% \defineXMLentity [sdot] {\mathematics\cdot}
+% \defineXMLentity [dot] {\mathematics\cdot}
+% \defineXMLentity [sim] {\mathematics\sim}
+% \defineXMLentity [circ] {\mathematics\circ}
+% \defineXMLentity [dagger] {\mathematics\dagger}
+% \defineXMLentity [cdots] {\mathematics\cdots}
+
+% \defineXMLentity [...] {\getXMLentity{cdots}}
+% \defineXMLentity [continued] {\getXMLentity{cdots}}
+
+% \defineXMLentity [sub] {\getXMLentity{subset}}
+% \defineXMLentity [sube] {\getXMLentity{prsubset}}
+% \defineXMLentity [notprsubset] {\getXMLentity{notprsubset}}
+
+% \defineXMLentity [ndash] {\endash}
+% \defineXMLentity [mdash] {\emdash}
+
+% -- ignored: malignmark
+% -- luacode will be moved to x-mmp.lua
+% -- { } # % _ ^ & etc escapen, {} in mathtype entities; mo/mtext
+
+\ifx\MMLleft \undefined \let\MMLleft \firstofoneargument \fi
+\ifx\MMLright\undefined \let\MMLright\firstofoneargument \fi
+
+\def\mmlleftdelimiter #1{\normalordelimiter{#1}{\MMLleft #1}}
+\def\mmlrightdelimiter#1{\normalordelimiter{#1}{\MMLright#1}}
+\def\mmlchar #1{\char#1 }
+\def\mmlnolim #1{\mathopnolimits{#1}}
+
+\endinput
diff --git a/tex/context/base/x-mmc.mkiv b/tex/context/base/x-mmc.mkiv
new file mode 100644
index 000000000..feed886fe
--- /dev/null
+++ b/tex/context/base/x-mmc.mkiv
@@ -0,0 +1,2390 @@
+%D \module
+%D [ file=x-newmml,
+%D version=2005.06.10, % 1999.12.20,
+%D title=\CONTEXT\ XML Modules,
+%D subtitle=MathML Renderer,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\doifnotmode {atpragma} {\endinput}
+
+%D Remark: from now on this is a module and no longer an xtag
+%D filter. In due time it will replace the older renderer (which
+%D we will keep around for sentimental reasons). This variant has
+%D no namespace support yet, but eventually we will use a \MKIV\
+%D version.
+
+\unprotect
+
+\def\widevec#1%
+ {\vbox{\m@th\ialign{##\crcr
+ \rightarrowfill\crcr\noalign{\nointerlineskip}%
+ $\hfil\displaystyle{#1}\hfil$\crcr}}}
+
+\protect
+
+\ifx\inlinemathematics\undefined
+ \def\inlinemathematics {\dontleavehmode\mathematics} % already in kernel
+ \long\def\inlinemath #1{\dontleavehmode\relax\ifmmode#1\else $#1$\fi}
+\fi
+
+%D Then we start defining the rendering macros:
+
+\writestatus{loading}{Context XML Macros (MathML Renderer)}
+
+\startmodule [mathml]
+
+%D First we load the entities:
+
+\usemodule[newmme] % will be replaced by math-ent or so
+
+\unprotect
+
+\def\MMLrm{\mr}
+
+\def\MMLseparator#1{{#1}} % nils space after separator
+
+%D First we define some general formula elements.
+
+% \defineXMLenvironment [formula] [label=,sublabel=]
+% {\dostartXMLformula\placeformula}
+% {\dostopXMLformula}
+
+% \defineXMLenvironment [subformula] [label=,sublabel=]
+% {\dostartXMLformula\placesubformula}
+% {\dostopXMLformula}
+
+% \def\dostartXMLformula#1%
+% {\doifelsenothingXMLop{label}
+% {\startformula}
+% {\expanded{#1[\XMLop{label}]{\XMLop{sublabel}}}\startformula}}
+
+% \def\dostopXMLformula
+% {\stopformula}
+
+%D Since I only had the draft of MathML 2 as example of
+%D rendering, there are probably a lot of omissions and
+%D misinterpretations. At least I learned some bits and
+%D pieces of math rendering.
+%D
+%D The main complications were not so much the math, but to
+%D find the most efficient way to handle elements without
+%D spacing beging messed up. The first implementation was
+%D aimed at getting reasonable output, this second
+%D implementation is already better in terms of handling
+%D nesting, and I will definitely need a third one that has
+%D more efficient and less ugly code.
+%D
+%D The \TEX\ part is not that complicated and once the
+%D preprocessor was okay, the rest way just a lot of keying
+%D and testing. It all comes down to gobbling, redefining,
+%D and not so much to parsing.
+%D
+%D The second implementation expanded the whole math sequence
+%D into an internal \TEX\ representation. This is a rather clean
+%D and fast process. Filtering and testing takes place by
+%D redefining teh internal representation macros.
+%D
+%D The third implementation may look a bit more messy in some
+%D respects. This is because in \TEX\ it's not that trivial to
+%D implement a tree handler. We use a stack for the \type {apply}
+%D element and other sequential content. Occasionally we need to
+%D peek into child elements which involves messy code. This
+%D implementation is closer to the normal \XML\ handling in
+%D \CONTEXT.
+
+%D We start with the parent elements and the option handler.
+
+\defineXMLdirective [mathml] \setupMMLappearance % todo
+
+%D In the styles, options can be set with:
+
+\def\setupMMLappearance[#1]{\dodoubleargument\getparameters[@@MML#1]}
+
+%D We will apply inner math to all bits and pieces made up by an
+%D \type {apply}.
+
+\def\MMLmathinner
+ {\ifinner \expandafter \firstofoneargument \else \expandafter \mathinner \fi}
+
+%D Auxiliary MathML macros: (to be generalized)
+
+ \def\mmlfirst #1{\mmlfirst{#1}{/*}}
+ \def\mmlsecond#1{\xmlindex{#1}{/*}{2}}
+ \def\mmlthird #1{\xmlindex{#1}{/*}{3}}
+ \def\mmllast #1{\xmlindex{#1}{/*}{-1}}
+
+ \def\doifelseMMCfunction#1{% todo: \startnolines ... \stopnolines
+ \xmldoifelse {#1} {/mml:fn} {%
+ \firstoftwoarguments
+ } {%
+ \xmldoifelse {#1} {/mml:apply/mml:fn}\XMLdoifonstackelse{apply} {%
+ \firstoftwoarguments
+ } {%
+ \xmldoifelse {#1} {/mml:ci[@type=='fn']} {%
+ \firstoftwoarguments
+ } {%
+ \secondoftwoarguments
+ }
+ }
+ }
+ }
+
+%D Special features:
+
+\newtoks \@@postponedMMLactions \setfalse \somepostponedMMLactions
+
+\def\postponeMMLactions#1%
+ {\global\settrue\somepostponedMMLactions
+ \global\@@postponedMMLactions\expandafter{\the\@@postponedMMLactions#1}}
+
+\def\postponedMMLactions
+ {\global\setfalse\somepostponedMMLactions
+ \@EA\global\@EA\@@postponedMMLactions\@EA\emptytoks
+ \the\@@postponedMMLactions}
+
+%D A couple of lists:
+
+ \convertargument
+ mml:times|mml:divide|mml:power|%
+ mml:lt|mml:gt|mml:eq|mml:leq|mml:geq|%
+ mml:in|mml:inverse|%
+ mml:fn|%
+ mml:floor|mml:ceiling|%
+ mml:mean|%
+ mml:selector|%
+ mml:abs|mml:int|mml:limit|mml:sum|mml:product|%
+ mml:outerproduct|mml:innerproduct|mml:scalarproduct%
+ \to \MMLcmainresetlist
+
+ \convertargument
+ mml:sin|mml:arcsin|mml:sinh|mml:arcsinh|%
+ mml:cos|mml:arccos|mml:cosh|mml:arccosh|%
+ mml:tan|mml:arctan|mml:tanh|mml:arctanh|%
+ mml:cot|mml:arccot|mml:coth|mml:arccoth|%
+ mml:csc|mml:arccsc|mml:csch|mml:arccsch|%
+ mml:sec|mml:arcsec|mml:sech|mml:arcsech|%
+ mml:ln|mml:exp|mml:log|%
+ mml:abs|mml:int|mml:limit|mml:sum|mml:product|%
+ mml:fn%
+ \to \MMLcfunctionlist
+
+ \convertargument
+ mml:sin|mml:arcsin|mml:sinh|mml:arcsinh|%
+ mml:cos|mml:arccos|mml:cosh|mml:arccosh|%
+ mml:tan|mml:arctan|mml:tanh|mml:arctanh|%
+ mml:cot|mml:arccot|mml:coth|mml:arccoth|%
+ mml:csc|mml:arccsc|mml:csch|mml:arccsch|%
+ mml:sec|mml:arcsec|mml:sech|mml:arcsech|%
+ mml:ln|mml:exp|mml:log|%
+ mml:abs%
+ \to \MMLcpurefunctionlist
+
+ \convertargument
+ mml:diff|mml:partialdiff|mml:root%
+ \to \MMLcconstructlist
+
+%D We use inner and grouping (begin/end and no b/e) else we
+%D get problems with 1/2(1+2) and alike (todo: ask taco).
+%D
+%D The problem with apply is that we need to take care of
+%D several situations, like:
+%D
+%D \starttyping
+%D <apply> <.../> ...
+%D <apply> <fn> ...
+%D <apply> <apply> <ci> ...
+%D <apply> <apply> <fn> <ci> ...
+%D \stoptyping
+%D
+%D Because we translated version 2 of this renderer into
+%D version 3 the following definitions may be sub optimal or
+%D more complex than actually needed.
+
+ % simple version
+
+ \newcount\@MMLlevel \def\MMLcreset{\@MMLlevel\zerocount}
+
+ \let\MMLctempresetlist\empty \def\setMMLcreset{\edef\MMLctempresetlist}
+
+ \let\MMLdoL\donothing
+ \let\MMLdoR\donothing
+
+ \newcount\mmlapplydepth \def\MMLcreset{\mmlapplydepth\zerocount}
+
+ \startxmlsetups mml:apply
+ \MMLmathinner {
+ \xmldoif {#1} {/(\MMLcmainresetlist\string|\MMLctempresetlist)} {
+% \MMLcreset
+ }
+ \edef\mmlapplyopentoken {\xmlatt{#1}{open}}
+ \edef\mmlapplyclosetoken{\xmlatt{#1}{close}}
+ \ifcase\mmlapplydepth \else
+ \ifx\mmlapplyopentoken\empty
+ \def\mmlapplyopentoken {(}
+ \def\mmlapplyclosetoken{)}
+ \fi
+ \fi
+ \advance\mmlapplydepth\plusone
+ \begingroup
+ \ifx\mmlapplyopentoken\empty
+ \let\MMLdoL\donothing
+ \let\MMLdoR\donothing
+ \else
+ \edef\MMLdoL{\noexpand\left \mmlapplyopentoken }
+ \edef\MMLdoR{\noexpand\right\mmlapplyclosetoken}
+ \fi
+ \let\MMLctempresetlist\empty
+ % \xmldoifelse {#1} {/mml:apply} {
+ % % <apply> <apply> ... </apply> <ci> .. </ci> </apply>
+ % \xmldoifelse {#1} {/mml:apply(mml:plus|mml:minus)} {% [a]
+ % % yet incomplete and rather untested
+ % % <apply> <apply> <minus/> <tan/> <cos/> </apply> <ci>x</ci> </apply>
+ % } {% [b]
+ % \MMLcreset
+ % }
+ % \MMLdoL
+ % \xmlfirst{#1}{/*}
+ % \ifconditional\somepostponedMMLactions
+ % \postponedMMLactions
+ % \else
+ % \left(\MMLcreset\mmlsecond{#1}\right)
+ % \fi
+ % \MMLdoR
+ % } {
+ \edef\mmlapplyaction{\xmlfilter{#1}{/*/name()}}
+ \doifsetupselse {mml:apply:\mmlapplyaction} {
+ \xmlsetup{#1}{mml:apply:\mmlapplyaction}
+ } {
+ % \MMLdoL
+ \xmlsetup{#1}{\xmlfilter{#1}{/*/name()}}
+ % \MMLdoR
+ }
+ % }
+ \endgroup
+ \advance\mmlapplydepth\minusone
+ }
+ \stopxmlsetups
+
+ \startxmlsetups mml:apply:mml:apply
+ \xmlflush{#1}
+ \xmlall{#1}{../[position()>1]}
+ \stopxmlsetups
+ \startxmlsetups mml:apply:mml:fn
+ \stopxmlsetups
+ \startxmlsetups mml:apply:mml:csymbol
+ \stopxmlsetups
+ \startxmlsetups mml:apply:mml:ci
+ \stopxmlsetups
+
+% \startsetups mmc:fn:apply
+% \begingroup
+% \rawXMLstacktext\plusone % still on stack, no check, just fn content
+% \doifelse {\getXMLstackname\plusone} {ci} {
+% \flattenXMLcontent{\getXMLstackdata\plusone}
+% \doifsetupselse{mmc:fn:\flattenedXMLcontent} {
+% % \MMLdoL/MMLdoR to be handled in plugin
+% \global\defXMLstackdata\XMLfnoperator\plusone
+% \expanded{\endgroup\noexpand\directsetup{mmc:fn:\flattenedXMLcontent}}
+% } {
+% \endgroup
+% \MMLcreset
+% \MMLdoL
+% \getXMLstackdata\plusone
+% \ifnum\XMLstacklevel>\plusone
+% \getXMLentity{NegThinSpace}
+% \left(\MMLcreset\flushXMLstackwith\plustwo{\MMLseparator,}\right)
+% \fi
+% \MMLdoR
+% }
+% } {
+% \endgroup
+% \MMLcreset
+% \MMLdoL
+% \getXMLstackdata\plusone
+% \MMLdoR
+% }
+% \stopsetups
+
+% \startsetups mmc:csymbol:apply
+% \begingroup
+% \defineXMLsave[csymbol][definitionURL=,encoding=]
+% \rawXMLstackdata\plusone % was text % still on stack, no check, just attr test
+% % \MMLdoL/MMLdoR to be handled in plugin
+% \lowercasestring\XMLpar{csymbol}{definitionURL}{}\to\mmcSymbolURL
+% \doifsetupselse{mmc:csymbol:\mmcSymbolURL} {
+% \expanded{\endgroup\noexpand\directsetup{mmc:csymbol:\mmcSymbolURL}}
+% } {
+% \endgroup
+% %\XMLval{mmc:cs}{\XMLop{encoding}}{\firstofoneargument}% fails when no content
+% \XMLval{mmc:cs}{\XMLop{encoding}}{}
+% }
+% \stopsetups
+
+% \defineXMLsingular
+% [csymbol]
+% [encoding=text,
+% definitionURL=]
+% {\directsetup{mmc:csymbol:apply:singular}}
+
+% \startsetups mmc:csymbol:apply:singular
+% \lowercasestring\XMLpar{csymbol}{definitionURL}{}\to\mmcSymbolURL
+% \directsetup{mmc:csymbol:\mmcSymbolURL}
+% \stopsetups
+
+% \startsetups mmc:ci:apply
+% \getXMLstackdata\plusone
+% \ifnum\XMLstacklevel>\plusone
+% \left(\MMLcreset\flushXMLstackwith\plustwo{\MMLseparator,}\right)
+% \fi
+% \stopsetups
+
+% reln
+
+ \startxmlsetups mml:reln
+ \writestatus{XML}{MathML element "reln" is obsolete}
+ \stopxmlsetups
+
+% fn
+
+\startsetups mmc:fn:plusminus
+ \ifnum\XMLstacklevel>\plustwo
+ \MMLcreset
+ \left(\expandafter\flushXMLstackwith\expandafter\plustwo\expandafter{\XMLfnoperator}\right)
+ \else
+ \getXMLstackdata\plustwo
+ \fi
+\stopsetups
+
+\startsetups mmc:fn:minusplus
+ \directsetup{mmc:fn:plusminus}
+\stopsetups
+
+\defineXMLnested
+ [fn]
+ {\directsetup{mmc:fn:start}}
+ {\directsetup{mmc:fn:stop}}
+
+\startsetups mmc:fn:apply
+ \begingroup
+ \rawXMLstacktext\plusone % still on stack, no check, just fn content
+ \doifelse {\getXMLstackname\plusone} {ci} {
+ \flattenXMLcontent{\getXMLstackdata\plusone}
+ \doifsetupselse{mmc:fn:\flattenedXMLcontent} {
+ \global\defXMLstackdata\XMLfnoperator\plusone
+ \expanded{\endgroup\noexpand\directsetup{mmc:fn:\flattenedXMLcontent}}
+ } {
+ \endgroup
+ \MMLcreset
+ \getXMLstackdata\plusone
+ \ifnum\XMLstacklevel>\plusone
+ \getXMLentity{NegThinSpace}
+ \left(\MMLcreset\flushXMLstackwith\plustwo{\MMLseparator,}\right)
+ \fi
+ }
+ } {
+ \endgroup
+ \MMLcreset
+ \getXMLstackdata\plusone
+ }
+\stopsetups
+
+\startsetups mmc:fn:start
+ \ifnum\XMLstacklevel>\plustwo
+ \def\MMCfnleft {\left(}
+ \def\MMCfnright{\right)}
+ \else
+ \let\MMCfnleft \relax
+ \let\MMCfnright\relax
+ \fi
+ \begingroup
+\stopsetups
+
+\startsetups mmc:fn:stop
+ \doifelse {\getXMLstackname\plusone} {ci} {
+ \flattenXMLcontent{\getXMLstackdata\plusone}
+ \doifsetupselse{mmc:fn:\flattenedXMLcontent} {
+ \global\defXMLstackdata\XMLfnoperator\plusone
+ \directsetup{mmc:fn:\flattenedXMLcontent}
+ } {
+ \MMLcreset
+ \getXMLstackdata\plusone
+ }
+ \endgroup
+ } {
+ \doifelse {\getXMLstackname\plusone} {apply} {
+ \xmldoifelse {#1} {/(mml:plus\string|mml:minus)} {
+ \left(
+ \getXMLstackdata\plusone
+ \right)
+ } {
+ \getXMLstackdata\plusone
+ }
+ \endgroup
+ \ifnum\XMLstacklevel>\plusone
+ \left(
+ \getXMLstackdata\plustwo
+ \right)
+ \fi
+ } {
+ \MMLcreset
+ \getXMLentity{NegThinSpace}
+ \MMCfnleft
+ \ifnum\XMLstacklevel=\plustwo\MMLccomma\fi
+ \flushXMLstackwith\plustwo\MMLccomma
+ \MMCfnright
+ \endgroup
+ }
+ }
+\stopsetups
+
+% c*
+
+\defineXMLargument [csymbol] [encoding=text] {\XMLval{mmc:cs}{\XMLop{encoding}}{\firstofoneargument}}
+
+%D The next definition provide a kind of plug-in mechanism (see
+%D the open math extension module).
+
+\defineXMLsingular
+ [csymbol]
+ [encoding=text,
+ definitionURL=]
+ {\doifsomething{\XMLop{definitionURL}}{\directsetup{mmc:csymbol:apply}}}
+
+\startsetups mmc:csymbol:apply
+ \begingroup
+ \rawXMLstacktext\plusone % still on stack, no check, just attr test
+ % http://www.publishers.com/SomeName
+ \lowercasestring\XMLpar{csymbol}{definitionURL}{}\to\mmcSymbolURL
+ \doifsetupselse{mmc:csymbol:} {\mmcSymbolURL} {
+ \expanded{\endgroup\noexpand\directsetup{mmc:csymbol:\mmcSymbolURL}}
+ } {
+ % SomeName (fallback)
+ \splitfilename{\XMLpar{csymbol}{definitionURL}{}}
+ \doifsetupselse{mmc:csymbol:\splitoffbase} {
+ \expanded{\endgroup\noexpand\directsetup{mmc:csymbol:\splitoffbase}}
+ } {
+ \endgroup
+ \XMLval{mmc:cs}{\XMLop{encoding}}{\firstofoneargument}
+ }
+ }
+\stopsetups
+
+%D Alternative b will convert periods into comma's:
+%D
+%D \startbuffer
+%D \startXMLdata
+%D <imath><apply><cn>1.23</cn></apply></imath>
+%D <dmath><apply><cn>1.23</cn></apply></dmath>
+%D \stopXMLdata
+%D
+%D \type{\setupMMLappearance[cn] [alternative=b]}
+%D
+%D \startXMLdata
+%D <imath><apply><cn>1.23</cn></apply></imath>
+%D <dmath><apply><cn>1.23</cn></apply></dmath>
+%D \stopXMLdata
+%D \stopbuffer
+%D
+%D \start \typebuffer \getbuffer \stop
+
+ \setupMMLappearance[cn] [\c!alternative=\v!a]
+ \setupMMLappearance[polar] [\c!alternative=\v!a] % a|b|c
+ \setupMMLappearance[float] [\c!symbol=\v!no] % \v!yes|dot
+ \setupMMLappearance[enotation][\c!symbol=\v!no] % \v!yes|dot
+ \setupMMLappearance[base] [\c!symbol=\v!numbers] % digits|characters|text|no
+
+ \startxmlsetups mml:cs \xmlcommand{#1}{/}{mml:cs:\xmlattdef{#1}{type}{default}} \stopxmlsetups
+ \startxmlsetups mml:ci \xmlcommand{#1}{/}{mml:ci:\xmlattdef{#1}{type}{default}} \stopxmlsetups
+ \startxmlsetups mml:cn \xmlcommand{#1}{/}{mml:cn:\xmlattdef{#1}{type}{default}} \stopxmlsetups
+
+ % helpers cn
+
+ \startxmlsetups mml:cn:default
+ \mfunction{\xmlflush{#1}}
+ \stopxmlsetups
+
+ % helpers ci
+
+ \startxmlsetups mml:ci:default
+ \xmlflush{#1}
+ \stopxmlsetups
+
+ \startxmlsetups mml:ci:set
+ {\bbd\xmlflush{#1}}
+ \stopxmlsetups
+
+ \startxmlsetups mml:ci:vector
+ \widevec{\xmlflush{#1}}
+ \stopxmlsetups
+
+ \startxmlsetups mml:ci:matrix
+ {\bi\xmlflush{#1}}
+ \stopxmlsetups
+
+ \startxmlsetups mml:ci:function
+ \xmlflush{#1}\negthinspace
+ \stopxmlsetups
+
+ \startxmlsetups mml:ci:fn
+ \xmlsetup{#1}{mml:ci:function}
+ \stopxmlsetups
+
+ \startxmlsetups mml:ci:complex-cartesian
+ \xmlsetup{#1}{mml:cn:complex}
+ \stopxmlsetups
+
+ \startxmlsetups mml:ci:complex
+ \xmlsetup{#1}{mml:cn:complex}
+ \stopxmlsetups
+
+ \startxmlsetups mml:ci:complex-polar
+ \xmlsetup{#1}{mml:cn:polar}
+ \stopxmlsetups
+
+ \startxmlsetups mml:ci:polar
+ \xmlsetup{#1}{mml:cn:polar}
+ \stopxmlsetups
+
+ % \doif\@@MMLcnalternative\v!b{\redefinemathcharacter [.][ord][mi]["3B]\relax}%
+ %
+ % todo: number function from mmp
+
+ % helpers ci
+
+ \startxmlsetups mml:cn:default
+ \xmlflush{#1}
+ \stopxmlsetups
+
+ \startxmlsetups mml:cn:integer
+ \edef\mmlintegerbase{\xmlattdef{#1}{base}{}}
+ \ifx\mmlintegerbase\empty
+ \xmlflush{#1}
+ \else
+ \doifelse \@@MMLbasesymbol \v!no {
+ \MMLcCNbasedata{\xmlflush{#1}}
+ } {
+ \MMLcCNbasedata{\xmlflush{#1}}_{
+ \hbox {$
+ \rm
+ \scriptscriptstyle
+ \processaction
+ [\@@MMLbasesymbol]
+ [\v!characters=>\MMLcCNbasestring BODH,
+ \v!text=>\MMLcCNbasestring{BIN}{OCT}{DEC}{HEX},
+ \s!unknown=>\mmlintegerbase]
+ $}
+ }
+ }
+ \fi
+ \stopxmlsetups
+
+ \def\MMLcCNbasedata#1%
+ {\ifnum\mmlintegerbase>10 \relax{\rm#1}\else#1\fi}
+
+ \def\MMLcCNbasestring#1#2#3#4%
+ {\ifnum\mmlintegerbase= 2 #1\else
+ \ifnum\mmlintegerbase= 8 #2\else
+ \ifnum\mmlintegerbase=10 #3\else
+ \ifnum\mmlintegerbase=16 #4\else
+ \mmlintegerbase \fi\fi\fi\fi}
+
+ \startxmlsetups mml:cn:polar
+ \xmlsetup{#1}{mml:cn:polar:\@@MMLpolaralternative}
+ \stopxmlsetups
+
+ \startxmlsetups mml:cn:polar:a
+ \mathopnolimits{Polar}% ? ? ?
+ \left(\xmlsnippet{#1}{1}\MMLccomma\xmlsnippet{#1}{1}\right)
+ \stopxmlsetups
+
+ \startxmlsetups mml:cn:polar:b
+ % {\rm e}^{\xmlsnippet{#1}{1}\mskip2mu\getXMLentity{imaginaryi}}
+ {\rm e}^{\xmlsnippet{#1}{1}+\xmlsnippet{#1}{3}{\rm i}}
+ \stopxmlsetups
+
+ \startxmlsetups mml:cn:polar:c
+ % \exp\left(\xmlsnippet{#1}{1}\mskip2mu\getXMLentity{imaginaryi}\right)}
+ \exp\left(\xmlsnippet{#1}{1}+\xmlsnippet{#1}{3}\mskip2mu\getXMLentity{imaginaryi}\right)
+ \stopxmlsetups
+
+ \startxmlsetups mml:cn:complex-polar
+ \xmlsetup{#1}{mml:cn:polar}
+ \stopxmlsetups
+
+ \startxmlsetups mml:cn:complex
+ \xmlsnippet{#1}{1} + \xmlsnippet{#1}{3}{\rm i}
+ \stopxmlsetups
+
+ \startxmlsetups mml:cn:complex-cartesian
+ \xmlsetup{#1}{mml:cn:complex}
+ \stopxmlsetups
+
+ \startxmlsetups mml:cn:float
+ \doifelse \@@MMLfloatsymbol \v!no {
+ % make sure that e shows up ok
+ \mfunction{\xmlflush{#1}}
+ } {
+ % we should ignore \entities !
+ \edef\mmlfloatstring{\xmlflush{#1}}
+ \splitstring\mmlfloatstring\at e\to\first\and\last
+ \ifx\first\empty
+ \mmlfloatstring
+ \else\ifx\last\empty
+ \mmlfloatstring
+ \else
+ \first
+ \doifelse \@@MMLfloatsymbol {dot} \cdot \times
+ 10^{\last}
+ \fi \fi
+ }
+ \stopxmlsetups
+
+ \startxmlsetups mml:cn:real
+ \xmlsetup{#1}{mml:cn:float}
+ \stopxmlsetups
+
+ \startxmlsetups mml:cn:e-notation
+ \doifelse \@@MMLenotationsymbol \v!no {
+ \xmlsnippet{#1}{1}
+ \unskip\mfunction{e}\ignorespaces
+ \xmlsnippet{#1}{3}
+ } {
+ \xmlsnippet{#1}{1}
+ \doifelse \@@MMLenotationsymbol {dot} \cdot
+ \times10^{\xmlsnippet{#1}{3}}
+ }
+ \stopxmlsetups
+
+ \startxmlsetups mml:cn:logical
+ \mfunction{\xmlflush{#1}}
+ \stopxmlsetups
+
+ \startxmlsetups mml:cn:rational
+ \xmldoifelse {#1} {/mml:sep} {
+ \frac
+ {\xmlsnippet{#1}{1}}
+ {\xmlsnippet{#1}{3}}
+ } {
+ \xmlflush{#1}
+ }
+ \stopxmlsetups
+
+% interval
+
+ \setupMMLappearance[interval][\c!alternative=\v!a,\c!separator={,}]
+
+ \startxmlsetups mml:interval
+ \xmlsetup{#1}{mml:interval:\xmlattdef{#1}{closure}{closed}}
+ \stopxmlsetups
+
+ \startxmlsetups mml:interval:closed
+ \left[\mmlsecond{#1}\MMLseparator\@@MMLintervalseparator\mmlthird{#1}\right]
+ \stopxmlsetups
+
+ \startxmlsetups mml:interval:open-closed
+ \doifelse \@@MMLintervalalternative \v!b {
+ \left<\mmlsecond{#1}\MMLseparator\@@MMLintervalseparator\mmlthird{#1}\right]
+ } {
+ \left(\mmlsecond{#1}\MMLseparator\@@MMLintervalseparator\mmlthird{#1}\right]
+ }
+ \stopxmlsetups
+
+ \startxmlsetups mml:interval:closed-open
+ \doifelse \@@MMLintervalalternative \v!b {
+ \left[\mmlsecond{#1}\MMLseparator\@@MMLintervalseparator\mmlthird{#1}\right>
+ } {
+ \left[\mmlsecond{#1}\MMLseparator\@@MMLintervalseparator\mmlthird{#1}\right)
+ }
+ \stopxmlsetups
+
+ \startxmlsetups mml:interval:open
+ \doifelse \@@MMLintervalalternative \v!b {
+ \left<\mmlsecond{#1}\MMLseparator\@@MMLintervalseparator\mmlthird{#1}\right>
+ } {
+ \left(\mmlsecond{#1}\MMLseparator\@@MMLintervalseparator\mmlthird{#1}\right)
+ }
+ \stopxmlsetups
+
+% inverse
+
+% \startxmlsetups mml:inverse
+% \xmldoifelse {#1} {/(\MMLcpurefunctionlist)} {
+% \mmlsecond{#1}^{-1}
+% \xmlall{#1}{/[position()>2]}
+% } {
+% {\left[\mmlthird{#1}\right]}^{-1}
+% }
+% \stopxmlsetups
+
+ \setfalse\xmlinversefunction
+
+ \startxmlsetups mml:apply:inverse
+ \settrue\xmlinversefunction
+ \ctxlua{print(table.serialize(lxml.id("#1")))}
+ \xmlsetup{#1}{\xmlfilter{#1}{/mml:apply/*/name(1)}}
+ \stopxmlsetups
+
+ \startxmlsetups xml:mmc:process
+ \xmlsetsetup{\xmldocument}{mml:apply/mml:apply/mml:inverse/../../..}{mml:apply:inverse}
+ \stopxmlsetups
+
+ \xmlregistersetup{xml:mmc:process}
+
+% condition
+
+ % maybe a fast \xmlnonfirst
+
+ \startxmlsetups mmc:condition
+ % \xmldoif {#1} {/mml:bvar} {
+ % \xmlfirst{#1}{/mml:bvar}\mid
+ % }
+ \xmlall{#1}{/!(mml:condition\string|mml:bvar)}
+ \stopxmlsetups
+
+% declare
+
+ \setupMMLappearance[declare][\c!state=\v!start]
+
+ \startxmlsetups mml:declare
+ \doif \@@MMLdeclarestate \v!start {
+ \mathopnolimits{declare}
+ \xmlindex{#1}{/*}{1}
+ \ifnum \xmlcount{#1}{/} > \plusone
+ \thickspace
+ \mathopnolimits{as}
+ \thickspace
+ \fi
+ \mmlsecond{#1}
+ }
+ \stopxmlsetups
+
+% lambda
+
+ \setupMMLappearance[lambda][\c!alternative=b]
+
+ \startxmlsetups mmc:lambda
+ \begingroup
+ \doifelse \@@MMLlambdaalternative \v!a {
+ \lambda\left(\xmlconcat{#1}{/!mml:lambda}{\MMLseparator,}\left)
+ } {
+ \ifnum \xmlcount {#1} {/mml:bvar} > \plusone
+ \left(\xmlconcat{#1}{/mml:bvar}{\MMLseparator,}\right)
+ \else
+ \xmlfirstnamed{#1}{bvar}
+ \fi
+ \mapsto
+ \MMLcreset
+ \xmlall{#1}{/!(mml:bvar|mml:lambda)}
+ }
+ \endgroup
+ \stopxmlsetups
+
+% compose
+
+\defineXMLcommand [compose] {\directsetup{mmc:compose}}
+
+\startsetups mmc:compose
+ \begingroup
+ \MMLcreset
+ \let\MMLcCIfunction\firstofoneargument % brrr
+ \doifelseMMCfunction {
+ \left(\flushXMLstackwith\plustwo\circ\right)
+ } {
+ \flushXMLstackwith\plustwo\circ
+ }
+ \endgroup
+\stopsetups
+
+ \startxmlsetups mml:image
+ \mathopnolimits{image} \left( \xmlfilter{#1}{/!mml:image/name()} \right)
+ \stopxmlsetups
+
+ \setupMMLappearance[piece][\c!separator=]
+
+ \startxmlsetups mml:piecewise
+ \processaction
+ [\@@MMLpieceseparator]
+ [ \v!yes=>\def\theMMLpieceseparator{,\@col@amp@},
+ \v!no=>\let\theMMLpieceseparator\@col@amp@,
+ \s!default=>\let\theMMLpieceseparator\@col@amp@,
+ \s!unknown=>\def\theMMLpieceseparator{\,\,\hbox{\@@MMLpieceseparator}\,\,}]
+ \cases \xmlflush{#1}
+ \stopxmlsetups
+
+ \startxmlsetups mml:piece
+ \mmlfirst{#1}\theMMLpieceseparator\mathematics{\mmlsecond{#1}}\crcr
+ \stopxmlsetups
+
+ \startxmlsetups mml:otherwise
+ \xmlflush{#1}\MMLcPIECEseparator\@col@amp@\mathematics{otherwise}\crcr
+ \stopxmlsetups
+
+ % end of piece
+
+ \startxmlsetups mml:quotient
+ \lfloor\mmlsecond{#1}/\mmlthird{#1}\rfloor
+ \stopxmlsetups
+
+ \startxmlsetups mml:factorial
+ \xmlall{#1}{/!factorial}!
+ \stopxmlsetups
+
+ \setupMMLappearance [divide] [\c!level=\!!maxcard,\c!alternative=\v!a]
+
+ \newcount\mmldividelevel
+
+ \startxmlsetups mml:divide
+ \advance\mmldividelevel\plusone
+ \doifelse \@@MMLdividealternative \v!b {
+ \mmlsecond{#1}/\mmlthird{#1}
+ } {
+ \ifnum \mmldividelevel > \@@MMLdividelevel \relax % threshold
+ \mmlsecond{#1}/\mmlthird{#1}
+ \else
+ \MMLcreset
+ \frac{\MMLcreset\mmlsecond{#1}}{\MMLcreset\mmlthird{#1}}
+ \fi
+ }
+ \advance\mmldividelevel\minusone
+ \stopxmlsetups
+
+% min max
+
+ \startxmlsetups mml:min
+ \xmldoifelse {#1} {/mml:bvar} {
+ {}_{\xmlfirst{#1}{/mml:bvar}}
+ } {
+ }
+ \left\{\xmlconcat{#1}{/!(mml:bvar\string|mml:min)}{\wedge}{\MMLseparator,}\right\}
+ \stopxmlsetups
+
+ \startxmlsetups mml:max
+ \xmldoifelse {#1} {/mml:bvar} {
+ {}_{\xmlfirst{#1}{/mml:bvar}}
+ } {
+ }
+ \left\{\xmlconcat{#1}{/!(mml:bvar\string|mml:max)}{\wedge}{\MMLseparator,}\right\}
+ \stopxmlsetups
+
+% minus plus
+
+ \setupMMLappearance [plus] [\c!alternative=\v!a] % b = no sign -> 3 1/4
+ \setupMMLappearance [sign] [\c!reduction=\v!yes]
+
+% alternative b -> geen sign
+
+% % branch needed, else (a-b) + (c-d) goes wrong
+% % reset check in case of (-x) + 37
+% % reset check in case of (-x) + 37
+
+ \newcount\mmlpluscounter
+
+ \startsetups mml:plus
+ \doifelse \@@MMLsignreduction \v!yes {
+ \MMLdoL
+ \xmlsetup{#1}{mml:plus:reset}
+ \xmlcommand{#1}{/!mml:plus}{mml:plus:body}
+ \MMLdoR
+ } {
+ \ifnum\xmlcount{#1}{/!mml:plus}=\plusone
+ +\xmlfirst{#1}{/!mml:plus}
+ \else
+ \MMLdoL
+ \xmlconcat{#1}{/!mml:plus}{+}
+ \MMLdoR
+ \fi
+ }
+ \stopsetups
+
+ \startxmlsetups mml:plus:reset
+ \mmlpluscounter\zerocount
+ \stopxmlsetups
+
+ \startxmlsetups mml:plus:body
+ \advance\mmlpluscounter\plusone
+ \ifnum\mmlpluscounter>\plusone
+ \xmldoifelse{#1}{/mml:minus} {
+ \ifnum\xmlcount{#1}{/!mml:minus}>\plusone
+ +
+ \fi
+ } {
+ \doifelse {\xmlatt{#1}{type}} {rational} {
+ % fraction
+ } {
+ +
+ }
+ }
+ \fi
+ \xmldirect{#1}
+ \stopxmlsetups
+
+ \newcount\mmlminuscounter
+
+ \startsetups mml:minus
+ \doifelse \@@MMLsignreduction \v!yes {
+ } {
+ }
+ \ifnum\xmlcount{#1}{/!mml:minus}=\plusone
+ -\xmlfirst{#1}{/!mml:minus}
+ \else
+ \MMLdoL
+ \xmlsetup{#1}{mml:minus:reset}
+ \xmlcommand{#1}{/!mml:minus}{mml:minus:body}
+ \MMLdoR
+ \fi
+ \stopsetups
+
+ \startxmlsetups mml:minus:reset
+ \mmlminuscounter\zerocount
+ \stopxmlsetups
+
+ \startxmlsetups mml:minus:body
+ % we can slso use concat here
+ \advance\mmlminuscounter\plusone
+ \ifnum\mmlminuscounter>\plusone
+ -
+ \fi
+ \xmldirect{#1}
+ \stopxmlsetups
+
+% power
+
+ \setupMMLappearance[power][\c!reduction=\v!yes]
+
+ \let\MMLpowerelement\empty
+
+ \startxmlsetups mml:power
+ \xmldoifelse {#1} {/mml:apply} {
+ \doifelse \@@MMLpowerreduction \v!yes {
+ \xmldoifelse {#1} {/(\MMLcfunctionlist)} {
+ \gdef\MMLpowerelement{\mmlthird{#1}}% postpone, no xdef
+ \MMLcreset\mmlsecond{#1}
+ } {
+ \left(\MMLcreset\mmlsecond{#1}\right)^{\MMLcreset\mmlthird{#1}}
+ }
+ } {
+ \left(\MMLcreset\mmlsecond{#1}\right)^{\MMLcreset\mmlthird{#1}}
+ }
+ } {
+ \mmlsecond{#1}^{\MMLcreset\mmlthird{#1}}
+ }
+ \stopxmlsetups
+
+% rem
+
+ \startxmlsetups mml:rem
+ \xmlconcat{#1}{/!mml:rem}{\mathopnolimits{mod}}
+ \stopxmlsetups
+
+ \setupMMLappearance [times] [\c!symbol=\v!no,\c!auto=\v!yes] % new, auto catches cn cn cn
+
+ \startxmlsetups mml:times
+ \setMMLcreset{\MMLcfunctionlist\string|\MMLcconstructlist}%
+ \doifelse\@@MMLtimesauto\v!no {
+ \let\@@MMLtimes@@symbol\@@MMLtimessymbol
+ } {
+ \xmldoifelse {#1} {/mml:cn[name(1) == 'mml:cn']} {% name(1) is next one
+ \doifinsetelse\@@MMLtimessymbol{\v!yes,\v!no} {
+ \let\@@MMLtimes@@symbol\v!yes
+ } {
+ \let\@@MMLtimes@@symbol\@@MMLtimessymbol
+ }
+ } {
+ \let\@@MMLtimes@@symbol\@@MMLtimessymbol
+ }
+ }
+ \doifelse\@@MMLtimes@@symbol\v!yes {
+ \xmlconcat{#1}{/!mml:times}{\times}
+ } {
+ \doifelse\@@MMLtimes@@symbol{dot} {
+ \xmlconcat{#1}{/!mml:times}{\cdot}
+ } {
+ \doifelse\@@MMLtimes@@symbol{times} {
+ \xmlconcat{#1}{/!mml:times}{\times}
+ } {
+ \xmlall{#1}{/!mml:times}
+ }
+ }
+ }
+ \stopxmlsetups
+
+ \setupMMLappearance[root][\c!symbol=\v!yes]
+
+ \startxmlsetups mml:root
+ \xmldoifelse {#1} {/mml:degree} {
+ \root
+ \doifnot\@@MMLrootsymbol\v!no{\MMLcreset\xmltext{#1}{/mml:degree}}
+ \of
+ } {
+ \sqrt
+ }
+ {\MMLcreset\xmlall{#1}{/!(mml:degree\string|mml:root)}}
+ \stopxmlsetups
+
+% gcd
+
+ \startxmlsetups mml:gcd
+ \begingroup
+ \gcd\left(\MMLcreset\xmlconcat{#1}{/!mml:gcd}{\MMLseparator,}\right)
+ \endgroup
+ \stopxmlsetups
+
+% and or xor implies, not
+
+ \startxmlsetups mml:and \xmlconcat{#1}{/!mml:and} {2}{}{\wedge} \stopxmlsetups
+ \startxmlsetups mml:or \xmlconcat{#1}{/!mml:or} {2}{}{\vee} \stopxmlsetups
+ \startxmlsetups mml:xor \xmlconcat{#1}{/!mml:xor} {2}{}{\mathopnolimits{xor}} \stopxmlsetups
+ \startxmlsetups mml:implies \xmlconcat{#1}{/!mml:implies}{2}{}{\Rightarrow} \stopxmlsetups
+ \startxmlsetups mml:not \neg \xmlall {#1}{/!mml:not} \stopxmlsetups
+
+% forall exists
+
+ %D We need to shift left below rotated A.
+
+ \startxmlsetups mml:forall
+ \forall \negthinspace \xmlsetup{#1}{mml:forallexists}
+ \stopxmlsetups
+
+ \startxmlsetups mml:exists
+ \exists \xmlsetup{#1}{mml:forallexists}
+ \stopxmlsetups
+
+ \def\mmlforallexistslist{mml:bvar\string|mml:forall\string|mml:exists\string|mml:condition}
+
+ \startxmlsetups mml:forallexists
+ _{\xmlconcat{#1}{/mml:bvar}{\MMLseparator,}}
+ \xmldoifelse {#1} {/mml:condition} {
+ \thickspace
+ \begingroup
+ \xmlfirst{#1}{/mml:condition}
+ \endgroup
+ \ifcase\xmlcount{#1}{/!(\mmlforallexistslist)}\relax
+ % nothing
+ \or
+ % == snelle volgende
+ \left\vert
+ \MMLcreset \medspace \xmlconcat{#1}{/!(\mmlforallexistslist)}{}
+ \right.
+ \else
+ % special case
+ \left\vert
+ \matrix {
+ \xmlconcat{#1}{/!(\mmlforallexistslist)}{\hfill\crcr}
+ }
+ \right.
+ \fi
+ } {
+ :\xmlfirst{#1}{/!(\mmlforallexistslist)}
+ }
+ \stopxmlsetups
+
+ \startxmlsetups mml:abs
+ \left\vert \MMLcreset\xmlall{#1}{/!mml:abs} \right\vert
+ \stopxmlsetups
+
+ \startxmlsetups mml:conjugate % watch extra {}
+ {\overline{\MMLcreset\xmlall{#1}{/!mml:conjugate}}}
+ \stopxmlsetups
+
+ \startxmlsetups mml:arg
+ \mathopnolimits{arg} \left( \MMLcreset\xmlall{#1}{/!mml:arg} \right)
+ \stopxmlsetups
+
+ \startxmlsetups mml:real
+ \Re \left( \MMLcreset \xmlall{#1}{/!mml:real} \right)
+ \stopxmlsetups
+
+ \startxmlsetups mml:imaginary
+ \Im \ left( \MMLcreset \xmlall{#1}{/!mml:imaginary} \right)
+ \stopxmlsetups
+
+ \startxmlsetups mml:lcm
+ \mathopnolimits{lcm} \left( \xmlconcat{#1}{/!mml:lcm}{\MMLseparator,} \right)
+ \stopxmlsetups
+
+ \startxmlsetups mml:floor
+ \lfloor \xmlall{#1}{/!mml:floor} \rfloor
+ \stopxmlsetups
+
+ \startxmlsetups mml:ceiling
+ \lceiling \xmlall{#1}{/!mml:ceiling} \rceiling
+ \stopxmlsetups
+
+% relations
+
+ % apply attr or eq
+
+ \mapXMLvalue {mml:relation} {mml:eq} {=}
+ \mapXMLvalue {mml:relation} {mml:neq} {\neq}
+ \mapXMLvalue {mml:relation} {mml:gt} {>}
+ \mapXMLvalue {mml:relation} {mml:lt} {<}
+ \mapXMLvalue {mml:relation} {mml:geq} {\geq}
+ \mapXMLvalue {mml:relation} {mml:leq} {\leq}
+ \mapXMLvalue {mml:relation} {mml:equivalent} {\equiv}
+ \mapXMLvalue {mml:relation} {mml:approx} {\approx}
+ \mapXMLvalue {mml:relation} {mml:factorof} {\mid}
+
+ \startxmlsetups mml:eq \xmlsetup{#1}{mml:relation:\xmlattdef{#1}{align}{default}} \stopxmlsetups
+ \startxmlsetups mml:neq \xmlsetup{#1}{mml:relation:\xmlattdef{#1}{align}{default}} \stopxmlsetups
+ \startxmlsetups mml:gt \xmlsetup{#1}{mml:relation:\xmlattdef{#1}{align}{default}} \stopxmlsetups
+ \startxmlsetups mml:lt \xmlsetup{#1}{mml:relation:\xmlattdef{#1}{align}{default}} \stopxmlsetups
+ \startxmlsetups mml:geq \xmlsetup{#1}{mml:relation:\xmlattdef{#1}{align}{default}} \stopxmlsetups
+ \startxmlsetups mml:leq \xmlsetup{#1}{mml:relation:\xmlattdef{#1}{align}{default}} \stopxmlsetups
+ \startxmlsetups mml:equivalent \xmlsetup{#1}{mml:relation:\xmlattdef{#1}{align}{default}} \stopxmlsetups
+ \startxmlsetups mml:approx \xmlsetup{#1}{mml:relation:\xmlattdef{#1}{align}{default}} \stopxmlsetups
+ \startxmlsetups mml:factorof \xmlsetup{#1}{mml:relation:\xmlattdef{#1}{align}{default}} \stopxmlsetups
+
+ % toch indirect
+
+ \setupMMLappearance[relation][\c!align=\v!no]
+
+ \startxmlsetups mml:relation:last % x & = \cr x & = \cr x & = x \cr
+ \edef\mmlapplyaction{\xmlfilter{#1}{/*/name()}}
+ \MMLcreset \eqalign {
+ \xmlconcatrange{#1}{/*}{2}{-1}{&\XMLval{mml:relation}{\mmlapplyaction}{?}\crcr}
+ &\XMLval{mml:relation}{\mmlapplyaction}{?}\mmllast{#1}\crcr
+ }
+ \stopxmlsetups
+ \startxmlsetups mml:relation:first % x & = x \cr & = x \cr & = x \cr
+ \edef\mmlapplyaction{\xmlfilter{#1}{/*/name()}}
+ \MMLcreset \eqalign {
+ \mmlsecond{#1}&\XMLval{mml:relation}{\mmlapplyaction}{?}\crcr
+ \xmlconcatrange{#1}{/*}{3}{}{&\XMLval{mml:relation}{\mmlapplyaction}{?}\crcr}
+ }
+ \stopxmlsetups
+ \startxmlsetups mml:relation:left
+ \edef\mmlapplyaction{\xmlfilter{#1}{/*/name()}}
+ \MMLcreset \eqalign {
+ \xmlconcatrange{#1}{/*}{2}{}{&\XMLval{mml:relation}{\mmlapplyaction}{?}\crcr}
+ }
+ \stopxmlsetups
+ \startxmlsetups mml:relation:right
+ \edef\mmlapplyaction{\xmlfilter{#1}{/*/name()}}
+ \MMLcreset \eqalign {
+ \xmlconcatrange{#1}{/*}{2}{}{\crcr\XMLval{mml:relation}{\mmlapplyaction}{?}{}&}
+ }
+ \stopxmlsetups
+ \startxmlsetups mml:relation:default
+ \edef\mmlapplyaction{\xmlfilter{#1}{/*/name()}}
+ \MMLcreset \xmlconcatrange{#1}{/*}{2}{}{\XMLval{mml:relation}{\mmlapplyaction}{?}}
+ \stopxmlsetups
+ \startxmlsetups mml:relation:yes
+ \xmlsetups{#1}{mml:relation:left}
+ \stopxmlsetups
+
+% mine
+
+\defineXMLcommand [becomes] {\MMLcrelation{:=}}
+
+\addtocommalist{becomes/}\MMLcmainresetlist
+
+% calculus and vector calculus
+
+ \startxmlsetups mml:domainofapplication
+ \xmlall{#1}{/!mml:domainofapplication}
+ \stopxmlsetups
+
+ \setupMMLappearance[int][\c!location=\v!top]
+
+ \def\doMMLlimits#1{\doifelsevalue{@@MML#1\c!location}\v!top\limits\nolimits}
+
+ \startxmlsetups mml:int
+ \MMLcreset
+ \xmldoifelse {#1} {/mml:domainofapplication} {
+ \int \doMMLlimits{int}_{\xmlfirst{#1}{/mml:domainofapplication}}\relax
+ } {
+ \xmldoifelse {#1} {/mml:condition} {
+ \int \doMMLlimits{int}_{\xmlfirst{#1}{/mml:condition}}\relax
+ } {
+ \xmldoifelse {#1} {/mml:lowlimit} {
+ \int \doMMLlimits{int}_{\xmlfirst{#1}{/mml:lowlimit}}^{\xmlfirst{#1}{/mml:uplimit}}
+ } {
+ % funny, why do we have lowlimit/uplimit then
+ \xmldoifelse {#1} {/mml:apply/mml:interval} {
+ \int \doMMLlimits{int}_{\xmlindex{#1}{/mml:apply}{2}}^{\xmlindex{#1}{/mml:apply}{3}}
+ } {
+ \int
+ }
+ }
+ }
+ }
+ \MMLcreset
+ \xmldoifelse {#1} {/mml:apply} {
+ \doifelseMMCfunction {#1} { % todo test
+ \xmlfirst{#1}{/mml:apply}
+ } {
+ % if there are too many () now, we need to be more clever
+ \left( \xmlfirst{#1}{/mml:apply} \right)
+ }
+ } {
+ \xmlfirst{#1}{/mml:ci}
+ }
+ \xmldoifelse {#1} {/mml:bvar} {
+ \thinspace \mfunction{d} \xmlfirst{#1}{/mml:bvar}
+ } {
+ % nothing
+ }
+ \stopxmlsetups
+
+\setupMMLappearance[diff][\c!location=\v!top,\c!alternative=\v!a]
+
+\defineXMLcommand [diff] {\directsetup{mmc:diff}}
+\defineXMLcommand [partialdiff] {\directsetup{mmc:partialdiff}}
+
+% \setupMMLappearance[diff][alternative=b]
+%
+% \startXMLdata
+% <math><apply><apply><diff/><bvar><ci>x</ci></bvar><ci>f</ci></apply><ci>a</ci></apply></math>
+% <math><apply><apply><diff/><bvar><ci>x</ci></bvar><degree>2</degree><ci>f</ci></apply><ci>a</ci></apply></math>
+% \stopXMLdata
+
+% d^y/dx^2
+%
+% \startXMLdata
+% <math><apply><diff/>
+% <bvar><ci>x</ci><cn type="integer">2</cn></bvar>
+% <lambda><bvar><ci>x</ci></bvar><ci>y</ci></lambda>
+% </apply></math>
+% \stopXMLdata
+
+\startsetups mmc:diff
+ \MMLcreset
+ \doifelse\@@MMLdiffalternative\v!a {
+ \XMLdoifonstackelse{lambda} {
+ % a special case (mathadore/openmath)
+ \begingroup
+ \defineXMLsave[ci]
+ \defineXMLsave[cn]
+ \defineXMLprocess[lambda]
+ \defineXMLprocess[bvar]
+ \frac {
+ d^{\XMLfirstnamed{bvar}\XMLflush{cn}}{\XMLfirstnamed{lambda}\XMLflush{ci}}
+ } {
+ d{\XMLfirstnamed{bvar}\XMLflush{ci}}^{\XMLfirstnamed{bvar}\XMLflush{cn}}
+ }
+ \endgroup
+ } {
+ \XMLdoifonstackelse{bvar} {
+ \frac {
+ \XMLdoifonstackelse{degree} {
+ \collectXMLnamedstack{degree}\empty
+ } {
+ \collectXMLnamedstacknamed{bvar}{degree}+
+ }
+ \mfunction{\getXMLentity{mathematicald}}
+ ^{\the\XMLRtoks}
+ \doif\@@MMLdifflocation\v!top {
+ \XMLdoifonstackelse{ci} {
+ \XMLfirstnamed{ci}
+ } {
+ \MMLcreset\XMLfirstnamed{apply}
+ }
+ }
+ } {
+ \mfunction{\getXMLentity{mathematicald}}
+ \begingroup
+ \defineXMLsave[degree]
+ \XMLfirstnamed{bvar}
+ \doifXMLdata{degree} {
+ ^{\XMLflush{degree}}
+ }
+ \endgroup
+ }
+ \doifnot\@@MMLdifflocation\v!top {
+ \left(\MMLcreset\XMLfirstnamed{apply,ci}\right)
+ }
+ } {
+ \flushXMLstackfrom\plustwo^\prime
+ }
+ }
+ } {
+ \MMLcreset
+ \XMLfirstnamed{apply,ci}
+ % there can be problems with nested diff's: ^^{} error
+ % so we add an empty group here
+ {}^
+ {
+ \XMLdoifonstackelse{degree} {
+ \defXMLfirstnamedtext\ascii{degree}
+ \dorecurse\ascii\prime
+ } {
+ \prime
+ }
+ }
+ }
+\stopsetups
+
+\startsetups mmc:partialdiff
+ \XMLdoifonstackelse{list} {
+ \getXMLentity{capitaldifferentiald}_{
+ \begingroup
+ \setfalse\mmllistdelimiters
+ \XMLallnamed{list}
+ \endgroup
+ }
+ \XMLfirstnamed{apply,reln,ci,cn}
+ } {
+ \XMLdoifonstackelse{bvar} {
+ \frac {
+ \XMLdoifonstackelse{degree} {
+ \collectXMLnamedstack{degree}\empty
+ } {
+ \collectXMLnamedstacknamed{bvar}{degree}+
+ }
+ \getXMLentity{differentiald}^{\the\XMLRtoks}
+ \MMLcreset
+ \XMLfirstnamed{apply,reln,ci,cn}
+ } {
+ \defineXMLnested[bvar]
+ {\directsetup{mmc:bvar:diff:start}}
+ {\directsetup{mmc:bvar:diff:stop}}
+ \XMLfirstnamed{bvar}
+ }
+ } {
+ \XMLfirstnamed{apply,reln,ci,cn}
+ }
+ }
+\stopsetups
+
+\startsetups mmc:bvar:diff:start
+ \begingroup
+\stopsetups
+
+\startsetups mmc:bvar:diff:stop
+ \getXMLentity{differentiald}\XMLfirstnamed{apply,reln,ci,cn}
+ \XMLdoifonstackelse{degree} {
+ ^{\XMLfirstnamed{degree}}
+ } {
+ % nothing
+ }
+ \endgroup
+\stopsetups
+
+ % option: to be discussed with taco/aditya: all math functions \mathentity
+ %
+ % \defineXMLentity [div] {\mathematics{\triangledown\times}}
+ % \defineXMLentity [curl] {\mathematics{\triangledown .}}
+ % \defineXMLentity [grad] {\mathematics{\triangledown }}
+
+ \startxmlsetups mml:divergence \mathopnolimits{div} \xmlall{#1}{/!mml:divergence} \stopxmlsetups
+ \startxmlsetups mml:grad \mathopnolimits{grad} \xmlall{#1}{/!mml:grad} \stopxmlsetups
+ \startxmlsetups mml:curl \mathopnolimits{curl} \xmlall{#1}{/!mml:curl} \stopxmlsetups
+ \startxmlsetups mml:laplacian \mathopnolimits{\nabla^2} \xmlall{#1}{/!mml:laplacian} \stopxmlsetups
+ \startxmlsetups mml:ident \mathopnolimits{identity} \xmlall{#1}{/!mml:ident} \stopxmlsetups
+
+ \setupMMLappearance[domain] [symbol=]
+ \setupMMLappearance[codomain][symbol=]
+
+ \startxmlsetups mml:domain:action
+ \doifelsenothing \@@MMLdomainsymbol {
+ \mathopnolimits{domain}\MMLcreset\xmlall{#1}{/!mml:domain}
+ } {
+ \@@MMLdomainsymbol_{\xmlall{#1}{/!mml:domain}}
+ }
+ \stopxmlsetups
+
+ \startxmlsetups mmc:codomain:action
+ \doifelsenothing \@@MMLcodomainsymbol {
+ \mathopnolimits{codomain}\MMLcreset\xmlall{#1}{/!mml:codomain}
+ } {
+ \@@MMLcodomainsymbol_{\xmlall{#1}{/!mml:codomain}}
+ }
+ \stopxmlsetups
+
+% theory of sets
+
+ \startxmlsetups mml:set
+ \left\{
+ \xmldoif {#1} {/mml:condition} {
+ \xmlfirst{#1}{/mml:bvar}\,\middle\vert\,\xmlfirst{#1}{/mml:condition}
+ } {
+ \xmlconcat{#1}{/!mml:set}{\MMLseparator,}
+ }
+ \right\}
+ \stopxmlsetups
+
+ \settrue\mmllistdelimiters
+
+ \startxmlsetups mml:list
+ \begingroup
+ \ifconditional\mmllistdelimiters\left [\fi
+ \begingroup
+ \settrue\mmllistdelimiters
+ \xmlconcat{#1}{/!mml:list}{\MMLseparator,}
+ \endgroup
+ \ifconditional\mmllistdelimiters\right]\fi
+ \endgroup
+ \stopxmlsetups
+
+ \startxmlsetups mml:union \mmlsecond{#1} \cup \mmlthird{#1} \stopxmlsetups
+ \startxmlsetups mml:intersect \mmlsecond{#1} \cap \mmlthird{#1} \stopxmlsetups
+ \startxmlsetups mml:in \mmlsecond{#1} \in \mmlthird{#1} \stopxmlsetups
+ \startxmlsetups mml:notin \mmlsecond{#1} {\not\in} \mmlthird{#1} \stopxmlsetups
+ \startxmlsetups mml:subset \mmlsecond{#1} \subset \mmlthird{#1} \stopxmlsetups
+ \startxmlsetups mml:prsubset \mmlsecond{#1} \subseteq \mmlthird{#1} \stopxmlsetups
+ \startxmlsetups mml:notsubset \mmlsecond{#1} {\not\subset} \mmlthird{#1} \stopxmlsetups
+ \startxmlsetups mml:notprsubset \mmlsecond{#1} {\not\subseteq} \mmlthird{#1} \stopxmlsetups
+ \startxmlsetups mml:setdiff \mmlsecond{#1} \setminus \mmlthird{#1} \stopxmlsetups
+
+ \startxmlsetups mml:card
+ \left\vert \xmlall{#1}{/!mml:card} \right\vert
+ \stopxmlsetups
+
+ \startxmlsetups mml:cartesianproduct
+ \xmlconcat{#1}{/!mml:cartesianproduct}{\times}
+ \stopxmlsetups
+
+% sequences and series
+
+\defineXMLcommand [sum] {\MMLcSUMandPRODUCT{sum}\sum}
+\defineXMLcommand [product]{\MMLcSUMandPRODUCT{product}\prod}
+
+\setupMMLappearance[sum] [\c!location=\v!top]
+\setupMMLappearance[product][\c!location=\v!top]
+
+\def\stackMMLsubscripts#1%
+ {\vbox
+ {\baselineskip\zeropoint % hack, taco vragen
+ \halign{$\scriptstyle\hss##\hss$\cr#1\crcr}}}
+
+\def\MMLcSUMandPRODUCT#1#2%
+ {\begingroup
+ \XMLdoifonstackelse{condition,bvar,lowlimit}
+ {\def\MMLcSUMlow
+ {_{\XMLdoifonstackelse{condition}
+ {\collectXMLnamedstack{condition}{\crcr}%
+ \stackMMLsubscripts{\the\XMLRtoks}}
+ {\XMLdoifonstackelse{bvar}
+ {\XMLfirstnamed{bvar}%
+ \XMLdoifonstackelse{lowlimit}{=}{}}%
+ {}%
+ \XMLfirstnamed{lowlimit}}}}}
+ {\let\MMLcSUMlow\empty}%
+ \XMLdoifonstackelse{uplimit}
+ {\def\MMLcSUMup{^{\XMLfirstnamed{uplimit}}}}
+ {\let\MMLcSUMup\empty}%
+ \XMLdoifonstackelse{interval} % open math converter gives this
+ {\begingroup
+ \directsetup{mmc:interval:fetch}%
+ \XMLfirstnamed{interval}%
+ \endgroup
+ \ifx\MMCintervalfrom\empty\else
+ \def\MMLcSUMlow{_{\XMLdoifonstackelse{bvar}{\XMLfirstnamed{bvar}{=}}{}\MMCintervalfrom}}%
+ \fi
+ \ifx\MMCintervalto\empty \else
+ \def\MMLcSUMup{^{\MMCintervalto}}%
+ \fi}
+ {}%
+ \MMLcreset#2\doMMLlimits{#1}\MMLcSUMup\MMLcSUMlow
+% \xmlfirst{#1}{/mml:lambda/mml:apply}
+ \directsetup{mmc:lambda:simple}% a bit of open math conversion mess
+ \MMLcreset\XMLfirstnamed{apply,lambda,ci}%
+ \endgroup}
+
+ \setupMMLappearance[limit][\c!location=\v!top]
+
+ \startxmlsetups mml:limit
+ \MMLcreset \lim
+ \doMMLlimits {#1} {limit}_{
+ \MMLcreset
+ \xmldoifelse {#1} {/mml:condition} {
+ \xmlfirst{#1}{/mml:condition}
+ } {
+ \xmldoif {#1} {/mml:bvar} {
+ \xmlfirst{#1}{/mml:bvar}\rightarrow
+ }
+ \xmlfirst{#1}{/mml:lowlimit}
+ }
+ }
+ \begingroup
+ % a bit of open math conversion mess, lambda needed for openmath, ok?
+ \MMLcreset
+ \xmlfirst{#1}{/mml:lambda/mml:apply}
+ \xmlfirst{#1}{/(mml:apply\string|\mml:lambda}
+ \endgroup
+ \stopxmlsetups
+
+ % consider a faster index
+
+ \startxmlsetups mml:tendsto
+ \MMLcreset \mmlsecond{#1}
+ \XMLval {mml:tendsto:type} {\xmlattdef{#1}{type}{default}} {\rightarrow}
+ \MMLcreset \mmlthird{#1}
+ \stopxmlsetups
+
+ \mapXMLvalue {mml:tendsto:type} {above} {\downarrow}
+ \mapXMLvalue {mml:tendsto:type} {below} {\uparrow}
+ \mapXMLvalue {mml:tendsto:type} {default} {\rightarrow}
+
+% elementary classical functions
+
+ \setupMMLappearance[log][\c!location=\v!right]
+
+ \startxmlsetups mml:exp
+ % {\rm e}^{\xmlfirst{#1}{/mml:apply\string|mml:reln\string|mml:ci\string|mml:cn}}
+ {\rm e}^{\xmlfirst{#1}{/!mml:exp}}
+ \stopxmlsetups
+
+ \startxmlsetups mml:log
+ \xmldoifelse {#1} {/mml:logbase} {
+ \doifelse \@@MMLloglocation \v!left {
+ \mathop {
+ {}^{\xmlfirst{#1}{/mml:logbase}}\negthinspace\mfunction{log}
+ }
+ } {
+ \mfunction{log}_{\xmlfirst{#1}{/mml:logbase}}
+ }
+ } {
+ \mfunction{log}
+ }
+ \MMLcreset
+ \xmlsetup{#1}{mml:function}
+ \stopxmlsetups
+
+ \startxmlsetups mml:ln
+ \mfunction {ln}
+ \xmlsetup{#1}{mml:function}
+ \stopxmlsetups
+
+% statistics
+
+ \startxmlsetups mml:mean \overline {\mmlsecond{#1}} \stopxmlsetups
+ \startxmlsetups mml:sdev \sigma \left(\MMLcreset\mmlsecond{#1}\right) \stopxmlsetups
+ \startxmlsetups mml:variance \sigma \left(\MMLcreset\mmlsecond{#1}\right)^2 \stopxmlsetups
+ \startxmlsetups mml:median \mathopnolimits{median}\left(\MMLcreset\mmlsecond{#1}\right) \stopxmlsetups
+ \startxmlsetups mml:mode \mathopnolimits{mode} \left(\MMLcreset\mmlsecond{#1}\right) \stopxmlsetups
+
+% moments
+
+ \startsetups mmc:moment
+ \left\langle
+ \xmlfirst{#1}{/(mml:apply\string|mml:reln\string|mml:ci\string|mml:cn)}^{\xmlfirst{#1}{/mml:degree}}
+ \right\rangle
+ \xmldoif {#1} {mml:momentabout} {
+ _{\xmlfirst{mml:momentabout}}
+ }
+ \stopsetups
+
+% linear algebra
+
+ \setupMMLappearance [vector] [\c!direction=\v!horizontal,\c!separator={,}]
+
+ \startxmlsetups mml:vector:start
+ \begingroup
+ \ifnum\xmlcount{#1}{/*}>\plusone
+ \doifelse\@@MMLvectordirection\v!horizontal {
+ \left(\xmlconcat{#1}{/*}{\MMLseparator\@@MMLvectorseparator}\right)
+ } {
+ \MMLcreset\left(\matrix{\xmlconcat{#1}{/*}{\MMLseparator\@@MMLvectorseparator}}\right)
+ }
+ \else
+ \overrightarrow{\charhtstrut\mmlsecond{#1}}
+ \fi
+ \endgroup
+ \stopxmlsetups
+
+ \settrue\MMCdelmatrix %( ) when true
+
+ \startxmlsetups mml:matrix
+ \begingroup
+ \MMLcreset
+ \ifconditional\MMCdelmatrix
+ \left(\matrix{\xmlcommand{#1}{/mml:matrixrow}{mml:matrixrow:do}}\right)
+ \else
+ \settrue\MMCdelmatrix
+ \matrix{\xmlcommand{#1}{/mml:matrixrow}{mml:matrixrow:do}}
+ \fi
+ \endgroup
+ \stopxmlsetups
+
+ \startxmlsetups mml:matrixrow
+ \begingroup
+ \MMLcreset
+ \left(\xmlsetup{#1}{mml:matrixrow:do}\right)
+ \endgroup
+ \stopxmlsetups
+
+ \startxmlsetups mml:matrixrow:do
+ \xmlconcat{#1}{/*}\crcr
+ \stopxmlsetups
+
+ \startxmlsetups mml:determinant
+ \begingroup
+ \setfalse\MMCdelmatrix
+ \left|\mmlsecond{#1}\right|
+ \endgroup
+ \stopxmlsetups
+
+ \startxmlsetups mml:transpose
+ \mmlsecond{#1}^{\mfunction{T}}
+ \stopxmlsetups
+
+ \startxmlsetups mml:selector
+ \MMLmathinner{\mmlsecond{#1}_{\MMLcreset\xmlconcatrange{#1}{/*}{3}{}{\MMLseparator,}}}
+ \stopxmlsetups
+
+ \startxmlsetups mml:vectorproduct \mmlsecond{#1}\times \mmlthird{#1} \stopxmlsetups
+ \startxmlsetups mml:scalarproduct \mmlsecond{#1}\cdot \mmlthird{#1} \stopxmlsetups
+ \startxmlsetups mml:outerproduct \mmlsecond{#1}\otimes\mmlthird{#1} \stopxmlsetups
+
+% semantic mapping elements
+
+ \startxmlsetups mml:semantics
+ \xmlfirst{#1}{/(mml:annotation\string|apply)}
+ \stopxmlsetups
+
+ \startxmlsetups mml:annotation
+ \xmldoifelse {#1} {[oneof(@encoding,'TeX','tex','TEX','ConTeXt','context','CONTEXT','ctx')]} {
+ \begingroup
+ \setcatcodetable\ctxcatcodes
+ \xmlflush{#1}
+ \endgroup
+ } {
+ \xmldoifelse {#1} {[oneof(@encoding,'calcmath','cm')]} {
+ % to be supported
+ } {
+ % unsupported
+ }
+ }
+ \stopxmlsetups
+
+ \startxmlsetups mml:annotation-xml
+ % maybe diagnostics
+ \stopxmlsetups
+
+% misc
+
+ \startxmlsetups mml:integers \integers \stopxmlsetups
+ \startxmlsetups mml:reals \reals \stopxmlsetups
+ \startxmlsetups mml:rationals \rationals \stopxmlsetups
+ \startxmlsetups mml:naturalnumbers \naturalnumbers \stopxmlsetups
+ \startxmlsetups mml:complexes \complexes \stopxmlsetups
+ \startxmlsetups mml:primes \primes \stopxmlsetups
+ \startxmlsetups mml:exponentiale \mathop{\rm e} \stopxmlsetups
+ \startxmlsetups mml:imaginaryi \mathop{\rm i} \stopxmlsetups
+ \startxmlsetups mml:notanumber \mathop{\mfunction{NaN}} \stopxmlsetups
+ \startxmlsetups mml:true \mathop{\mfunction{true}} \stopxmlsetups
+ \startxmlsetups mml:false \mathop{\mfunction{false}} \stopxmlsetups
+ \startxmlsetups mml:emptyset \mathop{\O} \stopxmlsetups
+ \startxmlsetups mml:pi \pi \stopxmlsetups
+ \startxmlsetups mml:eulergamma \gamma \stopxmlsetups
+ \startxmlsetups mml:infinity \infty \stopxmlsetups
+
+% gonio functions
+
+ \setupMMLappearance[function][\c!reduction=\v!yes]
+
+ \startxmlsetups mml:sin \mfunction {sin}\xmlsetup{#1}{mml:function} \stopxmlsetups
+ \startxmlsetups mml:sinh \mfunction{sinh}\xmlsetup{#1}{mml:function} \stopxmlsetups
+ \startxmlsetups mml:cos \mfunction {cos}\xmlsetup{#1}{mml:function} \stopxmlsetups
+ \startxmlsetups mml:cosh \mfunction{cosh}\xmlsetup{#1}{mml:function} \stopxmlsetups
+ \startxmlsetups mml:tan \mfunction {tan}\xmlsetup{#1}{mml:function} \stopxmlsetups
+ \startxmlsetups mml:tanh \mfunction{tanh}\xmlsetup{#1}{mml:function} \stopxmlsetups
+ \startxmlsetups mml:cot \mfunction {cot}\xmlsetup{#1}{mml:function} \stopxmlsetups
+ \startxmlsetups mml:coth \mfunction{coth}\xmlsetup{#1}{mml:function} \stopxmlsetups
+ \startxmlsetups mml:csc \mfunction {csc}\xmlsetup{#1}{mml:function} \stopxmlsetups
+ \startxmlsetups mml:csch \mfunction{csch}\xmlsetup{#1}{mml:function} \stopxmlsetups
+ \startxmlsetups mml:sec \mfunction {sec}\xmlsetup{#1}{mml:function} \stopxmlsetups
+ \startxmlsetups mml:sech \mfunction{sech}\xmlsetup{#1}{mml:function} \stopxmlsetups
+
+ \startxmlsetups mml:function
+ \ifconditional\xmlinversefunction^{-1}\fi\setfalse\xmlinversefunction
+ \xmlsetup{#1}{mml:function:argument}
+ \stopxmlsetups
+
+ \startxmlsetups mml:function:argument
+% \doifelse \@@MMLfunctionreduction \v!yes {
+% \xmldoifelse {#1} {/mml:apply} {
+% \xmldoifelse {#1} {/(\MMLcfunctionlist\string|mml:divide} \donefalse \donetrue
+% } {
+% \donefalse
+% }
+% } {
+% \donetrue
+% }
+ % beware, we still flush from 2 up
+% \ifdone
+ \left(\MMLcreset\xmlall{#1}{/[position()>1]}\right)
+% \else
+% \MMLcreset\flushXMLstackfrom\plustwo
+% \fi
+ \stopxmlsetups
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% presentation mml
+
+\def\resetMMLseparator
+ {\newcounter\MMLxxcounter
+ \let\lastMMLseparator\empty}
+
+\def\grabMMLseparator#1%
+ {\increment\MMLxxcounter
+ \newcounter\MMLyycounter
+ \expanded{\dograbMMLseparator#1\noexpand\relax}}
+
+\def\dograbMMLseparator
+ {\increment\MMLyycounter
+ \doifnextcharelse\relax
+ {\lastMMLseparator\gobbleoneargument}
+ {\doifnextcharelse\xmlrent\grabMMLseparatora\grabMMLseparatorb}}
+
+\def\grabMMLseparatora#1\xmlrent#2%
+ {\ifnum\MMLxxcounter=\MMLyycounter\space
+ \def\lastMMLseparator{\xmlrent{#2}}%
+ \fi
+ \dograbMMLseparator}
+
+\def\grabMMLseparatorb#1%
+ {\ifnum\MMLxxcounter=\MMLyycounter\space
+ \doifXMLentityelse{#1}
+ {\def\lastMMLseparator{\xmlrent{#1}}}
+ {\def\lastMMLseparator{#1}}%
+ \fi
+ \dograbMMLseparator}
+
+%
+
+\defineXMLargument [mi] \MMLpMI
+\defineXMLargument [mn] \MMLpMN
+\defineXMLargument [mo] \MMLpMO
+
+\def\MMLpMI#1%
+ {\begingroup
+ \setMMLpmathstyle{mstyle}%
+ #1%
+ \endgroup}
+
+% \def\MMLpMN#1%
+% {\begingroup
+% \MMLrm
+% \setMMLpmathstyle{mstyle}%
+% #1%
+% \endgroup}
+
+\def\MMLpMN#1%
+ {\mfunction{\setMMLpmathstyle{mstyle}#1}}
+
+\def\MMLpMO#1% yes or no
+ {\flattenXMLcontent{#1}%
+ \doifXMLentityelse\flattenedXMLcontent
+ {\getXMLentity\flattenedXMLcontent}
+ {\ConvertConstantAfter\doifinstringelse{\xmlrent}{#1} % TODO ! ! ! ! ! ! ! !
+ {#1}
+ {\hbox
+ {\setMMLpmathstyle{mstyle}%
+ \ignorespaces#1\unskip}}}}
+
+% we need to get rid of spaces: <mo> &RightArrow; </mo>
+
+\def\MMLpMO#1% yes or no
+ {\flattenXMLcontent{#1}%
+ \doifXMLentityelse\flattenedXMLcontent
+ {\getXMLentity\flattenedXMLcontent}
+ {\ignorespaces#1\removeunwantedspaces}}
+
+\let\normalright=\right
+\let\normalleft =\left
+
+\def\doMMLleft #1{\pushmacro\left \let\left \empty\normalleft #1\popmacro\left}
+\def\doMMLright#1{\pushmacro\right\let\right\empty\normalright#1\popmacro\right}
+
+\let\MMLpopen \empty
+\let\MMLpclose\empty
+
+\defineXMLnested [mfenced] [open=(,close=),separators=]
+ {\directsetup{mmp:mfenced:start}}
+ {\directsetup{mmp:mfenced:stop}}
+
+\startsetups mmp:mfenced:start
+ \begingroup
+\stopsetups
+
+\startsetups mmp:mfenced:stop
+ \edef\MMLpopen {\XMLpar{mfenced}{open} {}}
+ \edef\MMLpclose{\XMLpar{mfenced}{close}{}}
+ \ifx\MMLpopen \space\let\MMLpopen \empty\fi
+ \ifx\MMLpclose\space\let\MMLpclose\empty\fi
+ \ifx\MMLpopen\empty
+ \ifx\MMLpclose\empty
+ \else
+ \doMMLleft.
+ \fi
+ \else
+ \doMMLleft\MMLpopen
+ \fi
+ \pushmacro\MMLpopen
+ \pushmacro\MMLpclose
+ \doifelsenothing{\XMLpar{mfenced}{separators}{}} {
+ \flushXMLstackfrom\plusone
+ } {
+ \resetMMLseparator
+ \flushXMLstackwith\plusone {
+ \begingroup
+ \let\myspecialnormalvert\myspecialstretchvert
+ \grabMMLseparator{\XMLpar{mfenced}{separators}{}}
+ \endgroup
+ }
+ }
+ \popmacro\MMLpclose
+ \popmacro\MMLpopen
+ \ifx\MMLpclose\empty
+ \ifx\MMLpopen\empty
+ \else
+ \doMMLright.
+ \fi
+ \else
+ \doMMLright\MMLpclose
+ \fi
+ \endgroup
+\stopsetups
+
+% \startbuffer
+% <math><mfenced separators="" open="(" close=")"><mi>x</mi></mfenced></math>
+% <math><mfenced separators="" open="" close=")"><mi>x</mi></mfenced></math>
+% <math><mfenced separators="" open="(" close="" ><mi>x</mi></mfenced></math>
+% <math><mfenced separators="" open="" close="" ><mi>x</mi></mfenced></math>
+% <math><mfenced separators="" open="" close=" "><mi>x</mi></mfenced></math>
+% \stopbuffer
+%
+% \processXMLbuffer
+
+\defineXMLnestedenvironmentsave [menclose] [notation=]
+ {\directsetup{mmp:menclose:start}}
+ {\directsetup{mmp:menclose:stop}}
+
+\startsetups mmp:menclose:start
+ \begingroup
+\stopsetups
+
+\startsetups mmp:menclose:stop
+ \doifelse{\XMLpar{menclose}{notation}{}}{longdiv} {
+ \overline{)\XMLflush{menclose}}
+ } {
+ \XMLflush{menclose}
+ }
+ \endgroup
+\stopsetups
+
+ \startxmlsetups mml:mfrac % dodo: handle linethickness in lua + unit
+ \begingroup
+ \edef\MMPlinethickness{\xmlatt{#1}{linethickness}}
+ \ifx\MMPlinethickness\empty
+ \doifelse{\xmlatt{#1}{bevelled}}{true} {
+ \xmlindex{#1}{/*}{1}
+ \mathpunct{\kern-.2ex\left.\middle/\right.\kern-.25ex}
+ \mmlsecond{#1}
+ } {
+ \frac{\xmlindex{#1}{/*}{1}}{\mmlsecond{#1}}
+ }
+ \else
+ % use \XMLval
+ \processaction
+ [\MMPlinethickness]
+ [ thin=>\scratchdimen=.2pt,
+ medium=>\scratchdimen=.4pt,
+ thick=>\scratchdimen=.8pt,
+ unknown=>\setdimensionwithunit\scratchdimen{\MMPlinethickness}{pt}]
+ {
+ {\xmlindex{#1}{/*}{1}}
+ \above\scratchdimen
+ {\mmlsecond{#1}}
+ }
+ \fi
+ \endgroup
+ \stopxmlsetups
+
+
+\defineXMLargument
+ [ms]
+ [lquote=\xmlrent{quot},
+ rquote=\xmlrent{quot},
+ fontweight=,
+ fontstyle=,
+ mathstyle=,
+ mathvariant=,
+ background=,
+ color=]
+ {\MMLpSTRING}
+
+\def\MMLpSTRING#1%
+ {\hbox
+ {\tf % else encoding problems
+ \MMLpTEXT{\XMLpar{ms}{lquote}{}%
+ \doMMPpbackground{ms}{\doMMPpcolor{ms}{\setMMLptextstyle{ms}\ignorespaces#1\removeunwantedspaces}}%
+ \XMLpar{ms}{rquote}{}}}}
+
+\defineXMLenvironment
+ [mstyle]
+ [fontweight=,
+ fontstyle=,
+ mathstyle=,
+ mathvariant=,
+ background=,
+ color=]
+ {\begingroup}
+ {\endgroup}
+
+\defineXMLargument [mtext] [CPA] \MMLpTEXT
+\defineXMLargument [merror] [CPA] \MMLpERROR
+\defineXMLargument [mphantom] [CPA] \MMLpPHANTOM
+\defineXMLargument [mpadded] [CPA] \MMLpPADDED
+
+\mapXMLvalue{mmp}{normal} {\tf} \mapXMLvalue{mmp}{double-stuck} {\bf}
+\mapXMLvalue{mmp}{bolditalic} {\bi} \mapXMLvalue{mmp}{bold-italic} {\bi}
+\mapXMLvalue{mmp}{boldslanted}{\bs} \mapXMLvalue{mmp}{bold-slanted} {\bs}
+\mapXMLvalue{mmp}{boldnormal} {\bf} \mapXMLvalue{mmp}{bold} {\bf}
+\mapXMLvalue{mmp}{slanted} {\sl} \mapXMLvalue{mmp}{normalslanted}{\sl}
+\mapXMLvalue{mmp}{italic} {\it} \mapXMLvalue{mmp}{normalitalic} {\it}
+\mapXMLvalue{mmp}{fraktur} {\bf} \mapXMLvalue{mmp}{bold-fraktur} {\bf}
+\mapXMLvalue{mmp}{script} {\tf} \mapXMLvalue{mmp}{bold-script} {\bf}
+
+% and all kind of other crappy names
+
+\def\setMMLptextstyle#1%
+ {\XMLval{mmp}{\XMLpar{#1}{fontweight}{}\XMLpar{#1}{fontstyle}{}}{}}
+
+\def\setMMLpmathstyle#1%
+ {\XMLval{mmp}{\XMLpar{#1}{mathvariant}{}}{}}
+
+\def\doMMPpcolor#1#2%
+ {\doifXMLparelse{#1}{color}{\color[\XMLpar{#1}{color}{}]{#2}}{#2}}
+
+\def\doMMPpbackground#1#2%
+ {\doifXMLparelse{#1}{background}
+ {\inframed
+ [\c!frame=\v!off,
+ \c!background=\v!color,
+ \c!backgroundcolor=\XMLpar{#1}{background}{}]
+ {#2}}
+ {#2}}
+
+\def\MMLpTEXT#1%
+ {\hbox
+ {\tf % else encoding problems
+ \doMMPpbackground{ms}{\doMMPpcolor{ms}{\setMMLptextstyle{ms}\ignorespaces#1\removeunwantedspaces}}}}
+
+\def\MMLpERROR#1%
+ {\hbox{$\displaystyle#1$}}
+
+\def\MMLpPHANTOM#1%
+ {\phantom{\ignorespaces{}#1\unskip}} % watch spacing {} hack
+
+\def\MMLpPADDED#1%
+ {#1}
+
+% mrow
+
+\defineXMLenvironment [mrow] {\resetMMLbounds} {\finishMMLbounds}
+
+% \def\MMLleft #1{\increment\MMLboundslevel\left #1}
+% \def\MMLright#1{\right#1\decrement\MMLboundslevel}
+
+% \def\resetMMLbounds
+% {\let\MMLboundslevel\!!plusone\left.}
+
+% \def\finishMMLbounds
+% {\dorecurse\MMLboundslevel{\right.}}
+
+\def\resetMMLbounds
+ {\pushmacro\MMLboundslevel
+ \newcounter\MMLboundslevel}
+
+\def\MMLleft #1%
+ {\increment\MMLboundslevel
+ \normalleft#1}
+
+\def\MMLright#1%
+ {\ifnum\MMLboundslevel=0 \normalleft.\!\fi
+ \normalright#1%
+ \decrement\MMLboundslevel}
+
+\def\finishMMLbounds
+ {\ifnum\MMLboundslevel>0
+ \normalright.\!%
+ \decrement\MMLboundslevel
+ \expandafter\finishMMLbounds
+ \else
+ \popmacro\MMLboundslevel
+ \fi}
+
+ \startxmlsetups mml:msqrt
+ \sqrt{\xmlflush{#1}}
+ \stopxmlsetups
+
+ \startxmlsetups mml:mroot
+ \root{\xmlindex{#1}{*}{1}}\of{\xmlindex{#1}{*}{2}}
+ \stopxmlsetups
+
+ \setupMMLappearance[scripts][\c!alternative=\v!a] % {} rond base
+
+ \startxmlsetups mml:msub
+ \doifelse\@@MMLscriptsalternative\v!a {
+ {\xmlindex{#1}{/*}{1}}_{\mmlsecond{#1}}
+ } {
+ \xmlindex{#1}{/*}{1} _{\mmlsecond{#1}}
+ }
+ \stopxmlsetups
+
+ \startxmlsetups mml:msup
+ \doifelse\@@MMLscriptsalternative\v!a {
+ {\xmlindex{#1}{/*}{1}}^{\mmlsecond{#1}}
+ } {
+ \xmlindex{#1}{/*}{1} ^{\mmlsecond{#1}}
+ }
+ \stopxmlsetups
+
+ \startxmlsetups mml:msubsup
+ \doifelse\@@MMLscriptsalternative\v!a {
+ {\xmlindex{#1}{/*}{1}}_{\mmlsecond{#1}}^{\mmlthird{#1}}
+ } {
+ \xmlindex{#1}{/*}{1} _{\mmlsecond{#1}}^{\mmlthird{#1}}
+ }
+ \stopxmlsetups
+
+\defineXMLnested [mover] {\directsetup{mmp:mover:start}} {\directsetup{mmp:mover:stop}}
+\defineXMLnested [munder] {\directsetup{mmp:munder:start}} {\directsetup{mmp:munder:stop}}
+\defineXMLnested [munderover] {\directsetup{mmp:munderover:start}} {\directsetup{mmp:munderover:stop}}
+
+\startsetups mmp:mover:start
+ \begingroup
+\stopsetups
+
+\startsetups mmp:mover:stop
+ \mathop{\vbox{\m@th\ialign{\hss##\hss\crcr\noalign{\kern3\p@}%
+ \disabledelimiter\doMMLfiller{\getXMLstackdata\plustwo}
+ \crcr\noalign{\kern3\p@\nointerlineskip}%
+ \disabledelimiter\doMMLfiller{\getXMLstackdata\plusone}
+ \crcr}}}
+ \limits
+ \endgroup
+\stopsetups
+
+\startsetups mmp:munder:start
+ \begingroup
+\stopsetups
+
+\startsetups mmp:munder:stop
+ \mathop{\vtop{\m@th\ialign{\hss##\hss\crcr
+ \disabledelimiter\doMMLfiller{\getXMLstackdata\plusone}
+ \crcr\noalign{\kern3\p@\nointerlineskip}%
+ \disabledelimiter\doMMLfiller{\getXMLstackdata\plustwo}
+ \crcr\noalign{\kern3\p@}}}}
+ \limits
+ \endgroup
+\stopsetups
+
+\startsetups mmp:munderover:start
+ \begingroup
+\stopsetups
+
+\startsetups mmp:munderover:stop
+ \getXMLstackdata\plusone
+ _{\disablefiller\disabledelimiter\getXMLstackdata\plustwo}
+ ^{\disablefiller\disabledelimiter\getXMLstackdata\plusthree}
+ \endgroup
+\stopsetups
+
+\def\doMMLfiller#1% bugged
+ {\pushmacro\doMMLfiller
+ \let\doMMLfiller\gobbleoneargument
+ \gdef\dodoMMLfiller{\disablefiller\mathematics{#1}}%
+ \hbox
+ {\def\normalorfiller##1##2%
+ {\gdef\dodoMMLfiller{\enablefiller#1}%
+ \let\normalorfiller\gobbletwoarguments}%
+ $#1$}%
+ \popmacro\doMMLfiller
+ \dodoMMLfiller}
+
+% tables
+
+% obsolete: \setupMMLappearance[mtable][\c!alternative=\v!a]
+
+
+ % \startxmlsetups mml:mlabeledtr
+ % \bTR \xmlall{#1}{/mml:mtd} \eTR
+ % \stopxmlsetups
+
+ % \startxmlsetups mml:mtr
+ % \bTR \xmlall{#1}{/mml:mtd} \eTR
+ % \stopxmlsetups
+
+ % \startxmlsetups mml:mtd
+ % \bTD$\MMLhack\xmlall{#1}{/*}\relax$\eTD
+ % \stopxmlsetups
+
+ % \startxmlsetups mml:mtable
+ % \vcenter \bgroup
+ % \bTABLE[\c!frame=\v!off]
+ % \xmlall{#1}{/mml:mtr|mml:mlabeledtr}
+ % \eTABLE
+ % \egroup
+ % \stopxmlsetups
+
+\mapXMLvalue {mmp:mtable} {align:left} {right}
+\mapXMLvalue {mmp:mtable} {align:right} {left}
+\mapXMLvalue {mmp:mtable} {align:center} {middle}
+
+\mapXMLvalue {mmp:mtable} {frame:none} {off}
+\mapXMLvalue {mmp:mtable} {frame:solid} {on}
+\mapXMLvalue {mmp:mtable} {frame:on} {on}
+
+\defineXMLnested
+ [mtable]
+ [columnalign=,
+ columnspacing=.25ex,
+ rowspacing=.25ex,
+ frame=,
+ color=,
+ background=]
+ {\directsetup{mmp:mtable:start}}
+ {\directsetup{mmp:mtable:stop}}
+
+\defineXMLnestedargument
+ [mtr]
+ {\MMPmtableHANDLEtr}
+
+\defineXMLnestedargument
+ [mlabeledtr]
+ {\MMPmtableHANDLEtr}
+
+\defineXMLnestedargument
+ [mtd]
+ [columnalign=,
+ columnspacing=.25ex,
+ rowspacing=.25ex,
+ frame=,
+ color=,
+ background=]
+ {\MMPmtableHANDLEtd}
+
+\startsetups mmp:mtable:start
+ \vcenter \bgroup
+ \MMLpTABLEsplitter{background} \c!backgroundcolor % =1,2,3,4
+ \MMLpTABLEsplitter{color} \c!color
+ \MMLpTABLEmapper {frame} \c!frame
+ \MMLpTABLEmapper {columnalign}\c!align
+ \setMMLpunit{\XMLpar{mtable}{rowspacing}\empty}{.25ex}
+ \let\MMLpTABLEoffset\MMLpunit
+ \bTABLE[\c!frame=\v!off,\c!background=\v!color,\c!offset=\MMLpTABLEoffset]
+\stopsetups
+
+\startsetups mmp:mtable:stop
+ \eTABLE
+ \egroup
+\stopsetups
+
+\long\def\MMPmtableHANDLEtr#1{%
+ \bTR\ignorespaces#1\removeunwantedspaces\eTR
+}
+
+\long\def\MMPmtableHANDLEtd#1{%
+ \let\theMMLpTABLEmap\empty
+ \MMLpTABLEmap{background} \c!backgroundcolor
+ \MMLpTABLEmap{color} \c!color
+ \MMLpTABLEmap{frame} \c!frame
+ \MMLpTABLEmap{columnalign}\c!align
+ \expanded{\bTD[\theMMLpTABLEmap]}%
+ $\ignorespaces#1\removeunwantedspaces$\eTD
+}
+
+\def\MMLpTABLEmapper#1#2%
+ {\doifXMLparelse{mtable}{#1}
+ {\newcounter\MMLcounter
+ \def\docommand##1%
+ {\increment\MMLcounter
+ \expanded{\setupTABLE[column][\MMLcounter][#2=\XMLval{mmp:mtable}{#2:##1}\empty]}}%
+ \expanded{\processseparatedlist[\XMLpar{mtable}{#1}\empty]}[ ]\docommand}
+ {}}
+
+\def\MMLpTABLEsplitter#1#2%
+ {\doifXMLparelse{mtable}{#1}
+ {\newcounter\MMLcounter
+ \def\docommand##1%
+ {\increment\MMLcounter
+ \expanded{\setupTABLE[column][\MMLcounter][#2=##1]}}%
+ \expanded{\processseparatedlist[\XMLpar{mtable}{#1}\empty]}[ ]\docommand}
+ {}}
+
+\def\MMLpTABLEmap#1#2%
+ {\doifXMLparelse{mtd}{#1}
+ {\edef\theMMLpTABLEmap{#2=\XMLval{mmp:mtable}{#2:\XMLpar{mtd}{#1}\empty}\empty,\theMMLpTABLEmap}}
+ {}}
+
+% end of tables
+
+\def\setMMLpunit#1#2%
+ {\setbox\scratchbox=\hbox
+ {\edef\ascii{#1}%
+ \@EA\aftersplitstring\ascii\at.\to\ascii
+ \scratchcounter=\ifx\ascii\empty#1\else\ascii\fi
+ \unskip\unskip}%
+ \ifdim\wd\scratchbox=\zeropoint
+ \edef\MMLpunit{#1em}%
+ \else
+ \edefconvertedargument\ascii{#1}%
+ \convertasciiafter\doifinstringelse{em}{\ascii}{\edef\MMLpunit{#1}}{%
+ \convertasciiafter\doifinstringelse{ex}{\ascii}{\edef\MMLpunit{#1}}{%
+ \convertasciiafter\doifinstringelse{pt}{\ascii}{\edef\MMLpunit{#1}}{%
+ \edef\MMLpunit{#2}}}}%
+ \fi}
+
+
+ \startsetups mml:mspace % todo: width=ex/ex/pt
+ \hskip.5em\relax
+ \stopsetups
+
+\defineXMLsingular [mglyph] [fontfamily=,index=1,alt=] {\directsetup{mmp:mglyph}}
+
+\startsetups mmp:mglyph
+ \def\MMLpglyph{\XMLpar{mglyph}{fontfamily}{}}%
+ \doifelsenothing{\MMLpglyph} {
+ \hbox{\tttf[fontfamily unspecified]}
+ } {
+ \doifdefinedelse{\MMLpglyph} {
+ \hbox{\getvalue{\MMLpglyph}\char0\XMLpar{mglyph}{index}{1}}
+ } {
+ \doifelsenothing{\XMLpar{mglyph}{alt}{}} {
+ \hbox{\tttf[unknown fontfamily \XMLpar{mglyph}{fontfamily}{}]}
+ } {
+ \hbox{\tttf\XMLpar{mglyph}{alt}{}}
+ }
+ }
+ }
+\stopsetups
+
+\defineXMLsingular [malignmark] {}
+\defineXMLsingular [none] {}
+\defineXMLsingular [mprescripts] {}
+
+\defineXMLnested
+ [mmultiscripts]
+ {\setups{mmp:mmultiscripts:start}}
+ {\setups{mmp:mmultiscripts:stop}}
+
+\startsetups mmp:mmultiscripts:start
+ \begingroup
+\stopsetups
+
+\startsetups mmp:mmultiscripts:stop
+ \donefalse
+ \scratchcounter\zerocount
+ \dorecurse\XMLstacklevel {
+ % watch the extra {}'s
+ \ifdone
+ \ifodd\scratchcounter
+ _{\getXMLstackdata\recurselevel}
+ \else
+ ^{\getXMLstackdata\recurselevel}{}
+ \fi
+ \else
+ \doif{\getXMLstackname\recurselevel}{mprescripts}{\donetrue{}}
+ \fi
+ \ifdone \advance\scratchcounter\plusone \fi
+
+ }
+ \donetrue
+ \scratchcounter\zerocount
+ \dorecurse\XMLstacklevel {
+ \ifdone
+ % watch the extra {}'s
+ \ifcase\scratchcounter
+ \getXMLstackdata\recurselevel
+ \else\ifodd\scratchcounter
+ _{\getXMLstackdata\recurselevel}
+ \else
+ ^{\getXMLstackdata\recurselevel}{}
+ \fi\fi
+ \fi
+ \doif{\getXMLstackname\recurselevel}{mprescripts}{\donefalse}
+ \ifdone \advance\scratchcounter\plusone \fi
+ }
+ \endgroup
+\stopsetups
+
+% experimental patches
+
+\startmoduletestsection
+
+\def\xflushXMLstackwith#1#2#3#4% num bgroup egroup whatever
+ {\dostepwiserecurse{#1}\XMLstacklevel\plusone
+ {#2\relax
+ \ifnum\recurselevel>#1\relax#4\fi
+ \getXMLstackdata\recurselevel
+ #3}}
+
+\def\xflushXMLstackfrom#1#2#3%
+ {\dostepwiserecurse{#1}\XMLstacklevel\plusone
+ {#2\getXMLstackdata\recurselevel#3}}
+
+% <apply><divide/>
+% <apply><minus/>
+% <apply><minus/><ci>b</ci></apply>
+% <apply><minus/><ci>b</ci></apply>
+% <apply><root/> <ci>a</ci></apply>
+% </apply>
+% <apply><minus/>
+% <apply><minus/><ci>b</ci><ci>b</ci></apply>
+% <apply><minus/><ci>b</ci></apply>
+% <apply><root/> <ci>a</ci></apply>
+% </apply>
+% </apply>
+
+\startsetups mmc:minus
+ \doif \@@MMLsignreduction \v!yes {
+ \setMMLcreset{fn,\MMLcfunctionlist}
+ }
+ \ifcase\XMLstacklevel
+ \or
+ % self
+ \or
+ -\getXMLstackdata\plustwo
+ \else
+ \dostepwiserecurse\plustwo\XMLstacklevel\plusone {
+ \begingroup
+ \doifelse {\getXMLstackname\recurselevel} {apply} {
+ \ifnum\recurselevel=\plustwo
+ \begingroup
+ \dodoifelseMMCfunctioninapply \recurselevel {minus} {
+ \ifnum\XMLstacklevel>\plustwo
+ \endgroup
+ \else
+ \endgroup
+ \MMLcreset
+ \fi
+ } {
+ \endgroup
+ }
+ \else
+ \doifelseMMCfunctioninapply \recurselevel {\MMLcfunctionlist,\MMLcconstructlist} {
+ \MMLcreset
+ } {
+ }
+ \fi
+ } {
+ }
+ \getXMLstackdata\recurselevel
+ \ifnum\recurselevel<\XMLstacklevel\relax
+ -
+ \fi
+ \endgroup
+ }
+ \fi
+\stopsetups
+
+\stopmoduletestsection
+
+\stopmodule
+
+\protect \endinput
diff --git a/tex/context/base/x-mml.mkiv b/tex/context/base/x-mml.mkiv
index ee042d010..d2dd91a09 100644
--- a/tex/context/base/x-mml.mkiv
+++ b/tex/context/base/x-mml.mkiv
@@ -16,25 +16,16 @@
%D incomplete but I needed a quick hack for a project where I wanted
%D to use the new \MKIV\ \XML\ handler. It's also a nice testcase.
-% \xmlstrip {\xmldocument} {mml:math|mml:imath|mml:dmath}
-
-% \startxmlsetups xml:mml:process
-% \xmlutfize {\xmldocument}
-% \xmlgrab {\xmldocument} {mml:math|mml:imath|mml:dmath} {*}
-% \xmlgrab {\xmldocument} {mml:annotation} {ignore}
-% \stopxmlsetups
-
-% \xmlregistersetup{xml:mml:process}
-
\startxmlsetups xml:mml:process
-% \xmlutfize {\xmldocument}
- \xmlgrab {\xmldocument} {mml:*} {*}
+ \xmlgrab {\xmldocument} {mml:*} {*}
\stopxmlsetups
\xmlregistersetup{xml:mml:process}
\xmlregisterns{mml}{mathml}
+\def\setupMMLappearance[#1]{\dodoubleargument\getparameters[@@MML#1]}
+
\def\MMLhack{\let\MMLpar\par \let\par\relax \everyvbox{\let\par\MMLpar}}
\startxmlsetups mml:math
@@ -51,10 +42,8 @@
% -- we need a new entity mapper (also covering unicode)
-\usemodule[newmme] % temporary, we will have a new one, using lua tables
-
-%loadmarkfile{x-mme}
-\loadmarkfile{x-mmp}
-%loadmarkfile{x-mmc}
+\loadmarkfile{x-mmb} % common code
+\loadmarkfile{x-mmp} % presentation mathml
+\loadmarkfile{x-mmc} % content mathml
\endinput
diff --git a/tex/context/base/x-mmp.mkiv b/tex/context/base/x-mmp.mkiv
index 17cef5b55..1b5dd97b3 100644
--- a/tex/context/base/x-mmp.mkiv
+++ b/tex/context/base/x-mmp.mkiv
@@ -11,10 +11,6 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% -- ignored: malignmark
-% -- luacode will be moved to x-mmp.lua
-% -- { } # % _ ^ & etc escapen, {} in mathtype entities; mo/mtext
-
\startluacode
do
@@ -29,27 +25,103 @@
-- [" "] = utf.char(0x2002), -- "&textspace;" -> tricky, no &; in mkiv
["."] = "{.}",
[","] = "{,}",
+ [" "] = "",
}
local o_replacements = {
- ["{"] = "\\{",
- ["}"] = "\\}",
+ ["{"] = "\\mmlleftdelimiter\\lbrace",
+ ["}"] = "\\mmlrightdelimiter\\rbrace",
+ ["("] = "\\mmlleftdelimiter(",
+ [")"] = "\\mmlrightdelimiter)",
+ ["["] = "\\mmlleftdelimiter[",
+ ["]"] = "\\mmlrightdelimiter]",
+ ["<"] = "\\mmlleftdelimiter<",
+ [">"] = "\\mmlrightdelimiter>",
+ ["#"] = "\\mmlchar{35}",
+ ["$"] = "\\mmlchar{36}",
+ ["%"] = "\\mmlchar{37}",
+ ["&"] = "\\mmlchar{38}",
+ ["^"] = "\\mmlchar{94}{}", -- strange, sometimes luatex math see the char instead of \char
+ ["_"] = "\\mmlchar{95}{}", -- so we need the {}
+ ["~"] = "\\mmlchar{126}",
+ [" "] = "",
+ }
+ local i_replacements = {
+ ["sin"] = "\\mmlnolim{sin}",
+ ["cos"] = "\\mmlnolim{cos}",
+ ["abs"] = "\\mmlnolim{abs}",
+ ["arg"] = "\\mmlnolim{arg}",
+ ["codomain"] = "\\mmlnolim{codomain}",
+ ["curl"] = "\\mmlnolim{curl}",
+ ["determinant"] = "\\mmlnolim{det}",
+ ["divergence"] = "\\mmlnolim{div}",
+ ["domain"] = "\\mmlnolim{domain}",
+ ["false"] = "\\mmlnolim{false}",
+ ["gcd"] = "\\mmlnolim{gcd}",
+ ["grad"] = "\\mmlnolim{grad}",
+ ["identity"] = "\\mmlnolim{id}",
+ ["image"] = "\\mmlnolim{image}",
+ ["lcm"] = "\\mmlnolim{lcm}",
+ ["max"] = "\\mmlnolim{max}",
+ ["median"] = "\\mmlnolim{median}",
+ ["min"] = "\\mmlnolim{min}",
+ ["mode"] = "\\mmlnolim{mode}",
+ ["mod"] = "\\mmlnolim{mod}",
+ ["notanumber"] = "\\mmlnolim{NaN}",
+ ["otherwise"] = "\\mmlnolim{otherwise}",
+ ["true"] = "\\mmlnolim{true}",
+ ["declare"] = "\\mmlnolim{declare}",
+ ["as"] = "\\mmlnolim{as}",
+ ["polar"] = "\\mmlnolim{Polar}",
+ ["exp"] = "\\mmlnolim{exp}",
+ ["ln"] = "\\mmlnolim{ln}",
+ ["log"] = "\\mmlnolim{log}",
+ ["sin"] = "\\mmlnolim{sin}",
+ ["arcsin"] = "\\mmlnolim{arcsin}",
+ ["sinh"] = "\\mmlnolim{sinh}",
+ ["arcsinh"] = "\\mmlnolim{arcsinh}",
+ ["cos"] = "\\mmlnolim{cos}",
+ ["arccos"] = "\\mmlnolim{arccos}",
+ ["cosh"] = "\\mmlnolim{cosh}",
+ ["arccosh"] = "\\mmlnolim{arccosh}",
+ ["tan"] = "\\mmlnolim{tan}",
+ ["arctan"] = "\\mmlnolim{arctan}",
+ ["tanh"] = "\\mmlnolim{tanh}",
+ ["arctanh"] = "\\mmlnolim{arctanh}",
+ ["cot"] = "\\mmlnolim{cot}",
+ ["arccot"] = "\\mmlnolim{arccot}",
+ ["coth"] = "\\mmlnolim{coth}",
+ ["arccoth"] = "\\mmlnolim{arccoth}",
+ ["csc"] = "\\mmlnolim{csc}",
+ ["arccsc"] = "\\mmlnolim{arccsc}",
+ ["csch"] = "\\mmlnolim{csch}",
+ ["arccsch"] = "\\mmlnolim{arccsch}",
+ ["sec"] = "\\mmlnolim{sec}",
+ ["arcsec"] = "\\mmlnolim{arcsec}",
+ ["sech"] = "\\mmlnolim{sech}",
+ ["arcsech"] = "\\mmlnolim{arcsech}",
+ [" "] = "",
}
function lxml.mml.prepare_number(id,pattern)
local str = xml.content(lxml.id(id),pattern) or ""
- str = str:gsub("^%s*(.-)%s*$","%1")
- str = str:gsub(".",n_replacements)
- texsprint(str)
+ texsprint(tex.ctxcatcodes,(str:gsub(".",n_replacements)))
end
-
function lxml.mml.prepare_operator(id,pattern)
local str = xml.content(lxml.id(id),pattern) or ""
- str = str:gsub("^%s*(.-)%s*$","%1")
- str = str:gsub(".",o_replacements)
- texsprint(str)
+ tex.sprint(tex.ctxcatcodes,(str:gsub(".",o_replacements)))
+ end
+ function lxml.mml.prepare_identifier(id,pattern)
+ local str = xml.content(lxml.id(id),pattern) or ""
+ str = str:gsub("^%s*(.*)%s*$","%1")
+ local rep = i_replacements[str]
+ if rep then
+ tex.sprint(tex.ctxcatcodes,rep)
+ else
+ tex.sprint(tex.ctxcatcodes,(str:gsub(".",i_replacements)))
+ end
end
- function lxml.mml.connect(id,pattern,separators)
+ function lxml.mml.connect(id,pattern,separators) -- multiple separators
local n = xml.count(id,pattern)
if n == 0 then
-- skip
@@ -125,21 +197,6 @@
\unprotect
-% \xmlstrip {\xmldocument} {mml:mrow|mml:mi|mml:mn|mml:mo|mml:mroot|mml:msqrt|mml:mfenced|mml:mfrac|mml:enclose}
-
-% \startxmlsetups xml:mmp:process
-% \xmlgrab {\xmldocument} {mml:mrow|mml:mroot|mml:msqrt|mml:mi|mml:mo|mml:mn|mml:mfenced|mml:mfrac|mml:mspace|mml:enclose} {*}
-% \xmlgrab {\xmldocument} {mml:mover|mml:munder|mml:munderover|mml:msub|mml:msup|mml:msubsup|mml:mmultiscripts} {*}
-% \xmlgrab {\xmldocument} {mml:mstyle|mml:mtext|mml:merror|mml:mphantom|mml:mpadded|mml:ms|mp:mglyph} {*}
-% \xmlgrab {\xmldocument} {mml:mlabeledtr|mml:mtr|mml:mtd|mml:mtable} {*}
-% \stopxmlsetups
-
-% \startxmlsetups xml:mmp:process
-% \xmlgrab {\xmldocument} {mml:*} {*}
-% \stopxmlsetups
-
-% \xmlregistersetup{xml:mmp:process}
-
% helpers
% \let\myspecialnormalvert\myspecialstretchvert
@@ -197,35 +254,44 @@
\xmlflush{#1}
\stopsetups
+% \startxmlsetups mml:mi % todo: mathvariant mathsize mathcolor mathbackground
+% \edef\MMPidentifier{\xmlstripped{#1}{*}}
+% \doifXMLentityelse{\detokenize\expandafter{\MMPidentifier}} {
+% \getXMLentity\MMPidentifier
+% } {
+% \MMPidentifier
+% }
+% \stopxmlsetups
+
\startxmlsetups mml:mi % todo: mathvariant mathsize mathcolor mathbackground
- \edef\MMPidentifier{\xmlstripped{#1}{*}}
- \doifXMLentityelse{\detokenize\expandafter{\MMPidentifier}} {
- \getXMLentity\MMPidentifier
- } {
- \MMPidentifier
- }
+ \ctxlua{lxml.mml.prepare_identifier("#1","*")}
\stopxmlsetups
\startxmlsetups mml:mn % todo: mathvariant mathsize mathcolor mathbackground
\begingroup
- \mr \ctxlua{lxml.mml.prepare_number("#1","*")}
+ \mr \ctxlua{lxml.mml.prepare_number("#1","*")}%
\endgroup
\stopxmlsetups
% hbox will make . and , behave ok, see rep patterns above as alternative
%
% \startxmlsetups mml:mn % todo: mathvariant mathsize mathcolor mathbackground
-% % problem, we need an hbox because of . ,
% \mathop{\hbox{\mr \ctxlua{lxml.mml.prepare_number("#1","*")}}}% we need . and , properly spaced
% \stopxmlsetups
+% \startxmlsetups mml:mo
+% \edef\MMPoperator{\ctxlua{lxml.mml.prepare_operator("#1","*")}}
+% \doifXMLentityelse{\detokenize\expandafter{\MMPoperator}} {
+% \getXMLentity\MMPoperator
+% } {
+% \MMPoperator
+% }
+% \stopxmlsetups
+
+% also ok:
+
\startxmlsetups mml:mo
- \edef\MMPoperator{\ctxlua{lxml.mml.prepare_operator("#1","*")}}
- \doifXMLentityelse{\detokenize\expandafter{\MMPoperator}} {
- \getXMLentity\MMPoperator
- } {
- \MMPoperator
- }
+ \ctxlua{lxml.mml.prepare_operator("#1","*")}
\stopxmlsetups
\startxmlsetups mml:mrow
@@ -352,30 +418,6 @@
{\xmlindex{#1}{/*}{1}}_{\xmlindex{#1}{/*}{2}}^{\xmlindex{#1}{/*}{3}}
\stopsetups
-% \startsetups mml:mover
-% \mathop {
-% \doifelse{\xmlatt{#1}{accent}}{true} {
-% \begingroup
-% \xmldoif{#1}{/*[position()==2 and @stretchy=='true']} {
-% \let\normalorfiller\secondoftwoarguments
-% }
-% \xmlindex{#1}{/*}{2}{\xmlindex{#1}{/*}{1}}
-% \endgroup
-% } {
-% \vbox {
-% \m@th\ialign {
-% \hss##\hss\crcr
-% \noalign{\kern3\p@}%
-% \disabledelimiter\doMMLfiller{\xmlindex{#1}{/*}{2}}\crcr
-% \noalign{\kern3\p@\nointerlineskip}%
-% \disabledelimiter\doMMLfiller{\xmlindex{#1}{/*}{1}}\crcr
-% }
-% }
-% }
-% }
-% \limits
-% \stopsetups
-
\startsetups mml:mover
\mathop {
\edef\mmlovertoken{\xmlraw{#1}{/mml:mo[position()==2]}}
diff --git a/tex/context/base/x-newmml.tex b/tex/context/base/x-newmml.tex
index f4dfa9129..f4847eeb9 100644
--- a/tex/context/base/x-newmml.tex
+++ b/tex/context/base/x-newmml.tex
@@ -84,7 +84,7 @@
%D The second implementation expanded the whole math sequence
%D into an internal \TEX\ representation. This is a rather clean
%D and fast process. Filtering and testing takes place by
-%D redefining teh internal representation macros.
+%D redefining the internal representation macros.
%D
%D The third implementation may look a bit more messy in some
%D respects. This is because in \TEX\ it's not that trivial to
@@ -138,13 +138,6 @@
{\startsavingXMLelements}
{\stopsavingXMLelements}
-% already defined
-%
-% \defineXMLnestedenvironmentsave
-% [xmlstack]
-% {}
-% {\pushXMLnameonstack}
-
\stopXMLmapping
%D Auxiliary MathML macros: (to be generalized)
@@ -1193,7 +1186,7 @@
{\flushXMLstackwith\plustwo{#1}
\stopusingMMLarguments}
-\def\lastMMLcrelation#1%
+\def\lastMMLcrelation#1% weird, probably bugged
{\XMLRtoks\emptytoks
\dostepwiserecurse\plustwo\XMLstacklevel\plusone
{\appendetoks\noexpand\getXMLstackdata{\recurselevel}\to\XMLRtoks
diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml
index 86fc4d151..ec68e676a 100644
--- a/tex/context/interface/keys-cz.xml
+++ b/tex/context/interface/keys-cz.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2008.04.18 14:17">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2008.05.09 19:33">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml
index cdd1c702e..0a30f7992 100644
--- a/tex/context/interface/keys-de.xml
+++ b/tex/context/interface/keys-de.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2008.04.18 14:17">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2008.05.09 19:33">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml
index ce537a676..0afd7d099 100644
--- a/tex/context/interface/keys-en.xml
+++ b/tex/context/interface/keys-en.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2008.04.18 14:17">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2008.05.09 19:33">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml
index fb056b816..0b4fae012 100644
--- a/tex/context/interface/keys-fr.xml
+++ b/tex/context/interface/keys-fr.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2008.04.18 14:17">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2008.05.09 19:33">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml
index 097b3f054..9b8883c5c 100644
--- a/tex/context/interface/keys-it.xml
+++ b/tex/context/interface/keys-it.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2008.04.18 14:17">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2008.05.09 19:33">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml
index 63e719905..cb0d8e400 100644
--- a/tex/context/interface/keys-nl.xml
+++ b/tex/context/interface/keys-nl.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2008.04.18 14:17">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2008.05.09 19:33">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>
diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml
index 7ac866069..1dd42298e 100644
--- a/tex/context/interface/keys-ro.xml
+++ b/tex/context/interface/keys-ro.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2008.04.18 14:17">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2008.05.09 19:33">
<cd:variables>
<cd:variable name="lesshyphenation" value="lesshyphenation"/>