2
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage[libertine]{newtx}

\begin{document}

\begin{frame}{A frame}
  \begin{itemize}
    \item An item
      \begin{itemize}
        \item A subitem
      \end{itemize}
    \end{itemize}
\end{frame}

\end{document}

throws:

LaTeX Font Warning: Size substitutions with differences
(Font)  up to 0.5pt have occurred.
LaTeX Font Warning: Font shape `OT1/cmss/m/n' in size <5.5> not available
(Font)  size <5> substituted.

It's coming from the smaller bullet in the second level item.

Some observations:

  • \usepackage{libertine} instead of \usepackage[libertine]{newtx} doesn't show the problem.

  • Neither inserting something like {\small foobar} inside the frame.

It's the specific combination of libertine, newtx, small size and the bullet symbol.

How can I fix this so that I get that bullet at the nearest available size (not scaled) but without any warning?

2 Answers 2

3

For some reason this combination is still using computer modern sans serif for some symbols. You can make cm fonts available at all sizes using the fix-cm package which is part of the base latex distribution.

Normally it should be loaded before \documentclass, but beamer being beamer, it needs to be later here.


\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage[libertine]{newtx}
\usepackage{fix-cm}
\begin{document}

\begin{frame}{A frame}
  \begin{itemize}
    \item An item
      \begin{itemize}
        \item A subitem
      \end{itemize}
    \end{itemize}
\end{frame}

\end{document}

runs with no warnings.

3
  • Another thing that works is to load lmodern, perhaps it has the same effect than making cm available as in your answer?
    – memeplex
    Commented Aug 10 at 22:47
  • @memeplex that would switch from cm sans serif to lm sans serif although basically they look the same, so technically it's quite different but practically it comes to the same thing, more or less. Commented Aug 10 at 23:24
  • Yeah, that was kind of what I meant, thank you for clarifying my comment and my thoughts...
    – memeplex
    Commented Aug 10 at 23:33
2

You could avoid the warning by loading the professionalfonts theme. This will disable beamer's font replacements.

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usefonttheme{professionalfonts}
\usepackage[libertine]{newtx}

\begin{document}

\begin{frame}
\frametitle{A frame}
  \begin{itemize}
    \item An item
      \begin{itemize}
        \item A subitem
      \end{itemize}
    \end{itemize}
\end{frame}

\end{document}
2
  • Interesting, I didn't know about this option. I see it's automatically set when lmodern is used, which is usually my go-to. Is there a good reason for this not to be Beamer's default and have unprofessionalfonts as an option?
    – memeplex
    Commented Aug 10 at 22:44
  • 1
    @memeplex There is a good reason this isn't the default: there aren't many sans serif math fonts available. Even less were available when beamer was born. So beamer needs to be a bit creative with fonts so users get matching math and text. If beamer is loaded without any 3rd party font packages, it should work for the users without having to use additional options. Commented Aug 10 at 22:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .