用灵魂包删除波兰字母时,该字母会消失

用灵魂包删除波兰字母时,该字母会消失

我正在尝试用波兰语排版。不幸的是,一个字母神秘地消失了 - 但只有当它是单词的最后一个字母时才会消失。当我在缺失的字母后立即添加一个字符(下面示例中为“a”)时,它又出现了。有人能解释一下吗?

以下是代码:

\documentclass[12pt, a4paper]{article}
\usepackage{polski}
\usepackage{xltxtra}
\setlength\parindent{0pt}
\usepackage{soul}

\begin{document}
Wnoszę o głosowanie\\
Wnoszęa o głosowanie\\

\st{Wnoszę o głosowanie}\\
\st{Wnoszęa o głosowanie}\\


\end{document}

enter image description here

答案1

不要将 polski 包与 xelatex 一起使用。除此之外:

soul.sty 定义一个固定字体\SOUL@tt ,并在分析输入时在各个地方使用它。默认情况下使用 ectt,显然一旦单词以该字体中不存在的字形结尾,就会出现问题,因为这会导致宽度为 0 的框,因此 soul 认为不再有东西需要处理。解决方案是将字体设置为更合适的字体。例如

\documentclass[12pt, a4paper]{article}
\usepackage{fontspec}
\setlength\parindent{0pt}
\usepackage{soul}
\makeatletter 
\font\SOUL@tt="LMMono10-Regular"
\setbox\z@\hbox{\SOUL@tt-}
\SOUL@ttwidth\wd\z@ %reset default width of -
\makeatother
\begin{document}
Wnoszę o głosowanie\\
Wnoszęa o głosowanie\\

\st{Wnoszę o głosowanie}\\
\st{Wnoszęa o głosowanie}\\


\end{document}

enter image description here

相关内容