ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: nicola <vitacolo@dimi.uniud.it>
To: ntg-context@ntg.nl
Subject: Re: Relationship among mptopdf, mpost and latex
Date: Sat, 31 Mar 2007 19:33:40 +0200	[thread overview]
Message-ID: <vitacolo-D6048C.19334031032007@sea.gmane.org> (raw)
In-Reply-To: <460BD166.8040304@wxs.nl>

In article <460BD166.8040304@wxs.nl>, Hans Hagen <pragma@wxs.nl> wrote:

> 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

  reply	other threads:[~2007-03-31 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-25 15:36 nicola
2007-03-27  8:48 ` luigi scarso
2007-03-29  0:59   ` Mojca Miklavec
2007-03-29  8:32     ` Taco Hoekwater
2007-03-29 14:47       ` Hans Hagen
2007-03-31 17:33         ` nicola [this message]
2007-03-29 18:19 ` luigi scarso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vitacolo-D6048C.19334031032007@sea.gmane.org \
    --to=vitacolo@dimi.uniud.it \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).