目前,我正在编写一个关于数学的大型 LaTeX 文档,偶尔我会对其进行一些拼写检查。您可以猜到,有很多单词不在标准词典中。但我已经添加了他们aspell
与a在标准字典。
aspell -d de -t -c my-document.tex
Run Code Online (Sandbox Code Playgroud)
有没有办法导出我的话(只有那些)?
恢复似乎很简单:另一个问题。
在处理aspell
不确定事物的存储位置时,最好咨询其配置以找出答案。
$ aspell --lang=en dump config | less
Run Code Online (Sandbox Code Playgroud)
将告诉您添加的单词在哪里结束的 2 个项目如下:
# home-dir (string)
# location for personal files
# default: <$HOME|./> = /home/saml
# personal (string)
# personal dictionary file name
# default: .aspell.<lang>.pws = .aspell.en.pws
Run Code Online (Sandbox Code Playgroud)
因此,有了这些信息,您就可以查阅该文件$HOME/.aspell.en.pws
。其中包含添加的单词。
现在说我们有这个文件。
$ cat sample.txt
smurf
loook
Run Code Online (Sandbox Code Playgroud)
现在我们拼写检查文件,sample.txt
.
$ aspell -t -c sample.txt
Run Code Online (Sandbox Code Playgroud)
因此,我们loook
以与您描述的相同的方式添加单词,使用a选定的单词。
现在,如果我们查阅上述文件。
$ cat .aspell.en.pws
personal_ws-1.1 en 1
loook
Run Code Online (Sandbox Code Playgroud)
小智 5
有一个文件包含所有添加的条目,默认情况下(英语):
/home/user/.aspell.en.pws
Run Code Online (Sandbox Code Playgroud)
http://aspell.net/man-html/Format-of-the-Personal-and-Replacement-Dictionaries.html