William Adams | 21 Nov 20:29 2014

Use metaflow.mp in lualatex using mplib?

Metflow is a package which allows one to do flow charts in metapost:

http://www.utdallas.edu/~hamlen/metaflow.pdf
http://www.utdallas.edu/~hamlen/metaflow.mp
http://www.utdallas.edu/~hamlen/mftext.tex

When I try to use it, I get the error:

! Incomplete string token has been flushed.

How do I fix this?

William

--

-- 
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.

--
http://tug.org/metapost/

Graham Douglas | 5 Nov 13:27 2014
Picon

Re: MPlib: some observations on the mp_gr_copy_object(MP mp, mp_graphic_object*p) function

On 05/11/2014 11:00, metapost-request <at> tug.org wrote:
> Send metapost mailing list submissions to
> 	metapost <at> tug.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://tug.org/mailman/listinfo/metapost
> or, via email, send a message with subject or body 'help' to
> 	metapost-request <at> tug.org
>
> You can reach the person managing the list at
> 	metapost-owner <at> tug.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of metapost digest..."
>
>
> Today's Topics:
>
>    1. MPlib: some observations on the mp_gr_copy_object(MP mp,
>       mp_graphic_object*p) function (Graham Douglas)
>    2. Re: MPlib: some observations on the mp_gr_copy_object(MP mp,
>       mp_graphic_object*p) function (luigi scarso)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 3 Nov 2014 22:33:20 +0000
> From: Graham Douglas <graham.douglas <at> readytext.co.uk>
> To: <metapost <at> tug.org>
(Continue reading)

Graham Douglas | 3 Nov 23:33 2014
Picon

MPlib: some observations on the mp_gr_copy_object(MP mp, mp_graphic_object*p) function

Hi All

I'm working with MPlib (version 1.801, compiled under Windows 7, 64 bit
) and using mp_gr_copy_object(MP mp,mp_graphic_object*p) to create a way
to cache graphics produced by MPlib (which is now working well, after
the "fixes" below.).  I noticed that the mp_gr_copy_object(MP
mp,mp_graphic_object*p) function (in psout.c) was not copying a number
of key values into the new object --- such as ljoin, lcap colour
information etc. My apologies if this has been fixed or, of course,
there are good reasons that these values are not copied (or it is some
other error on my part). Anyway, I thought I'd make a note of this just
in case. I have highlighted the changes I made within psout.c

Warm wishes
Graham

