4

I am trying to typeset something in Polish. Unfortunately one letter mysteriously disappears - but only when it is the last in a word. When I add a character ('a' in the example below) right after the missing one, it shows up again. Can someone explain that?

Here is the code:

\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

tnorgd
  • 285

1 Answers1

5

Don't use the polski package with xelatex. Beside this:

soul.sty defines a fix font \SOUL@tt and use it in various places when analyzing the input. As default ectt is used and obviously one gets problems as soon as words ends with glyphs not existing in this font as this leads to boxes of width 0 and so soul thinks that there is no longer something to process. The solution is to set the font to something more suitable. E.g.

\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

Ulrike Fischer
  • 327,261