[XeTeX] No-Break Space

enrico.gregorio at univr.it enrico.gregorio at univr.it
Wed Mar 2 19:18:25 CET 2011


BPJ wrote:

> Thanks, I'll try it.  What about *before* the dot?
> Will \newunicodechar{·}{\hspace{0pt}\nobreak·\nobreak\hspace{0pt}}
> do the trick? Although most dots appear after prefixes some
> don't, and some prefixes are long too.

Everything before MIDDLE DOT will be hyphenated normally. My test was

\documentclass[a4paper]{article}
\usepackage{fontspec}
\setmainfont{Linux Libertine O} % it has MIDDLE DOT
\usepackage{newunicodechar}
\newunicodechar{·}{·\nobreak\hspace{0pt}}
\begin{document}
\hsize=3pt % everything will be hyphenated

\noindent x environmental·environment
\end{document}

The initial x is just because (Xe)TeX doesn't hyphenate the first word in
a paragraph. You'll see that "environmental" is hyphenated.

Ciao
Enrico

--
Enrico Gregorio          + Dipartimento di Informatica          + Tel: +39 045 8027937
Enrico.Gregorio at univr.it + Università degli Studi di Verona     +
(gregorio at math.unipd.it) + Strada le Grazie 15 / I-37134 Verona + Fax: +39 045 8027928




More information about the XeTeX mailing list