1if not modules then modules = { } end modules ['grph-epd'] = {
2 version = 1.001,
3 comment = "companion to grph-epd.mkiv",
4 author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
5 copyright = "PRAGMA ADE / ConTeXt Development Team",
6 license = "see context related readme files"
7}
8
9local variables = interfaces.variables
10local settings_to_hash = utilities.parsers.settings_to_hash
11local codeinjections = backends.pdf.codeinjections
12
13local trace = false trackers.register("figures.merging", function(v) trace = v end)
14
15local report = logs.reporter("backend","merging")
16
17local function mergegoodies(optionlist)
18 local options = settings_to_hash(optionlist)
19 local yes = options[variables.yes]
20 local all = options[variables.all]
21 if next(options) then
22 report("% t",table.sortedkeys(options))
23 end
24 if all or yes or options[variables.reference] then
25 codeinjections.mergereferences()
26 end
27 if all or options[variables.comment] then
28 codeinjections.mergecomments()
29 end
30 if all or yes or options[variables.bookmark] then
31 codeinjections.mergebookmarks()
32 end
33 if all or options[variables.field] then
34 codeinjections.mergefields()
35 end
36 if all or options[variables.layer] then
37 codeinjections.mergeviewerlayers()
38 end
39 codeinjections.flushmergelayer()
40end
41
42function figures.mergegoodies(optionlist)
43
44 context.stepwise(function()
45
46
47 mergegoodies(optionlist)
48 end)
49end
50
51interfaces.implement {
52 name = "figure_mergegoodies",
53 actions = figures.mergegoodies,
54 arguments = "string"
55}
56 |