6

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}
  • 2
    Just ignore it. It is just warning you it's made a font substitution. So long as you're happy about the substitution, there's no problem. – cfr Aug 09 '17 at 22:54
  • Those type of warnings should be a different category class really. If it can be ignored, so what. But other warnings completely rip your tex appart, not so so what... –  Feb 20 '22 at 23:03

0 Answers0