ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MPinclusions strangeness with labels
@ 2006-06-06 11:16 Jean Magnan de Bornier
  2006-06-06 13:44 ` Aditya Mahajan
  2006-06-06 14:02 ` Mojca Miklavec
  0 siblings, 2 replies; 7+ messages in thread
From: Jean Magnan de Bornier @ 2006-06-06 11:16 UTC (permalink / raw)


Hi all,

I found something strange with a metapost file where I want to store
various definitions for reuse in several tex files; here are example
files:

.......inc.mp...............
numeric u; u=.8cm;
path AX; AX = (10u,0) -- (0,0) -- (0,10u);

picture cax; cax = thelabel(textext("Costs, prices") rotated 90,(-.3u,8u));
............................

.......inc.tex..............
\setupoutput[pdftex]

\startMPinclusions
\input inc
\stopMPinclusions

\starttext

\startuseMPgraphic{toto}
drawdblarrow AX; 
% label.rt(textext("$3x^2+\pi$"), (5u,6u));
draw cax;
\stopuseMPgraphic

\placefigure[left]{bla.bla}{\useMPgraphic{toto}}
 
\input dawkins

\stoptext
............................

Now what happens? The label in the mp file "Costs, prices" is replaced by
"unknown" in the pdf. But if I add a label in the startuseMPgraphic
environment, (decommenting line 3 in it), then both labels appear!!

I tried several other files, it seems to happen every time.
Anything I'm doing wrong?
tia
-- 
Jean

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

* Re: MPinclusions strangeness with labels
  2006-06-06 11:16 MPinclusions strangeness with labels Jean Magnan de Bornier
@ 2006-06-06 13:44 ` Aditya Mahajan
  2006-06-06 15:01   ` Jean Magnan de Bornier
  2006-06-06 14:02 ` Mojca Miklavec
  1 sibling, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2006-06-06 13:44 UTC (permalink / raw)


On Tue, 6 Jun 2006, Jean Magnan de Bornier wrote:

> Hi all,
>
> I found something strange with a metapost file where I want to store
> various definitions for reuse in several tex files; here are example
> files:
>
> .......inc.mp...............
> numeric u; u=.8cm;
> path AX; AX = (10u,0) -- (0,0) -- (0,10u);
>
> picture cax; cax = thelabel(textext("Costs, prices") rotated 90,(-.3u,8u));
> ............................
>
> .......inc.tex..............
> \setupoutput[pdftex]
>
> \startMPinclusions
> \input inc
> \stopMPinclusions
>
> \starttext
>
> \startuseMPgraphic{toto}
> drawdblarrow AX;
> % label.rt(textext("$3x^2+\pi$"), (5u,6u));
> draw cax;
> \stopuseMPgraphic
>
> \placefigure[left]{bla.bla}{\useMPgraphic{toto}}
>
> \input dawkins
>
> \stoptext
> ............................
>
> Now what happens? The label in the mp file "Costs, prices" is replaced by
> "unknown" in the pdf. But if I add a label in the startuseMPgraphic
> environment, (decommenting line 3 in it), then both labels appear!!
>

This is because of the way textext works. tex.rb scans the file to see 
if textext is present. It is not, so it does not use mpx. When you 
uncomment the line, textext is present and mpx files are processed.

> I tried several other files, it seems to happen every time.
> Anything I'm doing wrong?

Add \forceMPTEXgraphictrue on top of your file if you want to force 
mpx to be run everytime. I do not know the equivalent command line 
switch (if there is any)

Aditya

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

* Re: MPinclusions strangeness with labels
  2006-06-06 11:16 MPinclusions strangeness with labels Jean Magnan de Bornier
  2006-06-06 13:44 ` Aditya Mahajan
