1

I get LaTeX Font Warning with beamer (2019/09/29 v3.57), biblatex, and a reference with ISBN. How can I remove it?

The full error text is:

[filename].tex || LaTeX Font Warning: Font shape `OT1/lmss/m/sc' in size <10.95> not available Font shape `OT1/lmr/m/sc' tried instead on input line 12.

I have tried everything in How to remove the warnings "Font shape `OT1/cmss/m/n' in size <4> not available" and "Size substitutions with differences" in beamer? to no avail:

  • added \usepackage{lmodern}
  • added \usepackage{anyfontsize}
  • added \let\Tiny=\tiny
  • my beamer version is already >= 3.44
  • I have the \end{document}

I have isolated the problem down to the isbn field of the .bib file entry. The error disappears when that field is removed.

Here's the truly-minimal working example:

% filename.tex
\documentclass{beamer}
\let\Tiny=\tiny
\usepackage{lmodern}
\usepackage{anyfontsize}

\usepackage{biblatex}
\addbibresource{ref.bib}

\begin{document}

\cite{freivalds}
\printbibliography

\end{document}
% ref.bib
@InProceedings{freivalds,
    author="Freivalds",
    isbn="978-3-540-38769-5"
}

Here's how the output looks like. Note how the text ISBN uses a different font in the bibliography.

Compiled output

  • 2
    well the warning says that lmss has no small caps and so falls back to the rm font, and your screenshots shows that ISBN is not in sans serif. What do you want for a font in this place? – Ulrike Fischer Jul 8 at 9:05
  • @UlrikeFischer I don't mind. I prefer whatever is the most standard/default, without producing errors during compilation. – Utkan Gezer Jul 8 at 9:28
  • 1
    You don't get an error, only a warning/info. Such substituation messages are quite common and you should worry about them only if you don't like the result - and then you will have to decide what you want instead. – Ulrike Fischer Jul 8 at 9:34
  • @UlrikeFischer Sorry, it seems that my question wasn't clear. I added it now to the title and the first paragraph. I would like them gone. How can I do it? – Utkan Gezer Jul 8 at 10:14
  • It is not enough to say that you want the warning to go. You must say which font the isbn should use instead. There is no standard here, it is something you must decide. – Ulrike Fischer Jul 8 at 10:18
1

As Ulrike Fischer explained in the comments, this is a font warning telling you that your document requested a font combination that is not available in your font setup and telling you what replacements LaTeX fell back to.

In particular

LaTeX Font Warning: Font shape `OT1/lmss/m/sc' in size <10.95> not available
(Font)              Font shape `OT1/lmr/m/sc' tried instead on input line 9.

says that something requested small caps in the sans serif font, which Latin Modern (the font you load with \usepackage{lmodern}) doesn't have. LaTeX decides to fall back to small caps of the regular/serif font.

Why is the font combination requested in the first place? By default beamer sets text in sans serif. biblatex prints acronyms like 'ISBN' with \mkbibacro, which does something like \textsc{\MakeLowercase{#1}} and thus request small caps.

There are several ways to deal with this warning.

  1. Ignore the warning and do nothing. If you are OK with the output you get you can ignore the warning. Warnings generally only tell you that something might be wrong or that there is something you might want to change and ask you to check the output carefully. If a warning does not suggest how you could do better (some warnings do, for example if commands were renamed they may suggest you use the new name) you don't always need to act if you are OK with the consequences or with what you get.

  2. Choose a font that has sans serif small caps. An obvious solution to make the error go away is to choose a font that has sans serif small caps. One example is Libertinus. Replace \usepackage{lmodern} with \usepackage{libertinus} and you will get sans serif small caps and no warning.

  3. Avoid the font combination. There are several ways to do that. One would be to typeset your presentation in Latin Modern Regular and not Sans Serif (probably not a great idea, people usually prefer sans serif fonts for presentations). But the less radical solution is to avoid small caps for acronyms. To do that add \renewcommand*{\mkbibacro}[1]{#1} to your document.

| improve this answer | |
  • I very much appreciate the solutions 2 and 3, particularly 2. Libertinus has such a radical look... I like it! For completeness, there is the 4th option, which is to remove the isbn fields from the .bib file directly, or suppress them all via isbn=false option on biblatex package. – Utkan Gezer Jul 8 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.