In article <460BD166.8040304@wxs.nl>, Hans Hagen
Taco Hoekwater wrote:
Mojca Miklavec wrote:
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.
LaTeX has worked only in the very beginning, when I was still using latex somewhat regularly, and afaik I was the only tester of that code (Btw, that means texexec dates back to at least the year 2000).
i can probably extend texexec easily to do the multipass latex thing (just as i support plain tex) but it has a low priority (useless to make something that no one will use or only one or two users)
About mptopdf: something is definately wrong there, and it really should be fixed. It is totally pointless when mptopdf processes only context-based files properly, since these are the only ones that do not _need_ mptopdf in the first place.
i remember fixing something because a latex user asked for it but usually don't test that (samep for supp-pdf), so if i get solutions i can put them in (i need to rewrite the thing anyway)
I have browsed mptopdf.pl code and I have discovered that I can process my original example with mptopdf --rawmp --metafun example.mp (en passant, it would be nice if 'mptopdf --help' showed the available options). The script recognizes when LaTeX is being used (lines 78--84), but unless --rawmp is given, it processes the file with texexec (which, as far as I have understood, does not currently work correctly with LaTeX, even if it probably should). It has turned out that the combination mptopdf/latex seems quite an unusual one: apparently, a ConTeXt user does not need to care about LaTeX stuff (of course); on the other hand, a LaTeX user might want to include the powerful MetaFun macros in raw MetaPost files (that was my case), without using ConTeXt. The latter can be accomplished as shown above, which implies mpost --tex=latex --progname=mpost --mem=metafun So, why not change mptopdf.pl so that it uses the command above when the latex switch is present and texexec only when there is no LaTeX related stuff? That is, change lines 86-100 to read: if ($Latex) { # Use mpost + metafun macros $mpbin = "mpost --tex=latex --progname=mpost --mem=metafun" ; } else { $mpbin = "texexec --mptex $PassOn" ; } The rationale here is that, probably, the more complicated processing by texexec is not relevant to the LaTeX user. My other question was: is page 5, ?1 in metafun-p.pdf obsolete? As I have already pointed out, 'input mp-tool; input mp-spec;' at the beginning of my original example results in no errors, but the output has a blank figure. Or is this a question for the metapost mailing list? Nicola