@ 2006-06-06 14:02 ` Mojca Miklavec
  2006-06-06 15:11   ` Jean Magnan de Bornier
  2006-06-06 15:30   ` Aditya Mahajan
  1 sibling, 2 replies; 7+ messages in thread
From: Mojca Miklavec @ 2006-06-06 14:02 UTC (permalink / raw)


On 6/6/06, Jean Magnan de Bornier wrote:

> Now what happens? The label in the mp file "Costs, prices" is replaced by
> "unknown" in the pdf. But if I add a label in the startuseMPgraphic
> environment, (decommenting line 3 in it), then both labels appear!!
>
> I tried several other files, it seems to happen every time.
> Anything I'm doing wrong?
> tia

In addition to Aditya's comments.

OK, aliens at work! I tried to compile your documents in order to
experiement a bit
(\forceMPTEXcheck{nameofsomecommandtobecheckedfortextextpresence}
might help in such cases as well), but now I don't understand why the
example DOES work here without any modifiction. It seems to me that
Hans debugged that part of ConTeXt even better than I thought :).


So just a few guidelines: it might help(*) if you have a ConTeXt
version that is not more than 1 month old and if you run ConTeXt with
"texmfstart" (texexec should resolve to "texmfstart texexec.rb"). If
you don't know how to do that, ask again (tell which distribution and
OS you're using). Perhaps we should put that info right on the top of
the first wiki page.

(*) read: you have to

Mojca

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

* Re: MPinclusions strangeness with labels
  2006-06-06 13:44 ` Aditya Mahajan
@ 2006-06-06 15:01   ` Jean Magnan de Bornier
  0 siblings, 0 replies; 7+ messages in thread
From: Jean Magnan de Bornier @ 2006-06-06 15:01 UTC (permalink / raw)


Le 06 juin à 15:44:05 Aditya Mahajan <adityam@umich.edu> écrit notamment:

| On Tue, 6 Jun 2006, Jean Magnan de Bornier wrote:
>
| > Hi all,
| >
| > I found something strange with a metapost file where I want to store
| > various definitions for reuse in several tex files; here are example
| > files:

[...]


| >
| > Now what happens? The label in the mp file "Costs, prices" is replaced by
| > "unknown" in the pdf. But if I add a label in the startuseMPgraphic
| > environment, (decommenting line 3 in it), then both labels appear!!
| >
>
| This is because of the way textext works. tex.rb scans the file to see 
| if textext is present. It is not, so it does not use mpx. When you 
| uncomment the line, textext is present and mpx files are processed.
>
| > I tried several other files, it seems to happen every time.
| > Anything I'm doing wrong?
>
| Add \forceMPTEXgraphictrue on top of your file if you want to force 
| mpx to be run everytime. I do not know the equivalent command line 
| switch (if there is any)
>
| Aditya

Thanks Aditya for the explanation and the solution, that was it!
-- 
Jean

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

* Re: MPinclusions strangeness with labels
  2006-06-06 14:02 ` Mojca Miklavec
@ 2006-06-06 15:11   ` Jean Magnan de Bornier
  2006-06-06 15:30   ` Aditya Mahajan
  1 sibling, 0 replies; 7+ messages in thread
From: Jean Magnan de Bornier @ 2006-06-06 15:11 UTC (permalink / raw)


Le 06 juin à 16:02:01 "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
écrit 
notamment:

| On 6/6/06, Jean Magnan de Bornier wrote:
>
| > Now what happens? The label in the mp file "Costs, prices" is replaced by
| > "unknown" in the pdf. But if I add a label in the startuseMPgraphic
| > environment, (decommenting line 3 in it), then both labels appear!!
| >
| > I tried several other files, it seems to happen every time.
| > Anything I'm doing wrong?
| > tia
>
| In addition to Aditya's comments.
>
| OK, aliens at work! I tried to compile your documents in order to
| experiement a bit
| (\forceMPTEXcheck{nameofsomecommandtobecheckedfortextextpresence}
| might help in such cases as well), but now I don't understand why the
| example DOES work here without any modifiction. It seems to me that
| Hans debugged that part of ConTeXt even better than I thought :).
>
>
| So just a few guidelines: it might help(*) if you have a ConTeXt
| version that is not more than 1 month old and if you run ConTeXt with
| "texmfstart" (texexec should resolve to "texmfstart texexec.rb"). If
| you don't know how to do that, ask again (tell which distribution and
| OS you're using). Perhaps we should put that info right on the top of
| the first wiki page.
>
| (*) read: you have to

