[英]fail to preview using auctex and emacs
我在 linux mint 上使用 emacs 和 auctex。 编写以下简单的 .tex 文件时,我无法在 emacs 中预览数学公式
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\begin{document}
I am going to write down the formula
\[
\sum_{k=1}^\infty x_k=\frac{x}{1-x^2}
\]
\end{document}
当我按 Cc Cp 时,会出现以下错误消息:
No appropriate `.dvi' file could be found
似乎 emacs 不会生成任何 .dvi 文件。 如何解决这个问题? 谢谢大家。
我遇到这个问题是因为我要求在构建完成之前显示 dvi 文件。 以下 elisp 在绑定键函数中使用,该函数指定 control-p 来预览乳胶。
("C-p" . (lambda ()
"Preview a latex buffer or selected region."
(interactive)
(if (use-region-p)
(tex-region (region-beginning) (region-end))
(tex-buffer))
(run-with-idle-timer 0.3 nil 'tex-view)))
tex-region 和 tex-buffer 命令开始从 TeX 到 dvi 的转换,并打开另一个显示中间文件名的窗口。 这些文件,包括所需的 dvi 文件,将在窗口关闭后立即删除。
我使用 run-with-idle-timer 函数等待 emacs 空闲 0.3 秒,然后再尝试显示文件。
注意:我不确定这是否仅仅因为我的 tex 文件很小,或者因为它确实有效。
Cc Cp Cp 在 Windows 10 上对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.