* \loadcurrentMPgraphic from metafun manual
@ 2007-06-08 9:09 nicola
2007-06-08 20:25 ` loadcurrentMPgraphic " Aditya Mahajan
0 siblings, 1 reply; 3+ messages in thread
From: nicola @ 2007-06-08 9:09 UTC (permalink / raw)
To: ntg-context
Hi,
I have tried the following example (metafun-p.pdf, p. 112-3):
\startMPgraphic
draw unitsquare xscaled 5cm yscaled 1cm withpen pencircle scaled 2mm
withcolor .625red;
\stopMPgraphic
\hbox \bgroup
\loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic \quad
\loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic \egroup
but nothing is drawn unless I remove the setups in curly braces (in
which case a rectangle 5cm x 1cm is drawn). Is there a different way to
pass options to the figure inclusion macro?
Nicola
___________________________________________________________________________________
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] 3+ messages in thread
* Re: loadcurrentMPgraphic from metafun manual
2007-06-08 9:09 \loadcurrentMPgraphic from metafun manual nicola
@ 2007-06-08 20:25 ` Aditya Mahajan
2007-06-10 15:26 ` Wolfgang Schuster
0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2007-06-08 20:25 UTC (permalink / raw)
To: ntg-context
Quoting nicola <vitacolo@dimi.uniud.it>:
> Hi,
> I have tried the following example (metafun-p.pdf, p. 112-3):
>
> \startMPgraphic
> draw unitsquare xscaled 5cm yscaled 1cm withpen pencircle scaled 2mm
> withcolor .625red;
> \stopMPgraphic
>
> \hbox \bgroup
> \loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic \quad
> \loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic \egroup
>
> but nothing is drawn unless I remove the setups in curly braces (in
> which case a rectangle 5cm x 1cm is drawn). Is there a different way to
> pass options to the figure inclusion macro?
Interesting....what is happening is something equivalent to
\externalfigure
[\MPgraphicfile.\the\currentMPgraphic]
[type=mps,object=no,
symbol=yes,reset=yes,
maxwidth=,maxheight=,
frame=off,background=,
width=8cm,
height=1cm]%
and there is no figure. If I remove object=no, the figure is there. I
do not understand why object=no should affect the placement of the
figure.
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: loadcurrentMPgraphic from metafun manual
2007-06-08 20:25 ` loadcurrentMPgraphic " Aditya Mahajan
@ 2007-06-10 15:26 ` Wolfgang Schuster
0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2007-06-10 15:26 UTC (permalink / raw)
To: ntg-context
On Fri, 08 Jun 2007 16:25:13 -0400
Aditya Mahajan <adityam@umich.edu> wrote:
> Quoting nicola <vitacolo@dimi.uniud.it>:
>
> > Hi,
> > I have tried the following example (metafun-p.pdf, p. 112-3):
> >
> > \startMPgraphic
> > draw unitsquare xscaled 5cm yscaled 1cm withpen pencircle scaled 2mm
> > withcolor .625red;
> > \stopMPgraphic
> >
> > \hbox \bgroup
> > \loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic \quad
> > \loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic \egroup
> >
> > but nothing is drawn unless I remove the setups in curly braces (in
> > which case a rectangle 5cm x 1cm is drawn). Is there a different way to
> > pass options to the figure inclusion macro?
>
> Interesting....what is happening is something equivalent to
>
> \externalfigure
> [\MPgraphicfile.\the\currentMPgraphic]
> [type=mps,object=no,
> symbol=yes,reset=yes,
> maxwidth=,maxheight=,
> frame=off,background=,
> width=8cm,
> height=1cm]%
>
> and there is no figure. If I remove object=no, the figure is there. I
> do not understand why object=no should affect the placement of the
> figure.
>
> Aditya
Hi,
right, the object=no value is the problem. You can solve your problem
by inserting the following macro somewhere before starttext in your
document:
\unprotect
\def\insertMPfileARG#1#2%
{\ifx\undefined\externalfigure
\message{[insert file #1 here]}%
\else
\externalfigure
[#1]
[\c!type=\c!mps,\c!object=\v!yes,
\c!symbol=\v!yes,\c!reset=\v!yes,
\c!maxwidth=,\c!maxheight=,
\c!frame=\v!off,\c!background=,
#2]%
\fi}
\protect
I changed only the "no" value from "object" to "yes".
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-10 15:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-08 9:09 \loadcurrentMPgraphic from metafun manual nicola
2007-06-08 20:25 ` loadcurrentMPgraphic " Aditya Mahajan
2007-06-10 15:26 ` Wolfgang Schuster
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).