ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MetaPost bug? in MKIV
@ 2010-03-02 16:34 Troy Henderson
  2010-03-02 18:42 ` Peter Rolf
  0 siblings, 1 reply; 9+ messages in thread
From: Troy Henderson @ 2010-03-02 16:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

The following example produces expected output with MKII (texexec) but
fails the compilation process with MKIV (context).

\startuseMPgraphic{foo}
   input graph;
   path p;
   gdata("data.d", $, augment.p($1,$2););
   draw begingraph(4in,2.5in);
      gdraw p;
   endgraph;
\stopuseMPgraphic
\starttext
   \useMPgraphic{foo}
\stoptext


The data stored in data.d is as follows:
0  0
1  1
2  4

When compiling with MKIV, the following error occurs:

!mplib          : mp terminal:
(/opt/context-minimals/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

-- 
Troy Henderson
___________________________________________________________________________________
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 bug? in MKIV
  2010-03-02 16:34 MetaPost bug? in MKIV Troy Henderson
@ 2010-03-02 18:42 ` Peter Rolf
  2010-03-02 19:25   ` Taco Hoekwater
  2010-03-02 19:33   ` Peter Rolf
  0 siblings, 2 replies; 9+ messages in thread
From: Peter Rolf @ 2010-03-02 18:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Troy,

I don't have the graph.mp file, but I have seen similar errors here. I
guess if you change the lines into

Gmargin.low:=-.07;
Gmargin.high:=1.07;

things work again. Sorry, I can't remember the reason why equations
cause trouble in mplib. But I'm quite sure that this is only an
incompatibility and not a bug.

Best wishes,  Peter

