I am using a document with Helvetica from the helvet package. I would like dashes not to protrude into the left margin. However, when I use SetProtrusion protrusion is disabled entirely:



% \LoadMicrotypeFile{helvet}


Quisque ullamcorper placerat ipsum. Cras nibh. Morbi a vel justo x  --- test --- a --- ullamcorper placerat ipsum. Cras nibh. Morbi vel justo vitae


Edit: that is, if I add

\SetProtrusion{encoding = T1}{\textendash = {0,}, \textemdash = {0,}}

below \usepackage{microtype}

From the answer under Modifying (i.e., partially overriding) microtype's character protrusion settings for specific characters and looking at section 5.7 of the manual I figure I need to create a file mt-helvet.cfg file. I tried saving the microtype.cfg file as mt-helvet.cfg in my working directory, changing all protrusion settings on dashes to be 0 for the left margin; however, when I compile the document with \LoadMicrotypeFile{helvet} I get a document with no protrusion at all (i.e. identical to not loading microtype).

  • It might be helpful (just so we're all on the same page) if you could post your mt-helvet.cfg and the portions of the resulting .log file that deal with microtype generally. – jon Apr 10 '16 at 4:44
  • pastebin.com/p5emK0Vm is the mt-helvet.cfg file. The .log files contains numerous warnings like Package microtype Warning: Redefining protrusion set all' on input line 51.` – Hugh Apr 10 '16 at 4:51

First of all, you should not base your font-specific configuration file on the global configuration file microtype.cfg, which is not supposed to be loaded twice (that's why you get all the warnings). Secondly, the name of the configuration file should be mt-phv.cfg (which is the name of the Helvetica font), not mt-helvet.cfg (which is just the package name). But thirdly, creating a font-specific configuration file is optional anyway, for a start it may be easier to change the settings directly in the preamble.

As a first step, you need to find out which settings are actually used for Helvetica. If you load microtype with the verbose option, you will find this in the log file (near the end):

Package microtype Info: Setting up font `T1/phv/m/n/10' on input line 14.
Package microtype Info: ... Loading protrusion list `T1-default'.

So you know now that you want to change the settings T1-default (which are generic, as specific settings for Helvetica don't exist). These settings are defined in microtype.cfg, which is always loaded by the package; therefore, you do not need to load any other file, but can change the settings right away:

   [ name     = T1-phv,      % the name is optional
     load     = T1-default ] % first load `T1-default` settings
   { encoding = T1,
     family   = phv }        % use for Helvetica family
     \textendash = {0, }, \textemdash = {0, }  % cancel out left protrusion

If you don't want to clutter your preamble, you may also put the above in a file mt-phv.cfg, which will then be loaded automatically, but as I said, this is optional.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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