我尝试在 vscode 上构建一个 Latex PDF 文件,但总是出现错误。但每次尝试找出错误 vscode 时,它最终都会构建失败,并给出以下错误日志:
The log file hopefully contains the information to get MiKTeX going again:
C:\...\Local\MiKTeX\miktex\log\pdflatex.log
Latexmk: No log file was found, neither the expected one, 'test.log', nor one in '.'.
Latexmk: fls file doesn't appear to have been made.
Latexmk: Couldn't read log file 'test.log':
No such file or directory
----------------------
This message may duplicate earlier message.
Latexmk: Failure in processing file 'c:/.../test':
*LaTeX didn't generate the expected log file 'test.log'
----------------------
Latexmk: If appropriate, the -f option can be used to get latexmk
to try to force complete processing.
起初它被认为是一个源自.tex
文件的简单编译错误,但我认为它不是。然而,根本不知道为什么 vscode 总是无法编译 latex PDF,即使是对于一个非常简单的.tex
文件,如下所示:
\documentclass[12pt]{article}
\begin{document}
This is just a test.
\end{document}
我也尝试过重新安装 Miktex,但无法弄清楚为什么它说目录中没有日志文件。任何帮助都将不胜感激。
编辑
miktex 中的pdflatex.log
记录了一些致命错误,这确实很难理解。这是尝试构建时的完整日志test.tex
,每次我尝试构建文件时,tex
它都会显示多个错误消息Bad parameter value
。这个错误实际上是什么意思?
2023-06-05 20:26:59,654+0900 INFO pdflatex - this process (35120) started by 'perl' with command line: pdflatex --max-print-line=10000 -synctex=1 -interaction=nonstopmode -file-line-error -recorder c:/.../test.tex
2023-06-05 20:26:59,654+0900 INFO pdflatex - allowing known shell commands
2023-06-05 20:26:59,654+0900 INFO pdflatex - enabling input (output) from (to) processes
2023-06-05 20:26:59,654+0900 FATAL pdflatex.core - Bad parameter value.
2023-06-05 20:26:59,654+0900 FATAL pdflatex.core - Data: parameterName="save_size"
2023-06-05 20:26:59,654+0900 FATAL pdflatex.core - Source: Libraries\MiKTeX\TeXAndFriends\include\miktex\TeXAndFriends\TeXMFMemoryHandlerImpl.h:107
2023-06-05 20:26:59,654+0900 FATAL pdflatex - Bad parameter value.
2023-06-05 20:26:59,654+0900 FATAL pdflatex - Info: parameterName="save_size"
2023-06-05 20:26:59,654+0900 FATAL pdflatex - Source: Libraries\MiKTeX\TeXAndFriends\include\miktex\TeXAndFriends\TeXMFMemoryHandlerImpl.h
2023-06-05 20:26:59,654+0900 FATAL pdflatex - Line: 107
2023-06-05 20:26:59,654+0900 INFO pdflatex - this process (35120) finishes with exit code 1