spacemacs 无法预览 latex 文件

我添加了 latex layer, 使用 SPC m p d 预览文件出错。 这是文件内容(hello.tex):

\documentclass{article}
\begin{document}
Hello World!
\end{document}

这是错误信息:

Running `Preview-LaTeX' on `hello' with ``pdflatex  -interaction=nonstopmode -file-line-error \&prv_hello "/AUCTEXINPUT{" hello.tex "}"''
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Arch Linux) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2020-10-01> patch level 2
L3 programming layer <2020-12-03> xparse <2020-03-03>
CUSTOMISED FORMAT. Preloaded files:
        .
 article.cls    2020/04/10 v1.4m Standard LaTeX document class
  size10.clo    2020/04/10 v1.4m Standard LaTeX file (size option)
        .
(./hello.tex (/usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) (./hello.aux) (/home/stskyblade/.spacemacs.d/elpa/develop/auctex-13.0.0/latex/preview.sty (/usr/share/texmf-dist/tex/generic/luatex85/luatex85.sty) (/home/stskyblade/.spacemacs.d/elpa/develop/auctex-13.0.0/latex/prtightpage.def) (/home/stskyblade/.spacemacs.d/elpa/develop/auctex-13.0.0/latex/prauctex.def
No auxiliary output files.


(/home/stskyblade/.spacemacs.d/elpa/develop/auctex-13.0.0/latex/prauctex.cfg)) (/home/stskyblade/.spacemacs.d/elpa/develop/auctex-13.0.0/latex/prfootnotes.def)
Preview: Fontsize 10pt
Preview: PDFoutput 1
) )
No pages of output.
Transcript written on hello.log.

TeX Output finished with nothing to show at Wed Feb 24 19:38:53
LaTeX: LaTeX found no preview images

我在该目录下运行 pdflatex hello.tex 可以找到正确渲染的 hello.pdf 文件。

我对 LaTeX 不是很熟,不过你就一行文本,没啥要预览的啊。我记得之前是有数学公式可以直接在 Emacs buffer 里显示出来,不知道你说的预览是不是这个。

latex 预览是对公式,图片,表格,这些环境,不是把pdf插在buffer里

这个问题算是解决了。我以为 preview-document 是新开一个 buffer 显示渲染后的全文件(类似 VSCode 预览 Markdown 文件), 实际上是将原文件中的公式等在原 buffer 中预览。 感谢各位的帮助。