From: luigi scarso <luigi.scarso@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Metapost Code works with MKII not with MKIV
Date: Thu, 19 Nov 2009 02:43:48 +0100 [thread overview]
Message-ID: <fe8d59da0911181743v29e03ef9wbe495ccc2b692868@mail.gmail.com> (raw)
In-Reply-To: <3b4b12310911181731u2394f3d4i92939f8bb5193415@mail.gmail.com>
On Thu, Nov 19, 2009 at 2:31 AM, Curiouslearn <curiouslearn@gmail.com> wrote:
> Hi,
>
> I am back to trying Metapost. I spent sometime yesterday and today
> learning about clipping, buildcycles etc. to fill areas with patterns.
> I think I will try to write a simple tutorial with it.
>
> Meanwhile, I just updated my installation of Context minimals. The
> following simple Metapost code does not compile with MKIV, but
> compiles okay with MKII.
>
\setuppapersize[letter][letter]
\setupcolors[state=start]
\setuppagenumbering[state=stop]
\starttext
\startuseMPgraphic{Filling}
u := 1cm;
w:= 2pt;
%Axes
path xaxis; path yaxis;
xaxis := (0,0)--(12,0) scaled u;
yaxis := (0,0)--(0,12) scaled u;
path demand; path AC;
demand :=
function (1,"x","10-x",0,10,1) scaled u;
AC :=
function(1,"x","2+8/x",1,10,0.1) scaled u;
drawarrow xaxis withpen pencircle scaled w;
drawarrow yaxis withpen pencircle scaled w;
draw demand withpen pencircle scaled w withcolor 0.5red;
draw AC withpen pencircle scaled w withcolor 0.5green;
fill fullcircle scaled u shifted (4*u,5*u) withcolor 0.1[white,blue] ;
label(btex \tfb S1 etex,(4,5)*u);
\stopuseMPgraphic
\midaligned{\useMPgraphic{Filling}}
\stoptext
You forgot \stoptext at the end
It works here
--
luigi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2009-11-19 1:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-19 1:31 Curiouslearn
2009-11-19 1:40 ` Aditya Mahajan
2009-11-19 1:43 ` luigi scarso [this message]
2009-11-19 1:55 ` Curiouslearn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe8d59da0911181743v29e03ef9wbe495ccc2b692868@mail.gmail.com \
--to=luigi.scarso@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).