diff options
Diffstat (limited to 'tex/context/base/mkiv')
-rw-r--r-- | tex/context/base/mkiv/colo-imp-rgb.mkiv | 12 | ||||
-rw-r--r-- | tex/context/base/mkiv/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/mlib-ctx.lua | 34 | ||||
-rw-r--r-- | tex/context/base/mkiv/mult-def.lua | 3 | ||||
-rw-r--r-- | tex/context/base/mkiv/publ-ini.lua | 47 | ||||
-rw-r--r-- | tex/context/base/mkiv/publ-ini.mkiv | 6 | ||||
-rw-r--r-- | tex/context/base/mkiv/status-files.pdf | bin | 25727 -> 25749 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/status-lua.pdf | bin | 246064 -> 246130 bytes |
9 files changed, 102 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/colo-imp-rgb.mkiv b/tex/context/base/mkiv/colo-imp-rgb.mkiv index 6e7e44f8c..85122cb44 100644 --- a/tex/context/base/mkiv/colo-imp-rgb.mkiv +++ b/tex/context/base/mkiv/colo-imp-rgb.mkiv @@ -61,6 +61,18 @@ \definecolor [lightgray] [s=.85] \definecolor [palegray] [s=.75] +% new per 2017-10-15 (for mp named colors) + +\definecolor [gray-1] [s=.1] +\definecolor [gray-2] [s=.2] +\definecolor [gray-3] [s=.3] +\definecolor [gray-4] [s=.4] +\definecolor [gray-5] [s=.5] +\definecolor [gray-6] [s=.6] +\definecolor [gray-7] [s=.7] +\definecolor [gray-8] [s=.8] +\definecolor [gray-9] [s=.9] + %D These colors are mapped to interface dependant colornames. \startinterface dutch diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index be616e21d..9b956c756 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{2017.10.18 21:16} +\newcontextversion{2017.10.19 13:50} %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 3c0ff4c51..65f779e19 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -41,7 +41,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2017.10.18 21:16} +\edef\contextversion{2017.10.19 13:50} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/mlib-ctx.lua b/tex/context/base/mkiv/mlib-ctx.lua index b149c47f6..baa08384f 100644 --- a/tex/context/base/mkiv/mlib-ctx.lua +++ b/tex/context/base/mkiv/mlib-ctx.lua @@ -12,6 +12,7 @@ if not modules then modules = { } end modules ['mlib-ctx'] = { local type, tostring = type, tostring local format, concat = string.format, table.concat local settings_to_hash = utilities.parsers.settings_to_hash +local formatters = string.formatters local report_metapost = logs.reporter("metapost") @@ -201,6 +202,39 @@ function metapost.graphic(specification) metapost.graphic_base_pass(setmpsformat(specification)) end +function metapost.startgraphic(t) + if not t then + t = { } + end + if not t.instance then + t.instance = metapost.defaultinstance + end + if not t.format then + t.format = metapost.defaultformat + end + if not t.method then + t.method = metapost.defaultmethod + end + if not t.definitions then + t.definitions = "" + end + t.data = { } + return t +end + +function metapost.stopgraphic(t) + if t then + t.data = concat(t.data or { },"\n") + metapost.graphic(t) + t.data = "" + end +end + +function metapost.tographic(t,f,s,...) + local d = t.data + d[#d+1] = s and formatters[f](s,...) or f +end + implement { name = "mpgraphic", actions = metapost.graphic, diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua index 05b6a0387..bbb079cc8 100644 --- a/tex/context/base/mkiv/mult-def.lua +++ b/tex/context/base/mkiv/mult-def.lua @@ -7871,6 +7871,9 @@ return { ["filler"]={ ["en"]="filler", }, + ["filter"]={ + ["en"]="filter", + }, ["filtercommand"]={ ["en"]="filtercommand", }, diff --git a/tex/context/base/mkiv/publ-ini.lua b/tex/context/base/mkiv/publ-ini.lua index 5ff701c37..07160ec57 100644 --- a/tex/context/base/mkiv/publ-ini.lua +++ b/tex/context/base/mkiv/publ-ini.lua @@ -489,7 +489,7 @@ end local findallused do local reported = { } - local finder = publications.finder + ----- finder = publications.finder findallused = function(dataset,reference,internal,forcethem) local current = datasets[dataset] @@ -642,6 +642,29 @@ local findallused do return okay, todo, tags end + local firstoftwoarguments = context.firstoftwoarguments + local secondoftwoarguments = context.secondoftwoarguments + + implement { + name = "btxdoifelsematches", + arguments = { "string", "string", "string" }, + actions = function(dataset,tag,expression) + local find = publications.finder(dataset,expression) + local okay = false + if find then + local d = datasets[dataset] + if d then + local e = d.luadata[tag] + if e and find(e) then + firstoftwoarguments() + return + end + end + end + secondoftwoarguments() + end + } + end local function unknowncite(reference) @@ -1813,6 +1836,7 @@ do end local method = specification.method or v_none local ignored = specification.ignored or "" + local filter = specification.filter or "" rendering.method = method rendering.ignored = ignored ~= "" and settings_to_set(ignored) or nil rendering.list = { } @@ -1837,6 +1861,24 @@ do end filtermethod(dataset,rendering,keyword) local list = rendering.list + if list and filter ~= "" then + local find = publications.finder(dataset,filter) + if find then + local luadata = datasets[dataset].luadata + local matched = 0 + for i=1,#list do + local found = list[i] + local entry = luadata[found[1]] + if find(entry) then + matched = matched + 1 + list[matched] = found + end + end + for i=#list,matched + 1,-1 do + list[i] = nil + end + end + end ctx_btxsetnoflistentries(list and #list or 0) end @@ -2265,6 +2307,7 @@ do { "repeated" }, { "ignored" }, { "group" }, + { "filter" }, } } } @@ -3343,7 +3386,7 @@ do -- local lpegmatch = lpeg.match local splitter = lpeg.tsplitat(":") - interfaces.implement { + implement { name = "checkinterfacechain", arguments = { "string", "string" }, actions = function(str,command) diff --git a/tex/context/base/mkiv/publ-ini.mkiv b/tex/context/base/mkiv/publ-ini.mkiv index e029f0564..4a31076c1 100644 --- a/tex/context/base/mkiv/publ-ini.mkiv +++ b/tex/context/base/mkiv/publ-ini.mkiv @@ -826,6 +826,7 @@ repeated {\btxrenderingparameter\c!repeat}% ignored {\btxrenderingparameter\c!ignore}% group {\btxrenderingparameter\c!group}% + filter {\btxrenderingparameter\c!filter}% \relax \ifnum\nofbtxlistentries>\zerocount \forgetall @@ -1893,6 +1894,11 @@ \unexpanded\def\stopbtxrunningstyleandcolor {\endgroup} +%D Maybe handy: + +\unexpanded\def\btxdoifelsematches#1#2#3% + {\clf_btxdoifelsematches{#1}{#2}{#3}} + %D Defaults: \setupbtxrendering diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex a402e1936..6927d71f2 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 849fb1351..8e423d993 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf |