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

Asymptote now works just fine except for when I try to add labels (that are created using LaTeX). In that case, I get

Process started

Cannot execute C:\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe/pdflatex Please put in a file config.asy: import settings; texpath="LOCATION"; where LOCATION specifies the location of the directory containing your pdflatex engine (pdflatex). Alternatively, set the environment variable ASYMPTOTE_TEXPATH or use the command line option -texpath="LOCATION". For further details, see http://asymptote.sourceforge.net/doc/Configuring.html http://asymptote.sourceforge.net/doc/Search-paths.html

Process exited with error(s)

My Asymptote command in Texmaker is set to

"C:/Program Files (x86)/Asymptote/asy.exe" -gs="C:/Program Files/gs/gs9.07/bin/gswin64.exe" -texpath="C:\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe" %.asy

(Nothing works without specifying the ghostscript location.) But I am also specifically stating the pdflatex location as the error says I should do, and I am still getting the error. What should I do? (Btw, yes, all the paths are correct, my pdflatex.exe really is at that location.)

share|improve this question
I think you're setting a wrong texpath. It should be a path so something like -texpath="C:\MiKTeX 2.9\miktex\bin\x64\" would do – karlkoeller Jun 6 '13 at 7:31
@karlkoeller That did it. Thanks so much! – Dominik Teiml Jun 6 '13 at 16:24
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – karlkoeller Aug 3 '13 at 21:18

There is a mistake in your command line. In fact, -texpath should point to a path and not to an executable. In other words, it should point to a directory (a folder) rather than a file.

So changing your command line to

"C:/Program Files (x86)/Asymptote/asy.exe" -gs="C:/Program Files/gs/gs9.07/bin/gswin64.exe" -texpath="C:\MiKTeX 2.9\miktex\bin\x64\" %.asy

it's the trick to get it working.

share|improve this answer

You can put most of the stuff in a configuration file config.asy. The position of the file is in your user DOS directory %USERPROFILE%\.asy. Run the following in a command window to obtain the directory:

>echo %USERPROFILE%\.asy

Create a new or change the existing file config.asy (my own setup)

import settings;
gs        = "C:\usr\gs\gs9.06\bin\gswin64c.exe";
psviewer  = "C:\usr\gs\Ghostgum\gsview\gsview64.exe";
pdfviewer = "C:\usr\SumatraPDF\SumatraPDF.exe";

If TeX is not in your standard search path, you can add

texpath   = "C:\MiKTeX 2.9\miktex\bin\x64\";

Then you can run: "C:/Program Files (x86)/Asymptote/asy.exe" -V -f pdf %.asy

share|improve this answer
Where should I put the config.asy file in Linux? – qed Oct 27 '13 at 20:47
@qed Look in the Asymptote documentation – Danie Els Oct 28 '13 at 7:20

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.