I have a beamer document with an eqnarray. I would like the box to appear nice and clean. Specifically, I would like that the boxes around the parts of the equations appear of the right size. The actual code (below) is giving me this output:
as you can see boxes are placed right but they are too short (the blue and the green one).
\begin{frame}
Details on computations leading to the following expression of $R_i$ are reported in the paper. Here it is worth noticing that the generalization error can be split into 6 components, namely:
\tikzstyle{na} = [baseline=-1.3ex]
\begin{itemize}[<+-| alert@+>]
\item Coriolis acceleration
\tikz[na] \node[coordinate] (n1) {};
\end{itemize}
%\begin{eqnarray}
% \tikz[baseline]{
% \node[fill=blue!20,anchor=base] (t1)
% {$2\vec{\omega}_{ib}\times\frac{{}^bd}{dt}\vec{r}$};
%}
%\end{eqnarray}
{\footnotesize
\begin{eqnarray}\label{eq:generalization_error_FE_var}
&&{R_i\left(\{\underline{x}_{n,t}\}_{n=1,\ldots,N}^{t=1,\ldots,T}\right)} \nonumber \\
&& \tikz[baseline]{
\node[fill=blue!20,anchor=base,height=3em, width=130mm] (t1)
{$\frac{\sigma^2}{{T}^2} \underline{1}_{{T}}' {X_i} \left(\sum_{n=1}^N {\ddot{X}_n'\Phi^{+} \ddot{X}_n}\right)^{-1} {X_i'} \underline{1}_{{T}}$}}
+\tikz[baseline]{
\node[fill=red!20,anchor=base] (t1) {$\frac{\sigma^2}{{T}^2}\underline{1}_{{T}}' {\Psi} \underline{1}_{{T}}$}}
\nonumber \\
&&- \tikz[baseline]{
\node[fill=green!20,anchor=base] (t1) {$\frac{2 {\sigma^2}}{{T}^2} \underline{1}_{{T}}' {X_i} \left(\sum_{n=1}^N {\ddot{X}_n'\Phi^{+} \ddot{X}_n} \right)^{-1} {\ddot{X}_i'\Phi^{+} Q_T} {\Psi} \underline{1}_{{T}}$}} \nonumber \\
&& + \sigma^2 \mathbb{E} \Bigg\{\left(\underline{x}_i^{test}\right)'\left(\sum_{n=1}^N {\ddot{X}_n'\Phi^{+} \ddot{X}_n} \right)^{-1} \underline{x}_i^{test} {\big| \{\underline{x}_{n,t}\}_{n=1,\ldots,N}^{t=1,\ldots,T}} \Bigg\} \nonumber \\
&&-\frac{2 \sigma^2}{{T}} \underline{1}_{{T}}' {X_i} \left(\sum_{n=1}^N {\ddot{X}_n'\Phi^{+} \ddot{X}_n}\right)^{-1} \mathbb{E} \left\{\underline{x}_i^{test} \right\} \nonumber \\
&& +\frac{2 {\sigma^2}}{{T}} \left({Q_T} {\Psi} \underline{1}_{{T}}\right)' {\Phi^{+} \ddot{X}_i} \left(\sum_{n=1}^N {\ddot{X}_n' \Phi^{+} \ddot{X}_n} \right)^{-1} \mathbb{E} \left\{\underline{x}_i^{test} \right\}\,,
\end{eqnarray}
}
\end{frame}
How can I fix it? I would also like arrows to appear and display: First part (on blue rectangle), second part (on red) and third part (on green rectangle)
\documentclass
and end with\end{docment}
. BTW, TikZ doesn't know forheight
, andwidth
, but forminimum height
, andminimum width