ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Metapost and mkiv
@ 2009-09-22 12:44 Otared Kavian
  2009-09-22 16:03 ` Hans Hagen
       [not found] ` <200911071613.35924.alan.braslau@cea.fr>
  0 siblings, 2 replies; 9+ messages in thread
From: Otared Kavian @ 2009-09-22 12:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

The following minimal example used to work with mkiv (until last May,  
I would guess…) but now it doesn't work with the latest
ConTeXt version 2009.09.21 17:39

Can any one tell me please what am I doing wrong?

Best regards: OK
%% begin

\setupcolors[state=start]
\starttext

\startbuffer[axes-1]
numeric u ; u := .5cm ;
path xox ; xox := (-u,0)--(8u,0) ;
path yoy ; yoy := (0,-u)--(0,7u) ;
draw xox withcolor blue ;
draw yoy withcolor blue ;
\stopbuffer

This MetaPost graphic is  \doifmodeelse{mkiv}{not shown with mkiv} 
{shown with mkii}:

\placefigure[middle][-]{}{\processMPbuffer[axes-1]} {}

\stoptext


%% end
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Metapost and mkiv
  2009-09-22 12:44 Metapost and mkiv Otared Kavian
@ 2009-09-22 16:03 ` Hans Hagen
  2009-09-22 16:45   ` Aditya Mahajan
       [not found] ` <200911071613.35924.alan.braslau@cea.fr>
  1 sibling, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2009-09-22 16:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Otared Kavian wrote:
> Hi all,
> 
> The following minimal example used to work with mkiv (until last May, I 
> would guess…) but now it doesn't work with the latest
> ConTeXt version 2009.09.21 17:39
> 
> Can any one tell me please what am I doing wrong?

shows ok here


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Metapost and mkiv
  2009-09-22 16:03 ` Hans Hagen
@ 2009-09-22 16:45   ` Aditya Mahajan
  2009-11-07 12:25     ` Metapost+mpgraph " Alan BRASLAU
  0 siblings, 1 reply; 9+ messages in thread
From: Aditya Mahajan @ 2009-09-22 16:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 455 bytes --]

On Tue, 22 Sep 2009, Hans Hagen wrote:

> Otared Kavian wrote:
>> Hi all,
>> 
>> The following minimal example used to work with mkiv (until last May, I 
>> would guess…) but now it doesn't work with the latest
>> ConTeXt version 2009.09.21 17:39
>> 
>> Can any one tell me please what am I doing wrong?
>
> shows ok here

It also works for me with 2009.09.18. Do normal MP figures work (those 
inside \startMPcode...\stopMPcode)


Aditya

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Metapost+mpgraph and mkiv
  2009-09-22 16:45   ` Aditya Mahajan
@ 2009-11-07 12:25     ` Alan BRASLAU
  2009-11-07 12:39       ` Taco Hoekwater
  0 siblings, 1 reply; 9+ messages in thread
From: Alan BRASLAU @ 2009-11-07 12:25 UTC (permalink / raw)
  To: ntg-context

mpgraph does not appear to work properly under mkiv.

%% minimal example %%
\starttext

\startuseMPgraphic{test}
input graph
draw begingraph(16cm,12cm);
	setrange(whatever,whatever,whatever,whatever);
	gdraw (0,0) -- (1,1) ;
	endgraph;
\stopuseMPgraphic

\startTEXpage
\useMPgraphic{test}
\stopTEXpage

\stoptext
%%%%%%%%%%%%%%%%%%%%%


Works correctly under mkii (texexec) but not under mkiv (context).
Error message:
mplib | mp terminal: (/home/local/context/tex/texmf/metapost/base/graph.mp
! Redundant equation.
<to be read again> 
                   ;
l.143 Gmargin.low=-.07;
                                              % bbox fraction for default 
ra...

! Redundant equation.
<to be read again> 
                   ;
l.144 Gmargin.high=1.07;
                                              % bbox fraction for default 
ra...

)
mplib | mp error: unknown, no error, terminal or log messages
mplib | mp terminal: [1]
mplib | mp error: unknown, no error, terminal or log messages


Alan
___________________________________________________________________________________
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] 9+ messages in thread

* Re: Metapost+mpgraph and mkiv
  2009-11-07 12:25     ` Metapost+mpgraph " Alan BRASLAU
@ 2009-11-07 12:39       ` Taco Hoekwater
  0 siblings, 0 replies; 9+ messages in thread
From: Taco Hoekwater @ 2009-11-07 12:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Alan BRASLAU wrote:
> mpgraph does not appear to work properly under mkiv.
> 

The reason why is explained here:

   http://wiki.contextgarden.net/MkIV_Differences#Metapost

Best wishes,
Taco
___________________________________________________________________________________
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] 9+ messages in thread

* Re: Metapost+mpgraph and mkiv
       [not found]   ` <4AF59E70.1020705@elvenkind.com>