mp_graphic_object* mp_gr_copy_object(MP mp,mp_graphic_object*p)
{

.....

switch(gr_type(p)){
case mp_fill_code:
tf= (mp_fill_object*)mp_new_graphic_object(mp,mp_fill_code);
gr_pre_script(tf)= mp_xstrdup(mp,gr_pre_script((mp_fill_object*)p));
gr_post_script(tf)= mp_xstrdup(mp,gr_post_script((mp_fill_object*)p));
gr_path_p(tf)= mp_gr_copy_path(mp,gr_path_p((mp_fill_object*)p));
gr_htap_p(tf)= mp_gr_copy_path(mp,gr_htap_p(p));
gr_pen_p(tf)= mp_gr_copy_path(mp,gr_pen_p((mp_fill_object*)p));

(Continue reading)

Tobias Columbus | 16 Oct 23:44 2014
Picon

Filling complex paths

Hi all,

I am currently writing a piece of software that should spit out some MetaPost
code. My input are the closed curves of a glyph and I want to produce MetaPost
code that fills them according to Postscript rules. However, as MetaPost cannot
handle non-contiguous closed paths, this task seems difficult at least. 

Note that the glyphs come from non-Postscript fonts, so that the MetaPost
"glyph" primitive does not work for me. I also tried "graphictext" as described
in the Metafun manual but that turned out to be too inaccurate. I traced the
inaccuracy back to "pstoedit", which is called for "graphictext".

My attempt was to fiddle around with specials and
withprescript/withpostscript.  This attempt turned out to be nonsense as
addto always writes "stroke" or "fill" and my specials were ignored. I
could, of course, write the whole glyph with specials, but I would
prefer a cleaner solution.

Has anybody some experience with this kind of problem? How difficult
would it be to add filling of non-contiguous paths to MetaPost?

Thank you in advance,
Tobias
--
http://tug.org/metapost/

Vafa Khalighi | 9 Sep 07:09 2014
Picon

"Improper transformation argument" Error

I have a metafont source file that has the following code:

begingroup
  my_T := currenttransform;
  currenttransform := identity slanted my_slant;
  currentpicture := nullpicture;
  clearxy;
  picture joined_fit_plus_pic;
  pickup pensquare;
  x1=x2=-2mag;  x3=x4=2mag+kashida_width;
  y1=y4=0;  y2=y3=horiz_width;
 fill (z1--z2--z3--z4--cycle) withweight 1;
  joined_fit_plus_pic := currentpicture;
  currenttransform := my_T;
endgroup;

when I run metafont on this, it runs smoothly without any problems.
but when I use mfplain format of metapost, I get the following error:

>> currenttransform.withweight1
! Improper transformation argument.
<to be read again>
                   ;
l.61  fill (z1--z2--z3--z4--cycle) withweight 1;

?

What is wrong? and how do I fix this? If required, I can provide the
full source.
--
(Continue reading)

Akira Kakuto | 8 Sep 01:32 2014
Picon

Processing metafont sources with metapost

s/a final error/final errors/

--
a

--
http://tug.org/metapost/

Vafa Khalighi | 7 Sep 11:20 2014
Picon

Processing metafont sources with metapost

Hi

I am designing a new font from scratch and I write metafont sources
and then compile them with metapost to generate the svg of each glyph.
To explain my issue, I will use cmr12.mf as an example here.

I have a file test.mp that contains:

outputtemplate := "%j-%c.svg";
outputformat := "svg";
input cmr12.mf;

and I process test.mp with mpost&mfplain test.mp

As expected for each glyph a svg will be generated; however I get a
warning about bad RGBcolor. Furthermore the glyph will be in gray
color instead black. There is also a grid and some dots, and labels
(numbers) which I do not want. How this can be fixed?

I have attached letter G and the view I got from inkscape.

Thanks
--
http://tug.org/metapost/
Toby Thurston | 1 Sep 16:25 2014

Bug with "odd" primitive?

The "odd" primitive appears to return "false" for all negative numbers.  This behaviour is significantly
different from Metafont. 
Can we get it corrected?  Or at least documented?  Thanks Toby

Test program:

    show(odd -3); end

result with Metafont:

    This is METAFONT, Version 2.7182818 (TeX Live 2014) (preloaded base=mf)
    (test.mf 
    >> true )  
    Transcript written on test.log.

result with Metapost

    This is MetaPost, version 1.902 (TeX Live 2014) (kpathsea version 6.2.0)
    (/usr/local/texlive/2014/texmf-dist/metapost/base/mpost.mp
    (/usr/local/texlive/2014/texmf-dist/metapost/base/plain.mp
    Preloading the plain mem file, version 1.005) ) (./test.mf
    >> false )
    Transcript written on test.log.

Thanks T.
--
http://tug.org/metapost/

France Dacar | 20 Aug 17:15 2014
Picon
Picon

Troubles rendeting text in PNG output

Hello there.

I am using MetaPost version 1.803 (mpost in MiKTeX 2.9).
I searched the Web, and in particular the MetaPost site, but could not find
the answer to my problem. The following test file

---------------------------------------
verbatimtex
\documentclass[11pt]{article}
\begin{document}
etex

outputformat := "png";
outputtemplate := "%j-%c.%o";

beginfig(1);
label(btex $(hs,f(s)t)$ etex, (0,0));
label(btex abracadabra etex, (0,-20));
endfig;

verbatimtex
\end{document}
etex
end
---------------------------------------

produces the expected result, though it spews out 20 warnings like

     Warning: invalid entry for `pkol0': unknown name `store' ignored

(Continue reading)

Walt Burkhard | 18 Aug 21:04 2014

quick question

Hello,

Does the current mpost 1.902 from texlive run with "large" integer/double
values?    I am using  something on the order of   97*360  within
the sind and cosd functions.    

If not, what command line option do I need.

Many thanks in advance.

Walt Burkhard
--
http://tug.org/metapost/
Vadim Radionov | 15 Jul 18:03 2014
Picon

dependencies bug

Dear all, 

My colleague found a bug in Metapost 1.803 which I would lile to report.  In the following minimal example, showdependencies shows something inappropriate, which gives "This can't happen (dep)" error later.  But if I move the third s-relation after setting z[4,6,8], everything works fine.

Vadim

def s(expr A,B,C,D)=
D-C=B-A=((B-D) rotated 90)
enddef;

beginfig(1);
s(z3,z4,z7,z8);
s(z4,z5,z6,z11);
s(z6,z12,z8,z10);

showdependencies;

z4 = (0,0);
z6 = (1cm,0);
z8 = (0,1cm);


endfig;
bye
--
http://tug.org/metapost/

Gmane