Ivan Ivanov | 2 Oct 2003 16:07
Picon
Favicon

(no subject)

At 03:11 PM 9/29/2003 -0700, you wrote:

>>I receieve a white gap between red thick graphics
and
>>the real fraphics of F and the gap is at the point
of
>>local minimum. This was what I wanted to overcome.
>Naturally: the pen has radius .1cm but the distance
>between the new 
>path
>and the old varies from almost .2cm at one end to
>about .14cm at the 
>other.

Well, I thought that the variation won't be so big. 

>This is unnecesarily hard work. If I understand what
>you want the
>following should work very well:
>beginfig(3);
>path p; p := makepath (H, 0, .1, 1) scaled 5cm;
>fill (reverse p)--(p shifted (.2cm*down))--cycle
>withcolor red;
>draw p; draw p shifted (.2cm*down) withcolor red;
>endfig;
Thanks, it is really cleaner and shorter. The simple
things are so hard to see.

>By the way: filling after drawing covers up 1/2 the
>line drawn.
(Continue reading)

Jens-Uwe Morawski | 8 Oct 2003 13:09
Picon

sort


Hi,

in one of my projects i needed sorting of numeric arrays.
Since i found nothing available for MP i implemented some
basic algorithms. Maybe you can make use of  it too.

Best,
  Jens

%%%
def insertionsort(suffix $)(expr l,r)=
  begingroup; save m, p, t, b ; boolean b ;
    for i=l upto r:
      m := $[i] ; b:=false ;
      for j=i+1 upto r:
	if $[j]<=m:
	  m:=$[j] ; p:=j ; b:=true ;
	fi;
      endfor;
      if b: t:=$[i] ; $[i]:=$[p] ; $[p]:=t ; fi;
    endfor;
  endgroup;
enddef;

def bubblesort(suffix $)(expr l,r)=
  begingroup; save t ;
    for i=l upto r:
      for j=r downto (i+1):
	if $[i]>$[j]:
(Continue reading)

Mads Munch Hansen | 18 Oct 2003 02:11
Picon
Picon
Favicon

graph.mp and fill

hi all, I've been trying to create a gray box-cart in metapost using the
graph extension, but I can't figure out how to do it from reading the
manual, so if anyone had any pointers I'd apperciate it :)

-- Mads
Jens-Uwe Morawski | 19 Oct 2003 12:07
Picon

Re: graph.mp and fill

On Sat, 18 Oct 2003 02:11:04 +0200
Mads Munch Hansen <mmunchh <at> ruc.dk> wrote:

> hi all, I've been trying to create a gray box-cart in metapost using the
> graph extension,

i'm not certain what you mean with 'gray box-chart'. Do you mean a
bar-chart? This is, AFAIK, not possible with graph.mp.

Jens
Nicolas FRANCOIS | 22 Oct 2003 18:53
Picon
Favicon

Block matrices

Hi. I've been looking for a long time for some clues on how to write block
matrices in LaTeX. I tried to use METAPOST, but the placement is non
trivial, and the result not allways satisfactory.

Do you have any experience on how to place efficiently lines in a (La)TeX
construction, like a matrix ?

\bye

--

-- 

Nicolas FRANCOIS
http://nicolas.francois.free.fr

We are the Micro$oft.
Resistance is futile.
You will be assimilated.
Maurizio Vianello | 29 Oct 2003 15:20
Picon

Problem with btex..etex

Dear fellow mp users:

I've been using metapost for quite some time until a couple of years ago. 
Thus, I have a bunch of picture that I know I was able to process, print, 
and include in tex(latex) files.

Then I changed PC and I installed again my tex system as follows:

MikTex version 2.3
WinEdt 5.3

All this on win2000 pro.

Now, if I process a simple file with a "btex .... etex" line through 
mpost.exe as provided by MikTeX I get an error message, like
(cerchio.mp is the name of my simple file, "circle" in italian)

%%%%%%%%%%%%%%%%%%%%

