TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

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

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".

share|improve this answer
I don't know why the package link in question, ctan.org/pkg/feynmp-auto does not work above – texenthusiast Mar 12 '13 at 18:38
@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 '13 at 18:41
sorry i thought it was old question and mistook it. thanks – texenthusiast Mar 12 '13 at 18:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.