Well, sorry I forgot to say about my installation; actually I have an uptodate
one, less than 10 days, last metapost, and using "texmfstart texexec" all
right (I found a script for that on the list with this line:
"ruby <path to ruby dir>/texmfstart.rb $*").

Then again there has to be something different with your installation...
thx
-- 
Jean

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

* Re: MPinclusions strangeness with labels
  2006-06-06 14:02 ` Mojca Miklavec
  2006-06-06 15:11   ` Jean Magnan de Bornier
@ 2006-06-06 15:30   ` Aditya Mahajan
  2006-06-06 15:42     ` Mojca Miklavec
  1 sibling, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2006-06-06 15:30 UTC (permalink / raw)


On Tue, 6 Jun 2006, Mojca Miklavec wrote:

> On 6/6/06, Jean Magnan de Bornier wrote:
>
>> Now what happens? The label in the mp file "Costs, prices" is replaced by
>> "unknown" in the pdf. But if I add a label in the startuseMPgraphic
>> environment, (decommenting line 3 in it), then both labels appear!!
>>
>> I tried several other files, it seems to happen every time.
>> Anything I'm doing wrong?
>> tia
>
> In addition to Aditya's comments.
>
> OK, aliens at work! I tried to compile your documents in order to
> experiement a bit
> (\forceMPTEXcheck{nameofsomecommandtobecheckedfortextextpresence}
> might help in such cases as well), but now I don't understand why the
> example DOES work here without any modifiction. It seems to me that
> Hans debugged that part of ConTeXt even better than I thought :).

Mojca,

I am surprised that it works without any modification on your machine. 
Do you have \forMPTEXgraphictrue set in your cont-sys.tex?
Is it possible that the mpx files are generated from a previous run 
(from your testing). That is, if you purge all temporary files and 
rerun texexec, do you still get the correct output?

If not, what magic setting do you have :)

Aditya

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

* Re: MPinclusions strangeness with labels
  2006-06-06 15:30   ` Aditya Mahajan
@ 2006-06-06 15:42     ` Mojca Miklavec
  0 siblings, 0 replies; 7+ messages in thread
From: Mojca Miklavec @ 2006-06-06 15:42 UTC (permalink / raw)


On 6/6/06, Aditya Mahajan wrote:

Hi, Aditya!

> I am surprised that it works without any modification on your machine.
> Do you have \forMPTEXgraphictrue set in your cont-sys.tex?

User file 'cont-sys.tex' not found, 'cont-sys.rme' has been used instead.

> Is it possible that the mpx files are generated from a previous run
> (from your testing). That is, if you purge all temporary files and
> rerun texexec, do you still get the correct output?

No, impossible since I ran the file for the first time. And yes, I
deleted everything and rerun and it was OK again.

> If not, what magic setting do you have :)

I don't know (I've just configured one of the machines in the
university, ie. replaced new tmf over old MikTeX files, added
texmfstart and stubs, so there's no way that the TeX tree would be
polluted from my old failures to compile gnuplot graphics), but it
must be a lucky TeX day today! Apart from some great news from Hans
about lua and the "Windows news" on the XeTeX mailing list ... I have
nothing more to say!

Mojca

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

end of thread, other threads:[~2006-06-06 15:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-06 11:16 MPinclusions strangeness with labels Jean Magnan de Bornier
2006-06-06 13:44 ` Aditya Mahajan
2006-06-06 15:01   ` Jean Magnan de Bornier
2006-06-06 14:02 ` Mojca Miklavec
2006-06-06 15:11   ` Jean Magnan de Bornier
2006-06-06 15:30   ` Aditya Mahajan
2006-06-06 15:42     ` Mojca Miklavec

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