TexMaker 字典中使用的程式碼的意思是什麼?

TexMaker 字典中使用的程式碼的意思是什麼?

TexMaker(或其分叉的等效項TexStudio:)有一個字典選項,可在編輯器中提供拼字功能。但是,正如問題中所提到的將單字加入 TexMaker 字典?,沒有直接的方法可以將額外的和自訂的單字添加到其字典中。這是一個重要的功能,特別是對於那些在特定科學或技術領域工作且使用不常用單字的人來說。似乎向字典檔案添加額外單字的唯一方法是編輯它們(字典檔案可以在安裝資料夾中找到TexMaker)。另外,似乎TexMaker使用標準OpenOfficeHunspell,如蒂姆霍夫曼提到的)字典。

問題是這些字典中的單字後面有一些代碼顯然有助於跳過添加根單字的變體。例如,對於單字book,我們有book/SBJGMD。這些代碼顯然是在主詞典 (.dic) 文件附帶的附加 (.aff) 文件中定義的。但是,我在附加文件中找不到它們含義的任何描述。我需要這些資訊,因為我想在字典中添加一些額外的單字供我自己使用,而不添加它們的所有變體。

是否有關於附加文件中使用的代碼或語法的參考?

答案1

我找到了對此的描述網頁。為了完整起見,下面提供了所描述語法的副本:

Here is an example of how to define one specific suffix borrowed 
from the en_US.aff file used by the OpenOffice org spellchecker

SFX D Y 4
SFX D   y     ied        [^aeiou]y

The first line has 4 fields:

Field
-----
1     SFX - indicates this is a suffix
2     D   - is the name of the character which represents this suffix
3     Y   - indicates it can be combined with prefixes (cross product)
4     4   - indicates that sequence of 4 affix entries are needed to
               properly store the affix information

The remaining lines describe the unique information for the 4 affix
entries that make up this affix.  Each line can be interpreted
as follows: (note fields 1 and 2 are used as a check against line 1 info)

Field
-----
1     SFX         - indicates this is a suffix
2     D           - is the name of the character which represents this affix
3     y           - the string of chars to strip off before adding affix
                         (a 0 here indicates the NULL string)
4     ied         - the string of affix characters to add
                         (a 0 here indicates the NULL string)
5     [^aeiou]y   - the conditions which must be met before the affix
                    can be applied

相關內容