summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/meta-blb.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-01-17 23:06:17 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-01-17 23:06:17 +0100
commit823bd4a7d8ff32c05807b02e650ecbd60b43e95d (patch)
treef6ac3760c1d5da04f8570587b76572cd4fb44ecd /tex/context/base/mkiv/meta-blb.lua
parent17527db3823d6123f4e462d13244430c40b78adb (diff)
downloadcontext-823bd4a7d8ff32c05807b02e650ecbd60b43e95d.tar.gz
2019-01-17 22:18:00
Diffstat (limited to 'tex/context/base/mkiv/meta-blb.lua')
-rw-r--r--tex/context/base/mkiv/meta-blb.lua89
1 files changed, 21 insertions, 68 deletions
diff --git a/tex/context/base/mkiv/meta-blb.lua b/tex/context/base/mkiv/meta-blb.lua
index 5fea35f6d..ca3e55e42 100644
--- a/tex/context/base/mkiv/meta-blb.lua
+++ b/tex/context/base/mkiv/meta-blb.lua
@@ -31,10 +31,6 @@ local report = logs.reporter("metapost","blobs")
trackers.register("metapost.blobs", function(v) trace = v end)
--- We start with a text that comes from an analyze stage and can end up with
--- one or more results. For practical reasons we store the blobs in one array
--- and work with ranges.
-
local allblobs = { }
local function newcategory(t,k)
@@ -189,10 +185,6 @@ local function reset()
blob_raw_reset()
end
-local function analyze(object,prescript)
- -- nothing
-end
-
local function process(object,prescript,before,after)
-- if prescript.tb_stage == "inject" then
local tb_blob = tonumber(prescript.tb_blob)
@@ -205,7 +197,6 @@ end
metapost.installplugin {
name = "texblob",
reset = reset,
- analyze = analyze,
process = process,
}
@@ -291,71 +282,33 @@ interfaces.implement {
actions = initialize,
}
-local ft_reset, ft_analyze, ft_process do
-
- if metapost.use_one_pass then
-
- local mp_category = 0
- local mp_str = ""
-
- function mp.mf_inject_blob(category,str)
- newblob(category,str) -- only for tracing
- mp_category = category
- mp_str = str
- tex.runtoks("mpblobtext")
- end
-
- interfaces.implement {
- name = "mpblobtext",
- actions = function()
- context.MPLIBfollowtext(mp_category,mp_str)
- end
- }
-
- ft_process = function(object,prescript,before,after)
- if prescript.ft_category then
- object.path = false
- object.color = false
- object.grouped = true
- object.istext = true
- end
- end
-
-
- else
-
- ft_reset = function()
- -- nothing
- end
-
- ft_analyze = function(object,prescript)
- if prescript.ft_stage == "trial" then
- local ft_category = tonumber(prescript.ft_category)
- if ft_category then
- newblob(ft_category,object.postscript) -- only for tracing
- context.MPLIBfollowtext(ft_category,object.postscript)
- metapost.getjobdata().multipass = true
- end
- end
- end
-
- ft_process = function(object,prescript,before,after)
- if prescript.ft_stage == "final" then
- object.path = false
- object.color = false
- object.grouped = true
- object.istext = true
- end
- end
+local mp_category = 0
+local mp_str = ""
+function mp.mf_inject_blob(category,str)
+ newblob(category,str) -- only for tracing
+ mp_category = category
+ mp_str = str
+ tex.runtoks("mpblobtext")
+end
+interfaces.implement {
+ name = "mpblobtext",
+ actions = function()
+ context.MPLIBfollowtext(mp_category,mp_str)
end
+}
+local process = function(object,prescript,before,after)
+ if prescript.ft_category then
+ object.path = false
+ object.color = false
+ object.grouped = true
+ object.istext = true
+ end
end
metapost.installplugin {
name = "followtext",
- reset = ft_reset,
- analyze = ft_analyze,
- process = ft_process,
+ process = process,
}