1

flyspell から除外したいカスタム マクロと環境を含む次の LaTeX コードがあります。

Some normal text

\begin{customenv}
Please dont flyspell-this
\end{customenv}

again some normal text (please flyspell this) and some \customcode{dont-flyspell-this}.

flyspell-mode-predicate に渡す関数を作成する必要があることはわかっていますが、\customcode と \begin{customenv} および \end{customenv} の両方で機能させるのに問題があります。

どんな提案でも大歓迎です。

更新: 次のように設定できるようです:

(setq flyspell-tex-command-regexp
"\\(\\((\\(begin\\|end\\)[ \t]*{\\|\\(cite[a-z*]*\\|label\\|ref\\|eqref\\|usepackage\\|documentclass\\|customcode\\)[ \t]*\\(\\[[^]]*\\]\\)?{[^{}]*\\)\\|\\\\begin{\\(customenv[1-9]*\\)}\\(.\\|\n\\)*\\\\end{\\(customenv[1-9]*\\)}\\)")

これは動作するようです\customcode{stuff}が、それでもテキストをスキップしませんcustomenv

4

0 に答える 0