diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luamplib/luamplib-createmem.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib-createmem.lua | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib-createmem.lua b/Master/texmf-dist/tex/luatex/luamplib/luamplib-createmem.lua new file mode 100644 index 00000000000..7d3d611110c --- /dev/null +++ b/Master/texmf-dist/tex/luatex/luamplib/luamplib-createmem.lua @@ -0,0 +1,55 @@ +-- +-- This is file `luamplib-createmem.lua', +-- generated with the docstrip utility. +-- +-- The original source files were: +-- +-- luamplib.dtx (with options: `gen-lua') +-- This is a generated file. +-- +-- Copyright (C) 2008-2009 by Hans Hagen, Taco Hoekwater and Elie Roux +-- <elie.roux@telecom-bretagne.eu>. +-- +-- This work is under the CC0 license. +-- +-- This Current Maintainer of this work is Elie Roux. +-- +-- This work consists of the main source file luamplib.dtx +-- and the derived files +-- luamplib.sty, luamplib.lua, luamplib-createmem.lua and luamplib.pdf. +-- + +kpse.set_program_name("kpsewhich") + +function finder (name, mode, ftype) + if mode == "w" then + return name + else + local result = kpse.find_file(name,ftype) + return result + end +end + +local preamble = [[ +input %s ; dump ; +]] + + +makeformat = function (name, mem_name) + local mpx = mplib.new { + ini_version = true, + find_file = finder, + job_name = mem_name, + } + if mpx then + local result + result = mpx:execute(string.format(preamble,name)) + print(string.format("dumping format %s in %s", name, mem_name)) + mpx:finish() + end +end + +makeformat("plain", "luatex-plain.mem") + +-- +-- End of File `luamplib-createmem.lua'. |