6

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

2

2 Answers 2

7

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

2
  • Where should I put the config.asy file in Linux?
    – qed
    Commented Oct 27, 2013 at 20:47
  • @qed Look in the Asymptote documentation
    – Danie Els
    Commented Oct 28, 2013 at 7:20
7

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.

You must log in to answer this question.

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