# KOMA-Script ‘fontsize’ with ‘newtxmath’: ‘microtype’ custom protrusion settings not working

I want to use scrbook with fontsize=12pt. To get Linux Libertine with matching math, I use the newtxmath package. I wanted to set up microtype margin protrusion for footnote markers and it didn't take effect. After a few hours I developed this MWE to identify the problematic parts:

\documentclass[%
fontsize=12pt % critical line 1
]{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[showframe=true]{geometry}

\usepackage[T1]{fontenc}
\usepackage{libertine}

\usepackage{newtxmath} % critical line 2

\usepackage{microtype}

\SetProtrusion{
encoding={*},
family={LinuxLibertineT-TLF},
series={*},
size={5,6,7,8}
}{1={ ,1000}}

\begin{document}
\noindent-A% Testing hyphen protrusion
\hfill
e$$\mathrm{e}$$% does text match with math?
\footnote{blah}% footnote marker protrusion?
\end{document}


The right margin area depending on the two critical lines:

I’d like to have the 12 pt fontsize, matching math font and footnote marker protrusion together. The -A in the document shows that regular protrusion works in all cases. Are my microtype protrusion settings even fully valid? I’m never sure on them and I’m more or less guessing there.

• newtxmath changes the math sizes. \sf@size (used by the superscript) has now size 8.8 and not 8. So you need to add this value to the size declaration:  size={5,6,7,8,8.8} . – Ulrike Fischer Apr 1 '17 at 21:14
• @Ulrike Fischer: Thanks, it worked. You can write this as an answer if you want. – lblb Apr 1 '17 at 21:18

newtxmath changes the math sizes. \sf@size (used by the superscript) has now size 8.8 and not 8. So you need to add this value to the size declaration:

 size={5,6,7,8,8.8}


or use a size range:

 size={5-9}


(the last number has to be greater than 8.8 because microtype won't include the upper limit in the range itself)

• Do you know why size={*} doesn't work? Is * just not effective for size? – cfr Apr 1 '17 at 21:39
• * is imho only \normalsize, use size={-} for all sizes. – Ulrike Fischer Apr 1 '17 at 21:47
• Oh. Thanks. That seems strange, but Microtype often seems strange to me. ;) – cfr Apr 1 '17 at 23:38
• @cfr * always stands for "default", not for "any" (the choice of the asterisk has been somewhat unfortunate, I know...) – Robert Apr 2 '17 at 16:41