This is MetaPost, Version 0.641 (MiKTeX 2.3) (preloaded mem=plain 
2003.10.17)  29 OCT 2003 14:32
**C:\TEXIN\Mptest\cerchio.mp
(C:\TEXIN\Mptest\cerchio.mp
 >> C:\TEXIN\Mptest\cerchio.mp
 >> C:\TEXIN\Mptest\cerchio.mpx
! Unable to make mpx file.
l.4 label(btex
                a etex, (4in, 4in));
The two files given above are one of your source files
and an auxiliary file I need to read to find out what your
(Continue reading)

Jens-Uwe Morawski | 29 Oct 2003 16:01
Picon

Re: Problem with btex..etex

On Wed, 29 Oct 2003 15:20:25 +0100
Maurizio Vianello <mvs52 <at> lombardiacom.it> wrote:

> %%%%%%%%%%%%%%%%%%%%
> 
> This is MetaPost, Version 0.641 (MiKTeX 2.3) (preloaded mem=plain 
> 2003.10.17)  29 OCT 2003 14:32
> **C:\TEXIN\Mptest\cerchio.mp
> (C:\TEXIN\Mptest\cerchio.mp
>  >> C:\TEXIN\Mptest\cerchio.mp
>  >> C:\TEXIN\Mptest\cerchio.mpx
> ! Unable to make mpx file.
> l.4 label(btex
>                 a etex, (4in, 4in));
> The two files given above are one of your source files
> and an auxiliary file I need to read to find out what your
> btex..etex blocks mean. If you don't know why I had trouble,
> try running it manually through MPtoTeX, TeX, and DVItoMP
> 
> %%%%%%%%%%%%%%%%%%%%%%
>   Could any one be so kind to suggest something? 
> This whole thing is getting frustrating....

the error message suggests to run the conversion
mptotex --> tex --> dvitomp manually. Could you try this?

Jens
Maurizio Vianello | 29 Oct 2003 16:38
Picon

Re: Problem with btex..etex

At 16.01 29/10/2003, Jens-Uwe Morawski wrote:
>On Wed, 29 Oct 2003 15:20:25 +0100
>Maurizio Vianello <mvs52 <at> lombardiacom.it> wrote:
>
> > %%%%%%%%%%%%%%%%%%%%
> >
> > This is MetaPost, Version 0.641 (MiKTeX 2.3) (preloaded mem=plain
> > 2003.10.17)  29 OCT 2003 14:32
> > **C:\TEXIN\Mptest\cerchio.mp
> > (C:\TEXIN\Mptest\cerchio.mp
> >  >> C:\TEXIN\Mptest\cerchio.mp
> >  >> C:\TEXIN\Mptest\cerchio.mpx
> > ! Unable to make mpx file.
> > l.4 label(btex
> >                 a etex, (4in, 4in));
> > The two files given above are one of your source files
> > and an auxiliary file I need to read to find out what your
> > btex..etex blocks mean. If you don't know why I had trouble,
> > try running it manually through MPtoTeX, TeX, and DVItoMP
> >
> > %%%%%%%%%%%%%%%%%%%%%%
> >   Could any one be so kind to suggest something?
> > This whole thing is getting frustrating....
>
>the error message suggests to run the conversion
>mptotex --> tex --> dvitomp manually. Could you try this?

Yes. mptotex (run through a command prompt) will write some tex code on the 
screen (with no complaints) but will not produce a tex file as output (as 
it should be, I think).  Thus, I cannot tex anything etc. Not very 
(Continue reading)

Jose Luis Diaz | 29 Oct 2003 17:53
Picon

Re: Problem with btex..etex

En fecha y hora 29/10/03 16:38, Maurizio Vianello dijo:

>> the error message suggests to run the conversion
>> mptotex --> tex --> dvitomp manually. Could you try this?
> 
> Yes. mptotex (run through a command prompt) will write some tex code on 
> the screen (with no complaints) but will not produce a tex file as 
> output (as it should be, I think).  Thus, I cannot tex anything etc. Not 
> very illuminating.

mptotex does not generate a tex file, but dumps it in the standard 
output. You have to redirect it to a file, i.e:

  mptotex yourfile.mp > test.tex
  tex (or latex) test.tex
  dvitomp (or dvito -mp) test.dvi > yourfile.mpx
  mpost yourfile.mp

Presumably, the second step will fail because you have some error in the 
tex/latex syntax of some label. Doing the steps manually can help you to 
locate the offending label.

Regards,
--JL Diaz
Maurizio Vianello | 31 Oct 2003 12:05
Picon

Re: Problem with btex..etex

At 17.53 29/10/2003, Jose Luis Diaz wrote:
>En fecha y hora 29/10/03 16:38, Maurizio Vianello dijo:
>
>>>the error message suggests to run the conversion
>>>mptotex --> tex --> dvitomp manually. Could you try this?
>>Yes. mptotex (run through a command prompt) will write some tex code on 
>>the screen (with no complaints) but will not produce a tex file as output 
>>(as it should be, I think).  Thus, I cannot tex anything etc. Not very 
>>illuminating.
>
>mptotex does not generate a tex file, but dumps it in the standard output. 
>You have to redirect it to a file, i.e:
>
>  mptotex yourfile.mp > test.tex
>  tex (or latex) test.tex
>  dvitomp (or dvito -mp) test.dvi > yourfile.mpx
>  mpost yourfile.mp
>
>Presumably, the second step will fail because you have some error in the 
>tex/latex syntax of some label. Doing the steps manually can help you to 
>locate the offending label.

Thanks, but I don't think that's the problem , because it happens even with 
trivial files, copied directly from the Metapost manual, as long as there 
is a label.

However, I noticed that everything is OK if I use LatexMP, which seems to 
be a very nice package.

Thanks,
(Continue reading)


Gmane