mhchem 中的連字符轉義不適用於 bidi

mhchem 中的連字符轉義不適用於 bidi

使用 排版我的化學論文時mhchem,我半頻繁地使用使用 轉義到文本模式的選項{},特別是在化學過程中排版連字符,如下所示:\ce{6{-}Me}。輸出應該是:

6-Me

然而,在添加了一個希伯來語單字後,這種情況就被打破了。新的輸出是:

6 我-

有什麼辦法可以解決這個問題嗎?

我的套件版本mhchem是4.04,分散式透過TexLive、Ubuntu軟體原始碼。附上一個最小的工作範例。我正在使用 XeLaTeX。

\documentclass{report}
\usepackage[version=4]{mhchem}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true,spelling=new]{german}

\setotherlanguage{hebrew} % <-- comment out this line for correct output.

\begin{document}
\ce{6{-}Me}
\end{document}

答案1

更新mhchem到最新版本沒有效果。

但是,更新後bidi會將連字符放回正確的位置。我之前的版本bidi是19.something,目前版本是20.something。

相關內容