Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to make the MPost command in Texmaker work. I am using the Texmaker in windows 7 with miktex.

So far I used the example document below. When using the windows console I was able to use following command for convertnig the .mp file to a pdf (a frient told me to rename the pdf because the previewer of texmaker only reads pdfs with the same name as the input file):

mptopdf testfile.m && ren testfile-mps.pdf testfile.pdf

This command works great in the console, but when I tried to use it in Texmaker it didn't work anymore:

mptopdf %.mp && ren %-mps.pdf %.pdf 

When using just

mptopdf %.mp

The pdf testfile-mps.pdf is being generated but when pressing "view PDF" texmaker says 'file not found'.

To my questions:

  • So how can I make the rename command work properly?
  • Or can I make texmaker showing the *-mps.pdf file?
  • What is the command for automatically showing a pdf in texmaker? (So you only have to press one button for compiling and previewing)

Here my testdocument testfile.mp

outputtemplate:="%j.mps";
beginfig(1);
z1=(0,0);
z2=(10mm,10mm);
drawarrow(z1--z2);
label.ulft(btex $A$ etex, .5[z1,z2]);
endfig;
bye
share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.