[tex-live] generating luatex-plain.mem

Dohyun Kim nomosnomos at gmail.com
Wed Sep 30 15:46:59 CEST 2009


2009/9/30 Élie Roux <elie.roux at telecom-bretagne.eu>:
> 2009/9/30 Dohyun Kim <nomosnomos at gmail.com>:
>> We do not need that file.
>> Please see luatex-mplib.lua located in texmf-dist/tex/generic/context/ .
>
> I see... but isn't it a bit unefficient to input plain every time
> instead of generating a format? If it's ok like this I'll change
> luamplib.

@@ -70,7 +70,11 @@
         if mode == "w" then
             return name
         else
-            return mpkpse:find_file(name,ftype)
+	    local found = mpkpse:find_file(name,ftype)
+	    if not found and ftype == "mem" then
+		found = mpkpse:find_file("metapost/"..name,ftype)
+	    end
+	    return found
         end
     end

After patching luatex-mplib.lua as above,
I could use mpost.mem installed already by tl2009:

\input luatex-mplib
\setmplibformat{mpost}
\mplibcode
beginfig(1);
draw fullcircle scaled 2cm;
endfig;
\endmplibcode
\bye

So no need to make the same file once again.

Best,
Dohyun Kim


More information about the tex-live mailing list