[metapost] jobname in luamplib

Dohyun Kim nomosnomos at gmail.com
Sat Aug 5 02:51:30 CEST 2023


The only way seems to be that luamplib.lua should be patched.

diff --git a/usr/local/texlive/2023/texmf-dist/tex/luatex/luamplib/luamplib.lua
b/luamplib.lua
index 3f396b1..3049188 100644
--- a/usr/local/texlive/2023/texmf-dist/tex/luatex/luamplib/luamplib.lua
+++ b/luamplib.lua
@@ -305,6 +305,7 @@ local function luamplibload (name)
     make_text   = luamplib.maketext,
     run_script  = luamplib.runscript,
     math_mode   = luamplib.numbersystem,
+    job_name    = tex.jobname,
     random_seed = math.random(4095),
     extensions  = 1,
   }

I will upload a new version in a few days.

2023년 8월 4일 (금) 오후 7:03, Toby Thurston <thurston at eml.cc>님이 작성:
>
> In plain MP with "mpost", the internal variable "jobname" resolves to the stem of the name of the current source file.
>
> But if I use "luamplib" with "lualatex" it always resolves to "mpout" -- would it be possible to propagate the current source filename from the lualatex level down to the MP level please?
>
> Or is there an alternative approach with lualatex?
>
> thanks, Toby Thurston
> --
> http://tug.org/metapost/



-- 
Dohyun Kim
Seoul, Republic of Korea



More information about the metapost mailing list.