更新

更新

chemgreek當我使用 TeX Gyre 字體時,一些希臘字元沒有隨包一起列印。

測試程式碼:

\documentclass{article}

\usepackage{fontspec}
\newfontfamily\termes{texgyretermes-regular.otf}
\newfontfamily\schola{texgyreschola-regular.otf}
\newfontfamily\libertine{LinLibertine_R.otf}

\usepackage{chemgreek}
\selectchemgreekmapping{fontspec}

\begin{document}
{\termes Termes: \printchemgreekalphabet}
{\schola Schola: \printchemgreekalphabet}
{\libertine Linux Libertine: \printchemgreekalphabet}
\end{document}

LuaTeX 的結果: LuaTeX 的 chemgreek + TeX Gyre 測試結果

XeTeX 的結果: XeTeX 的 chemgreek + TeX Gyre 測試結果

引擎之間的結果看起來略有不同,但除了 Linux Libertine 之外,它們都缺少 gamma、epsilon、iota 和 phi。

我已經發現一個答案提到 TeX Gyre 缺乏完整的希臘支持但我確認這些字體包含上面的“基本”希臘字符。

我可以使用chemgreekTeX Gyre 而不會丟失字元嗎?

答案1

更新

chemgreek此行為是由於1.1 (2016/12/20) 版本中修復的問題造成的。在可能的情況下,您應該更新你的 TeX 發行版安裝目前版本。如果這是不可能的,例如,如果您只想更改這一個軟體包,或者您沒有更新整個發行版的權限,則需要在本地安裝套件。此選項應被視為最後的手段,因為對於更複雜的包,可能存在包依賴性,這將使本地安裝更加複雜且容易出錯。


原答案

chemgreek套件做出了一些錯誤的假設:它假設\textgamma\textepsilon\textiota\textphi映射到希臘字符,但事實並非如此,因為將xunicode.sty它們定義為 IPA 字符(分別為拉丁小寫字母 gamma、epsilon、iota 和 phi)。

chemgreek您可以透過重新映射錯誤的目標來解決此問題,至少就目前而言:

\documentclass{article}

\usepackage{fontspec}
\newfontfamily\termes{texgyretermes-regular.otf}
\newfontfamily\schola{texgyreschola-regular.otf}
\newfontfamily\libertine{LinLibertine_R.otf}
\newfontfamily\tempora{Tempora}

\RenewDocumentCommand{\textgamma}{}{\symbol{"03B3}}
\RenewDocumentCommand{\textepsilon}{}{\symbol{"03B5}}
\RenewDocumentCommand{\textiota}{}{\symbol{"03B9}}
\RenewDocumentCommand{\textphi}{}{\symbol{"03C6}}

\usepackage{chemgreek}
\selectchemgreekmapping{fontspec}

\begin{document}

{\termes Termes: \printchemgreekalphabet}

{\tempora Tempora: \printchemgreekalphabet}

{\schola Schola: \printchemgreekalphabet}

{\libertine Linux Libertine: \printchemgreekalphabet}
\end{document}

我還添加了 Tempora,但您可以看到 TeX Gyre 字體的覆蓋也很完整。

在此輸入影像描述

順便說一下,它chemgreek的字母順序是錯誤的,因為它的 psi 之後是 chi。

相關內容