I'm writing a document with a book structure using only these few packages:
\documentclass[letterpaper, 10pt, oneside]{book}
\usepackage{XCharter}
\usepackage[xcharter]{newtxmath}
\usepackage[cal=boondox,scr=boondox,bb=boondox,frak=euler]{mathalfa}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage{enumerate}
I decided to define a personal command to denote the complement of a set as follows:
\newcommand{\comp}{\mathsf{c}}
And I intend to use it as $A^\comp$ or \[ A^\comp \], only in math environments. Although the document compiles and I have no problems with the output, a warning appears in the Log:
Font shape `T1/cmss/m/n' in size <5.5> not available(Font) size <5> substituted
How can I fix this warning? In this answer it is suggested to add \usepackage{lmodern}. I did it, but the whole font was modified and I hated it. I changed \mathsf{c} to c, just to try, and indeed the warning is no more, so the problem comes from using \mathsf.
Any help will be appreciated. Here is the MWE:
\documentclass[letterpaper, 10pt, oneside]{book}
\usepackage{XCharter}
\usepackage[xcharter]{newtxmath}
\usepackage[cal=boondox,scr=boondox,bb=boondox,frak=euler]{mathalfa}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage{enumerate}
\newcommand{\comp}{\mathsf{c}}
\begin{document}
$A^\comp$
\end{document}