summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv/m-asymptote.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-03-24 19:41:20 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-03-24 19:41:20 +0100
commitdc54cea46e02502b4474a0fa132466974a9cc19c (patch)
tree403096f7ba8345b5dea1f925765523f7d52bd645 /tex/context/modules/mkiv/m-asymptote.lua
parent576286d4c1349c644bea833c99ec5364668ffc8a (diff)
downloadcontext-dc54cea46e02502b4474a0fa132466974a9cc19c.tar.gz
2017-03-24 19:13:00
Diffstat (limited to 'tex/context/modules/mkiv/m-asymptote.lua')
-rw-r--r--tex/context/modules/mkiv/m-asymptote.lua38
1 files changed, 38 insertions, 0 deletions
diff --git a/tex/context/modules/mkiv/m-asymptote.lua b/tex/context/modules/mkiv/m-asymptote.lua
new file mode 100644
index 000000000..99efc4910
--- /dev/null
+++ b/tex/context/modules/mkiv/m-asymptote.lua
@@ -0,0 +1,38 @@
+if not modules then modules = { } end modules ['m-asymptote'] = {
+ version = 1.001,
+ comment = "companion to m-pstricks.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- See m-asymptote.mkiv for some comment.
+
+local context = context
+local replacesuffix = file.replacesuffix
+
+moduledata.asymptote = { }
+
+sandbox.registerrunner {
+ name = "asymptote",
+ program = "asy",
+ method = "execute",
+ template = '-noV -config="" -tex=pdflatex -outformat="prc" "%filename%"',
+ -- template = '-noV -config="" -tex=context -outformat="prc" "%filename%"',
+ checkers = {
+ filename = "readable",
+ }
+}
+
+function moduledata.asympote.process(name)
+ local result = buffers.run( -- experimental
+ name, -- name of the buffer
+ false, -- no wrapping
+ "asymptote", -- name of the process
+ "prc" -- suffix of result
+ )
+ parametersets[name] = {
+ js = replacesuffix(result,"js")
+ }
+ context(result)
+end