编译文件时出错

编译文件时出错

抱歉,如果这是显而易见的,因为我刚刚开始使用 LaTeX。我最近安装了 TeX Live 2024,并且正在使用 VSC LaTeX Workshop 扩展。当我尝试编译时,它返回了以下内容:

我运行的是 Windows 11,我认为它不相关,但我在安装 TeX Live 时也没有安装 TeXworks 前端。我也有 Perl v5.38.2。编辑:它似乎仍然有效(pdf 看起来全部正确)。

Initial Win CP for (console input, console output, system): (CP437, CP437, CP1252)
I changed them all to CP1252
Rc files read:
  NONE
Latexmk: This is Latexmk, John Collins, 29 Mar. 2024. Version 4.84.
Latexmk: Getting log file 'k5.log'
Latexmk: Examining 'k5.fls'
Latexmk: Examining 'k5.log'
Latexmk: Log file says output to 'k5.pdf'
No existing .aux file, so I'll make a simple one, and require run of *latex.
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex':  Reasons for rerun
Category 'other':
  Rerun of 'pdflatex' forced or previously required:
    Reason or flag: 'Initial setup'

------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex  -synctex=1 -interaction=nonstopmode -file-line-error -recorder  "c:/Users/Shingo/Desktop/latextime/k5.tex"'
------------
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(c:/Users/Shingo/Desktop/latextime/k5.tex
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-03-14>
(c:/texlive/2024/texmf-dist/tex/latex/base/article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
(c:/texlive/2024/texmf-dist/tex/latex/base/size10.clo)) (c:/texlive/2024/texmf-dist/tex/latex/graphics/graphicx.sty (c:/texlive/2024/texmf-dist/tex/latex/graphics/keyval.sty) (c:/texlive/2024/texmf-dist/tex/latex/graphics/graphics.sty (c:/texlive/2024/texmf-dist/tex/latex/graphics/trig.sty) (c:/texlive/2024/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (c:/texlive/2024/texmf-dist/tex/latex/graphics-def/pdftex.def))) (c:/texlive/2024/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) (./k5.aux) (c:/texlive/2024/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (c:/texlive/2024/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (c:/texlive/2024/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) (c:/texlive/2024/texmf-dist/tex/latex/tex-gyre/ot1qcr.fd) [1{c:/texlive/2024/texmf-var/fonts/map/pdftex/updmap/pdftex.map}{c:/texlive/2024/texmf-dist/fonts/enc/dvips/tex-gyre/q-rmm.enc}] [2 <./sampletrace.png>] (./k5.aux)

LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

 )<c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmss10.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/tex-gyre/qcrr.pfb>
Output written on k5.pdf (2 pages, 196442 bytes).
SyncTeX written on k5.synctex.gz.

Transcript written on k5.log.
Latexmk: Getting log file 'k5.log'
Latexmk: Examining 'k5.fls'
Latexmk: Examining 'k5.log'
Latexmk: References changed.
Latexmk: Log file says output to 'k5.pdf'
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex':  Reasons for rerun
Changed files or newly in use/created:
  k5.aux

------------
Run number 2 of rule 'pdflatex'
------------
------------
Running 'pdflatex  -synctex=1 -interaction=nonstopmode -file-line-error -recorder  "c:/Users/Shingo/Desktop/latextime/k5.tex"'
------------
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(c:/Users/Shingo/Desktop/latextime/k5.tex
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-03-14>
(c:/texlive/2024/texmf-dist/tex/latex/base/article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
(c:/texlive/2024/texmf-dist/tex/latex/base/size10.clo)) (c:/texlive/2024/texmf-dist/tex/latex/graphics/graphicx.sty (c:/texlive/2024/texmf-dist/tex/latex/graphics/keyval.sty) (c:/texlive/2024/texmf-dist/tex/latex/graphics/graphics.sty (c:/texlive/2024/texmf-dist/tex/latex/graphics/trig.sty) (c:/texlive/2024/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (c:/texlive/2024/texmf-dist/tex/latex/graphics-def/pdftex.def))) (c:/texlive/2024/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) (./k5.aux) (c:/texlive/2024/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (c:/texlive/2024/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (c:/texlive/2024/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) (c:/texlive/2024/texmf-dist/tex/latex/tex-gyre/ot1qcr.fd) [1{c:/texlive/2024/texmf-var/fonts/map/pdftex/updmap/pdftex.map}{c:/texlive/2024/texmf-dist/fonts/enc/dvips/tex-gyre/q-rmm.enc}] [2 <./sampletrace.png>] (./k5.aux) )<c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmss10.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb><c:/texlive/2024/texmf-dist/fonts/type1/public/tex-gyre/qcrr.pfb>
Output written on k5.pdf (2 pages, 196442 bytes).
SyncTeX written on k5.synctex.gz.

Transcript written on k5.log.
'k5.pdf' and 'c:/Users/Shingo/Desktop/latextime/k5.pdf' are identical (not copied) at c:\texlive\2024\texmf-dist\scripts\latexmk\latexmk.pl line 5562.
  That failed, with message 'No such file or directory'
Reverting Windows console CPs to (in,out) = (437,437)
Latexmk: Getting log file 'k5.log'
Latexmk: Examining 'k5.fls'
Latexmk: Examining 'k5.log'
Latexmk: Log file says output to 'k5.pdf'
================='.', 'c:/Users/Shingo/Desktop/latextime' '', 'c:/Users/Shingo/Desktop/latextime/'
Latexmk: Copying 'k5.pdf' to 'c:/Users/Shingo/Desktop/latextime/k5.pdf'
C:\texlive\2024\bin\windows\runscript.tlu:921: command failed with exit code 2:
perl.exe c:\texlive\2024\texmf-dist\scripts\latexmk\latexmk.pl -synctex=1 -interaction=nonstopmode -file-line-error -pdf -outdir=c:/Users/Shingo/Desktop/latextime c:/Users/Shingo/Desktop/latextime/k5

答案1

运行结束时看到的 latexmk 错误消息是由于新版本 latexmk (4.84) 中的错误以及-outdir=c:/Users/Shingo/Desktop/latextime命令行上的规范(我认为这是由 LaTeX Workshop 完成的)引起的。使用绝对路径是触发该错误的原因之一。

由于这个错误,LaTeX mk 正在 CTAN 上恢复到 4.83,该错误已由 LaTeX Workshop 的维护人员报告。

由于错误出现在运行结束时,即所有编译完成后,生成的pdf文件是正确的。

该错误与 latexmk 4.84 中一项新功能的实现有关,该功能称为最终输出目录,可通过选项访问--out2dir=...。(有关此新功能的基本原理,请参阅 latexmk 文档。)

修复将会很快发布。

相关内容