Use arara: https://tex.stackexchange.com/questions/226380/how-to-change-typesetting-engine-by-adding-code-to-tex-file/226407#226407
– CicadaAug 18 '22 at 12:15
@Cicada I checked that, but I found it is too difficult to understand. I am using Windows.
– Y. zengAug 18 '22 at 12:50
@Cicada I run arara in cmd successfully. But in texworks, the error is: )\Latex\texlive\2022\bin\win32\runscript.tlu:915: command failed with exit code 1:
java.exe -jar "f:\Important (Could not be deleted)\Latex\texlive\2022\texmf-dist\scripts\arara\arara.jar Let me try *Latexmk*
– Y. zengAug 19 '22 at 00:52
latexmkis another method. – Cicada Aug 18 '22 at 15:15In tex file: % arara: xelatex % arara: biber % arara: xelatex % arara: xelatex
– Cicada Aug 18 '22 at 17:24