[Tex/LaTex] MathTime Pro 2 fonts with beamer – Error: Command `\lll’ already defined

beamerfontsmtpro

MathTime Professional 2 doesn't work with Beamer. Did anyone encounter the same problem? Below short example:

\documentclass[10pt, xcolor=dvipsnames]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{polski}
\usepackage[polish]{babel}
\usepackage[T1]{fontenc}

\usepackage{graphicx}
\usepackage{amsmath}


\usefonttheme{professionalfonts}
\usepackage[subscriptcorrection]{mtpro2}
\renewcommand{\rmdefault}{ptm}


\begin{document}

\begin{frame}{Title}
Short $x+Y$  
\end{frame}

\end{document}

I get an error message

! LaTeX Error: Command `\lll' already defined.
See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.1422 ...bol{\lll}          {\mathrel}{AMSa}{"6E}

The problem disappears when switching to the other fonts. Does anybody have a suggestion how to fix it?
It might be important to add that for \documentclass{article} MathTime Pro 2 works with minor modification the preamble.

Best Answer

The fault is in two places.

First problem: with mtpro2 one shouldn't load amssymb. This is done automatically by beamer, but can be prevented with the option noamssymb:

\documentclass[10pt,xcolor=dvipsnames,noamssymb]{beamer}

Second problem: the babel language definition file polish.ldf defines \lll for to me mysterious reasons.

Possible fix:

\documentclass[10pt,xcolor=dvipsnames,noamssymb]{beamer}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{polski}
\usepackage[polish]{babel}

%%% fix for \lll
\let\babellll\lll
\let\lll\relax


\usefonttheme{professionalfonts}
\usepackage[subscriptcorrection]{mtpro2}

%%% fix for \lll
\let\mathlll\lll
\let\lll\babellll


\begin{document}

...

In case you need the \lll math symbol, use \mathlll.

Note that loading amsmath and graphicx is not required with beamer, that loads them automatically.