[XeTeX] Greek letterspacing with soul

Ulrike Fischer news3 at nililand.de
Tue May 25 09:37:01 CEST 2010


Am Mon, 24 May 2010 19:16:07 +0200 schrieb Pablo Rodríguez:


> Many thanks for your help, Ulrike.
> 
> FreeMono-Regular seems to do the job.
> 
> But I get error messages from soul (Reconstruction failed) when there 
> are blank spaces.
> 
> \documentclass[10pt]{book}
> \usepackage{fontspec}
> \setmainfont{Theano Didot}
> \usepackage{polyglossia}
> \setdefaultlanguage{greek}
> \usepackage{soul}
> \makeatletter\font\SOUL at tt="FreeMono-Normal"\makeatletter
> \begin{document}
> \so{ἐπεστείλατέ μοι νομίζειν δεῖν τὴν διάνοιαν ὑμῶν εἶναι τὴν αὐτὴν ἣν 
> εἶχεν καὶ Δίων, καὶ δὴ καὶ κοινωνεῖν διεκελεύεσθέ μοι, καθ᾽ ὅσον οἷός τέ 
> εἰμι ἔργῳ καὶ λόγῳ. ἐγὼ δέ, εἰ μὲν δόξαν καὶ ἐπιθυμίαν τὴν αὐτὴν ἔχετε 
> ἐκείνῳ, σύμφημι κοινωνήσειν, εἰ δὲ μή, βουλεύσεσθαι πολλάκις. τίς δ᾽ ἦν 
> ἡ ἐκείνου διάνοια καὶ ἐπιθυμία, σχεδὸν οὐκ εἰκάζων ἀλλ᾽ ὡς εἰδὼς σαφῶς 
> εἴποιμ᾽ ἄν.}
> \end{document}
> 
> Is there any way to solve it?

I got the error only after I enabled the hyphenation patters. This
indicates that the problem are not spaces but hyphenation. The
documentation of soul says that "Reconstruction failed" means that
soul gots confused about the width of the sylables. The width is
measured by the width of -. So this need to be set too. So

\makeatletter
\font\SOUL at tt="FreeMono-Normal"
\setbox\z@\hbox{\SOUL at tt-}
\SOUL at ttwidth\wd\z@
\makeatother
 
should do the job (I had to use another font for testing.)

(And the second \makeatletter in my first posting was naturally
simply a typo.)


-- 
Ulrike Fischer 



More information about the XeTeX mailing list