Fontspec 的 LetterSpace 令人不安的製表符(僅限 luatex)

Fontspec 的 LetterSpace 令人不安的製表符(僅限 luatex)

文本的一部分的字母間距fontspec將「縮進」後面的製表符,但僅限於使用 lualatex 編譯時; xelatex 將產生預期結果:

\documentclass{book}

\usepackage{fontspec}
\setromanfont{Junicode}

%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{tabbing}
test\qquad\=O ALLCAPS first part\qquad\=second part\\
test\>O {\addfontfeature{LetterSpace=10}ALLCAPS} first part\>second part\\
test\>O {ALLCAPS} first part\>second part\\
\end{tabbing}

\end{document} 

這看起來像是一個錯誤——有解決方法甚至修復嗎?

答案1

這是一個錯誤,我打開了一個錯誤報告:https://github.com/latex3/luaotfload/issues/167

解決方法是新增一個附加框:

\documentclass{book}

\usepackage{fontspec}
\setromanfont{Junicode}

%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{tabbing}
test\qquad\=O ALLCAPS first part\qquad\=second part\\
test\>O {\mbox{\addfontfeature{LetterSpace=10}ALLCAPS}} first part\>second part\\
test\>O {ALLCAPS} first part\>second part\\
\end{tabbing}

\end{document} 


在此輸入影像描述

相關內容