Tengo un problema con la tabla en beamer. La tabla se puede compilar en \documentclass{article}, pero no en \documentclass{beamer}. A continuación se muestra la tabla que hago:
\usepackage{multirow} \begin{table}[ht] \centering %\subfloat[Decay Channels]{ %\rule{4cm}{3cm} \newcommand{\minitab}[2][l]{\begin{tabular}{#1}#2\end{tabular}} %\renewcommand{\multirowsetup}{\centering} \begin{tabular}{|c|c|} \hline Description & Basic cuts \\ \hline \multirow{4}{*}{Jet} &${\bf p}_T >$ 25 GeV \\ &$|\eta| < $ 2.5 \\ &$\Delta R(j,l) >$ 0.2 \\ &$\Delta \phi(j,{\bf p}_T^{miss}) >$ 0.6 \\ \hline 3 Leading jets & ${\bf p}_T >$ 40 GeV \\ \hline b-tagging & $\ge$ 2 \\ \hline \multirow{3}{*}{Lepton} & ${\bf p}_T >$ 20 GeV \\ & $|\eta| <$ 2.5 \\ & $\Delta R(l,j) >$ 0.4 \\ \hline {${\bf p}_T^{miss}$} & $\Delta \phi({\bf p}_T^{miss},j) >$ 0.8 \\ \hline & {\bf Advanced cuts} \\ \hline $E_T^{miss}$ & $>$ 100, 120, 140, 160, 180, 200 (GeV)\\ \hline $H_T$ & $>$ 400, 450, 500, 550, 600 (GeV)\\ \hline $m_T$ & $>$ 100, 120, 140, 160, 180, 200 (GeV)\\ \hline $N_j$ & $\ge$ 4, 5, 6 \\ \hline $N_{bj}$ & $\ge$ 2, 3, 4 \\ \hline \end{tabular} %} \caption{Summary of event selection cuts} \end{table}
Comentarios
Respuesta
Un table es flotando, lo cual no tiene sentido dentro de beamer, ya que debería aparecer en una diapositiva diseñada en particular y, por lo tanto, está suprimida (ver comentario de G. Medina) Eliminé el table como así como el \caption y el comando \minitab incorrecto.
\documentclass{beamer} \usepackage{multirow} \begin{document} \begin{frame}{TestFrame} %\begin{table}[ht] \centering %\subfloat[Decay Channels]{ %\rule{4cm}{3cm} % \newcommand{\minitab}[2][l]{\begin{tabular}{#1}#2\end{tabular}} %\renewcommand{\multirowsetup}{\centering} \begin{tabular}{|c|c|} \hline Description & Basic cuts \\ \hline \multirow{4}{*}{Jet} &${\bf p}_T >$ 25 GeV \\ &$|\eta| < $ 2.5 \\ &$\Delta R(j,l) >$ 0.2 \\ &$\Delta \phi(j,{\bf p}_T^{miss}) >$ 0.6 \\ \hline 3 Leading jets & ${\bf p}_T >$ 40 GeV \\ \hline b-tagging & $\ge$ 2 \\ \hline \multirow{3}{*}{Lepton} & ${\bf p}_T >$ 20 GeV \\ & $|\eta| <$ 2.5 \\ & $\Delta R(l,j) >$ 0.4 \\ \hline {${\bf p}_T^{miss}$} & $\Delta \phi({\bf p}_T^{miss},j) >$ 0.8 \\ \hline & {\bf Advanced cuts} \\ \hline $E_T^{miss}$ & $>$ 100, 120, 140, 160, 180, 200 (GeV)\\ \hline $H_T$ & $>$ 400, 450, 500, 550, 600 (GeV)\\ \hline $m_T$ & $>$ 100, 120, 140, 160, 180, 200 (GeV)\\ \hline $N_j$ & $\ge$ 4, 5, 6 \\ \hline $N_{bj}$ & $\ge$ 2, 3, 4 \\ \hline \end{tabular} %} % \caption{Summary of event selection cuts} % \end{table} \end{frame} \end{document}
Comentarios
- La primera parte de su respuesta no es del todo correcta .
beamersuprime internamente el mecanismo de flotación paratableyfigure, por lo que es perfectamente seguro úselos enbeamersin que los objetos se alejen flotando (consulte la Sección 12.6 Figuras y tablas del manualbeamer). La razón para tenerfigureytablees poder seguir usando\captionpara tablas o figuras (es realmente necesario un título en una presentación). - @GonzaloMedina: Quizás no tuve el problema con los objetos flotantes hasta ahora en
beamer, porque apenas los uso, pero es bueno saberlo ahora
\documentclass{...}y terminando con\end{document}.