I'm encountering an issue while trying to compile a LaTeX document with an Asymptote figure. I receive the following error message:
Package asymptote Warning: file `asymptote-latex-1.pdf' not found on input line 11.
Additionally, I get the following errors related to missing files:
The system cannot find the file specified.
Function: CopyFileW
Result: 2
Data: existing="C:/Users/twill/AppData/Local/Temp/mik23382/_src\asymptote-latex.pdf", path="C:/Users/twill/OneDrive/Desktop\asymptote-latex.pdf"
Can someone help me understand what might be causing this issue and how to resolve it? I've checked the LaTeX document, file paths, and Asymptote code, but I can't seem to pinpoint the problem.
Any guidance or suggestions on how to fix this would be greatly appreciated. Thank you!
MWE: (Credit: 'filename-1.pdf' not found Asymptote)
\documentclass{article}
\usepackage{graphicx}
\usepackage{asymptote}
\begin{document}
\begin{asy}
size(200);
pen[] p={red,green,blue,magenta};
path g=(0,0){dir(45)}..(1,0)..(1,1)..(0,1)..cycle;
tensorshade(g,p);
dot(g);
\end{asy}
\end{document}
log:
2023-11-05 09:14:21,893-0700 INFO texify - this process (32336) started by miktex-texworks in directory C:\Users\twill\OneDrive\Desktop with command line: C:\Users\twill\AppData\Local\Programs\MiKTeX\miktex\bin\x64\texify.exe --pdf --synctex=1 --clean asymptote-latex.tex
2023-11-05 09:14:21,893-0700 INFO texify - running on Windows 10.0.22621
2023-11-05 09:14:21,903-0700 INFO texify.core - start process: pdflatex --synctex=1 C:/Users/twill/OneDrive/Desktop\asymptote-latex.tex
2023-11-05 09:14:22,468-0700 INFO texify.core - start process: pdflatex --synctex=1 C:/Users/twill/OneDrive/Desktop\asymptote-latex.tex
2023-11-05 09:14:22,954-0700 ERROR texify.core - The system cannot find the file specified.
2023-11-05 09:14:22,954-0700 ERROR texify.core - Function: CopyFileW
2023-11-05 09:14:22,954-0700 ERROR texify.core - Result: 2
2023-11-05 09:14:22,954-0700 ERROR texify.core - Data: existing="C:/Users/twill/AppData/Local/Temp/mik23382/_src\asymptote-latex.pdf", path="C:/Users/twill/OneDrive/Desktop\asymptote-latex.pdf"
2023-11-05 09:14:22,954-0700 ERROR texify.core - Source: Libraries\MiKTeX\Core\File\win\winFile.cpp:376
2023-11-05 09:14:22,959-0700 FATAL texify - Windows API error 2: The system cannot find the file specified.
2023-11-05 09:14:22,959-0700 FATAL texify - Info: existing="C:/Users/twill/AppData/Local/Temp/mik23382/_src\asymptote-latex.pdf", path="C:/Users/twill/OneDrive/Desktop\asymptote-latex.pdf"
2023-11-05 09:14:22,959-0700 FATAL texify - Source: Libraries\MiKTeX\Core\File\win\winFile.cpp
2023-11-05 09:14:22,959-0700 FATAL texify - Line: 376
Per the answer by @JimHefferon, I have tried to run the following two commands in the command line:
pdflatex C:\Users\twill\OneDrive\Desktop\asymptote-latex
asy C:\Users\twill\OneDrive\Desktop\asymptote-latex-*.asy
I've also tried replacing the first command with (removing the pdf):
latex C:\Users\twill\OneDrive\Desktop\asymptote-latex
The second one is producing the following error message:
failed to create directory /.asy.
error: could not load module 'C:\Users\twill\OneDrive\Desktop\asymptote-latex-*.asy'
OneDrive
(except probably on Linux because OneDrive on Linux sucks). Does it work if you try in some regular directory?