# Libertine + pdftex: using 'Th' and 'Qu' ligatures with T1 font encoding

Context: My document uses the libertine package and I process it with pdfTeX.

T1 encoding is better than OT1. A LY1 encoding exists but is less common.

Problem: For reasons explained above, I use the T1 font encoding for my document. However, this font encoding does not provide neither the Th nor the Qu ligature. I thus looked at similar questions (Linux Libertine ligatures / T1; Should I use the font encoding LY1 with the package libertine?; and Linux libertine, the {\l} character, ligatures, and T1 fontenc) and noted that the font provides different ligatures according to the encoding chosen. Here is the difference (MWE below):

• OT1 encoding: all ligatures.
• T1 encoding: common ligatures only.
• LY1 encoding: extended ligatures, but not with capital letters.

I would like to include at least Th and Qu ligatures in my document, but also want to benefit from T1 features (automatic hyphenation, accented characters being recognized as one single glyph), and be sure the text remains copy & past-able as well as search-able through the pdf.

Question: How to enable the Th and Qu ligatures in my document, without loosing T1 encoding benefits?

Bonus: The same question with the less common fb, fh, fj, fk, and ft ligature.

Note: Processing the document with LuaTeX or XeTeX is not an option for me (I have no time to shift from pdfTeX to another processing systems + I want to use microtype's tracking and spacing features), but answers involving them are still welcome.

\documentclass{scrbook}
\usepackage[OT1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{libertine}

\begin{document}
Ligatures with \texttt{OT1} encoding:  ff  fi   fl  ffi fb fh fj fk ft Qu Th
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   Ligatures with \texttt{T1} encoding:  ff  fi   fl  ffi
%
%   No ligature : fb fh fj fk ft Qu Th
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   Ligatures with \texttt{LY1} encoding:  ff  fi   fl  ffi fb fh fj fk ft
%
%   No ligature: Qu Th
\end{document}

• T1 has no free slots, see also my comment here tex.stackexchange.com/questions/229168/… Jun 5, 2017 at 20:42
• @UlrikeFischer Very explanatory, thank you. I should learn further about font encoding. It's surprising though, that glyphs got deleted when switching from OT1 to T1 (i.e. adding 128 more slots)! Jun 5, 2017 at 20:48
• @ebo The 128 additional slots are needed for accented letters supporting most Western Europe languages. Jun 5, 2017 at 21:12
• @egreg This makes sense! I trying to dig into fonttable for looking at the various glyphs made available by the T1 encoding. Jun 5, 2017 at 21:13
• There are 5 positions in T1 which can be used for such ligatures. In libertine there are ff, fi, fl, ffi and ffl on this position. Biolinum uses them for ff, ft, tt, QU and a "double exclam". You can check such things with the fonttable package and e.g. \xfonttable{T1}{LinuxBiolinumT-TLF}{m}{n} Jun 6, 2017 at 7:05

This might not be the solution you are looking for but just using LuaLaTeX (or XeLaTeX) and OpenType fonts you don't have this problem.

\documentclass{scrbook}
\usepackage{libertine}
\begin{document}
Ligatures with \texttt{TU} encoding:
ff fi fl ffi fb fh fj fk ft Qu Th
\end{document}


• Not the answer I hoped, yet the most useful... Sep 7, 2017 at 16:53

Based on karl's answer at Linux libertine, the {\l} character, ligatures, and T1 fontenc. Of course, in this case, the desired ligatures need to be explicitly invoked via macro.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\newcommand{\Th}{\begingroup\fontencoding{OT1}\selectfont Th\endgroup}
\newcommand{\Qu}{\begingroup\fontencoding{OT1}\selectfont Qu\endgroup}
\begin{document}
I have Th and Qu but I need the ligatures \Th{} and \Qu{} too though.
\end{document}


• Thank you! Changing every instances of The into \Th{}e does not seem to be, however, a longterm viable solution for my thesis! Jun 5, 2017 at 21:01
• @ebo With a capable text editor, it may not be so bad. Jun 5, 2017 at 21:01
• You are right, but I'm using butterflies instead (-; The source would look horrible though, and I'd prefer to separate content from layout markup in the sources. Jun 5, 2017 at 21:06
• @ebo You will lose kerning, too. Any font switch breaks kerning.
– cfr
Jun 6, 2017 at 3:51