Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using microtype in a document (with pdftex) and I would like to alter the amount of protrusion that small numbers (i.e. the digits 0-9) are subject to.

However, I cannot make \SetProtrusion work even in the most basic case - this MWE produces no protrusion of 1 or 2:

\documentclass{article}
\usepackage{microtype}
\SetProtrusion
{encoding = *}
 {1= {1000,1000}, {2=1000,1000}}

\begin{document}

Lorem Ipsum ... 
1\\
2\\
3\\
4\\
\end{document}

Following along the lines ofthis question I also tried to ensure that my settings are read last, hopefully overriding the defaults (from mt-cmr.cfg)

 \usepackage{microtype}
\LoadMicrotypeFile{cmr}
\SetProtrusion
{encoding = *}
 {1= {1000,1000}, {2=1000,1000}}

\begin{document}

Lorem Ipsum ... 
1\\
2\\
3\\
4\\\documentclass{article}

\end{document}

However this does not work either.

The only way I was able to affect the protrusion was by replacing the default protrusion list wholesale, as in

\usepackage{microtype}
\LoadMicrotypeFile{cmr}
\SetProtrusion
[name=cmr-default]
{encoding = *}
 {1= {1000,1000}, {2=1000,1000}}

\begin{document}

Lorem Ipsum ... 
1\\
2\\
3\\
4\\\documentclass{article}

\end{document}

But this means that all the defaults settings for glyphs I have not modified are gone.

What is the correct way to modify protrusion for certain character/size combinations while maintaining all the default settings for everything else ?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

The following works as intended, protruding only the small 1 and 2, and maintaining the protrusion rules that are set in mt-cmr.cfg (shown here with + and - as these characters are the most protruded in those sets).

\documentclass{article}
\usepackage{microtype}
\LoadMicrotypeFile{cmr}
\SetProtrusion
[load = cmr-OT1]
{ encoding = OT1,
family = cmr,
size = -small }
{ 1 = {1000,1000},
2 = {1000,1000} }

\begin{document}

Lorem Ipsum ... \\
1\\
2\\
-\\
+\\
\\
\scriptsize{1}\\
\scriptsize{2}\\
\scriptsize{+}\\
\scriptsize{-}\\

\end{document}

I believe the problem lies in the use of {encoding = *} - * is not a wildcard character as far as microtype is concerned, but rather something that expands to a default value (section 4 of the manual).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.