所有原始 TeX 控制命令的列表

所有原始 TeX 控制命令的列表

是否有所有 Knuth's Tex 後添加的所有控制命令的詳細記錄列表,例如 PdfTeX、e-TeX、XeTex、LuaTeX?

答案1

如果您對該引擎支援的 TeX 方言之一提供的新原語感興趣,您可以使用 LuaTeX 以程式設計方式取得清單。透過更改方言變數的值

proc =  tex.initialize ()
dialect = "etex"
-- The dialect identifiers accepted are: tex (i.e., original Knuth, without Plain Tex macros),
--              core (core Luatex, that is, which at present is just "directlua", and is 
--              not in the luatex dialect),
-- and the extension dialects:
--              etex, pdftex, omega, aleph, luatex, umath
-- so the primitives introduced by Luatex are the ones in core, luatex, and umath.
-- These dialect identifiers are case sensitive: "etex" is accepted by
-- tex.extraprimitives, "eTeX" is not.
ps = tex.extraprimitives (dialect)
for _, v in ipairs(ps) do
        print (v)
end

(如果您使用該檔案名稱保存了程序,則應該使用它來運行texlua listprims.lua),此程式碼將輸出給定可能值的基元列表。 Unixcolumn實用程式讓輸出更易於閱讀。

LuaTeX 手冊在其中列出此輸出文字外原語部分,如果出於某種原因您更喜歡的話,會提供訪問此資訊的非程式設計途徑。

並非所有 TeX 方言都包含在 LuaTeX 中;最重要的是,XeTeX 不是。我認為 NTS 和 ExTeX 都引入了新的原語——對於這些其他系統,請尋找他們的文件; XeTeX 的原語清單位於XeTeX 參考指南

另請注意,方言會隨著軟體的開發而變化。例如,我認為 XeTeX 最近獲得了與 pdfTeX 相容的原語。

至於為所有方言提供有據可查的清單的單一指南——好吧,由於它是一個不斷變化的目標,我懷疑是否有足夠的動力來製作和維護這樣的東西。

相關內容