# Microtype warning with lmodern package and KOMA-script

With a simple document

\documentclass{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
\usepackage{lmodern}
\begin{document}
\chapter{Test test test}
\end{document}


the log file spits out

Package microtype Warning: Loading generic settings for font family lmss'.
(microtype)                For optimal results, create font-specific settings.
(microtype)                See the microtype manual for details.


This does not happen with the standard report class. It seems that KOMA's scrreprt (v3.10a) is doing something funny in the chapter-headings and I can not figure out what it is.

If someone could please point me to a solutions I'd appreciate it.

EDIT

\DeclareMicrotype... does not change the issue

Microtype version is: 2011/08/18 v2.5

EDIT 2 \DeclareMicrotypeAlias{lmss}{cmr} actually does work. I may have forgotten to remove my log file after adding the command and the error kept coming back. For details see the accepted answer below

• What version of microtype are you using? – egreg Oct 4 '12 at 15:17
• You could try adding \DeclareMicrotypeAlias{lmss}{cmss} (not tested by me). See tex.stackexchange.com/a/63615/627 – Lev Bishop Oct 4 '12 at 15:21
• KOMA sets sectioning titles in sans serif and indeed the warning vanishes if you add \setkomafont{sectioning}{\normalfont\bfseries} but reappears when you set something else with \textsf (also with the standard classes) so this is not really an issue bound to KOMA. – clemens Oct 4 '12 at 16:14
• @cgnieder Ok, but what can I do now to get rid of this warning? Switching to \normalfont is not really an option for me. Actually I would not mind just suppressing the warning as I think it does not have much of an influence. It is just annoying having it in the log every time, – Martin H Oct 5 '12 at 8:56
• If you simply want to suppress the message you can load the silence package and add \WarningFilter{microtype}{Loading generic settings} to your preamble. – clemens Oct 5 '12 at 9:02

The warning (now: info, see edit below) for missing font-specific settings is not a bug but a new feature in the latest microtype beta version.

The fallback settings, which are used for fonts unknown to microtype, are by nature incomplete, quite conservative and in no way guaranteed to match all possible fonts; therefore, microtype now draws the user's attention to this potential source of suboptimal typographic quality.

If you decide against creating settings for the lmss font but just want to ignore the warning, there are two possibilities to get rid of it:

• either use existing settings for a different, but sufficiently similar font; in your case, since the design of lmss is derived from that of its roman counterpart, cmr would be a suitable choice:

\DeclareMicrotypeAlias{lmss}{cmr}

• or disable all warnings that microtype issues by passing the option verbose=silent (but beware that this would also turn all other warnings into info that then only appears in the log file).

## EDIT:

Because this seems to have created some irritation, the warning from the beta version has been turned into a less alarming info message (which is written to the log file, but not to the console) for the CTAN release.

• +1 for a good explanation of what is going on inside! Maybe you can also comment on what would – typographically – be the preferable workaround in this case? Does aliasing to Computer Modern yield better results than the fallback settings? – Daniel Oct 7 '12 at 19:22
• @Daniel in this case I think using the "cmr" settings would be better. I've expanded the answer. – Robert Oct 8 '12 at 0:06
• I tried your first suggestion but it did not remove the warning. For now I went with @cgnieder's idea to use the silence package as it appears favourable over verbose=silent as I'd like to see other warnings. In my case this warning seems to be related to the chapter headings and I guess it is easy enough to check them for unfavourable spacing and the like – Martin H Oct 8 '12 at 8:34
• @Robert Why cmr rather than cmss? – cfr Jan 21 '14 at 3:56
• @cfr Because settings for cmss don't exist either. If they did exist, you would be right, of course. – Robert Jan 22 '14 at 2:01

Too long for an comment:

I tried your given MWE (only added \listfiles before \documentclass and compiled it without any error or warning on my actual MiKTeX version 2.9 distribution.

Here the used files \listfilesreported:

 *File List*
scrreprt.cls    2012/07/29 v3.11b KOMA-Script document class (report)
scrkbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-dependent basics and keyval usage)
scrbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-independent basics and keyval usage)
keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
tocbasic.sty    2012/04/04 v3.10b KOMA-Script package (handling toc-files)
scrsize11pt.clo    2012/07/29 v3.11b KOMA-Script font size class option (11pt)
typearea.sty    2012/07/29 v3.11b KOMA-Script package (type area)
fontenc.sty
t1enc.def    2005/09/27 v1.99g Standard LaTeX file
inputenc.sty    2008/03/30 v1.1d Input encoding file
utf8.def    2008/04/05 v1.1m UTF-8 support for inputenc
t1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
ot1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
omsenc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
microtype.sty    2010/01/10 v2.4 Micro-typography with pdfTeX (RS)
microtype.cfg    2010/01/10 v2.4 microtype main configuration file (RS)
lmodern.sty    2009/10/30 v1.6 Latin Modern Fonts
t1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
mt-cmr.cfg    2009/11/09 v2.0 microtype config. file: Computer Modern Roman (RS)
t1lmss.fd    2009/10/30 v1.6 Font defs for Latin Modern


With documentclass report no errors or warnings.

As you can see my microtype version is 2.4 and I have no error or warning. So the change from version 2.4 to 2.5 causes the mentioned error/warning.

• The OP uses the beta version of microtype 2.5. Believe me, you also will get the warning with it. – Speravir Oct 5 '12 at 2:02
• @Speravir: I'm sure, I will. But my answer just documented, that teh error comes from the new version of microtype` and should be fixed there. – Mensch Oct 5 '12 at 12:23
• Thanks for testing. It would be interesting to know what change caused this warning. Most of microtype's configuration is a bit over my head... – Martin H Oct 5 '12 at 14:01