ashthespy / Atom-LaTeX

The only LaTeX package you need for typesetting with Atom.
https://atom.io/packages/atom-latex
MIT License
22 stars 9 forks source link

Error Occurred While Building LaTeX - latexmk not working #258

Closed TheOfficialDarthVader closed 3 years ago

TheOfficialDarthVader commented 3 years ago

What I've done:

I can confirm that Perl works as I am able to run both it and the latexmk script from Command Prompt. I can also use latexmk from TexStudio, but this required setting Commands ($PATH) to C:\Perl64\bin. I can run pdflatex as the build engine in atom-latex. It is just latexmk that is not working.

Given what I had to do to get Perl scripts to work with TexStudio this would seem to suggest the Environment Variables being passed are in some way incorrect.

The build log is just a single line: > latexmk -synctex=1 -interaction=nonstopmode -file-line-error -pdf "Cover Letter"

So I'm not sure where it is getting hung up, I assume it is an issue with not finding Perl.

ashthespy commented 3 years ago

As a quick sanity check, try setting your toolchain to just latexmk --version to ensure it's not something with your PDF?

TheOfficialDarthVader commented 3 years ago

That command fails to run

ashthespy commented 3 years ago

You seem to have some other issues here, I would create a debugging .bat or .cmd file to print out paths (where latexmk) and env variables among other things to confirm everything is correct. If Perl is not found, normally you get something along the lines of latexmk.exe: The script engine could not be found. IIRC...

Unfortunately, this is not really something the package can solve.

TheOfficialDarthVader commented 3 years ago

Rather frustratingly a restart seems to have fixed the problem. I find this a bit unusual as changes to environment variables are applied immediately. And restarting any program looking for said variable in theory should fix the problem. Guess this comes down to an idiosyncrasy in windows somewhere...