3

I am trying to duplicate fontspec's PunctuationSpace in microtype. The manual suggests that I should be able to do this via the command \SetExtraSpacing, but I haven't gotten it to work. Perhaps I am missing something obvious?

My file:

\documentclass[12pt,draft]{memoir}

\usepackage{cfr-lm}

\usepackage[final, expansion = false]{microtype}

\SetExtraSpacing{}{ . = {10000,10000,10000}, ? = {1000,1000,1000}, ! = {1000,1000,1000}, : = {1000,1000,1000}}

\begin{document}

\section{Introduction}

Now a sentence, with, many; types --- of punctuation!  Can, you believe it?  I am making: words.  And more... And more.

But if I decide to \textsc{nasa} me around, I disagree.

\end{document}

And yes,I know I am using an insane value for the extra spacing after .. I am merely doing this so I can check if it works. Once I get it working, I will reduce the 3 values to 1000, thus mimicking fontspec's PunctuationSpace=2.

4
  • Please do NOT use quoting for code blocks. To format the code correctly, somebody has to manually delete the > at the beginning of each line before adding the format for the code. If you can't remember how to format code, just don't format it as that is much easier to correct. To format it, use the {} key (not the quotation mark) or ctrl+k. This indents the block by 4 spaces, which is what you need.
    – cfr
    Commented Aug 13, 2016 at 2:13
  • I was wondering how people got such nice blocks of code. Thank you @cfr.
    – ltcomdata
    Commented Aug 13, 2016 at 2:18
  • 1
    At least it doesn't work with lmodern either ... ;).
    – cfr
    Commented Aug 13, 2016 at 2:21
  • memoir is not a package as far as I know.
    – cfr
    Commented Aug 13, 2016 at 2:42

1 Answer 1

2
  • You have to enable the extra spacing feature:

    \usepackage[spacing]{microtype}
    
  • The first argument to \SetExtraSpacing requires at least an encoding:

    \SetExtraSpacing{encoding = *}{...} 
    
3
  • It seems that the code will only work with the "default" encoding, whichever it happens to be. That will work for my needs. Nonetheless, I wonder: what if I had a document which switched encodings on the fly?
    – ltcomdata
    Commented Aug 13, 2016 at 3:01
  • you'd have to specify all encodings to which the list should apply, e.g. encoding={OT1,T1,T2A}
    – Robert
    Commented Aug 13, 2016 at 3:04
  • I also get the following warning: \nonfrenchspacing is active. Adjustment of interword spacing will disable it. What am I losing by using \SetExtraSpacing? In other words, besides the characters I secified on my set, where else does \nonfrenchspacing add "extra" space?
    – ltcomdata
    Commented Aug 13, 2016 at 3:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .