Modifying (i.e., partially overriding) microtype's character protrusion settings for specific characters
This is how you can extend or alter existing settings:
Make sure that the settings you want to change are already loaded; in the preamble, this isn't guaranteed to be the case, so you need
\LoadMicrotypeFile
.Create new settings that load the default settings by way of the
load
key.If you want set protrusion for any glyph to zero, you explicitly have to do that – declaring empty protrusion values (e.g.
\textendash = {,}
) will not change anything.If the warning you receive disturbs you, you can suppress it by loading the package withEDIT: Since version 2.7, you will no longer receive a warning if the overridden list is the same as the one that's been loaded.verbose=silent
; note, however, that this will also suppress all othermicrotype
warnings. (I guess something like aoverride
key for settings would be useful, but for now it is how it is.)
So, to turn this into code:
\usepackage[verbose=silent]{microtype}
\LoadMicrotypeFile{ptm}
\SetProtrusion
[ name = ptm-adapted, % the name is optional
load = ptm-T1 ]
{ encoding = T1,
family = {ptm,ptmx,ptmj} }
{
\textendash = { ,0}, % left protrusion will remain untouched,
% right protrusion set to zero
%\textendash = {150,150}, % this would set protrusion on both sides to 150
}
To adjust settings for more than one font, you have to do the same again (loading the settings and creating new ones), i.e. issue \SetProtrusion
(with \LoadMicrotypeFile
) multiple times:
\LoadMicrotypeFile{ppl}
\SetProtrusion
[ load = ppl-T1 ]
{ encoding = T1,
family = {ppl,pplx,pplj} }
{ ... }
Another, simpler but less fine-grained, possibility might be to load the package with a factor
less than 1000; this will scale the protrusion values for all glyphs of all fonts. For example,
\usepackage[factor=500]{microtype}
would halve all protrusion values.
I presently load microtype
with protrusion adjustments as follows. Perhaps someone is interested in using my values, especially for Times (ptm
), which imho has too much protrusion. Please note that my selection of adjustments is not an attempt at being exhaustive.
\usepackage[verbose=silent]{microtype}
\LoadMicrotypeFile{ptm}
\SetProtrusion
[ name = ptm-adapted,
load = ptm-T1 ]
{ encoding = T1,
family = {ptm,ptmx,ptmj} }
{ f = { ,-200},
r = { ,-100},
\textquoteleft = {300, }, % default uses 500
\textquoteright = { ,300}, % default uses 500
\textquotedblleft = {75, }, % default uses 300
\textquotedblright = { ,75}, % default uses 400
\textendash = {0,0}, % default is 300/300
\textemdash = {0,0}, % default is 200/200
/ = { ,-100}, % default uses 200
( = {67, }, % default uses 100
) = { ,67}, % default uses 200
{,} = { ,167}, % default uses 500
: = { ,167}, % default uses 500
; = { ,100}, % default uses 300
. = { ,233}, % default uses 700
? = { ,33} } % default uses 100
\SetProtrusion
[ name = ptm-it-adapted,
load = ptm-it-T1 ]
{ encoding = T1,
family = {ptm,ptmx,ptmj},
shape = {it,sl} }
{ f = { ,-300},
: = { ,0}, % default uses 500
. = { ,233} } % default uses 700
\LoadMicrotypeFile{ppl}
\SetProtrusion
[ name = ppl-adapted,
load = ppl-T1 ]
{ encoding = T1,
family = {ppl,pplx,pplj} }
{ \textquoteleft = {150, }, % default uses 500
\textquoteright = { ,150}, % default uses 700
\textquotedblleft = {75, }, % default uses 300
\textquotedblright = { ,75}, % default uses 400
\textendash = {0,0}, % default is 300/300
\textemdash = {0,0}, % default is 200/200
/ = { ,100}, % default uses 300
( = {50, }, % default uses 100
) = { ,150}, % default uses 300
{,} = { ,250}, % default uses 500
: = { ,250}, % default uses 500
; = { ,250}, % default uses 500
. = { ,350}, % default uses 700
? = { ,100} } % default uses 200
\SetProtrusion
[ name = txtt ]
{ encoding = T1,
family = txtt,
shape = {it,sl} }
{ f = { ,-120},
- = { ,300} } % in order to match ordinary hyphens' protrusion in body text