[luatex] Reusable Code (LuaLaTeX + LuaMPlib)

Troy Henderson thenders at gmail.com
Wed May 31 04:37:36 CEST 2017


Apologies, but I forgot to paste my code.  Here it is:

\documentclass{article}
\usepackage{luamplib}

\mplibtextextlabel{enable}
\mplibcodeinherit{enable}

\begin{document}
    \begin{center}
        \begin{mplibcode}
            picture p;
            beginfig(0);
                draw (-36,0)--(36,0);
                label.bot(textext("Hello"),origin);
                p:=currentpicture;
            endfig;
        \end{mplibcode}
    \end{center}

    \begin{center}
        \begin{mplibcode}
            beginfig(1);
                currentpicture:=p;
            endfig;
        \end{mplibcode}
    \end{center}

\end{document}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20170530/43ac7971/attachment.html>


More information about the luatex mailing list