LaTeX warning "Font shape `OT1/cmr/bx/sc' undefined": cause and fix
The font in use has no variant for the requested combination, so LaTeX takes another one; the next line of the log names it after "using". The four parts of the name are encoding, family, series and shape: OT1/cmr/bx/sc is Computer Modern Roman (cmr) in bold extended (bx) small caps (sc). The PDF is complete, but the text does not look the way you asked.
Why it happens
- Bold and small caps are combined, as in
\textbf{\textsc{...}}. The default font Computer Modern in the default encoding OT1 has no bold small caps, and LaTeX prints plain bold. - Another combination the default font lacks is requested, for example bold italic sans serif (
OT1/cmss/bx/it) or italic small caps (OT1/cmr/m/scit). - The combination comes from the context: a
\textscinside a bold heading, or a bold word inside a small caps title. - A font package is loaded that lacks the variant too. Latin Modern (
lmodern) has no bold small caps either.
How to fix it
- Load
\usepackage[T1]{fontenc}. The T1 version of the default font has bold small caps. Seefontenc. - Use only one of the two: bold or small caps.
- Look at the place in the PDF. If the replacement looks fine there, you can leave the warning as it is.
A document that produces the message
\documentclass{article}
\begin{document}
\textbf{\textsc{Bold Small Caps}}
\end{document}The corrected document
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
\textbf{\textsc{Bold Small Caps}}
\end{document}Both documents were compiled with pdfLaTeX from TeX Live 2023. The first produces the message, the second compiles without an error.
Finding the line in the editor
The editor lists every error and warning of a compile run with file and line. Select an entry and the cursor jumps to that line. See Error list with jump to the line.
Related pages
- Package
fontenc - How-to Bold, italic and underlined text in LaTeX
- How-to Change the font in LaTeX
- Error Encoding scheme `t1' unknown