有沒有辦法讓字母之間的間距更寬?

有沒有辦法讓字母之間的間距更寬?

我需要實現這樣的目標。我認為在每個字母之間使用 \hspace 不是最好的方法,是否有替代方案? 在此輸入影像描述

答案1

從顯示的範例可以得出結論,您正在從套件中尋找\so命令soul

\documentclass{article}
\usepackage{soul}

\begin{document}
\so{text} text text
\end{document}

在此輸入影像描述

編輯: 來自 Soul 文件(第 8 頁):

\so您可以定義自己的間距巨集或使用巨集覆寫原始意義\sodef

\sodef<cmd>{font inter-letter-space}{inner space}{outer space}

空間尺寸,所有這些都是強制性的,應該定義為em讓它們隨著各自的字體增大或縮小。

一個例子:

\documentclass{article}

\usepackage{microtype}
\usepackage{soul}

\begin{document}
foobar \textls{barfoo} 

foobar \so{barfoo}

\sodef\an{}{.1em}{0.2em plus0.2em}{0.5em plus.1em minus.1em}

foobar \an{barfoo}
\end{document}

給出:

在此輸入影像描述

答案2

猜測您想要的結果是字母間距(或追蹤)單字:

如果您已經在程式碼中使用fontspec或,這些套件允許您使用 letterspace。microtype

\textls{your text}您可以透過在您想要字母間距的部分周圍使用縮微字體的字母間距。

\documentclass{article}

\usepackage{microtype}

\begin{document}
foobar \textls{barfoo}
\end{document}

程式碼的輸出

您可以使用該選項調整字母之間的間距letterspace。例如\usepackage[letterspace=200]{microtype}

相關內容