Am 02.03.2010 17:34, schrieb Troy Henderson:
> The following example produces expected output with MKII (texexec) but
> fails the compilation process with MKIV (context).
> 
> \startuseMPgraphic{foo}
>    input graph;
>    path p;
>    gdata("data.d", $, augment.p($1,$2););
>    draw begingraph(4in,2.5in);
>       gdraw p;
>    endgraph;
> \stopuseMPgraphic
> \starttext
>    \useMPgraphic{foo}
> \stoptext
> 
> 
> The data stored in data.d is as follows:
> 0  0
> 1  1
> 2  4
> 
> When compiling with MKIV, the following error occurs:
> 
> !mplib          : mp terminal:
> (/opt/context-minimals/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
> 

___________________________________________________________________________________
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 bug? in MKIV
  2010-03-02 18:42 ` Peter Rolf
@ 2010-03-02 19:25   ` Taco Hoekwater
  2010-03-02 19:33   ` Peter Rolf
  1 sibling, 0 replies; 9+ messages in thread
From: Taco Hoekwater @ 2010-03-02 19:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Peter Rolf wrote:
> Hi Troy,
> 
> I don't have the graph.mp file, but I have seen similar errors here. I
> guess if you change the lines into
> 
> Gmargin.low:=-.07;
> Gmargin.high:=1.07;
> 
> things work again. Sorry, I can't remember the reason why equations
> cause trouble in mplib. But I'm quite sure that this is only an
> incompatibility and not a bug.

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

Best wishes,
Taco
... but it would be cool if there was a way to start a new mplib
instance for each MPfigure...
___________________________________________________________________________________
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 bug? in MKIV
  2010-03-02 18:42 ` Peter Rolf
  2010-03-02 19:25   ` Taco Hoekwater
@ 2010-03-02 19:33   ` Peter Rolf
  2010-03-02 20:02     ` Troy Henderson
  1 sibling, 1 reply; 9+ messages in thread
From: Peter Rolf @ 2010-03-02 19:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 02.03.2010 19:42, schrieb Peter Rolf:
> Hi Troy,
> 
> I don't have the graph.mp file, but I have seen similar errors here. I
> guess if you change the lines into
> 
> Gmargin.low:=-.07;
> Gmargin.high:=1.07;
> 
> things work again. Sorry, I can't remember the reason why equations
> cause trouble in mplib. But I'm quite sure that this is only an
> incompatibility and not a bug.
>
see

http://archive.contextgarden.net/message/20091107.123912.3010813e.en.html

for details. I will do the same :)

> Best wishes,  Peter
> 
> Am 02.03.2010 17:34, schrieb Troy Henderson:
>> The following example produces expected output with MKII (texexec) but
>> fails the compilation process with MKIV (context).
>>
>> \startuseMPgraphic{foo}
>>    input graph;
>>    path p;
>>    gdata("data.d", $, augment.p($1,$2););
>>    draw begingraph(4in,2.5in);
>>       gdraw p;
>>    endgraph;
>> \stopuseMPgraphic
>> \starttext
>>    \useMPgraphic{foo}
>> \stoptext
>>
>>
>> The data stored in data.d is as follows:
>> 0  0
>> 1  1
>> 2  4
>>
>> When compiling with MKIV, the following error occurs:
>>
>> !mplib          : mp terminal:
>> (/opt/context-minimals/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
>>
> 
> ___________________________________________________________________________________
> 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] 9+ messages in thread

* Re: MetaPost bug? in MKIV
  2010-03-02 19:33   ` Peter Rolf
@ 2010-03-02 20:02     ` Troy Henderson
  2010-03-02 22:53       ` Peter Rolf
  0 siblings, 1 reply; 9+ messages in thread
From: Troy Henderson @ 2010-03-02 20:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

When using

\startMPinclusions
   input graph;
\stopMPinclusions

or not even including the MPinclusions at all (and thus not doing
`input graph;') seems to give the same result.  The log of what
happens during the compile process is attached.

Troy

[-- Attachment #2: log --]
[-- Type: application/octet-stream, Size: 5685 bytes --]

MTXrun | run 1: luatex --fmt="/opt/context-minimals/tex/texmf-cache/luatex-cache/context/ccfefc91ec3ed68af1aeed1f470fef4d/formats/cont-en" --lua="/opt/context-minimals/tex/texmf-cache/luatex-cache/context/ccfefc91ec3ed68af1aeed1f470fef4d/formats/cont-en.lui" --backend=pdf "./foo.tex"
This is LuaTeX, Version beta-0.50.0-2009122519
 \write18 enabled.
(foo.tex

ConTeXt  ver: 2010.02.20 10:23 MKIV  fmt: 2010.2.20  int: english/english

system          : cont-new loaded
(/opt/context-minimals/tex/texmf-context/tex/context/base/cont-new.tex
systems         : beware: some patches loaded from cont-new.tex
(/opt/context-minimals/tex/texmf-context/tex/context/base/cont-new.mkiv))
system          : cont-fil loaded
(/opt/context-minimals/tex/texmf-context/tex/context/base/cont-fil.tex
loading         : ConTeXt File Synonyms
)
system          : cont-sys loaded
(/opt/context-minimals/tex/texmf-local/tex/context/user/cont-sys.tex (/opt/context-minimals/tex/texmf-context/tex/context/base/type-def.mkiv) (/opt/context-minimals/tex/texmf-context/tex/context/base/type-lua.tex) (/opt/context-minimals/tex/texmf-context/tex/context/base/type-tmf.tex (/opt/context-minimals/tex/texmf-context/tex/context/base/type-tmf.mkiv)) (/opt/context-minimals/tex/texmf-context/tex/context/base/type-siz.tex (/opt/context-minimals/tex/texmf-context/tex/context/base/type-siz.mkiv)) (/opt/context-minimals/tex/texmf-context/tex/context/base/type-otf.tex (/opt/context-minimals/tex/texmf-context/tex/context/base/type-otf.mkiv)))
system          : foo.top loaded
(foo.top)
fonts           : preloading latin modern fonts
(/opt/context-minimals/tex/texmf-local/tex/context/luc/type-luc.tex)
bodyfont        : 12pt rm is loaded
language        : language en is active
systems         : begin file foo.tex at line 13
mplib           : initializing instance 'metafun' using format 'metafun'
mplib           : loading 'metafun.mp' from '/opt/context-minimals/tex/texmf-cache/luatex-cache/context/ccfefc91ec3ed68af1aeed1f470fef4d/formats/cont-en-metafun.mem'
!mplib          : mp terminal: (/opt/context-minimals/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
fonts           : resetting map file list
{/opt/context-minimals/tex/texmf-context/fonts/map/pdftex/context/original-empty.map}
fonts           : using map file: original-base
{/opt/context-minimals/tex/texmf-context/fonts/map/pdftex/context/original-base.map}
fonts           : using map file: original-ams-base
{/opt/context-minimals/tex/texmf-context/fonts/map/pdftex/context/original-ams-base.map}
fonts           : using map file: original-ams-euler
{/opt/context-minimals/tex/texmf-context/fonts/map/pdftex/context/original-ams-euler.map}
fonts           : using map file: original-public-lm
{/opt/context-minimals/tex/texmf-context/fonts/map/pdftex/context/original-public-lm.map}
fonts           : using map file: lm-math
{/opt/context-minimals/tex/texmf/fonts/map/dvips/lm/lm-math.map}
fonts           : using map file: lm-rm
{/opt/context-minimals/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
!pages          : flushing realpage 1, userpage 1, subpage 1
systems         : end file foo.tex at line 15
 )</opt/context-minimals/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf>
mkiv lua stats : used config path          - /opt/context-minimals/tex/texmf/web2c/texmf.cnf
mkiv lua stats : used cache path           - /opt/context-minimals/tex/texmf-cache
mkiv lua stats : input load time           - 0.048 seconds
mkiv lua stats : stored bytecode data      - 202 modules, 48 tables, 250 chunks
mkiv lua stats : node list callback tasks  - 6 unique tasks, 6 created, 310 calls
mkiv lua stats : cleaned up reserved nodes - 25 nodes, 25 lists of 1408
mkiv lua stats : node memory usage         - 19 glue_spec
mkiv lua stats : used backend              - pdf (backend for directly generating pdf output)
mkiv lua stats : loaded patterns           - en:us:pat:exc:2
mkiv lua stats : startup time              - 0.687 seconds (including runtime option file processing)
mkiv lua stats : callbacks                 - direct: 465, indirect: 4236, total: 4701
mkiv lua stats : lxml preparation time     - 0.000 seconds, 0 nodes, 15 lpath calls, 0 cached calls
mkiv lua stats : result saved in file      - foo.pdf
mkiv lua stats : loaded fonts              - 32 files: lmmono12-regular.otf lmmono8-regular.otf lmmono9-regular.otf lmroman12-bold.otf lmroman12-regular.otf lmroman7-bold.otf lmroman7-regular.otf lmroman9-bold.otf lmroman9-regular.otf lmsans12-regular.otf lmsans8-regular.otf lmsans9-regular.otf eufb10.tfm eufb7.tfm eufm10.tfm eufm7.tfm msam10.tfm msam7.tfm msbm10.tfm msbm7.tfm lmex10.tfm lmmi12.tfm lmmi7.tfm lmmi9.tfm lmmib10.tfm lmmib7.tfm lmsy10.tfm lmsy7.tfm lmsy9.tfm rm-lmr12.tfm rm-lmr7.tfm rm-lmr9.tfm
mkiv lua stats : fonts load time           - 0.361 seconds
mkiv lua stats : luatex banner             - this is luatex, version beta-0.50.0-2009122519
mkiv lua stats : control sequences         - 29977 of 165536
mkiv lua stats : current memory usage      - 41 MB (ctx: 42 MB)
mkiv lua stats : runtime                   - 1.492 seconds, 0 processed pages, 1 shipped pages, 0.670 pages/second
MTXrun | total runtime: 1.526

[-- Attachment #3: Type: text/plain, Size: 486 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: MetaPost bug? in MKIV
  2010-03-02 20:02     ` Troy Henderson
@ 2010-03-02 22:53       ` Peter Rolf
  2010-03-03 20:21         ` Troy Henderson
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Rolf @ 2010-03-02 22:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 02.03.2010 21:02, schrieb Troy Henderson:
> When using
> 
> \startMPinclusions
>    input graph;
> \stopMPinclusions
> 
> or not even including the MPinclusions at all (and thus not doing
> `input graph;') seems to give the same result.  The log of what
> happens during the compile process is attached.
>
i tried your example (found graph.mp) and i got a bunch of errors
regarding wrong picture color model, redundant equations and unknown
transform components.

#color problem is probably here

def Gwithpc_(expr q) =
  withpen penpart q withcolor (redpart q, greenpart q, bluepart q)
enddef;

>> Another difference is the way text is handled in mkiv. In particular,
color (withcolor) is not applied to metapost text. <<

#redundant equations

use ':=' for constants, etc.

# unknown transform components
>> (0,0,_tt_w_1,0,0,1)
! Transform components aren't all known.

is this a problem with textext()? looks very cryptic to me.

anyhow, in the current form graph.mp does not work with mplib.


Peter

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

* Re: MetaPost bug? in MKIV
  2010-03-02 22:53       ` Peter Rolf
@ 2010-03-03 20:21         ` Troy Henderson
  2010-03-03 20:26           ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Troy Henderson @ 2010-03-03 20:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I hate to "beat a dead horse", but I want to understand this for
certain.  Is the consensus that graph.mp is incompatible with MKIV?
If so, are there any plans to make it compatible?  After all, graph.mp
is part of the base MP distribution.

Troy
___________________________________________________________________________________
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 bug? in MKIV
  2010-03-03 20:21         ` Troy Henderson
@ 2010-03-03 20:26           ` Wolfgang Schuster
  2010-03-08  8:58             ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2010-03-03 20:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 03.03.10 21:21, schrieb Troy Henderson:
> I hate to "beat a dead horse", but I want to understand this for
> certain.  Is the consensus that graph.mp is incompatible with MKIV?
> If so, are there any plans to make it compatible?  After all, graph.mp
> is part of the base MP distribution.
>    
\usemodule[graph]? (this loads graph.mp)

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 bug? in MKIV
  2010-03-03 20:26           ` Wolfgang Schuster
@ 2010-03-08  8:58             ` Hans Hagen
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2010-03-08  8:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 3-3-2010 21:26, Wolfgang Schuster wrote:
> Am 03.03.10 21:21, schrieb Troy Henderson:
>> I hate to "beat a dead horse", but I want to understand this for
>> certain. Is the consensus that graph.mp is incompatible with MKIV?
>> If so, are there any plans to make it compatible? After all, graph.mp
>> is part of the base MP distribution.
> \usemodule[graph]? (this loads graph.mp)

indeed.

graph is somewhat special in the sense that it uses some poor man number 
typesetter and therefore it needs to be loaded in a special way with 
some code being overloaded

Hans


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


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

end of thread, other threads:[~2010-03-08  8:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-02 16:34 MetaPost bug? in MKIV Troy Henderson
2010-03-02 18:42 ` Peter Rolf
2010-03-02 19:25   ` Taco Hoekwater
2010-03-02 19:33   ` Peter Rolf
2010-03-02 20:02     ` Troy Henderson
2010-03-02 22:53       ` Peter Rolf
2010-03-03 20:21         ` Troy Henderson
2010-03-03 20:26           ` Wolfgang Schuster
2010-03-08  8:58             ` Hans Hagen

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