1

I installed Asymptote and I'm trying to set it up with Texmaker so that I can compile Asymptote code within the tex document.

The problem is that I'm getting this error:

Error : could not start the command : "C:/Program Files/Asymptote/asy.exe" "C:/Users/abcde/Desktop/Documents/Test/Document-1".asy
AndréC
  • 24,137
  • Welcome to TeX.SX! Did you try the suggestions here? – schtandard Sep 08 '19 at 06:43
  • please have a look here: https://tex.stackexchange.com/questions/126510/texmaker-gives-an-error-could-not-start-the-command – teapot Sep 08 '19 at 02:10
  • @teapot I had already been using Texmaker and it was working fine, the problem is trying to setup Asymptote with it. Do you think that thread is still relevant? – Hb3wKh9lB7 Sep 08 '19 at 17:12

1 Answers1

2

Since August 2017, Asymptote has been integrated into MikTeX and therefore the previous answers are no longer valid.

For asymptote to work correctly under Texmaker, the asymptote command must be correctly initialized in Texmaker. By default, it displays: "C:/Program Files/Asymptote/asy.exe" %.asy

This is not the right path to the asymptote executable.

1. Found the MikTeX installation folder by clicking on the MikTeX console Settings Directoriestab

Asymptote is installed in the folder highlighted in yellow here, it is about C:\Program Files\MiKTeX 2.9\miktex\bin\x64

screenshot

But, by default, MikTeX is installed in the folder

C:\Users\cs\AppData\Local\Programs\MikTeX2.9

Then just copy this path and add \asy.exe" %.asy

In my case, this is: C:\Program Files\MiKTeX 2.9\miktex\bin\x64\asy.exe %.asy

By default, you will get C:\Users\cs\AppData\Local\Programs\MikTeX2.9\miktex\bin\x64\asy.exe %.asy

2. Just configure Texmaker by clicking on configure

configure texmaker

and then copy this path without forgetting the %.asy and it's over.

"C:\Program Files\MiKTeX 2.9\miktex\bin\x64\asy.exe" %.asy

3. New Year Update 2020.

I just wrote to Pascal Brachet, Texmaker developer, to change the default asymptote path on Texmaker. Version 5.0.4 of Texmaker has just been released. The default paths to the asymptote executable asy.exe has been updated.

Translated with www.DeepL.com/Translator

AndréC
  • 24,137
  • Hey, thank you so much for your answer. But, for some reason, I can't find the asy.log file in C:\Users\your-name-on-windows\AppData\Local\MiKTeX\2.9\miktex\log. – Hb3wKh9lB7 Sep 12 '19 at 17:01
  • Open the PowerShell console from any folder. Once opened type the command asy it will create the file asy.log – AndréC Sep 12 '19 at 17:03
  • Oh sorry, didn't see the rest of the answer. Also, not sure why but I can't find miktex in my program files. Should I consider reinstalling? – Hb3wKh9lB7 Sep 12 '19 at 17:22
  • No, it's no use, open the MikTeX management console, you'll find the installation folder there. I just updated my answer. – AndréC Sep 12 '19 at 18:04
  • 1
    Alright, sorry for the confusion. It works now, thank you so much for your help. – Hb3wKh9lB7 Sep 12 '19 at 18:35
  • Good if you succeeded. Your problem made me look for a long time and I thank you for it (I like to look for it). I have just found a simpler way to do it and I have simplified my solution. Do you think my last solution is easier to understand now? – AndréC Sep 12 '19 at 18:39
  • Yeah, your new solution is a bit easier to understand now. My main confusion was with the different directory for the MikTeX installation folder. Maybe it has to do with the fact that I installed it maybe a year ago. – Hb3wKh9lB7 Sep 12 '19 at 18:42
  • Good, have a good evening:-) – AndréC Sep 12 '19 at 18:44