* Metapost graphics in separate file, help needed
@ 2011-11-23 18:23 Christian
2011-11-23 19:07 ` Hans Hagen
0 siblings, 1 reply; 7+ messages in thread
From: Christian @ 2011-11-23 18:23 UTC (permalink / raw)
To: mailing list for ConTeXt users
Dear List,
I am experiencing a strange problem. I have a project, essentially with the following structure (desperate attempt to keep track of my stuff):
mainfile.mkiv:
% BOF
...lots of setups and settings...
\starttext
\input metapostgraphics.mkiv
\input chapter1.mkiv
\input chapter2.mkiv
\input chapter3.mkiv
\stoptext
% EOF
I generate the PDF with 'context mainfile.mkiv'
So far for the structure. Now my problem:
metapostgraphics.mkiv contains several (4) metapost graphics with \startuseMPgraphics{nameX} ... \stopuseMPgraphics.
In chapter2.mkiv I want to use them with \useMPgraphics{nameX}.
It worked well until today, when I added a fifth graphic. Then I suddenly get a frame with 'undefined' inside instead of the picture.
I tried everything, checked for typos, tried different names, double checked the MP-code etc. but to no avail.
It only works if I put the exact same MP-code between \startMPcode \stopMPcode directly in the chapter2.mkiv
What is wrong here? Am I missing something? Did I get the input mechanism all wrong?
___________________________________________________________________________________
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] 7+ messages in thread
* Re: Metapost graphics in separate file, help needed
2011-11-23 18:23 Metapost graphics in separate file, help needed Christian
@ 2011-11-23 19:07 ` Hans Hagen
2011-11-23 19:32 ` Aditya Mahajan
0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2011-11-23 19:07 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 23-11-2011 19:23, Christian wrote:
> Dear List,
>
> I am experiencing a strange problem. I have a project, essentially with the following structure (desperate attempt to keep track of my stuff):
>
> mainfile.mkiv:
> % BOF
> ....lots of setups and settings...
> \starttext
> \input metapostgraphics.mkiv
> \input chapter1.mkiv
> \input chapter2.mkiv
> \input chapter3.mkiv
> \stoptext
> % EOF
>
> I generate the PDF with 'context mainfile.mkiv'
> So far for the structure. Now my problem:
> metapostgraphics.mkiv contains several (4) metapost graphics with \startuseMPgraphics{nameX} ... \stopuseMPgraphics.
> In chapter2.mkiv I want to use them with \useMPgraphics{nameX}.
> It worked well until today, when I added a fifth graphic. Then I suddenly get a frame with 'undefined' inside instead of the picture.
> I tried everything, checked for typos, tried different names, double checked the MP-code etc. but to no avail.
>
> It only works if I put the exact same MP-code between \startMPcode \stopMPcode directly in the chapter2.mkiv
>
> What is wrong here? Am I missing something? Did I get the input mechanism all wrong?
What happens if you make a simple file with the 4 \useMPgraphics in it
.. does that one process? Maybe there is a problem with the graphics in
the sense that you cannto run them all in a row.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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] 7+ messages in thread
* Re: Metapost graphics in separate file, help needed
2011-11-23 19:07 ` Hans Hagen
@ 2011-11-23 19:32 ` Aditya Mahajan
2011-11-23 19:50 ` Christian
2011-11-23 19:58 ` Hans Hagen
0 siblings, 2 replies; 7+ messages in thread
From: Aditya Mahajan @ 2011-11-23 19:32 UTC (permalink / raw)
To: mailing list for ConTeXt users
>> It only works if I put the exact same MP-code between \startMPcode
>> \stopMPcode directly in the chapter2.mkiv
>>
>> What is wrong here? Am I missing something? Did I get the input mechanism
>> all wrong?
>
> What happens if you make a simple file with the 4 \useMPgraphics in it ..
> does that one process? Maybe there is a problem with the graphics in the
> sense that you cannto run them all in a row.
You can also try adding
begingroup;
....
endgroup;
inside each MP figure. I always wished that this was the default
behaviour.
Aditya
___________________________________________________________________________________
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] 7+ messages in thread
* Re: Metapost graphics in separate file, help needed
2011-11-23 19:32 ` Aditya Mahajan
@ 2011-11-23 19:50 ` Christian
2011-11-23 23:13 ` Hans Hagen
2011-11-23 19:58 ` Hans Hagen
1 sibling, 1 reply; 7+ messages in thread
From: Christian @ 2011-11-23 19:50 UTC (permalink / raw)
To: 'mailing list for ConTeXt users'
Thanks for the suggestions so far. I' currently testing Hans' idea and it seems to be a problem with caching.
The simple file I made where I just use each graphic runs into an error, but the corresponding code (undefined control sequence '\sb') is definitely not in the current source file of the graphics.
How do I clear the cache to force recalculation of the MP-graphics?
> -----Ursprüngliche Nachricht-----
> Von: ntg-context-bounces@ntg.nl [mailto:ntg-context-bounces@ntg.nl] Im
> Auftrag von Aditya Mahajan
> Gesendet: Mittwoch, 23. November 2011 20:33
> An: mailing list for ConTeXt users
> Betreff: Re: [NTG-context] Metapost graphics in separate file, help needed
>
> >> It only works if I put the exact same MP-code between \startMPcode
> >> \stopMPcode directly in the chapter2.mkiv
> >>
> >> What is wrong here? Am I missing something? Did I get the input
> >> mechanism all wrong?
> >
> > What happens if you make a simple file with the 4 \useMPgraphics in it ..
> > does that one process? Maybe there is a problem with the graphics in
> > the sense that you cannto run them all in a row.
>
> You can also try adding
>
> begingroup;
> ....
> endgroup;
>
> inside each MP figure. I always wished that this was the default behaviour.
>
> Aditya
> __________________________________________________________
> _________________________
> 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] 7+ messages in thread
* Re: Metapost graphics in separate file, help needed
2011-11-23 19:32 ` Aditya Mahajan
2011-11-23 19:50 ` Christian
@ 2011-11-23 19:58 ` Hans Hagen
2011-11-23 20:18 ` Christian
1 sibling, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2011-11-23 19:58 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 23-11-2011 20:32, Aditya Mahajan wrote:
>>> It only works if I put the exact same MP-code between \startMPcode
>>> \stopMPcode directly in the chapter2.mkiv
>>>
>>> What is wrong here? Am I missing something? Did I get the input
>>> mechanism all wrong?
>>
>> What happens if you make a simple file with the 4 \useMPgraphics in it
>> .. does that one process? Maybe there is a problem with the graphics
>> in the sense that you cannto run them all in a row.
>
> You can also try adding
>
> begingroup;
> .....
> endgroup;
>
> inside each MP figure. I always wished that this was the default behaviour.
Actually, last week I was tempted to do that but I cannot oversee the
consequences. It is probably harmless. The interesting thing is that
beginfig/endfig have grouping but somehow it does not work out well.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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] 7+ messages in thread
* Re: Metapost graphics in separate file, help needed
2011-11-23 19:58 ` Hans Hagen
@ 2011-11-23 20:18 ` Christian
0 siblings, 0 replies; 7+ messages in thread
From: Christian @ 2011-11-23 20:18 UTC (permalink / raw)
To: 'mailing list for ConTeXt users'
Oh boy. This is embarrassing!
Turns out the file that was open in notepad++ was not the one in the path of my project, but had the exact same name.
And I was editing this sucker instead of the real file. I guess I should reload my files during sessions.
<insert double face-palm here>
Problem solved, it's sitting right in front of the screen and is banging his head hard against the wall now.
I'm truly sorry that I have wasted your time.
> -----Ursprüngliche Nachricht-----
> Von: ntg-context-bounces@ntg.nl [mailto:ntg-context-bounces@ntg.nl] Im
> Auftrag von Hans Hagen
> Gesendet: Mittwoch, 23. November 2011 20:59
> An: mailing list for ConTeXt users
> Betreff: Re: [NTG-context] Metapost graphics in separate file, help needed
>
> On 23-11-2011 20:32, Aditya Mahajan wrote:
> >>> It only works if I put the exact same MP-code between \startMPcode
> >>> \stopMPcode directly in the chapter2.mkiv
> >>>
> >>> What is wrong here? Am I missing something? Did I get the input
> >>> mechanism all wrong?
> >>
> >> What happens if you make a simple file with the 4 \useMPgraphics in
> >> it .. does that one process? Maybe there is a problem with the
> >> graphics in the sense that you cannto run them all in a row.
> >
> > You can also try adding
> >
> > begingroup;
> > .....
> > endgroup;
> >
> > inside each MP figure. I always wished that this was the default behaviour.
>
> Actually, last week I was tempted to do that but I cannot oversee the
> consequences. It is probably harmless. The interesting thing is that
> beginfig/endfig have grouping but somehow it does not work out well.
>
> Hans
>
>
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | voip: 087 875 68 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
> __________________________________________________________
> _________________________
___________________________________________________________________________________
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] 7+ messages in thread
* Re: Metapost graphics in separate file, help needed
2011-11-23 19:50 ` Christian
@ 2011-11-23 23:13 ` Hans Hagen
0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2011-11-23 23:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 23-11-2011 20:50, Christian wrote:
> How do I clear the cache to force recalculation of the MP-graphics?
fyi: There is no cache in mkiv as mp is run internally, which is why it
is so fast (and in mkii caching is clever enough to determine a change).
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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] 7+ messages in thread
end of thread, other threads:[~2011-11-23 23:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-23 18:23 Metapost graphics in separate file, help needed Christian
2011-11-23 19:07 ` Hans Hagen
2011-11-23 19:32 ` Aditya Mahajan
2011-11-23 19:50 ` Christian
2011-11-23 23:13 ` Hans Hagen
2011-11-23 19:58 ` Hans Hagen
2011-11-23 20:18 ` Christian
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).