<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Courier New;color: #000000;font-size: 12pt;">
<font face="Courier New" size="3"><br>
Now I can truly say there was no problem whan I tried <br>
compiling your MWE.<br>
<br>
I have:<br>
  LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 4971)<br>
  ...<br>
  Compiled with libpng 1.6.10; using 1.6.10<br>
  Compiled with zlib 1.2.8; using 1.2.8<br>
  Compiled with poppler version 0.25.2<br>
  Compiled with mplib version 1.902<br>
  ...<br>
  luamplib.sty    2014/07/04 v2.8.1 mplib package for LuaTeX<br>
  luatexbase-modutils.sty    2013/05/11 v0.6 Module utilities for LuaTeX<br>
  ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)<br>
  luatexbase-loader.sty    2013/05/11 v0.6 Lua module loader for LuaTeX<br>
  luatexbase-compat.sty    2011/05/24 v0.4 Compatibility tools for LuaTeX<br>
<br>
If you have some other version(s), the message looks like<br>
there may be a problem with the expression (str @#) when <br>
@# is empty. However, I don't know enough about metaflow<br>
to suggest a work-around.<br>
<br>
Cheers,<br>
<br>
Daniel H. Luecking [luecking@uark.edu]<br>
Graduate Coordinator<br>
Department of Mathematical Sciences<br>
1 University of Arkansas<br>
Fayetteville, AR, USA 72701-1201</font><br>
<br>
________________________________________<br>
From: William Adams [will.adams@frycomm.com]<br>
Sent: Monday, December 01, 2014 10:20 AM<br>
To: Daniel H. Luecking<br>
Cc: metapost@tug.org<br>
Subject: Re: [metapost] Use metaflow.mp in lualatex using mplib?<br>
<br>
On Nov 21, 2014, at 3:42 PM, Daniel H. Luecking wrote:<br>
<br>
> Oops, I didn't notice the reference to mplib. Forget what I<br>
> said about having no trouble. Still, an MWE would be useful.<br>
<br>
Okay. I'm trying to do the first example.<br>
<br>
It works as two separate files:<br>
<br>
===========chart.mp============<br>
input metaflow<br>
prologues := 2;<br>
filenametemplate "%j-%c.mps";<br>
beginfig(1)<br>
z1c = (0,0);<br>
draw rect1(btex experiment etex);<br>
putitem2 20right of 1;<br>
draw oval2(btex results etex);<br>
drawarrow connector(1,2,right,right);<br>
putitems(2,3) like (1,2);<br>
z3s = (55,30);<br>
draw diamond3(btex evaluate etex);<br>
drawarrow connector(2,3,right,right);<br>
drawarrow connector1(3,1,down,up);<br>
z4um = point 1.5 of cp1;<br>
drawopen rect4(btex revise etex);<br>
putitems(3,5) like (1,2);<br>
drawopen rect5(btex success etex);<br>
drawarrow connector(3,5,right,right);<br>
endfig;<br>
end<br>
========end=chart.mp============<br>
<br>
===========test.tex=============<br>
\documentclass{article}<br>
\usepackage{graphicx}<br>
\begin{document}<br>
Here is a nice diagram:<br>
\begin{center}<br>
\includegraphics<br>
[width=.7\hsize]<br>
{chart-1.mps}<br>
\end{center}<br>
\end{document}<br>
========end=test.tex============<br>
<br>
Trying to put them together and process them using lualatex and mplib:<br>
<br>
<br>
\documentclass{article}<br>
\usepackage{luamplib}<br>
\begin{document}<br>
Here is a nice diagram:<br>
\begin{center}<br>
\begin{mplibcode}<br>
input metaflow<br>
prologues := 2;<br>
filenametemplate "%j-%c.mps";<br>
beginfig(1)<br>
z1c = (0,0);<br>
draw rect1(btex experiment etex);<br>
putitem2 20right of 1;<br>
draw oval2(btex results etex);<br>
drawarrow connector(1,2,right,right);<br>
putitems(2,3) like (1,2);<br>
z3s = (55,30);<br>
draw diamond3(btex evaluate etex);<br>
drawarrow connector(2,3,right,right);<br>
drawarrow connector1(3,1,down,up);<br>
z4um = point 1.5 of cp1;<br>
drawopen rect4(btex revise etex);<br>
putitems(3,5) like (1,2);<br>
drawopen rect5(btex success etex);<br>
drawarrow connector(3,5,right,right);<br>
endfig;<br>
\end{mplibcode}<br>
\end{center}<br>
\end{document}<br>
<br>
fails w/ the error messages:<br>
<br>
./testmpl.tex:27: LuaTeX error ...texlive/2013/texmf-dist/tex/luatex/luamplib/lu<br>
amplib.lua:177: Module luamplib error:<br>
(luamplib)<br>
(luamplib)<br>
(luamplib)<br>
(luamplib)<br>
(luamplib)<br>
(luamplib)<br>
(luamplib)<br>
(luamplib) (./metaflow.mp)<br>
(luamplib) ! Incomplete string token has been flushed.<br>
(luamplib) <*> ...warrow connector(3,5,right,right); endfig;<br>
(luamplib)<br>
(luamplib)<br>
(luamplib)<br>
(luamplib) no-error<br>
<br>
stack traceback:<br>
[C]: in function 'error'<br>
...xlive/2013/texmf-dist/tex/luatex/luatexbase/modutils.lua:26: in function 'mo<br>
dule_error_int'<br>
...xlive/2013/texmf-dist/tex/luatex/luatexbase/modutils.lua:49: in function 'er<br>
r'<br>
...texlive/2013/texmf-dist/tex/luatex/luamplib/luamplib.lua:177: in function <.<br>
..texlive/2013/texmf-dist/tex/luatex/luamplib/luamplib.lua:169><br>
(...tail calls...)<br>
[string "\directlua "]:1: in main chunk.<br>
\ltxdomplibcodefinally ...luamplib.process(data) }<br>
\end {mplibcode}\else \tok...<br>
l.27 \end{mplibcode}<br>
<br>
William<br>
<br>
--<br>
William Adams<br>
senior graphic designer<br>
Fry Communications<br>
Sphinx of black quartz, judge my vow.<br>
<br>
</div>
</body>
</html>