* "externalfigure" vs. "draw externalfigure" in metafun
@ 2011-09-16 14:00 Mojca Miklavec
2011-09-16 14:13 ` Andreas Schneider
2011-09-17 9:11 ` Nicola
0 siblings, 2 replies; 7+ messages in thread
From: Mojca Miklavec @ 2011-09-16 14:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
Dear Hans,
I have problems with externalfigure inside metapost.
In MKII, only
externalfigure "something.png";
works, while in MKIV only
draw externalfigure "something.png";
is accepted.
Is there any chance to accept one of the syntaxes in both flavours?
Thank you,
Mojca
Minimal example:
\starttext
\startMPpage
% only good for MKII
externalfigure "abc.png" xyscaled (5cm,8cm);
% only good for MKIV
% draw externalfigure "abc.png" xyscaled (5cm,8cm);
\stopMPpage
\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] 7+ messages in thread
* Re: "externalfigure" vs. "draw externalfigure" in metafun
2011-09-16 14:00 "externalfigure" vs. "draw externalfigure" in metafun Mojca Miklavec
@ 2011-09-16 14:13 ` Andreas Schneider
2011-09-17 9:11 ` Nicola
1 sibling, 0 replies; 7+ messages in thread
From: Andreas Schneider @ 2011-09-16 14:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 16.09.2011 16:00, Mojca Miklavec wrote:
> Dear Hans,
>
> I have problems with externalfigure inside metapost.
>
> In MKII, only
> externalfigure "something.png";
> works, while in MKIV only
> draw externalfigure "something.png";
> is accepted.
>
> Is there any chance to accept one of the syntaxes in both flavours?
Hmm, I noticed that too. However I'm sure that plain "externalfigure"
used to work in MkIV too, so I guess the change happened (more or less)
recently.
--
Best Regards,
Andreas
___________________________________________________________________________________
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: "externalfigure" vs. "draw externalfigure" in metafun
2011-09-16 14:00 "externalfigure" vs. "draw externalfigure" in metafun Mojca Miklavec
2011-09-16 14:13 ` Andreas Schneider
@ 2011-09-17 9:11 ` Nicola
2011-09-17 9:20 ` Nicola
2011-09-17 9:32 ` Mojca Miklavec
1 sibling, 2 replies; 7+ messages in thread
From: Nicola @ 2011-09-17 9:11 UTC (permalink / raw)
To: ntg-context
In article
<CALBOmsadxdYX8Q9pmVa2_cpM3RQ8j1MXKEPQGNaSJtAFUhc2OQ@mail.gmail.com>,
Mojca Miklavec <mojca.miklavec.lists@gmail.com> wrote:
> Dear Hans,
>
> I have problems with externalfigure inside metapost.
>
> In MKII, only
> externalfigure "something.png";
> works, while in MKIV only
> draw externalfigure "something.png";
> is accepted.
>
> Is there any chance to accept one of the syntaxes in both flavours?
>
> Thank you,
> Mojca
>
> Minimal example:
>
> \starttext
> \startMPpage
> % only good for MKII
> externalfigure "abc.png" xyscaled (5cm,8cm);
> % only good for MKIV
> % draw externalfigure "abc.png" xyscaled (5cm,8cm);
> \stopMPpage
> \stoptext
Does the following workaround work for you?
def mydraw text t =
def f = begingroup t endgroup enddef;
if picture f : draw f ; fi
enddef;
mydraw externalfigure "abc.png" xyscaled (5cm,8cm);
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: "externalfigure" vs. "draw externalfigure" in metafun
2011-09-17 9:11 ` Nicola
@ 2011-09-17 9:20 ` Nicola
2011-09-17 9:32 ` Mojca Miklavec
1 sibling, 0 replies; 7+ messages in thread
From: Nicola @ 2011-09-17 9:20 UTC (permalink / raw)
To: ntg-context
In article <nvitacolonna-9462E1.11114817092011@news.gmane.org>,
Nicola <nvitacolonna@gmail.com> wrote:
> Does the following workaround work for you?
>
> def mydraw text t =
> def f = begingroup t endgroup enddef;
> if picture f : draw f ; fi
> enddef;
> mydraw externalfigure "abc.png" xyscaled (5cm,8cm);
This may be better:
def mydraw text t = _mydraw begingroup t endgroup enddef;
def _mydraw primary f = if picture f : draw f ; fi enddef;
mydraw externalfigure "abc.png" xyscaled (5cm,8cm);
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: "externalfigure" vs. "draw externalfigure" in metafun
2011-09-17 9:11 ` Nicola
2011-09-17 9:20 ` Nicola
@ 2011-09-17 9:32 ` Mojca Miklavec
2011-09-17 9:50 ` Hans Hagen
2011-09-17 12:22 ` Nicola
1 sibling, 2 replies; 7+ messages in thread
From: Mojca Miklavec @ 2011-09-17 9:32 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sat, Sep 17, 2011 at 11:11, Nicola wrote:
>
> Does the following workaround work for you?
If Hans is willing to fix metafun, I would prefer to avoid workarounds.
(I don't care which syntax is used, but I would be grateful if the
same syntax worked in both mkii and mkiv.)
Since you seem to be a metapost expert: do you have any idea what
exactly would have to be fixed in ConTeXt core code?
If ConTeXt won't be fixed for whatever reason, I will write a wrapper
function using your code, but I would like to avoid that.
Hans?
Mojca
___________________________________________________________________________________
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-09-17 12:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-16 14:00 "externalfigure" vs. "draw externalfigure" in metafun Mojca Miklavec
2011-09-16 14:13 ` Andreas Schneider
2011-09-17 9:11 ` Nicola
2011-09-17 9:20 ` Nicola
2011-09-17 9:32 ` Mojca Miklavec
2011-09-17 9:50 ` Hans Hagen
2011-09-17 12:22 ` Nicola
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).