
我正在使用aspell --version
国际 Ispell 版本 3.1.20(但实际上是 Aspell 0.60.6)来验证我的 tex 文件,命令如下:
aspell -d pt_PT --dont-tex-check-comments -c file0.tex
问题是每个
\citep{someone2011sometitle}
以及每个
\citet{someone2011sometitle}
我正在使用
\usepackage[authoryear]{natbib}
我该怎么做才能让 ispell 忽略引用?
答案1
手册说您需要在命令行中添加以下内容:
--add-tex-command citep op --add-tex-command citet op
这里的 op 表示每个命令(\citet
或\citep
)可能有一个可选参数和一个强制参数,并且都不应检查(如果要检查可选参数,请使用 Op)。
看http://aspell.net/0.50-doc/man-html/4_Customizing.html
更新:正确的语法(对于某些版本的 aspell?)可能是
--add-tex-command="citep op" --add-tex-command="citet op"
答案2
要将设置添加到配置文件(/etc/aspell.conf
或~/.aspell.conf
),不需要引号:
add-tex-command citep op
add-tex-command citet op