0

I am trying to get Peter Heslin's ispell-multi.el and flyspell-babel.el working with the custom commands:

\newcommand{\fli}[1]{\foreignlanguage{latin}{\textit{#1}}}
\newcommand{\fl}[1]{\foreignlanguage{latin}{#1}}
\newcommand{\fii}[1]{\foreignlanguage{italian}{\textit{#1}}}
\newcommand{\fgi}[1]{\foreignlanguage{german}{\textit{#1}}}

and languages

\usepackage[italian,german,latin,french]{babel}

When I enter flyspell-babel-mode, it successfully loads French sometimes, but it mostly throws this warning:

Flyspell-babel warning: no dictionary installed for foreignlanguage

and does not switch the dictionary depending what language environment I'm in; yet I am able to load all the languages' dictionaries manually with ispell-change-dictionary. They are named the same as Babel's names for them.

Flyspell-babel does work if I explicitly write, e.g.,

\foreignlanguage{latin}{<Latin text here>}

Here's what's in my ~/.emacs:

(load-file "ispell-multi.el")
(load-file "flyspell-babel.el")
(autoload 'flyspell-babel-setup "flyspell-babel")
(add-hook 'latex-mode-hook 'flyspell-babel-setup)

(setq flyspell-babel-verbose t)

(setq flyspell-babel-to-ispell-alist
       '(("german" "german")
         ("italian" "italian")
         ("latin" "latin")))

(setq flyspell-babel-command-alist
      '(("fgi" "german")
        ("fii" "italian")
        ("fl" "latin")
    ("fli" "latin")))

I am using GNU Emacs 24.5.1.

For more information on flyspell-babel, see the question: "How can I make AUCTeX spell check in the language specified by babel and csquotes macros?" and its chosen answer.

0
(setq flyspell-babel-verbose t)

(setq flyspell-babel-to-ispell-alist
       '(("german" "german")
         ("italian" "italian")
         ("latin" "latin")))

(setq flyspell-babel-command-alist
      '(("fgi" "german")
        ("fii" "italian")
        ("fl" "latin")
    ("fli" "latin")))

should be in flyspell-babel.el, not in ~/.emacs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.