[luatex] luamplib + picture

Troy Henderson thenders at gmail.com
Tue May 26 13:57:23 CEST 2015


In MetaPost, the following code produces

2 "textual" "textual"

as expected.

% Begin code %
picture pct;
pct:=btex{a\,b}etex;

show length pct;
for tkn within pct:
  for str="bounded", "clipped", "filled", "stroked", "textual":
    if scantokens str tkn: show str; fi
  endfor
endfor

beginfig(0)
endfig;
end
% End code %

However, using luamplib (with lualatex), the following code produces

1 "stroked"

which is unexpected.

    \begin{mplibcode}
        picture pct;
        pct:=btex a\,b" etex;

        show length pct;
        for tkn within pct:
            for str="bounded", "clipped", "filled", "stroked", "textual":
                if scantokens str tkn: show str; fi
            endfor
        endfor

        beginfig(0)
        endfig;
    \end{mplibcode}

Why does luamplib indicate that the btex/etex has length 1, and why does
that picture have only 1 stroked token?

Troy Henderson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20150526/74522d8c/attachment.html>


More information about the luatex mailing list