Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

To quote Wikipedia:

In Dutch, spellings such as coëfficiënt are necessary because the digraphs oe and ie normally represent the simple vowels [u] and [i], respectively. However, hyphenation is now preferred for compound words so that zeeëend (sea duck) is now spelled zee-eend.

Because the diaeresis is used to indicate that two letters should not be read as a digraph, it should be removed when this is indicated in an other way (a hyphen at a line break, for example). There are still cases where hyphenation removes the diaeresis: ‘financiën’ should be hyphenated as ‘fi-nan-ci-en’.

Unfortunately, when using

\usepackage{polyglossia}
\setdefaultlanguage{dutch}

the word is hyphenated as ‘financi-ën’ (when hyphenation happens at a line break). Is it possible to make XeLaTeX/Polyglossia remove the diaeresis when hyphenation happens?

The language-specific options in the Polyglossia manual do not offer a solution to this problem. The Babel manual mentions the \@trema macro, and indeed, when using pdfLaTeX and Babel, financi"en is hyphenated correctly (removing the diaeresis) at line breaks. I did find this ugly hack, but I am convinced there should be a better solution.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

If all “ë” just mean this, then a possible workaround is to redefine the meaning of ë to be "e:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[dutch]{babel}
\usepackage{newunicodechar}

\makeatletter
\newunicodechar{ë}{\@trema e}
\makeatother

\begin{document}

financiën coëfficiënt zeeëend    

\parbox{0pt}{\hspace{0pt}financiën coëfficiënt zeeëend}

\end{document}

The \parbox{0pt}{...} is a trick for telling TeX to hyphenate as much as possible.

enter image description here

With XeLaTeX you can use babel in the same fashion, just remove the calls to fontenc and inputenc.

If you want to use polyglossia, then here's a way:

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{dutch}
\usepackage{newunicodechar}

\makeatletter
\providecommand{\allowhyphens}{%
  \ifvmode\else\nobreak\hskip\z@skip\fi
}
\def\@trema#1{\allowhyphens\discretionary{-}{#1}{\"{#1}}\allowhyphens}

\newunicodechar{ë}{\@trema e}
\makeatother

\begin{document}

financiën coëfficiënt zeeëend

\parbox{0pt}{\hspace{0pt}financiën coëfficiënt zeeëend}

\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.