我写一个latexmk的脚本如下,运行出错了。win10 64位+texlive2019
latexmk -xelatex random
用xelatex运行的测试脚本运行成功。
:: Called from Notepad++ Run :: [path_to_bat_file] "$(CURRENT_DIRECTORY)" "$(NAME_PART)" :: Change Drive and to File Directory rem %~d1 rem cd %1 :: Run Cleanup call:cleanup :: Run xelatex -> bibtex -> xelatex -> xelatex xelatex -synctex=1 -shell-escape -interaction=nonstopmode -no-pdf random bibtex random :: If you are using multibib the following will run bibtex on all aux files :: FOR /R . %%G IN (*.aux) DO bibtex %%G xelatex -synctex=1 -shell-escape -interaction=nonstopmode -no-pdf random xelatex -synctex=1 -shell-escape -interaction=nonstopmode -no-pdf random xdvipdfmx random :: Run Cleanup call:cleanup :: Open PDF rem START "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" %3 -reuse-instance :: Cleanup Function :cleanup @echo off del *.toc *.bbl *.blg *.out *.aux *.log *.bak *.thm *.synctex.gz *.fdb_latexmk *.fls *.glo *.gls *.idx *.ilg *.ind
这是random的代码
%!TEX program = xelatex % 使用 ctexart 文类,UTF-8 编码 %!TEX spellcheck \documentclass[UTF8,a4paper,12pt]{ctexart} \usepackage[left=3.18cm,right=3.18cm,top=2.54cm,bottom=2.54cm]{geometry} \begin{document} hello \LaTeX \end{document}
这是演示视频
这是MWE