繁体   English   中英

如何在Emacs中为LaTeX模式定义两个ispell词典?

[英]How to define two ispell dictionaries in Emacs for LaTeX mode?

我有一个带有许多第二语言引文的文档。 如何为Ispell定义第​​二语言? 我在文件顶部有这个:

%% Local IspellDict: brasileiro

我试过这个,但它不起作用:

%% Local IspellDict: brasileiro, english

我有办法在两种语言之间切换:

;; You should have aspell-ru and aspell-en packages installed
(let ((langs '("english" "russian")))
  (setq lang-ring (make-ring (length langs)))
  (dolist (elem langs) (ring-insert lang-ring elem)))
(defun cycle-ispell-languages ()
  (interactive)
  (let ((lang (ring-ref lang-ring -1)))
    (ring-insert lang-ring lang)
    (ispell-change-dictionary lang)))

(global-set-key (kbd "C-1") 'cycle-ispell-languages)

马科斯,我发现了这个:

http://www.emacswiki.org/emacs/AutoLangMode

http://www.emacswiki.org/emacs/GuessLang

我想第一个做你需要的。

请从http://www.emacswiki.org/emacs/TN/#toc13尝试swL-mode。 它适用于flyspell。 选择当前点位置的文本字典。 你应该根据自己的需要调整swL-alist。 语言标识符字符串(例如\\ selectlanguage {...})必须从行的开头开始。

同时我还在下面的页面中发现了flyspell-babel.el:

https://tex.stackexchange.com/questions/40988/how-can-i-make-auctex-spell-check-in-the-language-specified-by-babel-and-csquote

我认为它更加用户友好(打包)。 它不使用即时格式化(jit-lock-mode)和文本属性,因此可能存在一些性能问题。 但也许,这没问题,而且我太谨慎了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM