This question led to a new package:

What is the command line to be placed in the User

Quick Build Command of Texmaker to get:

LaTeX + mpost + dvips + ps2pdf + ViewPDF

That's to say, in order to avoid manually running mpost run on file.mp every time I run LaTeX command, is there anyway TeXMaker will do it for me?

I used TexMaker's own Wizard, which produced following command line:

latex -interaction=nonstopmode %.tex|mpost --interaction nonstopmode |dvips -o %.ps %.dvi|ps2pdf %.ps|"C:/Program Files (x86)/Adobe/Reader 10.0/Reader/AcroRd32.exe" %.pdf

It looks fine, but when I run a file.tex file it takes indefinite time with no result.

  • Hello, anyone to help?
    – Laura
    Sep 26, 2012 at 20:44
  • I thought I will get an answer quickly.
    – Laura
    Sep 27, 2012 at 13:18
  • Would you please add a simple example of a file you want to process?
    – egreg
    Oct 1, 2012 at 15:32

1 Answer 1


With an updated TeX Live 2012 there's no need to call mpost from the command line, since this program is allowed to be called during the LaTeX run. Just modify the definition of \endfmffile to do the Metapost run.



  \fmfcmd{\p@rcent\space the end.^^J%
  \IfFileExists{\thefmffile.mp}{\immediate\write18{mpost \thefmffile}}{}




This will produce abc.1 that will be included on the next run, with the usual command line call.

With MiKTeX it might not work, depending if mpost is allowed in the "restricted shell".

  • I don't know why the package link in question, ctan.org/pkg/feynmp-auto does not work above Mar 12, 2013 at 18:38
  • 1
    @texenthusiast Well, wait until it's activated; I just uploaded it, but knowing myself, I'd forget this annotation if not made immediately. ;-)
    – egreg
    Mar 12, 2013 at 18:41
  • sorry i thought it was old question and mistook it. thanks Mar 12, 2013 at 18:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .