Text FormattingHyphenation in Dutch

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Bram
Posts: 20
Joined: Sat Jul 14, 2012 12:54 pm

Hyphenation in Dutch

Post by Bram »

Hyphenation in Dutch works perfectly, except for one case: words like "ideeën" (ideas) and "technologieën" (technologies) are normally hyphened as: "idee-en" and "technologie-en". So the umlaut is dropped, in stead of an 'ë' we simply write 'e' after a hyphen.

How can I persuade polyglossia to do that? Any help would be appreciated.

An example is given below.

Code: Select all

\documentclass{memoir}

\usepackage{polyglossia}
% I use this in combination with xelatex, babel is incompatible
\setdefaultlanguage{dutch}

\begin{document}
ideeën ideeën ideeën technologieën technologieën technologieën ideeën ideeën
ideeën technologieën technologieën technologieën technologieën ideeën technologieën technologieën technologieën ideeën ideeën ideeën technologieën technologieën technologieën technologieënideeën technologieën technologieën technologieën ideeën ideeën ideeën technologieën technologieën technologieën technologieën ideeën technologieën technologieën technologieën ideeën ideeën ideeën technologieën technologieën technologieën ideeën ideeën ideeën technologieën technologieën technologieën ideeën ideeën ideeën technologieën technologieën technologieën ideeën ideeën ideeën technologieën technologieën technologieën ideeën ideeën ideeën technologieën technologieën technologieën ideeën ideeën ideeën technologieën technologieën technologieën ideeën ideeën
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Hyphenation in Dutch

Post by localghost »

Do you remember a similar problem you had some time ago with the digraphs? At that time we solved it by adding a new shorthand from babel. We'll do it similar here by defining the shorthand "e for this purpose and add it (together with the digraphs) to the predefined ones.

Code: Select all

\documentclass{memoir}
\usepackage{polyglossia}
\setdefaultlanguage[babelshorthands=true]{dutch}

\makeatletter
\addto\dutch@shorthands{%
  \declare@shorthand{dutch}{"y}{\textormath{\ij{}}{\ddot y}}  % added from »babel«
  \declare@shorthand{dutch}{"Y}{\textormath{\IJ{}}{\ddot Y}}  % added from »babel«
  \declare@shorthand{dutch}{"e}{\allowhyphens\discretionary{-}{e}{ë}\allowhyphens}  % new shorthand for hyphenation
}
\makeatother

\begin{document}
ideeën ideeën ideeën technologieën technologieën technologieën idee"en idee"en

technologieën technologieën technologieën technologieën idee"en technologie"en
\end{document}
You can use this shorthand in general or only where needed (see above example). In Germany we had a similar problem with "ck", which should be hyphenated as "k-k".

By the way, neither polyglossia with XeTeX nor babel with PDFTeX do a good job in this case. So I suggest to contact the maintainers of both packages. As far as I know the current maintainer of babel works on support for XeTeX and LuaTeX. Hence this issue should make its way on his to-do list (and also the one with the digraphs). I'm not sure about the development of polyglossia. But you should try that also. Feel free to report back here if you got any answers.


Thorsten
Bram
Posts: 20
Joined: Sat Jul 14, 2012 12:54 pm

Re: Hyphenation in Dutch

Post by Bram »

Thanks a lot! It is nice to see the similarity with the diphtongs. I will certainly contact the maintainers of babel and polyglossia, it is better to solve this once and for all.
Would there be a trick to extend this to 'ë'? This is simpler for authors, otherwise they'll have to remember to write "e.
Kind regards,
Bram
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Hyphenation in Dutch

Post by localghost »

Bram wrote:[…] Would there be a trick to extend this to 'ë'? This is simpler for authors, otherwise they'll have to remember to write "e. […]
I'm afraid that this is not possible because " is the active character for the shorthands. This could be very tricky and at the moment goes beyond my TeX skills. But you could also ask this question when contacting the package maintainers.
Post Reply