I would like to disable or modify character protrusion (enabled by microtype
) for specific characters.
Let me illustrate the issue with the en-dash, which protrudes far too wide for my taste:
(left: without protrusion; right: with protrusion)
I am however unable to disable protrusion with \SetProtrusion
:
\documentclass{memoir}
\usepackage{mathptmx}
\usepackage[T3,T1]{fontenc}
\usepackage{microtype}
%\usepackage[protrusion=false]{microtype}
\SetProtrusion
{ encoding = T1,
family = ptm }
{ \textendash = {,0} }
\begin{document}
Word word word word word word word word word word word word word word -- word
word word word word word word word word word word word word word word word
word word word word word word word word word word word word word word word
word word word word word word ...
\end{document}
I also get the following warning:
Package microtype Warning: protrusion codes list `ptm-T1' will override list
(microtype) `q.tex/9' for font `T1/ptm///' on input line 105.
According to How do I call microtype's \SetProtrusion in the preamble?, including a line \LoadMicrotypeFile{ptm}
just before \SetProtrusion
helps; if I try this, this does seem to address the issue for --
(\textendash
), but (1) the annoying warning stays and (2) my code disables all protrusion (by overriding the whole list of protrusion values with my short list). What is the right way to partially override default character protrusion settings? Ideally there will be a way that does away with any warnings while not disabling important microtype
functionality.
\LoadMicrotypeFile{ptm}\SetProtrusion[name=myptm,load=ptm-T1]{ encoding = T1 , family = {ptm,ptmx,ptmj} }{ \textendash = {,0} }
seems to work. and as this loadsptm-T1
before it overrides it I guess you can ignore the warning. – cgnieder Jul 14 '13 at 17:12