From 8c0bb98e13632d6caf24fd08261ff4bca4fdd4eb Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 12 May 2010 18:43:00 +0200 Subject: beta 2010.05.12 18:43 --- scripts/context/lua/luatools.lua | 27 +- scripts/context/lua/mtx-mptopdf.lua | 2 +- scripts/context/lua/mtx-update.lua | 1 + scripts/context/lua/mtxrun.lua | 27 +- scripts/context/stubs/mswin/luatools.lua | 27 +- scripts/context/stubs/mswin/mtxrun.lua | 27 +- scripts/context/stubs/unix/luatools | 27 +- scripts/context/stubs/unix/mtxrun | 27 +- tex/context/base/back-pdf.lua | 1 + tex/context/base/bibl-tra.mkiv | 1 - tex/context/base/buff-ini.lua | 15 +- tex/context/base/buff-ver.mkiv | 75 +- tex/context/base/colo-ini.lua | 6 +- tex/context/base/cont-new.tex | 2 +- tex/context/base/context-characters.lmx | 2 +- tex/context/base/context-debug.lmx | 2 +- tex/context/base/context-error.lmx | 2 +- tex/context/base/context-fonttest.lmx | 2 +- tex/context/base/context-help.lmx | 2 +- tex/context/base/context-timing.lmx | 2 +- tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/context.tex | 2 +- tex/context/base/core-def.mkiv | 2 +- tex/context/base/core-uti.lua | 1 + tex/context/base/data-res.lua | 10 +- tex/context/base/enco-ini.mkiv | 19 +- tex/context/base/font-col.mkiv | 2 + tex/context/base/font-ini.mkiv | 193 +--- tex/context/base/l-lpeg.lua | 20 + tex/context/base/lang-ini.lua | 226 +---- tex/context/base/lang-ini.mkiv | 31 +- tex/context/base/lang-wrd.lua | 185 ++++ tex/context/base/lang-wrd.mkiv | 47 + tex/context/base/lpdf-ini.lua | 35 +- tex/context/base/luat-ini.lua | 6 + tex/context/base/luat-ini.mkiv | 10 +- tex/context/base/m-database.tex | 25 +- tex/context/base/math-ini.mkiv | 10 +- tex/context/base/mtx-context-arrange.tex | 10 +- tex/context/base/mtx-context-combine.tex | 70 +- tex/context/base/mtx-context-common.tex | 43 + tex/context/base/mtx-context-ideas.tex | 2 - tex/context/base/mtx-context-listing.tex | 74 +- tex/context/base/mtx-context-timing.tex | 2 - tex/context/base/mult-cld.lua | 40 +- tex/context/base/mult-de.tex | 2 + tex/context/base/mult-def.lua | 8 + tex/context/base/mult-en.tex | 2 + tex/context/base/mult-fr.tex | 2 + tex/context/base/mult-ini.mkiv | 5 + tex/context/base/mult-it.tex | 2 + tex/context/base/mult-nl.tex | 2 + tex/context/base/mult-ro.tex | 2 + tex/context/base/pack-rul.mkiv | 8 +- tex/context/base/page-lin.lua | 20 +- tex/context/base/page-lin.mkiv | 159 ++-- tex/context/base/page-mar.mkiv | 3 - tex/context/base/pret-lua.lua | 4 + tex/context/base/s-abr-01.tex | 7 +- tex/context/base/s-map-10.tex | 3 +- tex/context/base/scrn-fld.mkiv | 4 +- tex/context/base/spac-hor.mkiv | 2 +- tex/context/base/spac-ver.lua | 2 + tex/context/base/strc-mat.mkiv | 20 +- tex/context/base/supp-dir.mkiv | 20 + tex/context/base/supp-mat.mkii | 293 ++++++ tex/context/base/supp-mat.mkiv | 293 ++++++ tex/context/base/supp-mat.tex | 293 ------ tex/context/base/type-ini.mkiv | 102 ++- tex/context/base/type-otf.mkiv | 223 +++-- tex/context/interface/cont-cs.xml | 12 +- tex/context/interface/cont-de.xml | 12 +- tex/context/interface/cont-en.xml | 12 +- tex/context/interface/cont-fr.xml | 12 +- tex/context/interface/cont-it.xml | 12 +- tex/context/interface/cont-nl.xml | 12 +- tex/context/interface/cont-pe.xml | 12 +- tex/context/interface/cont-ro.xml | 12 +- tex/context/interface/keys-cs.xml | 2 + tex/context/interface/keys-de.xml | 2 + tex/context/interface/keys-en.xml | 2 + tex/context/interface/keys-fr.xml | 2 + tex/context/interface/keys-it.xml | 2 + tex/context/interface/keys-nl.xml | 2 + tex/context/interface/keys-pe.xml | 2 + tex/context/interface/keys-ro.xml | 2 + tex/context/test/chem-str-test.tex | 560 ------------ tex/context/test/sort-lan-test.tex | 38 - tex/context/test/x-cml-test.tex | 9 - tex/context/test/x-cml-test.xml | 210 ----- tex/context/test/x-ct-test.tex | 7 - tex/context/test/x-ct-test.xml | 149 ---- tex/context/test/x-mmp-test.tex | 12 - tex/context/test/x-mmp-test.xml | 1270 --------------------------- tex/generic/context/luatex-fonts-merged.lua | 22 +- 96 files changed, 1755 insertions(+), 3461 deletions(-) create mode 100644 tex/context/base/lang-wrd.lua create mode 100644 tex/context/base/lang-wrd.mkiv create mode 100644 tex/context/base/mtx-context-common.tex create mode 100644 tex/context/base/supp-mat.mkii create mode 100644 tex/context/base/supp-mat.mkiv delete mode 100644 tex/context/base/supp-mat.tex delete mode 100644 tex/context/test/chem-str-test.tex delete mode 100644 tex/context/test/sort-lan-test.tex delete mode 100644 tex/context/test/x-cml-test.tex delete mode 100644 tex/context/test/x-cml-test.xml delete mode 100644 tex/context/test/x-ct-test.tex delete mode 100644 tex/context/test/x-ct-test.xml delete mode 100644 tex/context/test/x-mmp-test.tex delete mode 100644 tex/context/test/x-mmp-test.xml diff --git a/scripts/context/lua/luatools.lua b/scripts/context/lua/luatools.lua index ccedd97cd..e6fdd50d5 100644 --- a/scripts/context/lua/luatools.lua +++ b/scripts/context/lua/luatools.lua @@ -428,6 +428,15 @@ lpeg.splitat = splitat local cache = { } +function lpeg.split(separator,str) + local c = cache[separator] + if not c then + c = Ct(splitat(separator)) + cache[separator] = c + end + return match(c,str) +end + function string:split(separator) local c = cache[separator] if not c then @@ -439,6 +448,17 @@ end local cache = { } +function lpeg.checkedsplit(separator,str) + local c = cache[separator] + if not c then + separator = P(separator) + local other = C((1 - separator)^0) + c = Ct(separator^0 * other * (separator^1 * other)^0) + cache[separator] = c + end + return match(c,str) +end + function string:checkedsplit(separator) local c = cache[separator] if not c then @@ -5710,6 +5730,8 @@ local normalsplit = string.split local cache = { } +local splitter = lpeg.Ct(lpeg.splitat(lpeg.S(os.type == "windows" and ";" or ":;"))) + local function split_kpse_path(str) -- beware, this can be either a path or a {specification} local found = cache[str] if not found then @@ -5717,7 +5739,8 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s found = { } else str = gsub(str,"\\","/") - local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator) +--~ local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator) +local split = lpegmatch(splitter,str) found = { } for i=1,#split do local s = split[i] @@ -6180,7 +6203,7 @@ end function resolvers.expanded_path_list(str) if not str then - return ep or { } + return ep or { } -- ep ? elseif instance.savelists then -- engine+progname hash str = gsub(str,"%$","") diff --git a/scripts/context/lua/mtx-mptopdf.lua b/scripts/context/lua/mtx-mptopdf.lua index 6fa5bbcb8..c3d5b50dc 100644 --- a/scripts/context/lua/mtx-mptopdf.lua +++ b/scripts/context/lua/mtx-mptopdf.lua @@ -99,7 +99,7 @@ function scripts.mptopdf.convertall() logs.simple("%s => %s", r[1], r[2]) end else - logs.simple("no input files match %s", table.concat(files,' ')) + logs.simple("no files are converted") end else logs.simple("no files match %s", table.concat(environment.files,' ')) diff --git a/scripts/context/lua/mtx-update.lua b/scripts/context/lua/mtx-update.lua index 8affaf01b..b63be6475 100644 --- a/scripts/context/lua/mtx-update.lua +++ b/scripts/context/lua/mtx-update.lua @@ -196,6 +196,7 @@ function scripts.update.synchronize() if force then dir.mkdirs(format("%s/%s", texroot, "texmf-cache")) dir.mkdirs(format("%s/%s", texroot, "texmf-local")) + dir.mkdirs(format("%s/%s", texroot, "texmf-project")) end if ok or not force then diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index cefa3192b..727099027 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -437,6 +437,15 @@ lpeg.splitat = splitat local cache = { } +function lpeg.split(separator,str) + local c = cache[separator] + if not c then + c = Ct(splitat(separator)) + cache[separator] = c + end + return match(c,str) +end + function string:split(separator) local c = cache[separator] if not c then @@ -448,6 +457,17 @@ end local cache = { } +function lpeg.checkedsplit(separator,str) + local c = cache[separator] + if not c then + separator = P(separator) + local other = C((1 - separator)^0) + c = Ct(separator^0 * other * (separator^1 * other)^0) + cache[separator] = c + end + return match(c,str) +end + function string:checkedsplit(separator) local c = cache[separator] if not c then @@ -8911,6 +8931,8 @@ local normalsplit = string.split local cache = { } +local splitter = lpeg.Ct(lpeg.splitat(lpeg.S(os.type == "windows" and ";" or ":;"))) + local function split_kpse_path(str) -- beware, this can be either a path or a {specification} local found = cache[str] if not found then @@ -8918,7 +8940,8 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s found = { } else str = gsub(str,"\\","/") - local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator) +--~ local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator) +local split = lpegmatch(splitter,str) found = { } for i=1,#split do local s = split[i] @@ -9381,7 +9404,7 @@ end function resolvers.expanded_path_list(str) if not str then - return ep or { } + return ep or { } -- ep ? elseif instance.savelists then -- engine+progname hash str = gsub(str,"%$","") diff --git a/scripts/context/stubs/mswin/luatools.lua b/scripts/context/stubs/mswin/luatools.lua index ccedd97cd..e6fdd50d5 100644 --- a/scripts/context/stubs/mswin/luatools.lua +++ b/scripts/context/stubs/mswin/luatools.lua @@ -428,6 +428,15 @@ lpeg.splitat = splitat local cache = { } +function lpeg.split(separator,str) + local c = cache[separator] + if not c then + c = Ct(splitat(separator)) + cache[separator] = c + end + return match(c,str) +end + function string:split(separator) local c = cache[separator] if not c then @@ -439,6 +448,17 @@ end local cache = { } +function lpeg.checkedsplit(separator,str) + local c = cache[separator] + if not c then + separator = P(separator) + local other = C((1 - separator)^0) + c = Ct(separator^0 * other * (separator^1 * other)^0) + cache[separator] = c + end + return match(c,str) +end + function string:checkedsplit(separator) local c = cache[separator] if not c then @@ -5710,6 +5730,8 @@ local normalsplit = string.split local cache = { } +local splitter = lpeg.Ct(lpeg.splitat(lpeg.S(os.type == "windows" and ";" or ":;"))) + local function split_kpse_path(str) -- beware, this can be either a path or a {specification} local found = cache[str] if not found then @@ -5717,7 +5739,8 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s found = { } else str = gsub(str,"\\","/") - local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator) +--~ local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator) +local split = lpegmatch(splitter,str) found = { } for i=1,#split do local s = split[i] @@ -6180,7 +6203,7 @@ end function resolvers.expanded_path_list(str) if not str then - return ep or { } + return ep or { } -- ep ? elseif instance.savelists then -- engine+progname hash str = gsub(str,"%$","") diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index cefa3192b..727099027 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -437,6 +437,15 @@ lpeg.splitat = splitat local cache = { } +function lpeg.split(separator,str) + local c = cache[separator] + if not c then + c = Ct(splitat(separator)) + cache[separator] = c + end + return match(c,str) +end + function string:split(separator) local c = cache[separator] if not c then @@ -448,6 +457,17 @@ end local cache = { } +function lpeg.checkedsplit(separator,str) + local c = cache[separator] + if not c then + separator = P(separator) + local other = C((1 - separator)^0) + c = Ct(separator^0 * other * (separator^1 * other)^0) + cache[separator] = c + end + return match(c,str) +end + function string:checkedsplit(separator) local c = cache[separator] if not c then @@ -8911,6 +8931,8 @@ local normalsplit = string.split local cache = { } +local splitter = lpeg.Ct(lpeg.splitat(lpeg.S(os.type == "windows" and ";" or ":;"))) + local function split_kpse_path(str) -- beware, this can be either a path or a {specification} local found = cache[str] if not found then @@ -8918,7 +8940,8 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s found = { } else str = gsub(str,"\\","/") - local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator) +--~ local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator) +local split = lpegmatch(splitter,str) found = { } for i=1,#split do local s = split[i] @@ -9381,7 +9404,7 @@ end function resolvers.expanded_path_list(str) if not str then - return ep or { } + return ep or { } -- ep ? elseif instance.savelists then -- engine+progname hash str = gsub(str,"%$","") diff --git a/scripts/context/stubs/unix/luatools b/scripts/context/stubs/unix/luatools index ccedd97cd..e6fdd50d5 100755 --- a/scripts/context/stubs/unix/luatools +++ b/scripts/context/stubs/unix/luatools @@ -428,6 +428,15 @@ lpeg.splitat = splitat local cache = { } +function lpeg.split(separator,str) + local c = cache[separator] + if not c then + c = Ct(splitat(separator)) + cache[separator] = c + end + return match(c,str) +end + function string:split(separator) local c = cache[separator] if not c then @@ -439,6 +448,17 @@ end local cache = { } +function lpeg.checkedsplit(separator,str) + local c = cache[separator] + if not c then + separator = P(separator) + local other = C((1 - separator)^0) + c = Ct(separator^0 * other * (separator^1 * other)^0) + cache[separator] = c + end + return match(c,str) +end + function string:checkedsplit(separator) local c = cache[separator] if not c then @@ -5710,6 +5730,8 @@ local normalsplit = string.split local cache = { } +local splitter = lpeg.Ct(lpeg.splitat(lpeg.S(os.type == "windows" and ";" or ":;"))) + local function split_kpse_path(str) -- beware, this can be either a path or a {specification} local found = cache[str] if not found then @@ -5717,7 +5739,8 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s found = { } else str = gsub(str,"\\","/") - local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator) +--~ local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator) +local split = lpegmatch(splitter,str) found = { } for i=1,#split do local s = split[i] @@ -6180,7 +6203,7 @@ end function resolvers.expanded_path_list(str) if not str then - return ep or { } + return ep or { } -- ep ? elseif instance.savelists then -- engine+progname hash str = gsub(str,"%$","") diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index cefa3192b..727099027 100755 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -437,6 +437,15 @@ lpeg.splitat = splitat local cache = { } +function lpeg.split(separator,str) + local c = cache[separator] + if not c then + c = Ct(splitat(separator)) + cache[separator] = c + end + return match(c,str) +end + function string:split(separator) local c = cache[separator] if not c then @@ -448,6 +457,17 @@ end local cache = { } +function lpeg.checkedsplit(separator,str) + local c = cache[separator] + if not c then + separator = P(separator) + local other = C((1 - separator)^0) + c = Ct(separator^0 * other * (separator^1 * other)^0) + cache[separator] = c + end + return match(c,str) +end + function string:checkedsplit(separator) local c = cache[separator] if not c then @@ -8911,6 +8931,8 @@ local normalsplit = string.split local cache = { } +local splitter = lpeg.Ct(lpeg.splitat(lpeg.S(os.type == "windows" and ";" or ":;"))) + local function split_kpse_path(str) -- beware, this can be either a path or a {specification} local found = cache[str] if not found then @@ -8918,7 +8940,8 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s found = { } else str = gsub(str,"\\","/") - local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator) +--~ local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator) +local split = lpegmatch(splitter,str) found = { } for i=1,#split do local s = split[i] @@ -9381,7 +9404,7 @@ end function resolvers.expanded_path_list(str) if not str then - return ep or { } + return ep or { } -- ep ? elseif instance.savelists then -- engine+progname hash str = gsub(str,"%$","") diff --git a/tex/context/base/back-pdf.lua b/tex/context/base/back-pdf.lua index 3d21a5961..54e22f1a2 100644 --- a/tex/context/base/back-pdf.lua +++ b/tex/context/base/back-pdf.lua @@ -32,6 +32,7 @@ local registrations = backends.pdf.registrations local pdfliteral, register = nodes.pdfliteral, nodes.register local pdfconstant = lpdf.constant +local pdfstring = lpdf.string local pdfdictionary = lpdf.dictionary local pdfarray = lpdf.array local pdfreference = lpdf.reference diff --git a/tex/context/base/bibl-tra.mkiv b/tex/context/base/bibl-tra.mkiv index 7b6fc84cb..1fc9089e7 100644 --- a/tex/context/base/bibl-tra.mkiv +++ b/tex/context/base/bibl-tra.mkiv @@ -366,7 +366,6 @@ \ifhmode\removeunwantedspaces\fi \let\par\@@savedpar} - %D \macros{setuppublicationlist} %D %D This will be the first command in (\BIBTEX-generated) \type{bbl} diff --git a/tex/context/base/buff-ini.lua b/tex/context/base/buff-ini.lua index a075bcbf5..6786f9b58 100644 --- a/tex/context/base/buff-ini.lua +++ b/tex/context/base/buff-ini.lua @@ -122,14 +122,16 @@ end function buffers.strip(lines,first,last) local first, last = first or 1, last or #lines for i=first,last do - if #lines[i] == 0 then + local li = lines[i] + if #li == 0 or find(li,"^%s*$") then first = first + 1 else break end end for i=last,first,-1 do - if #lines[i] == 0 then + local li = lines[i] + if #li == 0 or find(li,"^%s*$") then last = last - 1 else break @@ -380,11 +382,16 @@ end -- maybe just line(n,str) empty(n,str) -visualizers.handlers = visualizers.handlers or { } visualizers.tablength = 7 visualizers.enabletab = true -- false visualizers.obeyspace = true +function buffers.settablength(tablength) + visualizers.tablength = tablength and tonumber(tablength) or 7 +end + +visualizers.handlers = visualizers.handlers or { } + local handlers = visualizers.handlers function buffers.newvisualizer(name) @@ -427,6 +434,8 @@ local default = buffers.newvisualizer(visualizers.defaultname) --~ print(variables.typing) os.exit() +-- will become cleaner + local currentvisualizer, currenthandler function buffers.setvisualizer(str) diff --git a/tex/context/base/buff-ver.mkiv b/tex/context/base/buff-ver.mkiv index 15b40e9b9..3e34bc22b 100644 --- a/tex/context/base/buff-ver.mkiv +++ b/tex/context/base/buff-ver.mkiv @@ -85,7 +85,7 @@ \spaceskip\wd\scratchbox \xspaceskip\spaceskip} -\let\obeycharacters\relax +\let\obeycharacters\relax % tab mess can go \setvalue{\??tp:\c!lines:\v!yes }{\obeybreakpoints} \setvalue{\??tp:\c!lines:\v!hyphenated}{\obeyhyphens} @@ -96,17 +96,12 @@ \setvalue{\??tp:\c!option:\v!none }{\let\obeycharacters\relax} \setvalue{\??tp:\c!option:\empty }{\let\obeycharacters\relax} \setvalue{\??tp:\c!option:\v!color }{\setupprettiesintype{\typingparameter\c!option}% - \let\obeycharacters\setupprettytype - \let\obeytabs\ignoretabs} + \let\obeycharacters\setupprettytype} \setvalue{\??tp:\c!option:\v!normal }{\let\obeycharacters\setupgroupedtype} -\setvalue{\??tp:\c!option:\v!slanted }{\let\obeycharacters\setupslantedtype - \let\obeytabs\ignoretabs} +\setvalue{\??tp:\c!option:\v!slanted }{\let\obeycharacters\setupslantedtype} \setvalue{\??tp:\c!option:\s!unknown }{\setupprettiesintype{\typingparameter\c!option}% - \let\obeycharacters\setupprettytype - \let\obeytabs\ignoretabs} - -%setvalue{\??tp:\c!option:\v!commands }{\def\obeycharacters{\setupcommandsintype}% -% \let\obeytabs\ignoretabs} + \let\obeycharacters\setupprettytype} +%setvalue{\??tp:\c!option:\v!commands }{\def\obeycharacters{\setupcommandsintype}} \def\dosetverbatimfont {\redoconvertfont\dosetfontattribute{\currenttypingclass\currenttyping}\c!style @@ -123,9 +118,6 @@ \getvalue{\??tp:\c!lines:\typingparameter\c!lines}% \getvalue{\??tp:\c!empty:\typingparameter\c!empty}% \getvalue{\??tp:\c!option:\ifcsname\??tp:\c!option:\typingparameter\c!option\endcsname\typingparameter\c!option\else\s!unknown\fi}% - \doifnumberelse{\typingparameter\c!tab} - {\def\obeytabs{\setfixedtabskips{\typingparameter\c!tab}}}% - \donothing \setupverbatimcolor} \newtoks \everyinitializeverbatim @@ -141,11 +133,17 @@ \let\noverbatimeop\ignoreendofpretty \let\noverbatimsop\ignorebeginofpretty -\def\doinitializeverbatim +\def\doinitializeverbatim % todo: combine all in one call is faster {\ctxlua{buffers.visualizers.reset()}% \doifelse{\typingparameter\c!space}\v!on {\let\obs\fastcontrolspace}% {\let\obs\specialobeyedspace}% + \edef\askedverbatimtab{\typingparameter\c!tab}% + \doifelse\askedverbatimtab\v!no + {\ctxlua{buffers.settablength(1)}} + {\doifnumberelse{\askedverbatimtab} + {\ctxlua{buffers.settablength(\askedverbatimtab)}} + {\ctxlua{buffers.settablength()}}}% \ctxlua{buffers.doifelsevisualizer("\prettyidentifier")} {\ctxlua{buffers.setvisualizer("\prettyidentifier")}% \let\bop\doverbatimbop @@ -321,15 +319,6 @@ \catcode`\>=\@@other \futurelet\next\dodotype} -% \def\dodotype -% {\ifx\next\bgroup -% \@EA\dodotypeA -% \else\if\next<% -% \doifelse{\typingparameter\c!option}\v!none{\@EAEAEA\dodotypeB}{\@EAEAEA\dodotypeC}% -% \else -% \@EAEAEA\dodotypeD -% \fi\fi} - \def\dodotype {\ifx\next\bgroup \@EA\dodotypeA @@ -411,12 +400,8 @@ \setupcommonverbatim %\dosetverbatimfont %\setverbatimspaceskip - %\let\obeytabs \ignoretabs % probably not needed - %\let\obeylines\ignorelines % probably not needed - %\let\obeypages\ignorepages % probably not needed %\setupcopyverbatim % not needed - \setcatcodetable\vrbcatcodes - } + \setcatcodetable\vrbcatcodes} %D \macros %D {setuptype} @@ -593,6 +578,7 @@ \else \edef\verbatimbaselineskip{\the\scratchskip}% \fi +\doifsomething{\typingparameter\c!align}{\setupalign[\typingparameter\c!align]}% \setupcommonverbatim} %D The basic display verbatim commands are defined in an @@ -674,8 +660,7 @@ {\stopverbatimcolor \stoppacked % includes \egroup \typingparameter\c!after - \egroup - \dochecknextindentation{\??tp#1}% + \normalexpanded{\egroup\checknextindentation[\typingparameter\c!indentnext]}% \dorechecknextindentation} %D Line numbering for files is combined with filtering, while @@ -771,6 +756,8 @@ %D %D The definitions default to the standard typing values. +% TODO: parent etc ! + \def\presettyping[#1][#2]% brrr also use parent here {\copyparameters[\??tp#1][\??tp][\c!color,\c!style]% \getparameters [\??tp#1][#2]} @@ -878,34 +865,6 @@ \dodotypefile[\v!file][]{#3}% \fi\fi} -% \def\dosetuptypelinenumbering#1% fuzzy -% {\ifcsname\currenttypingclass\currenttyping\c!start\endcsname \else -% \setuptyping[\currenttyping][\c!start=1,\c!stop=,\c!step=1,\c!nlines=]% -% \fi -% \setuptyping[\currenttyping][#1]% -% \doifelse{\typingparameter\c!numbering}\v!file -% {% kind of special: filters lines ! -% \setuplinenumbering[\c!method=\v!file]% -% \donetrue} -% {\doifelse{\typingparameter\c!numbering}\v!line -% {% \setuplinenumbering defaults start/step to 1/1, so we need -% \doifinsetelse\v!continue{#1,\typingparameter\c!start} -% {\scratchcounter0\typingparameter\c!n -% \setxtypingparameter\c!start{\ifnum\scratchcounter=0 1\else\number\scratchcounter\fi}}% -% {\doifnothing{\typingparameter\c!start}{\settypingparameter\c!start{1}}}% -% \doifnothing{\typingparameter\c!step}{\settypingparameter\c!step{1}}% -% \setuplinenumbering -% [\c!method=\v!type, -% \c!start=\typingparameter\c!start, -% \c!stop=\typingparameter\c!stop, -% \c!step=\typingparameter\c!step]% -% \donetrue} -% {\donefalse}}% -% \ifdone -% \def\beginofverbatimlines{\startlinenumbering}% -% \def\endofverbatimlines {\stoplinenumbering\setxtypingparameter\c!n{\number\linenumber}}% -% \fi} - \def\dosetuptypelinenumbering#1% fuzzy {%\ifcsname\currenttypingclass\currenttyping\c!start\endcsname \else % \setuptyping[\currenttyping][\c!start=1,\c!stop=,\c!step=1,\c!continue=\v!no,\c!nlines=]% diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua index 0298f91ca..363850928 100644 --- a/tex/context/base/colo-ini.lua +++ b/tex/context/base/colo-ini.lua @@ -151,6 +151,9 @@ local function do_registerspotcolor(parent,name,parentnumber,e,f,d,p) if v then local kind = colors.default -- else problems with shading etc if kind == 1 then kind = v[1] end + if e and e ~= "" then + registrations.spotcolorname(parent,e) -- before registration of the color + end if kind == 2 then -- name noffractions names p's r g b registrations.grayspotcolor(parent,f,d,p,v[2]) elseif kind == 3 then @@ -158,9 +161,6 @@ local function do_registerspotcolor(parent,name,parentnumber,e,f,d,p) elseif kind == 4 then registrations.cmykspotcolor(parent,f,d,p,v[6],v[7],v[8],v[9]) end - if e and e ~= "" then - registrations.spotcolorname(parent,e) - end end registered[parentnumber] = true end diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index f15d6f259..9b8a555c1 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2010.05.08 13:33} +\newcontextversion{2010.05.12 18:43} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context-characters.lmx b/tex/context/base/context-characters.lmx index b2ddee64e..f018e412b 100644 --- a/tex/context/base/context-characters.lmx +++ b/tex/context/base/context-characters.lmx @@ -12,7 +12,7 @@ -