仅自用 请勿参考
使用TeXstudio+pdflatex能够构建并查看pdf,没有错误和警告,消息如下所示。
开始 : pdflatex.exe -synctex=1 -interaction=nonstopmode "file_name".tex
完成
但是,在某些时候,在上述消息出现若干分钟后,会接着自动出现如下消息。
开始 : pdflatex.exe -synctex=1 -interaction=nonstopmode "xkEakR".tex
出现错误
这个命令可能是TeXstudio自动运行的,而且可以看出,xkEakR
是一个随机产生的文件名字。
搜索此名字,可以发现其存在于C:\Users\user_name\AppData\Local\Temp
。
在此位置找到了同名的log文件,打开发现如下内容。
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2024.4.12) 5 JUL 2024 19:14
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**ARiCZg.tex
(./ARiCZg.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-22>
! LaTeX Error: File `my_xxx.cls' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)
Enter file name:
! Emergency stop.
<read *>
l.2 ^^M
*** (cannot \read from terminal in nonstop modes)
Here is how much of TeX's memory you used:
23 strings out of 477942
461 string characters out of 5837043
1849382 words of memory out of 5000000
20328 multiletter control sequences out of 15000+600000
512287 words of font info for 32 fonts, out of 8000000 for 9000
36 hyphenation exceptions out of 8191
19i,0n,29p,64b,17s stack positions out of 10000i,1000n,20000p,200000b,200000s
! ==> Fatal error occurred, no output PDF file produced!
根据以上内容,推测是自定义的cls类文件没有在pdflatex可找到的位置。在TeXstudio进行编辑时,可以发现\documentclass{my_xxx}
下有绿色波浪线,但是不会产生错误和警告。