我的 emacs“ispell”命令运行 hunspell,当它到达我的 emacs Latex 缓冲区中的引用部分时会中断(我使用的是 AucTEX)。我以前的 emacs/Linux 发行版没有这个问题。示例:
as you like to say, vbfs ``You won't know what to do with yourself.''
运行 M-x ispell
可以正确标记 vbfs。然而,
as you like to say, ``You won't know what to do with yourself.'' vbfs
不记录任何错误。此外,一旦到达文本的引用部分,似乎就会跳过文档的其余部分。什么可能导致这种情况?作为引用,这是我的 ispell-tex-skip-alists
var:
((("\\\\addcontentsline" ispell-tex-arg-end 2)
("\\\\add\\(tocontents\\|vspace\\)" ispell-tex-arg-end)
("\\\\\\([aA]lph\\|arabic\\)" ispell-tex-arg-end)
("\\\\bibliographystyle" ispell-tex-arg-end)
("\\\\makebox" ispell-tex-arg-end 0)
("\\\\e?psfig" ispell-tex-arg-end)
("\\\\document\\(class\\|style\\)" . "\\\\begin[ \n]*{[ \n]*document[ \n]*}"))
(("\\(figure\\|table\\)\\*?" ispell-tex-arg-end 0)
("list" ispell-tex-arg-end 2)
("program" . "\\\\end[ \n]*{[ \n]*program[ \n]*}")
("verbatim\\*?" . "\\\\end[ \n]*{[ \n]*verbatim\\*?[ \n]*}")))
在 buildvm-15.phx2.fedoraproject.org 上运行 2013 年 8 月 14 日的 GNU Emacs 24.3.1(x86_64-redhat-linux-gnu,GTK+ 版本 3.8.2)
最佳答案
Ispell 将一对引号传递给 hunspell,但 hunspell 无法处理它。 我们可以通过以下建议来避免这种情况:
(defadvice ispell-send-string (before kill-quotes activate)
(setq string (replace-regexp-in-string "''" " " string)))
它将一对引号替换为空格。需要空格以避免未对齐。
关于emacs ispell 在 Latex 引号上中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20611169/