2

I need to use tabu and \cellcolor in beamer. So I added

\PassOptionsToPackage{dvipsnames}{xcolor}
\documentclass[xcolor=table]{beamer}

to my LaTeX source.

But a previous part code

\begin{tabu}{cc}
\begin{minipage}{0.15\textwidth}
{
                   \begin{align*}
                     a &= b  \ \\
                     c &= d
                   \end{align*}
}
\end{minipage} &
\begin{minipage}{0.15\textwidth}
{
                   \begin{align*}
                     A &= B  \ \\
                     C &= D
                   \end{align*}
}
\end{minipage}
\end{tabu}

is not working with the above two options. This part of code was working before the above two options are added.

I tried to replace the part

\begin{align*}
  a &= b  \ \\
  c &= d
\end{align*}

to a simpler code, like just $ A $, i.e. without align in this part, and it doesn't cause any problem.

Question : What cause the problem and how to fix it?

Updated : I found that the actual problem comes from xcolor=table option. If change it to xcolor={}, no longer error, but then \cellcolor won't work anymore.

% These two are needed for using \cellcolor with tabu in beamer.
% However, these will make the example code below not working.
%\PassOptionsToPackage{dvipsnames}{xcolor}
%\documentclass[xcolor=table]{beamer}

% If not use the above two, the code below is fine.
\documentclass{beamer}

\mode<presentation>
{
    \usetheme{Warsaw}
    \setbeamertemplate{headline}{}
    \setbeamertemplate{itemize item}[triangle]
    \setbeamertemplate{itemize subitem}[triangle]
    \setbeamertemplate{itemize subsubitem}[triangle]
    \setbeamercovered{transparent}
    \useoutertheme{infolines}
    \usefonttheme{professionalfonts}
}


\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{amsfonts}

\usepackage{mathtools}

\usepackage{tabu}
\definecolor{Gray}{gray}{0.9}

\begin{document}


\begin{frame}


\begin{tabu}{cc}
\begin{minipage}{0.15\textwidth}
{
                   \begin{align*}
                     a &= b  \ \\
                     c &= d
                   \end{align*}
}
\end{minipage} &
\begin{minipage}{0.15\textwidth}
{
                   \begin{align*}
                     A &= B  \ \\
                     C &= D
                   \end{align*}
}
\end{minipage}
\end{tabu}

\end{frame}


\end{document}

closed as unclear what you're asking by user36296, Troy, CarLaTeX, TeXnician, Zarko Jul 6 '17 at 17:33

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Probably related: tex.stackexchange.com/questions/213342/… – Benjamin Dec 12 '15 at 9:16
  • normally it should be possible to pass multiple options via \documentclass[xcolor={dvipsnames,table}]{beamer} - but this combination gives an error. Do you really need tabu or would it be enough to position your minipages with e.g. columns? – user36296 Dec 14 '15 at 21:18

Browse other questions tagged or ask your own question.