2

I am trying to use the Linux Libertine fonts with sfmath and siunitx package but it doesn't work with beamer class.

\documentclass[11pt]{beamer}

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[libertine]{newtxmath}
\usepackage{libertine}
\usepackage[T1]{fontenc}

\usepackage{sfmath}
\usepackage{siunitx}

\begin{document}
 \begin{frame}
  test
 \end{frame}
\end{document

Error:

Too many math alphabets used in version normal.

When I use the article or report class, no error appears.

\documentclass[11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[libertine]{newtxmath}
\usepackage{libertine}
\usepackage[T1]{fontenc}

\usepackage{sfmath}
\usepackage{siunitx}

\begin{document}
  test
\end{document}
2

use it this way:

\documentclass[11pt]{beamer}
\usefonttheme{professionalfonts}%% do not define math settings by beamer itself
\usepackage[T1]{fontenc}
\usepackage[libertine]{newtxmath}
\usepackage{libertine}
\usepackage{sfmath}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{siunitx}

\begin{document}
 \begin{frame}
  test $f(x)$
 \end{frame}
\end{document}
| improve this answer | |
  • It works, thanks! Is there another way to extend the number of math alphabets? If I want to use other packages, such as chemfig and chemmacros, I get this error again. – SLx64 Nov 26 '14 at 17:49
  • 1
    Use xelatex or lualatex instead. – user2478 Nov 26 '14 at 18:27

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.