diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-05-22 01:22:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-05-22 01:22:00 +0200 |
commit | 3ecd4ddc188bb441690ea80cef39a06a875c9701 (patch) | |
tree | 4baa10dc663d18380857843629be0ab7b49d11c0 | |
parent | 2895f6edd9f6692d7941a84e30ca06254338dfa8 (diff) | |
download | context-3ecd4ddc188bb441690ea80cef39a06a875c9701.tar.gz |
beta 2012.05.22 01:22
27 files changed, 580 insertions, 154 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua index 305236509..f1138979e 100644 --- a/scripts/context/lua/mtx-context.lua +++ b/scripts/context/lua/mtx-context.lua @@ -621,6 +621,10 @@ scripts.context.aftersuffixes = { "pdf", "tuo", "tuc", "log" } +scripts.context.errorsuffixes = { + "log" +} + scripts.context.interfaces = { en = "cont-en", uk = "cont-uk", @@ -710,6 +714,56 @@ function scripts.context.closepdf(name,method) pdfview.close(file.replacesuffix(name,"pdf")) end +local function push_result_purge(oldbase,newbase) + for _, suffix in next, scripts.context.aftersuffixes do + local oldname = file.addsuffix(oldbase,suffix) + local newname = file.addsuffix(newbase,suffix) + os.remove(newname) + os.remove(oldname) + end +end + +local function push_result_keep(oldbase,newbase) + for _, suffix in next, scripts.context.beforesuffixes do + local oldname = file.addsuffix(oldbase,suffix) + local newname = file.addsuffix(newbase,suffix) + local tmpname = "keep-"..oldname + os.remove(tmpname) + os.rename(oldname,tmpname) + os.remove(oldname) + os.rename(newname,oldname) + end +end + +local function save_result_error(oldbase,newbase) + for _, suffix in next, scripts.context.errorsuffixes do + local oldname = file.addsuffix(oldbase,suffix) + local newname = file.addsuffix(newbase,suffix) + os.remove(newname) -- to be sure + os.rename(oldname,newname) + end +end + +local function save_result_purge(oldbase,newbase) + for _, suffix in next, scripts.context.aftersuffixes do + local oldname = file.addsuffix(oldbase,suffix) + local newname = file.addsuffix(newbase,suffix) + os.remove(newname) -- to be sure + os.rename(oldname,newname) + end +end + +local function save_result_keep(oldbase,newbase) + for _, suffix in next, scripts.context.aftersuffixes do + local oldname = file.addsuffix(oldbase,suffix) + local newname = file.addsuffix(newbase,suffix) + local tmpname = "keep-"..oldname + os.remove(newname) + os.rename(oldname,newname) + os.rename(tmpname,oldname) + end +end + function scripts.context.run(ctxdata,filename) -- filename overloads environment.files local files = (filename and { filename }) or environment.files @@ -812,22 +866,9 @@ function scripts.context.run(ctxdata,filename) newbase = file.removesuffix(resultname) if oldbase ~= newbase then if environment.argument("purgeresult") then - for _, suffix in next, scripts.context.aftersuffixes do - local oldname = file.addsuffix(oldbase,suffix) - local newname = file.addsuffix(newbase,suffix) - os.remove(newname) - os.remove(oldname) - end + push_result_purge(oldbase,newbase) else - for _, suffix in next, scripts.context.beforesuffixes do - local oldname = file.addsuffix(oldbase,suffix) - local newname = file.addsuffix(newbase,suffix) - local tmpname = "keep-"..oldname - os.remove(tmpname) - os.rename(oldname,tmpname) - os.remove(oldname) - os.rename(newname,oldname) - end + push_result_keep(oldbase,newbase) end else resultname = nil @@ -928,10 +969,16 @@ function scripts.context.run(ctxdata,filename) --~ end if not returncode then report("fatal error: no return code, message: %s",errorstring or "?") + if resultname then + save_result_error(oldbase,newbase) + end os.exit(1) break elseif returncode > 0 then report("fatal error: return code: %s",returncode or "?") + if resultname then + save_result_error(oldbase,newbase) + end os.exit(returncode) break else @@ -972,21 +1019,9 @@ function scripts.context.run(ctxdata,filename) if environment.argument("purgeresult") then -- so, if there is no result then we don't get the old one, but -- related files (log etc) are still there for tracing purposes - for _, suffix in next, scripts.context.aftersuffixes do - local oldname = file.addsuffix(oldbase,suffix) - local newname = file.addsuffix(newbase,suffix) - os.remove(newname) -- to be sure - os.rename(oldname,newname) - end + save_result_purge(oldbase,newbase) else - for _, suffix in next, scripts.context.aftersuffixes do - local oldname = file.addsuffix(oldbase,suffix) - local newname = file.addsuffix(newbase,suffix) - local tmpname = "keep-"..oldname - os.remove(newname) - os.rename(oldname,newname) - os.rename(tmpname,oldname) - end + save_result_keep(oldbase,newbase) end report("result renamed to: %s",newbase) end diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 335c4fcb9..a8bbca885 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -8112,7 +8112,7 @@ xml.tocdata(e,"error") </typing> --ldx]]-- -function xml.tocdata(e,wrapper) +function xml.tocdata(e,wrapper) -- a few more in the aux module local whatever = type(e) == "table" and xmltostring(e.dt) or e or "" if wrapper then whatever = format("<%s>%s</%s>",wrapper,whatever,wrapper) @@ -10095,6 +10095,36 @@ function xml.cdatatotext(e) end end +-- local x = xml.convert("<x><a>1<b>2</b>3</a></x>") +-- xml.texttocdata(xml.first(x,"a")) +-- print(x) -- <x><![CDATA[1<b>2</b>3]]></x> + +function xml.texttocdata(e) -- could be a finalizer + local dt = e.dt + local s = xml.tostring(dt) -- no shortcut? + e.tg = "@cd@" + e.special = true + e.ns = "" + e.rn = "" + e.dt = { s } + e.at = nil +end + +-- local x = xml.convert("<x><a>1<b>2</b>3</a></x>") +-- xml.tocdata(xml.first(x,"a")) +-- print(x) -- <x><![CDATA[<a>1<b>2</b>3</a>]]></x> + +function xml.elementtocdata(e) -- could be a finalizer + local dt = e.dt + local s = xml.tostring(e) -- no shortcut? + e.tg = "@cd@" + e.special = true + e.ns = "" + e.rn = "" + e.dt = { s } + e.at = nil +end + xml.builtinentities = table.tohash { "amp", "quot", "apos", "lt", "gt" } -- used often so share local entities = characters and characters.entities or nil @@ -10242,7 +10272,7 @@ if not modules then modules = { } end modules ['lxml-xml'] = { } local concat = table.concat -local find = string.find +local find, lower, upper = string.find, string.lower, string.upper local xml = xml @@ -10639,6 +10669,46 @@ function xml.textonly(e) -- no pattern return concat(textonly(e,{})) end +-- + +-- local x = xml.convert("<x><a x='+'>1<B>2</B>3</a></x>") +-- xml.filter(x,"**/lowerall()") print(x) +-- xml.filter(x,"**/upperall()") print(x) + +function finalizers.lowerall(collected) + for c=1,#collected do + local e = collected[c] + if not e.special then + e.tg = lower(e.tg) + local eat = e.at + if eat then + local t = { } + for k,v in next, eat do + t[lower(k)] = v + end + e.at = t + end + end + end +end + +function finalizers.upperall(collected) + for c=1,#collected do + local e = collected[c] + if not e.special then + e.tg = upper(e.tg) + local eat = e.at + if eat then + local t = { } + for k,v in next, eat do + t[upper(k)] = v + end + e.at = t + end + end + end +end + end -- of closure diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb index 2184447ce..8f5683985 100644 --- a/scripts/context/ruby/base/tex.rb +++ b/scripts/context/ruby/base/tex.rb @@ -74,7 +74,6 @@ class TEX @@backends = Hash.new @@mappaths = Hash.new @@runoptions = Hash.new - @@tcxflag = Hash.new @@draftoptions = Hash.new @@synctexcoptions = Hash.new @@texformats = Hash.new @@ -86,18 +85,18 @@ class TEX @@mpsprocstr = Hash.new @@texmethods = Hash.new @@mpsmethods = Hash.new - @@pdftex = 'pdftex' # new default, pdfetex is gone + @@pdftex = 'pdftex' @@platformslash = if System.unix? then "\\\\" else "\\" end - ['tex','etex','pdftex','pdfetex','standard'] .each do |e| @@texengines[e] = 'pdftex' end + ['tex','etex','pdftex','standard'] .each do |e| @@texengines[e] = 'pdftex' end ['aleph','omega'] .each do |e| @@texengines[e] = 'aleph' end ['xetex'] .each do |e| @@texengines[e] = 'xetex' end ['petex'] .each do |e| @@texengines[e] = 'petex' end ['metapost','mpost', 'standard'] .each do |e| @@mpsengines[e] = 'mpost' end - ['pdfetex','pdftex','pdf','pdftex','standard'] .each do |b| @@backends[b] = 'pdftex' end + ['pdftex','pdf','pdftex','standard'] .each do |b| @@backends[b] = 'pdftex' end ['dvipdfmx','dvipdfm','dpx','dpm'] .each do |b| @@backends[b] = 'dvipdfmx' end ['xetex','xtx'] .each do |b| @@backends[b] = 'xetex' end ['petex'] .each do |b| @@backends[b] = 'dvipdfmx' end @@ -108,7 +107,7 @@ class TEX ['xdv','xdv2pdf'] .each do |b| @@backends[b] = 'xdv2pdf' end ['tex','standard'] .each do |b| @@mappaths[b] = 'dvips' end - ['pdftex','pdfetex'] .each do |b| @@mappaths[b] = 'pdftex' end + ['pdftex'] .each do |b| @@mappaths[b] = 'pdftex' end ['aleph','omega','xetex','petex'] .each do |b| @@mappaths[b] = 'dvipdfmx' end ['dvipdfm', 'dvipdfmx', 'xdvipdfmx'] .each do |b| @@mappaths[b] = 'dvipdfmx' end ['xdv','xdv2pdf'] .each do |b| @@mappaths[b] = 'dvips' end @@ -131,8 +130,7 @@ class TEX ['plain','mpost'] .each do |f| @@mpsformats[f] = 'mpost' end ['metafun','context','standard'] .each do |f| @@mpsformats[f] = 'metafun' end - ['pdftex','pdfetex','aleph','omega','petex', - 'xetex'] .each do |p| @@prognames[p] = 'context' end + ['pdftex','aleph','omega','petex','xetex'] .each do |p| @@prognames[p] = 'context' end ['mpost'] .each do |p| @@prognames[p] = 'metafun' end ['latex','pdflatex'] .each do |p| @@prognames[p] = 'latex' end @@ -159,21 +157,13 @@ class TEX @@runoptions['aleph'] = ['--8bit'] @@runoptions['mpost'] = ['--8bit'] - @@runoptions['pdfetex'] = ['--8bit'] # obsolete - @@runoptions['pdftex'] = ['--8bit'] # pdftex is now pdfetex + @@runoptions['pdftex'] = ['--8bit'] # @@runoptions['petex'] = [] @@runoptions['xetex'] = ['--8bit','-output-driver="xdvipdfmx -E -d 4 -V 5"'] @@draftoptions['pdftex'] = ['--draftmode'] @@synctexcoptions['pdftex'] = ['--synctex=1'] @@synctexcoptions['xetex'] = ['--synctex=1'] - @@tcxflag['aleph'] = true - @@tcxflag['mpost'] = false - @@tcxflag['pdfetex'] = true - @@tcxflag['pdftex'] = true - @@tcxflag['petex'] = false - @@tcxflag['xetex'] = false - @@mainbooleanvars = [ 'batchmode', 'nonstopmode', 'fast', 'final', 'paranoid', 'notparanoid', 'nobanner', 'once', 'allpatterns', 'draft', @@ -423,7 +413,7 @@ class TEX def prefixed(format,engine) # format case engine - when /etex|pdftex|pdfetex|aleph|xetex/io then + when /etex|pdftex|aleph|xetex/io then "*#{format}" else format @@ -540,18 +530,21 @@ class TEX "--ini" end end - def tcxflag(engine) - if @@tcxflag[engine] then - file = "natural.tcx" - if Kpse.miktex? then - "-tcx=#{file}" - else - "-translate-file=#{file}" - end - else - "" - end - end + + # # obsolete + # + # def tcxflag(engine) + # if @@tcxflag[engine] then + # file = "natural.tcx" + # if Kpse.miktex? then + # "-tcx=#{file}" + # else + # "-translate-file=#{file}" + # end + # else + # "" + # end + # end def filestate(file) File.mtime(file).strftime("%d/%m/%Y %H:%M:%S") @@ -618,7 +611,7 @@ class TEX texformats.each do |texformat| report("generating tex format #{texformat}") progname = validprogname([getvariable('progname'),texformat,texengine]) - runcommand([quoted(texengine),prognameflag(progname),iniflag,tcxflag(texengine),prefixed(texformat,texengine),texmakeextras(texformat)]) + runcommand([quoted(texengine),prognameflag(progname),iniflag,prefixed(texformat,texengine),texmakeextras(texformat)]) end else report("unable to make format due to lack of permissions") @@ -643,7 +636,6 @@ class TEX mpsformats.each do |mpsformat| report("generating mps format #{mpsformat}") progname = validprogname([getvariable('progname'),mpsformat,mpsengine]) - # if not runcommand([quoted(mpsengine),prognameflag(progname),iniflag,tcxflag(mpsengine),runoptions(mpsengine),mpsformat,mpsmakeextras(mpsformat)]) then if not runcommand([quoted(mpsengine),prognameflag(progname),iniflag,runoptions(mpsengine),mpsformat,mpsmakeextras(mpsformat)]) then setvariable('error','no format made') end @@ -717,7 +709,7 @@ class TEX f.close if FileTest.file?(tempfilename('tex')) then format = File.basename(name) - engine = if name =~ /(pdftex|pdfetex|aleph|xetex)[\/\\]#{format}/ then $1 else '' end + engine = if name =~ /(pdftex|aleph|xetex)[\/\\]#{format}/ then $1 else '' end if engine.empty? then engineflag = "" else @@ -816,14 +808,14 @@ class TEX end end - private # will become baee/context + private # will become base/context @@preamblekeys = [ ['tex','texengine'], ['engine','texengine'], ['program','texengine'], - ['translate','tcxfilter'], - ['tcx','tcxfilter'], + # ['translate','tcxfilter'], + # ['tcx','tcxfilter'], ['output','backend'], ['mode','mode'], ['ctx','ctxfile'], @@ -1503,7 +1495,7 @@ end if texengine && texformat then fixbackendvars(@@mappaths[texengine]) progname = validprogname([getvariable('progname'),texformat,texengine]) - runcommand([quoted(texengine),prognameflag(progname),formatflag(texengine,texformat),tcxflag(texengine),runoptions(texengine),filename,texprocextras(texformat)]) + runcommand([quoted(texengine),prognameflag(progname),formatflag(texengine,texformat),runoptions(texengine),filename,texprocextras(texformat)]) else false end @@ -1517,7 +1509,6 @@ end ENV["MPXCOMMAND"] = "0" unless mpx progname = validprogname([getvariable('progname'),mpsformat,mpsengine]) mpname.gsub!(/\.mp$/,"") # temp bug in mp - # runcommand([quoted(mpsengine),prognameflag(progname),formatflag(mpsengine,mpsformat),tcxflag(mpsengine),runoptions(mpsengine),mpname,mpsprocextras(mpsformat)]) runcommand([quoted(mpsengine),prognameflag(progname),formatflag(mpsengine,mpsformat),runoptions(mpsengine),mpname,mpsprocextras(mpsformat)]) true else diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 335c4fcb9..a8bbca885 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -8112,7 +8112,7 @@ xml.tocdata(e,"error") </typing> --ldx]]-- -function xml.tocdata(e,wrapper) +function xml.tocdata(e,wrapper) -- a few more in the aux module local whatever = type(e) == "table" and xmltostring(e.dt) or e or "" if wrapper then whatever = format("<%s>%s</%s>",wrapper,whatever,wrapper) @@ -10095,6 +10095,36 @@ function xml.cdatatotext(e) end end +-- local x = xml.convert("<x><a>1<b>2</b>3</a></x>") +-- xml.texttocdata(xml.first(x,"a")) +-- print(x) -- <x><![CDATA[1<b>2</b>3]]></x> + +function xml.texttocdata(e) -- could be a finalizer + local dt = e.dt + local s = xml.tostring(dt) -- no shortcut? + e.tg = "@cd@" + e.special = true + e.ns = "" + e.rn = "" + e.dt = { s } + e.at = nil +end + +-- local x = xml.convert("<x><a>1<b>2</b>3</a></x>") +-- xml.tocdata(xml.first(x,"a")) +-- print(x) -- <x><![CDATA[<a>1<b>2</b>3</a>]]></x> + +function xml.elementtocdata(e) -- could be a finalizer + local dt = e.dt + local s = xml.tostring(e) -- no shortcut? + e.tg = "@cd@" + e.special = true + e.ns = "" + e.rn = "" + e.dt = { s } + e.at = nil +end + xml.builtinentities = table.tohash { "amp", "quot", "apos", "lt", "gt" } -- used often so share local entities = characters and characters.entities or nil @@ -10242,7 +10272,7 @@ if not modules then modules = { } end modules ['lxml-xml'] = { } local concat = table.concat -local find = string.find +local find, lower, upper = string.find, string.lower, string.upper local xml = xml @@ -10639,6 +10669,46 @@ function xml.textonly(e) -- no pattern return concat(textonly(e,{})) end +-- + +-- local x = xml.convert("<x><a x='+'>1<B>2</B>3</a></x>") +-- xml.filter(x,"**/lowerall()") print(x) +-- xml.filter(x,"**/upperall()") print(x) + +function finalizers.lowerall(collected) + for c=1,#collected do + local e = collected[c] + if not e.special then + e.tg = lower(e.tg) + local eat = e.at + if eat then + local t = { } + for k,v in next, eat do + t[lower(k)] = v + end + e.at = t + end + end + end +end + +function finalizers.upperall(collected) + for c=1,#collected do + local e = collected[c] + if not e.special then + e.tg = upper(e.tg) + local eat = e.at + if eat then + local t = { } + for k,v in next, eat do + t[upper(k)] = v + end + e.at = t + end + end + end +end + end -- of closure diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 335c4fcb9..a8bbca885 100755 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -8112,7 +8112,7 @@ xml.tocdata(e,"error") </typing> --ldx]]-- -function xml.tocdata(e,wrapper) +function xml.tocdata(e,wrapper) -- a few more in the aux module local whatever = type(e) == "table" and xmltostring(e.dt) or e or "" if wrapper then whatever = format("<%s>%s</%s>",wrapper,whatever,wrapper) @@ -10095,6 +10095,36 @@ function xml.cdatatotext(e) end end +-- local x = xml.convert("<x><a>1<b>2</b>3</a></x>") +-- xml.texttocdata(xml.first(x,"a")) +-- print(x) -- <x><![CDATA[1<b>2</b>3]]></x> + +function xml.texttocdata(e) -- could be a finalizer + local dt = e.dt + local s = xml.tostring(dt) -- no shortcut? + e.tg = "@cd@" + e.special = true + e.ns = "" + e.rn = "" + e.dt = { s } + e.at = nil +end + +-- local x = xml.convert("<x><a>1<b>2</b>3</a></x>") +-- xml.tocdata(xml.first(x,"a")) +-- print(x) -- <x><![CDATA[<a>1<b>2</b>3</a>]]></x> + +function xml.elementtocdata(e) -- could be a finalizer + local dt = e.dt + local s = xml.tostring(e) -- no shortcut? + e.tg = "@cd@" + e.special = true + e.ns = "" + e.rn = "" + e.dt = { s } + e.at = nil +end + xml.builtinentities = table.tohash { "amp", "quot", "apos", "lt", "gt" } -- used often so share local entities = characters and characters.entities or nil @@ -10242,7 +10272,7 @@ if not modules then modules = { } end modules ['lxml-xml'] = { } local concat = table.concat -local find = string.find +local find, lower, upper = string.find, string.lower, string.upper local xml = xml @@ -10639,6 +10669,46 @@ function xml.textonly(e) -- no pattern return concat(textonly(e,{})) end +-- + +-- local x = xml.convert("<x><a x='+'>1<B>2</B>3</a></x>") +-- xml.filter(x,"**/lowerall()") print(x) +-- xml.filter(x,"**/upperall()") print(x) + +function finalizers.lowerall(collected) + for c=1,#collected do + local e = collected[c] + if not e.special then + e.tg = lower(e.tg) + local eat = e.at + if eat then + local t = { } + for k,v in next, eat do + t[lower(k)] = v + end + e.at = t + end + end + end +end + +function finalizers.upperall(collected) + for c=1,#collected do + local e = collected[c] + if not e.special then + e.tg = upper(e.tg) + local eat = e.at + if eat then + local t = { } + for k,v in next, eat do + t[upper(k)] = v + end + e.at = t + end + end + end +end + end -- of closure diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua index 08f1a303f..747e2116f 100644 --- a/tex/context/base/colo-ini.lua +++ b/tex/context/base/colo-ini.lua @@ -835,3 +835,45 @@ commands.startcolorset = colors.pushset commands.stopcolorset = colors.popset commands.usecolors = colors.usecolors + +-- bonus + +function commands.pgfxcolorspec(ca) -- {}{}{colorspace}{list} + -- local cv = attributes.colors.values[ca] + local cv = colorvalues[ca] + if cv then + local model = cv[1] + if model == 2 then + context("{gray}{%1.3f}",cv[2]) + elseif model == 3 then + context("{rgb}{%1.3f,%1.3f,%1.3f}",cv[3],cv[4],cv[5]) + elseif model == 4 then + context("{cmyk}{%1.3f,%1.3f,%1.3f,%1.3f}",cv[6],cv[7],cv[8],cv[9]) + else + context("{gray}{%1.3f}",cv[2]) + end + else + context("{gray}{0}") + end +end + +-- function commands.pgfregistercolor(name,attribute) +-- local cv = colorvalues[ca] +-- context.pushcatcodes('prt') +-- if cv then +-- local model = forcedmodel(cv[1]) +-- if model == 2 then +-- context["pgfutil@definecolor"]("{%s}{gray}{%1.3f}",name,cv[2]) +-- elseif model == 3 then +-- context["pgfutil@definecolor"]("{%s}{rgb}{%1.3f,%1.3f,%1.3f}",name,cv[3],cv[4],cv[5]) +-- elseif model == 4 then +-- context["pgfutil@definecolor"]("{%s}{cmyk}{%1.3f,%1.3f,%1.3f,%1.3f}",name,cv[6],cv[7],cv[8],cv[9]) +-- else +-- context["pgfutil@definecolor"]("{%s}{gray}{0}",name) +-- end +-- else +-- context["pgfutil@definecolor"]("{%s}{gray}{0}",name) +-- end +-- context.popcatcodes() +-- end + diff --git a/tex/context/base/colo-ini.mkii b/tex/context/base/colo-ini.mkii index f14f1e15e..56b9d14da 100644 --- a/tex/context/base/colo-ini.mkii +++ b/tex/context/base/colo-ini.mkii @@ -2693,6 +2693,18 @@ \def\dointernalspotcolorname#1:#2:#3:#4:#5:#6:#7:#8\end{\if#1P\ifcase0#3 #1\else#2\fi\else#1\fi} \def\dointernalspotcolorsize#1:#2:#3:#4:#5:#6:#7:#8\end{\if#1P\ifcase0#3 0\else#3\fi\else 0\fi} +%D Because it's a persitent issue, we also provide + +\def\pgf@context@registercolor#1% + {\handlecolorwith\pgf@context@registercolor@indeed\csname\??cr#1\endcsname:::::::>#1\end} + +\def\pgf@context@registercolor@indeed#1:#2:#3:#4:#5:#6>#7\end + {\setevalue{\string\color@#7}{\noexpand\xcolor@{}{}% + \if#1R{rgb}{#2,#3,#4}\else + \if#1C{cmyk}{#2,#3,#4,#5}\else + \if#1S{gray}{#2}\else + {gray}{0}\fi\fi\fi}} + %D Slow but ok \unknown \def\colorcomponents#1% might be broken diff --git a/tex/context/base/colo-ini.mkiv b/tex/context/base/colo-ini.mkiv index 21d70decb..5721bb513 100644 --- a/tex/context/base/colo-ini.mkiv +++ b/tex/context/base/colo-ini.mkiv @@ -738,6 +738,15 @@ %D %D \stopmode +\def\pgf@context@registercolor#1% bonus macro + {\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\ctxcommand{pgfxcolorspec(\thecolorattribute{#1})}}} + +%D \starttyping +%D \ifdefined\pgf@context@registercolor +%D \let\pgfutil@registercolor\pgf@context@registercolor +%D \fi +%D \stoptyping + %D \macros %D {doifcolorelse, doifcolor} %D diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 165cf971f..2cdbdb2cc 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.05.18 23:50} +\newcontextversion{2012.05.22 01:22} %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/cont-new.mkiv b/tex/context/base/cont-new.mkiv index b6532341c..462c58037 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.05.18 23:50} +\newcontextversion{2012.05.22 01:22} %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-version.pdf b/tex/context/base/context-version.pdf Binary files differindex a85b09e0b..0077d3618 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex 65df0f2da..1ff16a0eb 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index a3abacbe7..6377f0513 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2012.05.18 23:50} +\edef\contextversion{2012.05.22 01:22} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 755d807ee..6f60b734c 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -23,7 +23,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2012.05.18 23:50} +\edef\contextversion{2012.05.22 01:22} %D For those who want to use this: diff --git a/tex/context/base/font-ini.mkvi b/tex/context/base/font-ini.mkvi index f581a1685..61fa7afd1 100644 --- a/tex/context/base/font-ini.mkvi +++ b/tex/context/base/font-ini.mkvi @@ -1441,13 +1441,6 @@ % the rest is a size, although in practice one will seldom define the size directly. We might even % drop that as it gives faster code. -% \unexpanded\def\font_basics_define_body_font_nop_xx[#one#two#rest=#value]% local -% {\ifcsname\m_font_asked_style#one#two#rest\endcsname\else\font_basics_check_fontname_combination\m_font_asked_style{#one#two}{#rest}\fi -% \expandafter\let\csname\??fontinstanceclass\m_font_asked_body-\m_font_asked_style-#one#two-#rest\endcsname\undefined -% \unexpanded\expandafter\normaledef\csname\??fontinstanceready\m_font_asked_body-\m_font_asked_style-#one#two-#rest\endcsname -% {\font_helpers_trigger{\m_font_asked_body-\m_font_asked_style-#one#two#rest}{\noexpand\font_rscale_xx{\m_font_asked_style}}{\m_font_asked_body}{\normalunexpanded{#value}}}% -% } - \unexpanded\def\font_basics_define_body_font_nop_xx[#one#two#rest=#value]% local {\ifcsname\m_font_asked_style#one#two#rest\endcsname\else\font_basics_check_fontname_combination\m_font_asked_style{#one#two}{#rest}\fi \expandafter\let\csname\??fontinstanceclass\m_font_asked_body-\m_font_asked_style-#one#two-#rest-0\endcsname\undefined @@ -1461,15 +1454,6 @@ {\font_helpers_trigger{\m_font_asked_body-\m_font_asked_style-#one#two#rest}{\noexpand\font_rscale_xx{\m_font_asked_style}}{\m_font_asked_body}{\normalunexpanded{#value}}}% } -% \writestatus{fonts}{define \m_asked_style\space nop: \expandafter\meaning\csname\m_font_asked_body\m_font_asked_style#one#two#rest\endcsname}% - -% \unexpanded\def\font_basics_define_body_font_yes_xx[#one#two#rest=#value]% global -% {\ifcsname\m_font_asked_style#one#two#rest\endcsname\else\font_basics_check_fontname_combination\m_font_asked_style{#one#two}{#rest}\fi -% \global\expandafter\let\csname\??fontinstanceclass\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest\endcsname\undefined -% \unexpanded\expandafter\normalxdef\csname\??fontinstanceready\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest\endcsname -% {\font_helpers_trigger{\m_font_asked_body-\m_font_asked_style-#one#two#rest}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}% -% } - \unexpanded\def\font_basics_define_body_font_yes_xx[#one#two#rest=#value]% global {\ifcsname\m_font_asked_style#one#two#rest\endcsname\else\font_basics_check_fontname_combination\m_font_asked_style{#one#two}{#rest}\fi \global\expandafter\let\csname\??fontinstanceclass\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest-1\endcsname\undefined @@ -1677,7 +1661,7 @@ \else \setcurrentfontclass\m_font_keyword \ifcase#method\relax - \let\globalfontclass\globalfontclass + \let\globalfontclass\globalfontclass % -) \else \let\globalfontclass\fontclass \fi diff --git a/tex/context/base/font-mat.mkvi b/tex/context/base/font-mat.mkvi index 7ef0f2b77..c8ab45b75 100644 --- a/tex/context/base/font-mat.mkvi +++ b/tex/context/base/font-mat.mkvi @@ -167,10 +167,38 @@ \font_helpers_set_math_family_bold_indeed#mbfam#familytag#mrfam% \fi} +%D It can happen that we use a bodyfont with no math in which case +%D we have a problem with setting the global bodyfont size in the +%D page builder. For instance in: +%D +%D \starttext +%D \definetypeface[test][rm][serif][pagella][default] +%D \setupbodyfont[test] +%D test +%D \stoptext +%D +%D This is why we need the check: + +% \def\font_helpers_preset_math_family_indeed#fam#familytag% +% {\expandafter\ifx\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname\relax +% \writestatus{fonts}{math: unset for global bodyfont \fontclass\space at \fontbody}% +% \else +% \scriptscriptfont#fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-3\endcsname +% \scriptfont #fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-2\endcsname +% \textfont #fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname +% \fi} +% +% Uglier but more efficient (esp in tracing): + \def\font_helpers_preset_math_family_indeed#fam#familytag% - {\scriptscriptfont#fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-3\endcsname - \scriptfont #fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-2\endcsname - \textfont #fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname} + {\expandafter\let\expandafter\v_font_math_one\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname + \ifx\v_font_math_one\relax + \writestatus{fonts}{math: unset for global bodyfont \fontclass\space at \fontbody}% + \else + \scriptscriptfont#fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-3\endcsname + \scriptfont #fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-2\endcsname + \textfont #fam\v_font_math_one + \fi} \let\font_helpers_reset_fontclass_math_families\gobbleoneargument diff --git a/tex/context/base/grph-inc.lua b/tex/context/base/grph-inc.lua index 15aff8925..8a9fd6b47 100644 --- a/tex/context/base/grph-inc.lua +++ b/tex/context/base/grph-inc.lua @@ -1083,6 +1083,7 @@ end local function runprogram(template,binary,...) local command = format(template,binary,...) + local binary = match(binary,"[%S]+") -- to be sure if os.which(binary) then if trace_conversion or trace_programs then report_inclusion("running: %s",command) @@ -1166,7 +1167,6 @@ local gifconverter = { } converters.gif = gifconverter programs.convert = { - -- command = "convert" -- imagemagick command = "gm convert" -- graphicmagick } diff --git a/tex/context/base/lxml-aux.lua b/tex/context/base/lxml-aux.lua index 7df6179a0..09411bfc0 100644 --- a/tex/context/base/lxml-aux.lua +++ b/tex/context/base/lxml-aux.lua @@ -559,6 +559,36 @@ function xml.cdatatotext(e) end end +-- local x = xml.convert("<x><a>1<b>2</b>3</a></x>") +-- xml.texttocdata(xml.first(x,"a")) +-- print(x) -- <x><![CDATA[1<b>2</b>3]]></x> + +function xml.texttocdata(e) -- could be a finalizer + local dt = e.dt + local s = xml.tostring(dt) -- no shortcut? + e.tg = "@cd@" + e.special = true + e.ns = "" + e.rn = "" + e.dt = { s } + e.at = nil +end + +-- local x = xml.convert("<x><a>1<b>2</b>3</a></x>") +-- xml.tocdata(xml.first(x,"a")) +-- print(x) -- <x><![CDATA[<a>1<b>2</b>3</a>]]></x> + +function xml.elementtocdata(e) -- could be a finalizer + local dt = e.dt + local s = xml.tostring(e) -- no shortcut? + e.tg = "@cd@" + e.special = true + e.ns = "" + e.rn = "" + e.dt = { s } + e.at = nil +end + xml.builtinentities = table.tohash { "amp", "quot", "apos", "lt", "gt" } -- used often so share local entities = characters and characters.entities or nil diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua index 0a43f4352..fddd55a09 100644 --- a/tex/context/base/lxml-tab.lua +++ b/tex/context/base/lxml-tab.lua @@ -1312,7 +1312,7 @@ xml.tocdata(e,"error") </typing> --ldx]]-- -function xml.tocdata(e,wrapper) +function xml.tocdata(e,wrapper) -- a few more in the aux module local whatever = type(e) == "table" and xmltostring(e.dt) or e or "" if wrapper then whatever = format("<%s>%s</%s>",wrapper,whatever,wrapper) diff --git a/tex/context/base/lxml-xml.lua b/tex/context/base/lxml-xml.lua index 7e7922cfb..d0e256078 100644 --- a/tex/context/base/lxml-xml.lua +++ b/tex/context/base/lxml-xml.lua @@ -7,7 +7,7 @@ if not modules then modules = { } end modules ['lxml-xml'] = { } local concat = table.concat -local find = string.find +local find, lower, upper = string.find, string.lower, string.upper local xml = xml @@ -403,3 +403,43 @@ end function xml.textonly(e) -- no pattern return concat(textonly(e,{})) end + +-- + +-- local x = xml.convert("<x><a x='+'>1<B>2</B>3</a></x>") +-- xml.filter(x,"**/lowerall()") print(x) +-- xml.filter(x,"**/upperall()") print(x) + +function finalizers.lowerall(collected) + for c=1,#collected do + local e = collected[c] + if not e.special then + e.tg = lower(e.tg) + local eat = e.at + if eat then + local t = { } + for k,v in next, eat do + t[lower(k)] = v + end + e.at = t + end + end + end +end + +function finalizers.upperall(collected) + for c=1,#collected do + local e = collected[c] + if not e.special then + e.tg = upper(e.tg) + local eat = e.at + if eat then + local t = { } + for k,v in next, eat do + t[upper(k)] = v + end + e.at = t + end + end + end +end diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 9327292a4..a8dc4b054 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 38c7dde20..056f5e83f 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/strc-con.mkvi b/tex/context/base/strc-con.mkvi index 3068fda0b..cc4278b1e 100644 --- a/tex/context/base/strc-con.mkvi +++ b/tex/context/base/strc-con.mkvi @@ -233,6 +233,7 @@ \constructionparameter\c!before \begingroup \edef\currentconstructionalternative{\constructionparameter\c!alternative}% + \checkconstructionalternativeparent % this catches an unknown alternative \doadaptleftskip{\constructionparameter\c!margin}% \setlocalhsize % so we can use \localhsize in width assignments \constructionsheaddistance\constructionalternativeparameter\c!distance\relax diff --git a/tex/context/base/strc-des.mkvi b/tex/context/base/strc-des.mkvi index 1b29c864f..f2943d0f9 100644 --- a/tex/context/base/strc-des.mkvi +++ b/tex/context/base/strc-des.mkvi @@ -95,6 +95,8 @@ % \startdescription [reference]{title} text \stopdescription % \startdescription [title=,title=,reference=] text \stopdescription +% A bit over the top, the optional title but mkii has it too. + \unexpanded\def\strc_descriptions_start#1% {\begingroup \strc_constructions_initialize{#1}% @@ -114,7 +116,17 @@ \expandafter\strc_descriptions_start_yes_normal \fi} -\unexpanded\def\strc_descriptions_start_yes_titled[#1]#2% todo userdata +% \unexpanded\def\strc_descriptions_start_yes_titled[#1]#2% todo userdata +% {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=][]% +% \csname\??constructionstarthandler\currentconstructionhandler\endcsname} + +\unexpanded\def\strc_descriptions_start_yes_titled[#1]% + {\doifnextbgroupelse + {\strc_descriptions_start_yes_titled_indeed[#1]}% + {\setfalse\c_strc_constructions_title_state + \strc_descriptions_start_yes_normal[#1]}} + +\unexpanded\def\strc_descriptions_start_yes_titled_indeed[#1]#2% todo userdata {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=][]% \csname\??constructionstarthandler\currentconstructionhandler\endcsname} @@ -129,7 +141,18 @@ \expandafter\strc_descriptions_start_nop_normal \fi} -\unexpanded\def\strc_descriptions_start_nop_titled#1% +% \unexpanded\def\strc_descriptions_start_nop_titled#1% +% {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#1},\c!bookmark=,\c!list=][]% +% \csname\??constructionstarthandler\currentconstructionhandler\endcsname} +% \csname\??constructionstarthandler\currentconstructionhandler\endcsname} + +\unexpanded\def\strc_descriptions_start_nop_titled + {\doifnextbgroupelse + {\strc_descriptions_start_nop_titled_indeed}% + {\setfalse\c_strc_constructions_title_state + \strc_descriptions_start_nop_normal}}% + +\unexpanded\def\strc_descriptions_start_nop_titled_indeed#1% {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#1},\c!bookmark=,\c!list=][]% \csname\??constructionstarthandler\currentconstructionhandler\endcsname} @@ -159,6 +182,16 @@ {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=][]% \csname\??constructioncommandhandler\currentconstructionhandler\endcsname} +\unexpanded\def\strc_descriptions_yes_titled[#1]% + {\doifnextbgroupelse + {\strc_descriptions_yes_titled_indeed[#1]}% + {\setfalse\c_strc_constructions_title_state + \strc_descriptions_yes_normal[#1]}} + +\unexpanded\def\strc_descriptions_yes_titled_indeed[#1]#2% + {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=][]% + \csname\??constructioncommandhandler\currentconstructionhandler\endcsname} + \unexpanded\def\strc_descriptions_yes_normal[#1]% {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title=,\c!bookmark=,\c!list=][]% \csname\??constructioncommandhandler\currentconstructionhandler\endcsname} @@ -170,7 +203,17 @@ \expandafter\strc_descriptions_nop_normal \fi} -\unexpanded\def\strc_descriptions_nop_titled#1% +% \unexpanded\def\strc_descriptions_nop_titled#1% +% {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#1},\c!bookmark=,\c!list=][]% +% \csname\??constructioncommandhandler\currentconstructionhandler\endcsname} + +\unexpanded\def\strc_descriptions_nop_titled + {\doifnextbgroupelse + {\strc_descriptions_nop_titled_yes_indeed}% + {\setfalse\c_strc_constructions_title_state + \strc_descriptions_nop_normal}} + +\unexpanded\def\strc_descriptions_nop_titled_indeed#1% {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#1},\c!bookmark=,\c!list=][]% \csname\??constructioncommandhandler\currentconstructionhandler\endcsname} diff --git a/tex/context/base/strc-not.mkvi b/tex/context/base/strc-not.mkvi index 5f1f041e3..20a664420 100644 --- a/tex/context/base/strc-not.mkvi +++ b/tex/context/base/strc-not.mkvi @@ -242,7 +242,7 @@ {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#1},\c!bookmark=,\c!list=][]% \csname\??constructionnotehandler\currentconstructionhandler\endcsname \strc_constructions_finalize - \endgroup} + \normalexpanded{\endgroup\noteparameter\c!next}} \unexpanded\def\strc_notations_command_yes[#1]% {\doifassignmentelse{#1}\strc_notations_command_assignment\strc_notations_command_argument[#1]} @@ -251,13 +251,13 @@ {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,#1][]% \csname\??constructionnotehandler\currentconstructionhandler\endcsname \strc_constructions_finalize - \endgroup} + \normalexpanded{\endgroup\noteparameter\c!next}} \unexpanded\def\strc_notations_command_argument[#1]#2% {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=][]% \csname\??constructionnotehandler\currentconstructionhandler\endcsname \strc_constructions_finalize - \endgroup} + \normalexpanded{\endgroup\noteparameter\c!next}} \unexpanded\def\strc_notations_start#1#2% {\begingroup @@ -272,13 +272,13 @@ {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=][]% \csname\??constructionnotehandler\currentconstructionhandler\endcsname \strc_constructions_finalize - \endgroup} + \normalexpanded{\endgroup\noteparameter\c!next}} \unexpanded\def\strc_notations_start_nop#1% {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#1},\c!bookmark=,\c!list=][]% \csname\??constructionnotehandler\currentconstructionhandler\endcsname \strc_constructions_finalize - \endgroup} + \normalexpanded{\endgroup\noteparameter\c!next}} \unexpanded\def\strc_notations_stop {} @@ -863,7 +863,7 @@ \installcorenamespace{notepositionvariant} \installcorenamespace{notelocation} -% \newconditional\c_strc_notes_delayed +\newconditional\c_strc_notes_delayed \setvalue{\??notelocation\v!page }{\letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_page} \setvalue{\??notelocation\v!columns }{\letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_columns} @@ -910,7 +910,7 @@ \fi} \def\strc_notes_set_location_page - {%\setfalse\c_strc_notes_delayed + {\setfalse\c_strc_notes_delayed \strc_notes_set_distance \strc_notes_set_columns \global\count\currentnoteins\numexpr\plusthousand/\c_strc_notes_columns\relax @@ -918,7 +918,7 @@ \global\skip \currentnoteins\s_strc_notes_distance} \def\strc_notes_set_location_columns - {%\setfalse\c_strc_notes_delayed + {\setfalse\c_strc_notes_delayed \strc_notes_set_distance \strc_notes_set_columns \ifnum\currentnofcolumns=\zerocount @@ -929,7 +929,7 @@ \global\skip \currentnoteins\s_strc_notes_distance} \def\strc_notes_set_location_firstcolumn - {%\setfalse\c_strc_notes_delayed + {\setfalse\c_strc_notes_delayed \strc_notes_set_distance \strc_notes_set_columns \global\count\currentnoteins\plusthousand @@ -939,7 +939,7 @@ \let\strc_notes_set_location_lastcolumn\strc_notes_set_location_firstcolumn \def\strc_notes_set_location_text % we don't use inserts anyway (e.g. endnotes) - {%\settrue\c_strc_notes_delayed + {\settrue\c_strc_notes_delayed \ctxlua{structures.notes.setstate("\currentnote","store")}% \global\dimen\currentnoteins\maxdimen \global\count\currentnoteins\zerocount @@ -1185,9 +1185,10 @@ {\strc_notes_process\strc_notes_place_inserts} \def\strc_notes_place_inserts - {%\ifconditional\c_strc_notes_delayed \else - \ifdim\ht\currentnoteins>\zeropoint % or a faster delayed test - \strc_notes_place_inserts_indeed + {\ifconditional\c_strc_notes_delayed \else + \ifdim\ht\currentnoteins>\zeropoint % or a faster delayed test + \strc_notes_place_inserts_indeed + \fi \fi} \def\strc_notes_place_inserts_indeed diff --git a/tex/context/base/type-imp-latinmodern.mkiv b/tex/context/base/type-imp-latinmodern.mkiv index f5a32fad1..698834a4b 100644 --- a/tex/context/base/type-imp-latinmodern.mkiv +++ b/tex/context/base/type-imp-latinmodern.mkiv @@ -28,44 +28,6 @@ \starttypescriptcollection[latinmodern] - \starttypescript [modern-designsize] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto] - \quittypescriptscanning - \stoptypescript - - \starttypescript [modern,modern-base] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern] [\s!default] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [modernvariable,modern-variable] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern-variable] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern-variable] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [modernvariablelight,modern-variable-light] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern-variable-light] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern-variable-light] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] - \quittypescriptscanning - \stoptypescript - - \starttypescript [modern-mono,modern-base-mono] - \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern] [\s!default] - \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] - \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern-light] [\s!default] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] - \quittypescriptscanning - \stoptypescript - \starttypescript [\s!serif] [simple] [\s!name]% for old times sake (manuals) \definefontsynonym [\s!Simple] [\s!file:lmmonoproplt10-regular] [\s!features=\s!default] \stoptypescript @@ -213,6 +175,44 @@ \definefontsynonym [LMMathRoman-Bold] [\v!file:lmmath-regular.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=lm] \stoptypescript + \starttypescript [modern-designsize] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto] + \quittypescriptscanning + \stoptypescript + + \starttypescript [modern,modern-base] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern] [\s!default] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] + \quittypescriptscanning + \stoptypescript + + \starttypescript [modernvariable,modern-variable] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern-variable] [\s!default] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern-variable] [\s!default] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] + \quittypescriptscanning + \stoptypescript + + \starttypescript [modernvariablelight,modern-variable-light] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern-variable-light] [\s!default] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern-variable-light] [\s!default] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] + \quittypescriptscanning + \stoptypescript + + \starttypescript [modern-mono,modern-base-mono] + \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern] [\s!default] + \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] + \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern-light] [\s!default] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] + \quittypescriptscanning + \stoptypescript + \stoptypescriptcollection %D It doesn't hurt to have these, at least for the moment (can go to type-imp-symbol) diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 1b65dbffd..51988e521 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 05/18/12 23:50:46 +-- merge date : 05/22/12 01:22:21 do -- begin closure to overcome local limits and interference |