Use the ellipsis glyph from TeX Gyre Termes in pdfLaTeX

ellipsisfont-encodingsfonts

The font TeX Gyre Termes has a dedicated ellipsis glyph. It can be seen, for example, by opening the file qtmr.pfb in fontforge; it is the glyph number 133 (in base ten), corresponding to Unicode U+2026.

However, this glyph does not appear in the table generated by \fonttable{rm-qtmr}.

Suppose I'm using the package newtxtext with pdfLaTeX.

In this case (as in all cases I'm familiar with), \dots is not using the dedicated ellipsis glyph, but is rather composed of three separate periods. This is so regardless of whether the ellipsis package is used or not.

My questions are:

  1. How can I use the ellipsis glyph mentioned above in regular text (not math) in my document, assuming it only has to work in regular font size and weight?

  2. What if I want it also to work in italics, boldface, bold italics, and in different sizes (e.g. in footnotes and superscripts)?

EDIT:

The solution, provided by David Carlisle, is to use the LY1 encoding and \textellipsis command (although \dots would work, too). The simplest way is to use \usepackage[LY1]{fontenc} in the preamble. Then any of the following will produce the ellipsis glyph: \symbol{133}, or \textellipsis, or \dots .

But if one wants to preserve the T1 encoding for the rest of the document, one can use \usepackage[LY1,T1]{fontenc} in the preamble (make sure to put T1 last, as that will be the default for the document). Then, in the body of the document, use {\fontencoding{LY1}\selectfont\textellipsis}. Of course, one can also define a new command.

Here is a MWE showing that \textellipsis and \dots still produce three dots rather than a single glyph, and \symbol{133} still produces 'E' with a caron, as it should in T1 encoding. But the new command \ellipsisglyph produces the dedicated ellipsis glyph.

\documentclass{standalone}
\usepackage{newtxtext}
\usepackage[LY1,T1]{fontenc}
\newcommand{\ellipsisglyph}{{\fontencoding{LY1}\selectfont\textellipsis}}
\begin{document}
\begin{tabular}{ll}
\verb|\ellipsisglyph| & \ellipsisglyph\\
\verb|\textellipsis| & \textellipsis\\
\verb|\dots| & \dots\\
\verb|\symbol{133}| & \symbol{133}
\end{tabular}
\end{document}

MWE output

Best Answer

ellipsis is in the LY1 encoding (in position 133) so you can use that for the whole document, or just for a specific region.

enter image description here

\documentclass{article}

\usepackage{newtxtext}
\usepackage[LY1]{fontenc}

\showoutput

\begin{document}

 a \textellipsis\ b

\end{document}

The \showoutput log confirms this is a single glyph, not just three . which is the default definition:

....\LY1/ntxtlf/m/n/10 a
....\glue 2.5 plus 1.99997 minus 1.00006
....\LY1/ntxtlf/m/n/10 �
....\glue 2.5 plus 1.99997 minus 1.00006
....\LY1/ntxtlf/m/n/10 b