Here it says that to setup Asymptote in TeXnicCenter, one should put

-batchView -tex "pdflatex" %tc-*.asy

into the Arguments line.

But there is no Arguments line in Texmaker. Instead, there is only one line corresponding to Asymptote in "Configure Texmaker". Entering

"C:/Program Files (x86)/Asymptote/asy.exe"  -batchView -tex "pdflatex" %tc-*.asy

leads to

error: could not load module 'C:/Users/Dominik/Documents/Latex/test5tc-*.asy

I suspect the reason is that in Texmaker the symbol % actually stands for the filename.

By the way, using

"C:/Program Files (x86)/Asymptote/asy.exe" %.asy

on a simple code


does give the result in GSView. But I want to use Asymptote in my LaTeX files and also output it in PDF, so I need to configure that somehow.


1 Answer 1


All is automatic with Texmaker :

  1. For the asymptote command in Texmaker, just use

    "C:/Program Files (x86)/Asymptote/asy.exe" %.asy
  2. If you use inline asymptote figure (code into .tex document), just use the

    PdfLaTex + Asymptote + PdfLatex + View Pdf

    mode for the "quick build" command and hit F1 : all the figures will be automatically compiled.

  3. If you edit asymptote figures .asy directly, Texmaker (>=4.0) will switch automatically in a special "quick build" mode for asymptote: just hit F1 and the pdf of the figure will be displayed automatically after compilation.

See the Texmaker user manual.

  • I should have written that that doesn't work. PdfLatexing a .tex file with the use of the asymptote package for some reason leads to the fatal error "LaTeX Error: File 'asymptote.asy' not found". But I do have Asymptote installed. Commented Jun 4, 2013 at 8:24
  • Can someone please help? I really need Asymptote for my project. Commented Jun 4, 2013 at 15:27
  • @DominikTeiml Just to know, did you install Asymptote separately or are you using the one which comes with TeX Live? Commented Jun 4, 2013 at 15:35
  • Your problem is not related to Texmaker but with your asymptote installation. If you use miktex, you must copy the "asycolors.sty" and "asymptote.sty" files (from "C:\Program Files(x86)\Asymptote" ) to the "C:\Program Files(x86)\MiKTeX 2.9\tex\latex" folder. Then, you have to launch the "Miktex settings" program and click on the "Refresh FNDB" button in the "general" tab.
    – user27168
    Commented Jun 4, 2013 at 20:53
  • Sorry, there was a typo in my comment. I mean copy the files to the "C:\Program Files(x86)\MiKTeX 2.9\tex\latex\asymptote" (you have to create the "asymptote" subfolder before copying the files)
    – user27168
    Commented Jun 4, 2013 at 21:26

You must log in to answer this question.

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