3

How do I set up for latexmk compilation for pdflatex in texlive? I have the following (see picture) setup for latexmk compilation for xelatex (I just found it somewhere), but I don't know what to change for pdflatex.

enter image description here

  • I'd guess the xelatex that follows q/ should be pdflatex. But I haven't used Windows in almost a decade. – jon Sep 10 '13 at 17:13
  • Latexmk should use pdfLaTeX by default with the -pdf switch: did you try just removing the $pdflatex ... line? – Joseph Wright Sep 10 '13 at 18:08
  • @JosephWright That seems to work, although I see a warning I have never seen before: Unquoted string "tex" may clash with future reserved word at (eval 8) line 2 (possibly completely unrelated). – Sverre Sep 10 '13 at 18:13
  • latexmk is a Perl script. You must have a Perl interpreter installed in your machine. – Raniere Silva Sep 10 '13 at 18:29
  • 1
    @Sverre OK, drop the -e (it seems this is actually linked to the xelatex business). For me, that removes the warning, and latexmk -pdf <filename> with the linked demo is fine. – Joseph Wright Sep 10 '13 at 20:08
4

Based on Joseph's comments, this:

enter image description here


The latexmk procedure for xelatex given in the question can also be simplified to the following:

enter image description here

  • 1
    Along the lines of this configuration, you should be able to simplify the xelatex configuration: Just replace -pdf (from this configuration) with -xelatex. The only difference seems to be that the configuration you posted heeds some variable $synctexoption, which I can’t find in the latexmk documentation, so I’m guessing it’s TeXworks-specific. What happens if you keep the xelatex configuration and only replace xelatex (in the 3rd line) with pdflatex? – doncherry Sep 11 '13 at 9:59
  • @doncherry You seem to be suggesting two different things here. I tried your first suggestion, and that seemed to work fine in the document I tested it on. I'll add it to my answer above. – Sverre Sep 11 '13 at 10:31
  • Yes, those were two different things. Overall, there should be (at least) four possible configurations, two each for pdflatex and xelatex. The one not pictured yet is the pdflatex configuration I described in the second part of my last comment. – doncherry Sep 11 '13 at 10:39
  • Since the one I pictured would be the simpler one, I guess that should be preferable. – Sverre Sep 11 '13 at 10:51

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.