@ 2009-11-07 17:58     ` Alan BRASLAU
  2009-11-07 18:00       ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Alan BRASLAU @ 2009-11-07 17:58 UTC (permalink / raw)
  To: Taco Hoekwater; +Cc: ntg-context

On Saturday 07 November 2009 17:21:04 Taco Hoekwater wrote:
> 
> 1. You should load the MP packages you need in \startMPinclusions (this
> is where the code really belongs, even in mkii) instead of inside each
> separate graphic.
> 
> 2. You have to make sure that you do not re-state equations that were
> already solved in a previous graphic.
> 
> These are in fact the excact same rules that you have to adhere to in
> mkii if \runMPgraphicsfalse is active.

So, for the mailing list, here is a working solution (mkii & mkiv):

%% minimal example %%
\starttext

\startMPinclusions
input graph
\stopMPinclusions

\startuseMPgraphic{test}
draw begingraph(16cm,12cm);
        setrange(whatever,whatever,whatever,whatever);
        gdraw (0,0) -- (1,1) ;
        endgraph;
\stopuseMPgraphic

\startTEXpage
\useMPgraphic{test}
\stopTEXpage

\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] 9+ messages in thread

* Re: Metapost+mpgraph and mkiv
  2009-11-07 17:58     ` Alan BRASLAU
@ 2009-11-07 18:00       ` Wolfgang Schuster
  2009-11-08 15:17         ` Alan BRASLAU
  2009-11-08 15:31         ` Metapost+mpgraph withcolor Alan BRASLAU
  0 siblings, 2 replies; 9+ messages in thread
From: Wolfgang Schuster @ 2009-11-07 18:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 07.11.2009 um 18:58 schrieb Alan BRASLAU:

> So, for the mailing list, here is a working solution (mkii & mkiv):
>
> %% minimal example %%
> \starttext
>
> \startMPinclusions
> input graph
> \stopMPinclusions

\usemodule[graph]

Wolfgang

___________________________________________________________________________________
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] 9+ messages in thread

* Re: Metapost+mpgraph and mkiv
  2009-11-07 18:00       ` Wolfgang Schuster
@ 2009-11-08 15:17         ` Alan BRASLAU
  2009-11-08 15:31         ` Metapost+mpgraph withcolor Alan BRASLAU
  1 sibling, 0 replies; 9+ messages in thread
From: Alan BRASLAU @ 2009-11-08 15:17 UTC (permalink / raw)
  To: ntg-context

On Saturday 07 November 2009 19:00:13 Wolfgang Schuster wrote:
> 
> \usemodule[graph]
> 

Thanks! This works in mkiv (but appears to be broken in mkii).

Alan
___________________________________________________________________________________
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] 9+ messages in thread

* Metapost+mpgraph withcolor
  2009-11-07 18:00       ` Wolfgang Schuster
  2009-11-08 15:17         ` Alan BRASLAU
@ 2009-11-08 15:31         ` Alan BRASLAU
  1 sibling, 0 replies; 9+ messages in thread
From: Alan BRASLAU @ 2009-11-08 15:31 UTC (permalink / raw)
  To: ntg-context

glabel <option list> withcolor is broken (mkiv and mkii).
The label at the first point is black (the 2nd comes out red).

%% minimal example %%
\setupcolors[state=start] 
\usemodule[graph]

\startuseMPgraphic{test}
draw begingraph(16cm,12cm);
        gdraw (0,0) -- (1,1) withcolor red ;
	glabel.urt(btex beginning etex, 0) withcolor red ; 
	glabel.llft(btex \red end etex, infinity) ; 
        endgraph;
\stopuseMPgraphic

\starttext

\startTEXpage
\useMPgraphic{test}
\stopTEXpage

\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] 9+ messages in thread

end of thread, other threads:[~2009-11-08 15:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-22 12:44 Metapost and mkiv Otared Kavian
2009-09-22 16:03 ` Hans Hagen
2009-09-22 16:45   ` Aditya Mahajan
2009-11-07 12:25     ` Metapost+mpgraph " Alan BRASLAU
2009-11-07 12:39       ` Taco Hoekwater
     [not found] ` <200911071613.35924.alan.braslau@cea.fr>
     [not found]   ` <4AF59E70.1020705@elvenkind.com>
2009-11-07 17:58     ` Alan BRASLAU
2009-11-07 18:00       ` Wolfgang Schuster
2009-11-08 15:17         ` Alan BRASLAU
2009-11-08 15:31         ` Metapost+mpgraph withcolor Alan BRASLAU

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