ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Metapost Code works with MKII not with MKIV
@ 2009-11-19  1:31 Curiouslearn
  2009-11-19  1:40 ` Aditya Mahajan
  2009-11-19  1:43 ` luigi scarso
  0 siblings, 2 replies; 4+ messages in thread
From: Curiouslearn @ 2009-11-19  1:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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}}

--------------------------------------------------------------------------------------------------------
The LOG file is:
This is LuaTeX, Version beta-0.44.0-2009103007
 \write18 enabled.
(TestFile.tex

ConTeXt  ver: 2009.11.18 21:51 MKIV  fmt: 2009.11.18  int: english/english

system          : cont-new loaded
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-new.tex
systems         : beware: some patches loaded from cont-new.tex
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-new.mkiv))
system          : cont-fil loaded
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-fil.tex
loading         : ConTeXt File Synonyms
)
system          : cont-sys.rme loaded
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/user/cont-sys.rme
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-tmf.tex
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-tmf.mkiv))
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-siz.tex
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-siz.mkiv))
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-otf.tex
(/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-otf.mkiv)))
system          : TestFile.top loaded
(TestFile.top)
fonts           : preloading latin modern fonts
bodyfont        : 12pt rm is loaded
language        : language en is active
color           : system all is global activated
systems         : begin file TestFile at line 5
mplib           : initializing instance 'metafun' using format 'metafun'
mplib           : loading 'metafun.mp' from
'/Applications/ConTeXtMinimals/tex/texmf-cache/luatex-cache/context/3fc847143b06f084e10e73c8fbdf4ae2/formats/cont-en-metafun.mem'
)
*
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Metapost Code works with MKII not with MKIV
  2009-11-19  1:31 Metapost Code works with MKII not with MKIV Curiouslearn
@ 2009-11-19  1:40 ` Aditya Mahajan
  2009-11-19  1:43 ` luigi scarso
  1 sibling, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2009-11-19  1:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 18 Nov 2009, Curiouslearn 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

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Metapost Code works with MKII not with MKIV
  2009-11-19  1:31 Metapost Code works with MKII not with MKIV Curiouslearn
  2009-11-19  1:40 ` Aditya Mahajan
@ 2009-11-19  1:43 ` luigi scarso
  2009-11-19  1:55   ` Curiouslearn
  1 sibling, 1 reply; 4+ messages in thread
From: luigi scarso @ 2009-11-19  1:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Metapost Code works with MKII not with MKIV
  2009-11-19  1:43 ` luigi scarso
@ 2009-11-19  1:55   ` Curiouslearn
  0 siblings, 0 replies; 4+ messages in thread
From: Curiouslearn @ 2009-11-19  1:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thanks. That was a stupid mistake. It works fine now.

On Wed, Nov 18, 2009 at 8:43 PM, luigi scarso <luigi.scarso@gmail.com> wrote:
> 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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-19  1:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-19  1:31 Metapost Code works with MKII not with MKIV Curiouslearn
2009-11-19  1:40 ` Aditya Mahajan
2009-11-19  1:43 ` luigi scarso
2009-11-19  1:55   ` Curiouslearn

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).