On 3/27/07, luigi scarso wrote:
> If I have some time, i will check this.
>
> On 3/25/07, nicola <[EMAIL PROTECTED]> wrote:
> > Hi,
> > some time ago I needed to include a png file into a MetaPost picture and
> > I did it with the MetaFun macro externalfigure. I compiled the code with
> > mptopdf and the result was fine. Since I had no previous experience with
> > it, my code used LaTeX, not ConTeXt, for the labels.

> hmm, a bit off-topic; after all, there is a latex mailing list. This
> is the context mailing list,

But mptopdf has no connection with any LaTeX package at all. It's a
pure ConTeXt script, which used to support LaTeX input as well until
ConTeXt has switched to ruby (and there should be no reason why it
would not support that now).

> so some user (like me for example) don't
> use latex anymore from some year at least.

Exactly that was the problem: no LaTeX user has ever updated the
distribution (there was nothing comfortable to update after all until
TeXLive 2007 came out) and tried to use mptopdf to process metapost
code with LaTeX commands. I completely forgot (would never come to the
idea to do that) to test that during transition to ruby (I only wrote
countless mails to Hans complaining that the new version still didn't
work). So I'm the guilty one ;)

On the other hand there is rarely a need to use LaTeX in such labels
(one can do the same on ConTeXt), but it's a matter of a habit. And
since that worked already, it should be fixed to work again.

I remember that Hans claimed that texmfstart (or texexec) could be
convinced to process LaTeX documents (and there is some mention of
latex command in core indeed), but I never managed to make it work.

> A better approach:
> 1) "I have this latex-code that works well on ...... system/distro"
> (... follow latex code ....) (pdf in attachment)

pdfs in attachments tend to be long anyway. And LaTeX mailing lists
will be unable to answer that specific problem which was introduced in
ConTeXt.

> 2) "I want to do the same in ConTeXt" (if no, why did you wrote in
> this mailling list?) ", and I tried this:"
> (... follow ConTeXt code ....) (pdf in attachment, if compile well)
> "but it does  not work (or works not better)."
>
> Please, keep your tex/pdf as small and clear as you can; at leat don't
> attach anything, just write down a link where one can download code/pdf

He posted a minimal example:

%%%%%%%%%%%%%

verbatimtex
%&latex
\documentclass{article}
\begin{document}
etex

beginfig(0);
 externalfigure "pic.png" scaled 15mm shifted origin;
 label.bot(btex $x$ etex, origin);
endfig;
end;

%%%%%%%

One should save it as something.mp and compile it with
   mptopdf [--someswitch] something.mp

Mojca
_______________________________________________
ntg-context mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to