LaTeX forum ⇒ Text FormattingHyphenation in Dutch

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

Hyphenation in Dutch

Postby Bram » Mon Feb 18, 2013 5:08 pm

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.

  1. \documentclass{memoir}
  2.  
  3. \usepackage{polyglossia}
  4. % I use this in combination with xelatex, babel is incompatible
  5. \setdefaultlanguage{dutch}
  6.  
  7. \begin{document}
  8. ideeën ideeën ideeën technologieën technologieën technologieën ideeën ideeën
  9. 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
  10. \end{document}

Tags:

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Mon Feb 18, 2013 7:14 pm

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.
  1. \documentclass{memoir}
  2. \usepackage{polyglossia}
  3. \setdefaultlanguage[babelshorthands=true]{dutch}
  4.  
  5. \makeatletter
  6. \addto\dutch@shorthands{%
  7. \declare@shorthand{dutch}{"y}{\textormath{\ij{}}{\ddot y}} % added from »babel«
  8. \declare@shorthand{dutch}{"Y}{\textormath{\IJ{}}{\ddot Y}} % added from »babel«
  9. \declare@shorthand{dutch}{"e}{\allowhyphens\discretionary{-}{e}{ë}\allowhyphens} % new shorthand for hyphenation
  10. }
  11. \makeatother
  12.  
  13. \begin{document}
  14. ideeën ideeën ideeën technologieën technologieën technologieën idee"en idee"en
  15.  
  16. technologieën technologieën technologieën technologieën idee"en technologie"en
  17. \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
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

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

Postby Bram » Wed Feb 20, 2013 10:58 am

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: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Wed Feb 20, 2013 11:07 am

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.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1


Return to “Text Formatting”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 7 guests