# microtype: Customizing protrusion for ellipsis and multiplication symbols

I can’t bring microtype to set protrusion for the \times symbol as well as the … ellipsis symbol). I used the "XXXX ={} notation to refer to these symbols (with XXXX being the UTF-8 code), as described in the microtype manual. Both documents generate microtype warnings and the symbols don't get and protrusion.

Document 1: Ellipsis symbol

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[showframe]{geometry}
\usepackage[protrusion=true]{microtype}

\SetProtrusion
{encoding={*}, family={*}, series={*}, size={*}}
{
"2026 ={,1000}% ellipsis symbol UTF-8
}

\begin{document}
\noindent Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text{…}\linebreak
Test text
\end{document}


Observations:
- When running this code, microtype reports Number "2026 in encoding OT1 too large!.
- When trying it with pasting in the actual symbol (…) both in text and in the setup code, it says Unknown slot number.
- When trying it with \dots, the same warning occurs.

Document 2: multiplication symbol

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[showframe]{geometry}
\usepackage{textcomp}
\usepackage[protrusion=true]{microtype}

\SetProtrusion
{encoding={*}, family={*}, series={*}, size={*}}
{
\texttimes ={,1000},% times symbol
}

\begin{document}
\noindent Test text Test text Test text Test text Test text Test text Test text Test text Test text Test text\texttimes\linebreak
Test text
\end{document}


Observations:
- When running this code, microtype reports Unknown slot number.
- When trying it with UTF-8 adressing ´"00D7 ={,1000}, no warnings, but there's no visible protrusion either.

Screen (combines Doc. 1 and 2):

• Unfortunately \dots is not the UTF-8 ellipsis symbol, but only three actual dots with adjusted spacing. Mar 30, 2015 at 18:34
• Thanks, I’ve edited the question to account for \dots and the ellipsis symbol. Both have similar problems.
– lblb
Mar 30, 2015 at 20:53
• But you are trying to apply protrusion to the unicode ellipsis symbol, which is not what TeX knows?
– cfr
Mar 30, 2015 at 21:07
• Does protrusion work with symbols?
– cfr
Mar 30, 2015 at 21:16
• @cfr 1. I’m applying it to the ellipsis symbol by using the UTF-8 code "2026. Applying protrusion to \dots yields a different warning. 2. Protrusion works with all the other symbols I’m using, e.g. – (endash), ,, ” etc. These are all entered in the text as symbols, not as commands.
– lblb
Mar 31, 2015 at 21:52

Let me first expand on the possible ways of how to specify characters in microtype's settings:

• For pdftex, the following input methods are allowed:

1. a character (like A) within the (7-bit) ASCII range
2. you may also use 8-bit (eg., Ä), and UTF-8 characters (eg., …), if the glyph is defined in the input encoding.
3. to remain portable, you may use text commands (eg., \texttimes).
• in any case, the glyph must exist in the font, ie. must be defined in the output encoding.
4. finally, you can refer directly to slot numbers of the font (ie., of the output encoding), which is for example the only way to create settings for ligatures.
• For luatex and xetex the first three points are the same, but there is a difference about the last one and an additional possibility:

1. numbers do not refer to the internal slots of the font, but to Unicode numbers (eg., "2026 stands for the ellipsis symbol).
2. additionally, you may specify a glyph name, prefixed with /. These names may be font-specific, and have to be looked up by examining the font itself. This is useful especially for ornaments that are not accessible otherwise.

So what goes wrong in your case?

1. Concerning the ellipsis:

• you cannot specify a Unicode number, because you are running pdftex, where numbers refer to the font encoding (as per point 4 above). Because OT1 encoding only contains 128 characters, the number is way out of range.
• in principle, both specifying the symbol itself (…) or the corresponding text command (\textellipsis -- not \dots) would work if the ellipsis glyph actually existed in the font. However, there simply is no ellipsis in OT1 encoding, it is rather composed of three single periods with some kerning interspersed.

It is therefore unfortunately impossible to set protrusion for the ellipsis independently from that of the period.

(The LY1 encoding contains a proper ellipsis symbol, but I doubt whether you would want to change to this font encoding.)

1. Concerning the times symbol:

• again, specifying the UTF-8 code is not possible, because numbers refer to the slots of the font (and there is no glyph at slot D7 in OT1 encoding).
• with \texttimes or ×, you get an Unknown slot number warning because this glyph is not part of OT1, but it is included in TS1 encoding.

Therefore, all you have to do is change the encoding key to TS1:

\SetProtrusion
{encoding={TS1}, family={*}, series={*}, size={*}}
{
\texttimes ={,1000},% times symbol
}


It may be noted that the situation with luatex or xetex would be much less intricate, because there is only one encoding (Unicode) for both input and output, and you could specify the symbols simply as … and ×, or as \textellipsis and \texttimes, or as "2026 and "00D7`.