Fonts & Character Setspolyglossia | The Dutch digraph "IJ"

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
Bram
Posts: 20
Joined: Sat Jul 14, 2012 12:54 pm

polyglossia | The Dutch digraph "IJ"

Post by Bram »

In Dutch, the combination 'ij' is a digraph (or a ligature). The kerning between i and j is reduced. They are capitalized together:
"IJselijk koud is het IJ, maar altijd dichtbij."

There are unicode characters for these digraphs: U+0132 (IJ) and U+0133 (ij). Some fonts implement them.

The babel package specifies this digraph as: \"y
But this doesn't work with the polyglossia package that is needed in combination with Xelatex. And it is impractical, as the 'ij' is very common in Dutch texts.

Reducing kerning between i and j is another possibility, but the microtype package doesn't work with XeLaTeX. And: the 'ij' is not always a digraph. There are rare exceptions: bijunctie is read as bi-junctie.

And now my questions:
  • I'd like to replace 'ij' and 'IJ' in my texts with the appropriate unicode character. This can be done in tex-text.map, but instead I'ld like to have something in the preambule, which makes it easier to exchange texts.
  • If the font doesn't have the appropriate digraph characters, I'd like to emulate them with reduced kerning.
Here is some basic code for XeLaTeX:

Code: Select all

\documentclass{memoir}

\usepackage{polyglossia}
\setdefaultlanguage{dutch}

\begin{document}
IJselijk koud is het IJ, maar altijd dichtbij.
\end{document}
Your help is very much appreciated!

Recommended reading 2024:

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

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

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

polyglossia | The Dutch digraph "IJ"

Post by localghost »

Bram wrote:[…] The babel package specifies this digraph as: \"y […]
Correctly this should read "y, because \"y would result in dieresis on the »y« (»ÿ« or »Ÿ«, respectively). Off the top of my head I would suggest to turn on the babel shorthands.

Code: Select all

\usepackage{polyglossia}
\setdefaultlanguage[babelshorthands=true]{dutch}
Unfortunately this doesn't help as "y results in »"y«. But polyglossia (as well as babel) defines the commands \ij and \IJ.

Code: Select all

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

\begin{document}
  IJselijk koud is het IJ, maar altijd dichtbij.

  \ij\ \IJ
\end{document}
If you want to use the syntax known from babel, you might write a note to the maintainer(s) of polyglossia and ask for advice. An alternative would be to find a way to insert the Unicode characters »ij« and »IJ« directly (as I did here).

I don't think that you have to be afraid of fonts not containing these characters. Modern fonts (OpenType and TrueType) should have this feature built-in. So from my point of view an emulation is not necessary.


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

polyglossia | The Dutch digraph "IJ"

Post by Bram »

Thanks a lot! I agree with you that modern fonts should contain the ij and IJ, but many commercial fonts don't, including some of famous Dutch font-designers (which is a shame). So there is really an need to emulate it, for example with a reduced kerning between the i and j. I couldn't get it done with Xelatex, as the Microtype doesn't work together with Xelatex. So some help with this second step would be very much appreciated!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

polyglossia | The Dutch digraph "IJ"

Post by localghost »

Bram wrote:[…] I agree with you that modern fonts should contain the ij and IJ, but many commercial fonts don't, including some of famous Dutch font-designers (which is a shame). […]
Too bad. For commercial fonts this is an absurdity. All free fonts that I tested contain the Unicode characters for these digraphs so that I didn't face any problems.
Bram wrote:[…] So there is really an need to emulate it, for example with a reduced kerning between the i and j. I couldn't get it done with XeLaTeX, as microtype doesn't work together with XeLaTeX. […]
A kind of emulation is available with the commands \ij an \IJ which I already mentioned. And with a trick you can even get the familiar syntax from babel.

Code: Select all

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

\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«
}
\makeatother

\begin{document}
  \ij\ \IJ

  "y "Y

  ij IJ

  ij IJ
\end{document}
Bram
Posts: 20
Joined: Sat Jul 14, 2012 12:54 pm

Re: polyglossia | The Dutch digraph "IJ"

Post by Bram »

Thanks a lot! That is really helpful.
Ruud Harmsen
Posts: 1
Joined: Sun Mar 31, 2013 10:20 am

polyglossia | The Dutch digraph "IJ"

Post by Ruud Harmsen »

Bram wrote:In Dutch, the combination 'ij' is a digraph (or a ligature). The kerning between i and j is reduced.


I don't agree with this. If for example you look at various Windows fonts containing the special characters, sometimes the i and j in them are closer together, but sometimes they are even wider. There is no general rule that the combination of ij in Dutch should be kerned closer together.
Bram wrote:They are capitalized together:
That much is true. But there too, simply putting an I and a J together does the trick quite nicely. There is no need for any special characters or measures.

In my opinion, these special characters in Unicode should never have been added in the first place, as in practice they are never used and never needed. Just use i followed by j, I followed J, and the result looks quite OK.

Of course, typewriter fonts like Courier are an exception, and that is where this mistaken idea for special characters comes from: mechanical typewriters with only non-proportional fonts.

But in non-proportional font too, the special characters are too small and the separate letters too wide. So the simple solution is: use proportional fonts (like everybody does already) and the combined sequences i followed by j. No digraphs needed.

As some may know, I made a web page about the subject years ago (in Dutch).
Post Reply