# newtx bijection is bĳection

Feeding

\documentclass{standalone}
\usepackage{newtxtext}%%% 2020/07/22 v1.628
\begin{document}
bijection
\end{document}


to pdflatex leads to a PDF document (here is the image of it,

) in which you cannot copy bi or jection separately with the PDF readers Evince or Okular. If you don't use NewTX, you can select and copy bi or jection separately as expected. It seems to me that the glyph ĳ is graphically used (though copying the whole word from the text layer using the two PDF viewers correctly yields two separate letters ij inside the word). If this glyph is really used here, then it incorrectly spans the linguistical morpheme boundary; in any case you should be able to select and copy the “bi” part separately. How to avoid this weird behavior?

The NewTX maintainer has been informed.

• @campa evince, okular
– user224332
Nov 2, 2020 at 10:20
• I can't reproduce the behavior, both with Evince and Okular I can select i and j separately. I do have a slightly older version of newtxtext though (v1.531, 2018/03/27) so maybe it is different in the most recent version. Nov 2, 2020 at 10:23
• it is not a bug, it is a ligature ;-). You can input bi\/jection to split it. Nov 2, 2020 at 10:27
• ask the maintainer. Imho it is an rather odd choice to make this a ligature by default. Nov 2, 2020 at 10:36
• The T1 encoding has the glyphs “IJ” and “ij” but these should not be used for ligatures, because they're specific for Dutch. The font should instead define a kerning for the combination i+j. If I force OT1 encoding, the glyphs are indeed separate, but newtxtext uses T1 by default. Nov 2, 2020 at 11:15

### UPDATE

In version 1.631 (and some later versions, not including v1.71) of the NewTX fonts the issue is fixed.

The current version of the text font ntx-Regular-tlf-t1 has

   (LABEL C I)
(LIG C J O 234)
(STOP)
[...]
(LABEL C i)
(LIG C j O 274)
(KRN O 224 R -0.03)
(KRN C j R -0.035)
(KRN C T R -0.03)
(STOP)


Maybe the code above is cryptic, but it's what I get from tftopl that shows tfm files in (nearly) human readable form. The LABEL C i instruction introduces ligatures and kerning for the character at ASCII position for i as the first element.

Here LIG C j O 274 tells TeX that i followed by j should be replaced with the glyph sitting at slot octal 274 (in T1 encoding it's indeed the composite “ij” for Dutch). Instead KRN C T R -0.03 tells TeX that between i and T there should be a negative kern amounting to 3/100 of the design size (but this will be scaled by the magnification factor the font is loaded at). There is a KRN C j R -0.035 instruction, but since LIG C j comes first, the latter is discarded.

In previous versions of newtxtext fonts there is no ligature map for I and for i we read

   (LABEL C i)
(KRN C j R -0.035)
(KRN O 224 R -0.03)
(KRN C T R -0.03)
(STOP)


Adding the ligatures I+J mapping to the character at octal 234 and i+j mapping to octal 274 is wrong.

The T1 encoding has indeed glyphs “IJ” and “ij” at those positions, but they're specific for the Dutch language and its capitalization rules. They should not be used as general ligatures. This oversight has to be fixed by the maintainer.

In the meantime, you can use microtype to disable the wrong ligatures.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{newtxtext}%%% 2020/07/22 v1.628
\usepackage{microtype}

\DisableLigatures[I,i]{encoding=T1}

\begin{document}

bijection

\end{document}


Note that the kern is still applied. Disabling the ligature resurrects the kern mentioned above.

• Thx! (1) Are there any other ligatures besides ĳ that \DisableLigatures[I,i]{encoding=T1} would disable? (2) Is it possible to restrict \DisableLigatures[I,i]{encoding=T1} to all languages except Dutch (e.g., when you use \usepackage[USenglish,british,dutch,latin,german,ngerman]{babel})?
– user224332
Nov 2, 2020 at 11:37
• @GeekestGeek No, there is no provision for enabling ligatures only for a particular language. This might be possible with OpenType fonts. From the ligature tables I showed, there is no other ligature involving i as the first element. Nov 2, 2020 at 11:39
• It would be nice to have such a provision, which would allow us to quote a paper of Dĳkstra in Dutch and to talk about bijections in English :-). As for now, the most reasonable way seems to forbid such a ligature as you stated (or go with selnolig+LuaLaTex as Mico said).
– user224332
Nov 4, 2020 at 6:23

If you're free to employ LuaLaTeX to compile your document, you can employ the selnolig package to suppress the ij ligature automatically if the newtxtext text font package is in use.

If you compare the first and second word in each row, you'll notice that the kern between i and j is not affected by the operation of the selnolig package, even as the ligature is no longer there.

AFAICT, there are no good uses of the ij-ligature in English-language documents, even for words which have a Latin root -- e.g., bijection -- or which derive from another modern language, e.g., bijou, jipijapa (aka Panama hat), and Marijuana (Maryjane -- what else could you possibly have in mind?).

% !TEX TS-program = lualatex
\documentclass{article}
\usepackage{fontspec} % is required by 'selnolig'
\usepackage{newtxtext}
\usepackage{selnolig}

\begin{document}
bijection bi\kern0ptjection

\em bijection bi\kern0ptjection
\end{document}

• If you use LuaTeX, you would mostly like to employ OpenType fonts (rather than T1 fonts) anyway, wouldn't you?
– user224332
Nov 3, 2020 at 12:53
• @GeekestGeek - Definitely. The main points of the answer are (a) that LuaLaTeX can be used just fine with the newtxtext package and (b) that such a setup allows use of the selnolig package even if no OpenType font is used. Aside: Not many OpenType fonts offer an ij ligature. One of the few that does (and that I'm aware of) is the italic face of Garamond Premier Pro.
– Mico
Nov 3, 2020 at 14:30
• TeX Gyre Termes version 2.004 offers the ĳ ligature, too. But IMHO it's visually indistinguishable from a properly kerned ij.
– user224332
Nov 4, 2020 at 6:18