This is what I have done to solve the problem in Windows mainly to be able to run in Emacs with either .org or .tex file. Perl To compile using latexmk require perl to be installed in your machine. Check the path with where and ensure it’s registered in your PATH.
Read More