我正在使用 MiKTeX/TeXworks,latexmk
几年前就设置好了。它一直运行良好,直到昨天我更新了 MiKTeX。
latexmk
我使用的排版程序是:
但是,现在当我尝试使用我的latexmk
处理选项进行编译时,我获得了以下日志文件:
Latexmk: This is Latexmk, John Collins, 18 June 2019, version: 4.65.
Rule 'pdflatex': The following rules & subrules became out-of-date:
'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex -synctex=1 -recorder "DOCUMENT.tex"'
------------
Latexmk: applying rule 'pdflatex'...
Can't spawn "pdflatex -synctex=1 -recorder "DOCUMENT.tex"": Inappropriate I/O control operation at C:\Program Files\MiKTeX 2.9\scripts/latexmk\latexmk.pl line 9732.
Latexmk: fls file doesn't appear to have been made.
Collected error summary (may duplicate other messages):
pdflatex: Command for 'pdflatex' gave return code 255
Refer to 'DOCUMENT.log' for details
----------------------
This message may duplicate earlier message.
Latexmk: Failure in processing file 'DOCUMENT.tex':
(Pdf)LaTeX didn't generate the expected log file 'DOCUMENT.log'
----------------------
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs, or warnings treated as errors.
Latexmk: Errors, so I did not complete making targets
我尝试搜索该怎么做,但到目前为止还没有找到任何有用的东西。有人可以提供一些指导吗?如果我手动执行,一切都会按预期进行编译pdflatex + bibtex + pdflatex + pdflatex
。
TeXworks版本为0.6.3版(MiKTeX 2.9.7140 64位)。
编辑:这是我从命令行运行得到的结果latexmk
。错误消息
和输出
C:\Users\username\folder>latexmk
Latexmk: This is Latexmk, John Collins, 18 June 2019, version: 4.65.
Latexmk: Disallowing switch of output file as incompatible
with file requests.
Latexmk: applying rule 'latex'...
Rule 'latex': The following rules & subrules became out-of-date:
'latex'
------------
Run number 1 of rule 'latex'
------------
------------
Running 'latex -recorder "DOCUMENT.tex"'
------------
Can't spawn "latex -recorder "DOCUMENT.tex"": Inappropriate I/O control operati
on at C:\Program Files\MiKTeX 2.9\scripts/latexmk\latexmk.pl line 9732.
Latexmk: fls file doesn't appear to have been made.
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
latex: Command for 'latex' gave return code 255
Refer to 'DOCUMENT.log' for details
----------------------
This message may duplicate earlier message.
Latexmk: Failure in processing file 'DOCUMENT.tex':
(Pdf)LaTeX didn't generate the expected log file 'DOCUMENT.log'
----------------------
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs, or warnings treated as errors.
答案1
miktex bin 文件夹中的许多 exe 文件都非常小:它们只是包装器。“真正的”应用程序代码位于某个 dll(和/或某个脚本)中,包装器必须找到“入口点”。有时在更新后,入口点会发生变化,必须重新创建包装器。通常 miktex 会处理这个问题,但它可能会因任何原因而失败。在这种情况下,可以使用以下命令重新创建包装器
initexmf --mklinks --admin --force
或者只有 latexmk 之类的脚本受到影响
initexmf --mklinks=scripts --admin --force