lualatex / luamplib

generic TeX package - including MetaPost code in LuaTeX documents
http://ctan.org/pkg/luamplib
16 stars 11 forks source link

luamplib/metafun problem: arrow tips are not filled. #71

Closed u-fischer closed 6 years ago

u-fischer commented 6 years ago

the metafun code from context has evolved and now (since Texlive 2016) uses functions (in the example fillup) that are not supported by luamplib for pdf output. This has e.g. the effect that arrow tips are not filled:

https://tex.stackexchange.com/questions/408215/metafun-why-is-the-arrow-tip-not-filled

\documentclass{article}
\usepackage{luamplib}
\begin{document}

\begin{mplibcode}
beginfig(1);
drawarrow (0,0)--(10,10);
endfig;
\end{mplibcode}

\mplibsetformat{metafun}
\begin{mplibcode}
beginfig(1);
drawarrow (0,0)--(10,10);
endfig;
\end{mplibcode}

\begin{mplibcode}
def mfun_draw_arrow_path text t =
    if autoarrows :
        set_ahlength(t) ;
    fi
    draw arrowpath mfun_arrow_path t ;
    fill arrowhead mfun_arrow_path t ; %changed fillup to fill
    endgroup ;
enddef ;
beginfig(1);
drawarrow (0,0)--(10,10);
endfig;
\end{mplibcode}

\end{document}

The problem has been reported by Franck Pastor on the metapost list http://tug.org/pipermail/metapost/2017-December/003256.html and Hans Hagen wrote as answer

i have added some code to the luatex-mplib.lua module and it works in plain now so when i post a new context beta someone has to make sure it's also used in latex