diff options
Diffstat (limited to 'tex')
17 files changed, 72 insertions, 47 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 970f0e887..7aed27917 100644 --- a/tex/context/base/mkii/cont-new.mkii +++ b/tex/context/base/mkii/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2018.06.08 09:31} +\newcontextversion{2018.06.09 14:30} %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/mkii/context.mkii b/tex/context/base/mkii/context.mkii index 0ffedca85..003bcd0c1 100644 --- a/tex/context/base/mkii/context.mkii +++ b/tex/context/base/mkii/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2018.06.08 09:31} +\edef\contextversion{2018.06.09 14:30} %D For those who want to use this: diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index feb54e9ca..0f226d75f 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2018.06.08 09:31} +\newcontextversion{2018.06.09 14:30} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 5202268c3..9d171901f 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -42,7 +42,7 @@ %D has to match \type {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2018.06.08 09:31} +\edef\contextversion{2018.06.09 14:30} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/font-def.lua b/tex/context/base/mkiv/font-def.lua index 732ce401f..7b3beda73 100644 --- a/tex/context/base/mkiv/font-def.lua +++ b/tex/context/base/mkiv/font-def.lua @@ -82,12 +82,14 @@ and prepares a table that will move along as we proceed.</p> local splitter, splitspecifiers = nil, "" -- not so nice -local P, C, S, Cc = lpeg.P, lpeg.C, lpeg.S, lpeg.Cc +local P, C, S, Cc, Cs = lpeg.P, lpeg.C, lpeg.S, lpeg.Cc, lpeg.Cs -local left = P("(") -local right = P(")") -local colon = P(":") -local space = P(" ") +local left = P("(") +local right = P(")") +local colon = P(":") +local space = P(" ") +local lbrace = P("{") +local rbrace = P("}") definers.defaultlookup = "file" @@ -99,7 +101,7 @@ local function addspecifier(symbol) local lookup = C(prefixpattern) * colon local sub = left * C(P(1-left-right-method)^1) * right local specification = C(method) * C(P(1)^1) - local name = C((1-sub-specification)^1) + local name = Cs((lbrace/"") * (1-rbrace)^1 * (rbrace/"") + (1-sub-specification)^1) splitter = P((lookup + Cc("")) * name * (sub + Cc("")) * (specification + Cc(""))) end diff --git a/tex/context/base/mkiv/mlib-pdf.lua b/tex/context/base/mkiv/mlib-pdf.lua index d93e1b879..791d36607 100644 --- a/tex/context/base/mkiv/mlib-pdf.lua +++ b/tex/context/base/mkiv/mlib-pdf.lua @@ -48,17 +48,29 @@ local experiment = true -- uses context(node) that already does delayed nod local savedliterals = nil -- needs checking local mpsliteral = nodes.pool.register(node.new("whatsit",nodes.whatsitcodes.pdfliteral)) -- pdfliteral.mode = 1 -local f_f = formatters["%F"] - -local f_m = formatters["%F %F m"] -local f_c = formatters["%F %F %F %F %F %F c"] -local f_l = formatters["%F %F l"] -local f_cm = formatters["%F %F %F %F %F %F cm"] -local f_M = formatters["%F M"] +-- we can have "withaccuracy 3" and then change formatters on the fly + +-- local f_f = formatters["%F"] +-- local f_m = formatters["%F %F m"] +-- local f_c = formatters["%F %F %F %F %F %F c"] +-- local f_l = formatters["%F %F l"] +-- local f_cm = formatters["%F %F %F %F %F %F cm"] +-- local f_M = formatters["%F M"] +-- local f_j = formatters["%i j"] +-- local f_J = formatters["%i J"] +-- local f_d = formatters["[%s] %F d"] +-- local f_w = formatters["%F w"] + +local f_f = formatters["%.6F"] +local f_m = formatters["%.6F %.6F m"] +local f_c = formatters["%.6F %.6F %.6F %.6F %.6F %.6F c"] +local f_l = formatters["%.6F %.6F l"] +local f_cm = formatters["%.6F %.6F %.6F %.6F %.6F %.6F cm"] +local f_M = formatters["%.6F M"] local f_j = formatters["%i j"] local f_J = formatters["%i J"] -local f_d = formatters["[%s] %F d"] -local f_w = formatters["%F w"] +local f_d = formatters["[%s] %.6F d"] +local f_w = formatters["%.3F w"] directives.register("metapost.savetable",function(v) if type(v) == "string" then diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua index db07cd7e4..91377f468 100644 --- a/tex/context/base/mkiv/mlib-pps.lua +++ b/tex/context/base/mkiv/mlib-pps.lua @@ -1002,12 +1002,12 @@ local tx_reset, tx_analyze, tx_process do ----- pat = tsplitat(":") local pat = lpeg.tsplitter(":",tonumber) -- so that %F can do its work --- local f_gray_yes = formatters["s=%F,a=%F,t=%F"] --- local f_gray_nop = formatters["s=%F"] --- local f_rgb_yes = formatters["r=%F,g=%F,b=%F,a=%F,t=%F"] --- local f_rgb_nop = formatters["r=%F,g=%F,b=%F"] --- local f_cmyk_yes = formatters["c=%F,m=%F,y=%F,k=%F,a=%F,t=%F"] --- local f_cmyk_nop = formatters["c=%F,m=%F,y=%F,k=%F"] + -- local f_gray_yes = formatters["s=%F,a=%F,t=%F"] + -- local f_gray_nop = formatters["s=%F"] + -- local f_rgb_yes = formatters["r=%F,g=%F,b=%F,a=%F,t=%F"] + -- local f_rgb_nop = formatters["r=%F,g=%F,b=%F"] + -- local f_cmyk_yes = formatters["c=%F,m=%F,y=%F,k=%F,a=%F,t=%F"] + -- local f_cmyk_nop = formatters["c=%F,m=%F,y=%F,k=%F"] local f_gray_yes = formatters["s=%n,a=%n,t=%n"] local f_gray_nop = formatters["s=%n"] @@ -1116,18 +1116,25 @@ local tx_reset, tx_analyze, tx_process do mp_a = tonumber(prescript.tr_alternative) mp_t = tonumber(prescript.tr_transparency) -- - local mp_text = top.texstrings[mp_index] - local hash = fmt(mp_text,mp_a or "-",mp_t or "-",mp_c or "-") - local box = data.texhash[hash] mp_index = index mp_target = top.texlast - 1 top.texlast = mp_target - if box then - box = copy_list(box) - else + -- + local mp_text = top.texstrings[mp_index] + local box + if prescript.tx_cache == "no" then tex.runtoks("mptexttoks") box = textakebox("mptextbox") - data.texhash[hash] = box + else + local hash = fmt(mp_text,mp_a or "-",mp_t or "-",mp_c or "-") + box = data.texhash[hash] + if box then + box = copy_list(box) + else + tex.runtoks("mptexttoks") + box = textakebox("mptextbox") + data.texhash[hash] = box + end end top.textexts[mp_target] = box -- diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua index 01a512bc6..803d6c3e1 100644 --- a/tex/context/base/mkiv/mult-def.lua +++ b/tex/context/base/mkiv/mult-def.lua @@ -17823,8 +17823,8 @@ return { ["cd:brackets-l"] = { en = "[...,...]", lua = "{..., ...}" }, ["cd:parenthesis-s"] = { en = "(...)" }, ["cd:parenthesis-l"] = { en = "(...,...)" }, - ["cd:index-s"] = { en = "[...]" }, - ["cd:index-l"] = { en = "[..+...+..]" }, + ["cd:index-s"] = { en = "{...}" }, + ["cd:index-l"] = { en = "{..+...+..}" }, ["cd:math-s"] = { en = "$...$" }, ["cd:math-l"] = { en = "$...$" }, ["cd:inlinemath-s"] = { en = "$...$" }, diff --git a/tex/context/base/mkiv/mult-fun.lua b/tex/context/base/mkiv/mult-fun.lua index 1ee593be4..caac199de 100644 --- a/tex/context/base/mkiv/mult-fun.lua +++ b/tex/context/base/mkiv/mult-fun.lua @@ -64,6 +64,7 @@ return { "withmask", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "colordecimalslist", "textext", "thetextext", "rawtextext", "textextoffset", "texbox", "thetexbox", "rawtexbox", "istextext", + "notcached", "verbatim", "thelabel", "label", "autoalign", diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex c5a2850f3..5fc519b39 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex ae98a0339..6df30cade 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf Binary files differindex 6ddabb994..9afd18d27 100644 --- a/tex/context/interface/mkiv/i-context.pdf +++ b/tex/context/interface/mkiv/i-context.pdf diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf Binary files differindex d7c05d1c8..fc23c7d59 100644 --- a/tex/context/interface/mkiv/i-readme.pdf +++ b/tex/context/interface/mkiv/i-readme.pdf diff --git a/tex/context/base/mkiv/font-xtx.lua b/tex/generic/context/luatex/luatex-fonts-def.lua index 494ac00a9..a8bc3b06f 100644 --- a/tex/context/base/mkiv/font-xtx.lua +++ b/tex/generic/context/luatex/luatex-fonts-def.lua @@ -38,16 +38,17 @@ local function iskey (k,v) list[k] = v end local function istrue (s) list[s] = true end local function isfalse(s) list[s] = false end -local P, S, R, C = lpeg.P, lpeg.S, lpeg.R, lpeg.C +local P, S, R, C, Cs = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.Cs local spaces = P(" ")^0 -local namespec = (1-S("/:("))^0 -- was: (1-S("/: ("))^0 +local namespec = Cs((P("{")/"") * (1-S("}"))^0 * (P("}")/"") + (1-S("/:("))^0) local crapspec = spaces * P("/") * (((1-P(":"))^0)/iscrap) * spaces local filename_1 = P("file:")/isfile * (namespec/thename) local filename_2 = P("[") * P(true)/isname * (((1-P("]"))^0)/thename) * P("]") local fontname_1 = P("name:")/isname * (namespec/thename) local fontname_2 = P(true)/issome * (namespec/thename) -local sometext = (R("az","AZ","09") + S("+-.{}"))^1 +----- sometext = (R("az","AZ","09") + S("+-.{}"))^1 +local sometext = (P("{")/"")*(1-P("}"))^0*(P("}")/"") + (R("az","AZ","09")+S("+-."))^1 local truevalue = P("+") * spaces * (sometext/istrue) local falsevalue = P("-") * spaces * (sometext/isfalse) local keyvalue = (C(sometext) * spaces * P("=") * spaces * C(sometext))/iskey diff --git a/tex/context/base/mkiv/font-gbn.lua b/tex/generic/context/luatex/luatex-fonts-gbn.lua index 778b07740..272f65e95 100644 --- a/tex/context/base/mkiv/font-gbn.lua +++ b/tex/generic/context/luatex/luatex-fonts-gbn.lua @@ -1,4 +1,4 @@ -if not modules then modules = { } end modules ['font-gbn'] = { +if not modules then modules = { } end modules ['luatex-fonts-gbn'] = { version = 1.001, comment = "companion to luatex-*.tex", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 0889d7777..e0c1b7899 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 06/08/18 09:31:24 +-- merge date : 06/09/18 14:30:08 do -- begin closure to overcome local limits and interference @@ -32982,11 +32982,13 @@ local loadedfonts=constructors.loadedfonts local designsizes=constructors.designsizes local resolvefile=fontgoodies and fontgoodies.filenames and fontgoodies.filenames.resolve or function(s) return s end local splitter,splitspecifiers=nil,"" -local P,C,S,Cc=lpeg.P,lpeg.C,lpeg.S,lpeg.Cc +local P,C,S,Cc,Cs=lpeg.P,lpeg.C,lpeg.S,lpeg.Cc,lpeg.Cs local left=P("(") local right=P(")") local colon=P(":") local space=P(" ") +local lbrace=P("{") +local rbrace=P("}") definers.defaultlookup="file" local prefixpattern=P(false) local function addspecifier(symbol) @@ -32995,7 +32997,7 @@ local function addspecifier(symbol) local lookup=C(prefixpattern)*colon local sub=left*C(P(1-left-right-method)^1)*right local specification=C(method)*C(P(1)^1) - local name=C((1-sub-specification)^1) + local name=Cs((lbrace/"")*(1-rbrace)^1*(rbrace/"")+(1-sub-specification)^1) splitter=P((lookup+Cc(""))*name*(sub+Cc(""))*(specification+Cc(""))) end local function addlookup(str,default) @@ -33376,15 +33378,15 @@ local function iscrap (s) list.crap=string.lower(s) end local function iskey (k,v) list[k]=v end local function istrue (s) list[s]=true end local function isfalse(s) list[s]=false end -local P,S,R,C=lpeg.P,lpeg.S,lpeg.R,lpeg.C +local P,S,R,C,Cs=lpeg.P,lpeg.S,lpeg.R,lpeg.C,lpeg.Cs local spaces=P(" ")^0 -local namespec=(1-S("/:("))^0 +local namespec=Cs((P("{")/"")*(1-S("}"))^0*(P("}")/"")+(1-S("/:("))^0) local crapspec=spaces*P("/")*(((1-P(":"))^0)/iscrap)*spaces local filename_1=P("file:")/isfile*(namespec/thename) local filename_2=P("[")*P(true)/isname*(((1-P("]"))^0)/thename)*P("]") local fontname_1=P("name:")/isname*(namespec/thename) local fontname_2=P(true)/issome*(namespec/thename) -local sometext=(R("az","AZ","09")+S("+-.{}"))^1 +local sometext=(P("{")/"")*(1-P("}"))^0*(P("}")/"")+(R("az","AZ","09")+S("+-."))^1 local truevalue=P("+")*spaces*(sometext/istrue) local falsevalue=P("-")*spaces*(sometext/isfalse) local keyvalue=(C(sometext)*spaces*P("=")*spaces*C(sometext))/iskey @@ -36376,7 +36378,7 @@ end -- closure do -- begin closure to overcome local limits and interference -if not modules then modules={} end modules ['font-gbn']={ +if not modules then modules={} end modules ['luatex-fonts-gbn']={ version=1.001, comment="companion to luatex-*.tex", author="Hans Hagen, PRAGMA-ADE, Hasselt NL", diff --git a/tex/generic/context/luatex/luatex-fonts.lua b/tex/generic/context/luatex/luatex-fonts.lua index b80ea5564..b0f5aac3f 100644 --- a/tex/generic/context/luatex/luatex-fonts.lua +++ b/tex/generic/context/luatex/luatex-fonts.lua @@ -275,7 +275,7 @@ if non_generic_context.luatex_fonts.skip_loading ~= true then -- We support xetex compatible specifiers (plain/latex only). - loadmodule('font-xtx.lua') + loadmodule('luatex-fonts-def.lua') -- was font-xtx.lua -- Here come some additional features. @@ -289,7 +289,7 @@ if non_generic_context.luatex_fonts.skip_loading ~= true then -- We need to plug into a callback and the following module implements the -- handlers. Actual plugging in happens later. - loadmodule('font-gbn.lua') + loadmodule('luatex-fonts-gbn.lua') end |