I have a .tex file which attempts to \includegraphics with a .pdf file.

This is perfectly possible when explicitly running pdflatex but doesn't work with latexmk because latexmk runs with latex and not pdflatex. (This SE answer pointed me to the latex vs. pdflatex problem.)

I'm interested in getting my compilation to work with latexmk because I'm using the Vim plugin vimtex. Is there a way?

  • It doesn't say anywhere in the answer you link to that latexmk runs with latex rather than pdflatex. But if you run latexmk with the argument -pdf, it should compile with pdflatex. – Sverre May 11 '15 at 12:05

If you run latexmk with the argument -pdf, it will compile with pdflatex.

In TeXWorks:

enter image description here

On Linux, change the `~/.latexmkrc' file as per this SE answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.