0

Is there a way to automate the Build and View (F5) function such that it knows which command to use amongst latex, pdflatex, xetex and lualatex? For example, if I load the fontspec, I want my Texstudio to automatically call the xetex command when I press F5 (Build and View). Is there any way to configure my Texstudio to behave in such a way?

David Carlisle
  • 757,742
itc
  • 657
  • You can configure tesxtudio to use latexmk: https://tex.stackexchange.com/a/351728/29873 – DG' Jul 15 '22 at 20:22
  • The solution you have cited is using lualatex as the option and is not yet solving my problem. – itc Jul 15 '22 at 20:49
  • Sorry, I misread your question. You want some magic that determines what you are doing in the document. For that, I have, indeed, no solution. But then again, lualatex can compile almost every document that be compiled with either pdflatex or xelatex, so it might work after all – DG' Jul 15 '22 at 21:02
  • Yes of course, I want some configuration that determines what command to use amongst pdflatex, lualatex, xetexetc – itc Jul 15 '22 at 21:06
  • 1
    Perhaps "magic comments" could be of use: https://www.texdev.net/2011/03/24/texworks-magic-comments/, https://tex.stackexchange.com/questions/78101/when-and-why-should-i-use-tex-ts-program-and-tex-encoding – Steven B. Segletes Jul 15 '22 at 21:11

0 Answers0