[英]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.