TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In this answer about full justification for italic text, I used microtype's \SetProtrusion to get better-looking margin kerning for italics. It works fine, but I had to call \SetProtrusion after \begin{document}, which is clearly not nice.

I tried it in the preamble: Then it compiles, but the new protrusion table isn't used. I tried it with \AtBeginDocument, but this gave a very long error message, starting with

Package microtype Warning: Unknown slot number of character
(microtype)                ` A '
(microtype)                in font encoding `OT1'.
(microtype)                Make sure it's a single character
(microtype)                (or a number) in protrusion list 
(microtype)                `cmr-it'.

Thus my question: How do I call \SetProtrusion in the preamble?

(Answers which use external files are appreciated, but I'd also like to know if it's possible without that.)

EDIT: Here's a minimal example (sorry for not providing that immediately).

   [ name     = cmr-it   ]
   { }
   { A              = {50,50},
     \textquoteleft = {700, } }}
\it foo
share|improve this question
Where did @Herbert's answer go!? – Seamus Feb 18 '11 at 13:42
@Seamus: Good question, he updated it and then deleted it before I read the update. @Herbert, if you're reading this: I'd also like to know what happened to your answer. (Well, why that happened, to be precise.) – Hendrik Vogt Feb 18 '11 at 13:44
it was nonsense – Herbert Feb 18 '11 at 16:30
up vote 7 down vote accepted

If you want to overwrite a set from one the mt-xxx.cfg files you should load this file first:

\SetProtrusion[name=cmr-it]    { }    {A= {1000,1000}}

\itshape ABC

Btw: The spaces around the "A" in the microtype warning indicates that at the begin of the document spaces are no longer ignored. The warning disappears if you remove the spaces in \SetProtrusion. (You will get other errors but as \AtBeginDocument is the wrong idea anyway I didn't investigate more.)

share|improve this answer
Great, thanks, \LoadMicrotypeFile{cmr} is the solution. But I don't quite understand your "Btw" about spaces: As I wrote in the question, with \SetProtrusion after \begin{document} it did work despite all the spaces. Or are those spaces only relevant with \AtBeginDocument? – Hendrik Vogt Feb 19 '11 at 10:36

Your Answer


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.