1

I have a long table that I would like to split in two columns in latex beamer. To this purpose I have used the columns environment, which works fine. The problem is that \resizebox (which I would normally use in beamer to make tables fit to the margins of a frame) does not seem to be working.

I was therefore wondering whether there is a command that I can use to make the length of my split table fit into the two columns of one frame. Here is my code:

\RequirePackage{etex} 
\documentclass[10pt]{beamer}

\usetheme{Boadilla}
\usepackage{bm}
\usepackage{graphicx} 

\usepackage{xcolor}

\usepackage{color, colortbl}
\definecolor{LRed}{rgb}{1,.8,.8}
\definecolor{MRed}{rgb}{1,.6,.6}
\definecolor{HRed}{rgb}{1,.2,.2}

\usepackage[english]{babel}
\usepackage{csquotes}

\usepackage{multirow}
\usepackage{multicol}
\usepackage{array}
\usepackage{fixltx2e}
\usepackage{wasysym}

\setbeamertemplate{caption}{\insertcaption}
\renewcommand\mathfamilydefault{\rmdefault}     
\definecolor{red1}{rgb}{1,0,0}
\definecolor{red2}{rgb}{0.93,0,0}
\definecolor{red3}{rgb}{0.8,0,0}
\definecolor{red4}{rgb}{0.54,0,0}

\usepackage{epstopdf}

\mode<presentation>
{
\usetheme[compress]{Berlin}
    \usecolortheme[named=red1]{structure}   
}

\begin{document}    
\begin{frame}
\begin{columns}[T] % align columns
    \begin{column}{.50\textwidth}
    \vspace{-0.5cm}
        \begin{table} [H]
        \footnotesize
            \begin{center}
            \scriptsize
            \resizebox{\textwidth}{!}{
                \begin{tabular}{l c c}
                \multirow{2}{*}{\textbf{Levels}}& \multicolumn{2}{c}{\textbf{(5)}}\\
                & \textbf{Mean} & \textbf{s.d.} \\
                \hline
                \multirow{2}{*}{AIRQ\_better}&.554***&.171***\\
                &(.021)&(.060)\\
                \multirow{2}{*}{AIRQ\_worse}&-.706***&.349***\\
                &(.025)&(.036)\\
                \multirow{2}{*}{TEMP\_warm}& .090***&.196***\\
                &(.012)&(.029)\\
                \multirow{2}{*}{COST\_low}&.365***&\\
                &(.020)&\\
                \multirow{2}{*}{COST\_high}& -.403***&\\
                &(.021)&\\
                \multirow{2}{*}{CONTR\_high}&.242***&.211***\\
                &(.019)&(.049)\\
                \multirow{2}{*}{CONTR\_low}&-.216***&.210***\\
                &(.019)&(.049)\\
                \multirow{2}{*}{NOISE\_in/out}&.191***&.033\\
                &(.023)&(.114)\\
                \multirow{2}{*}{NOISE\_out}&.046**&.007\\
                &(.023)&(.131)\\
                \multirow{2}{*}{NOISE\_none}&-.296***&.253***\\
                &(.025)&(.062)\\
                \multirow{2}{*}{AESTH\_in/out}&.215***&.174*\\
                &(.027)&(.104)\\
                \multirow{2}{*}{AESTH\_in}&.129***&.159\\   
                &(.027)&(.110)\\
                \end{tabular}
                }
            \end{center}
        \end{table} 
    \end{column}

    \begin{column}{.50\textwidth}
    \vspace{-0.5cm}
        \begin{table} [H]
        \footnotesize
            \begin{center}
            \scriptsize
            \resizebox{\textwidth}{!}{
                \begin{tabular}{l c c}
                \multirow{2}{*}{AESTH\_out}&.006&.159\\
                &(.027)&(.101)\\
                \multirow{2}{*}{AESTH\_out+in-}&-.237***&.072\\
                &(.028)&(.213)\\
                \multirow{2}{*}{SAV\_20}&-.457***&.225***\\
                &(.021)&(.050)\\
                \multirow{2}{*}{SAV\_80}&.479***&.304***\\
                &(.021)&(.037)\\
                \multirow{2}{*}{NONE}&-.769***&3.308***\\
                &(.074)&(.088)\\
                \multirow{2}{*}{TEMPwarm*SAV20}&-.052**&.001\\
                &(.022)&(.088)\\
                \multirow{2}{*}{Fem*AIRQbetter}&.042**&\\
                &(.018)&\\
                \multirow{2}{*}{Fem*AIRQworse}&-.065***&\\
                &(.020)&\\
                \multirow{2}{*}{Fem*CONTRhigh}&.047***&\\
                &(.018)&\\
                \multirow{2}{*}{Fem*CONTRlow}&-.057***&\\
                &(.019)&\\
                \multirow{2}{*}{Fem*NOISEin/out}&.054***&\\
                &(.021)&\\
                \multirow{2}{*}{Fem*NOISEnone}&-.089***&\\
                &(.023)&\\
                \multirow{2}{*}{Fem*AESTHin}&.045**&\\
                &(.022)&\\
                \end{tabular}
                }
            \end{center}
        \end{table} 
    \end{column}%
\end{columns}
\end{frame}
\end{document}
1

As first iteration ... see, if the following solution is closte to what you looking for. Table is not complete yet:

enter image description here

\documentclass{beamer}
\usetheme{Boadilla}
\setbeamertemplate{caption}{\insertcaption}
\renewcommand\mathfamilydefault{\rmdefault}

\mode<presentation>
{
\usetheme[compress]{Berlin}
%\usecolortheme[named=red1]{structure}
}

%\usepackage{bm}
%\usepackage{graphicx}

\usepackage[english]{babel}
\usepackage{csquotes}

%\usepackage{multicol}
\usepackage{booktabs, makecell, multirow, tabularx}
\renewcommand\theadfont{\bfseries}
%\usepackage{fixltx2e}
%\usepackage{wasysym}

%\definecolor{LRed}{rgb}{1,.8,.8}
%\definecolor{MRed}{rgb}{1,.6,.6}
%\definecolor{HRed}{rgb}{1,.2,.2}

%\definecolor{red1}{rgb}{1,0,0}
%\definecolor{red2}{rgb}{0.93,0,0}
%\definecolor{red3}{rgb}{0.8,0,0}
%\definecolor{red4}{rgb}{0.54,0,0}

%\usepackage{epstopdf}


\begin{document}
\begin{frame}
    \vspace{-0.5cm}
\begin{table}
    \small
    \centering
\begin{tabularx}{\textwidth}{X c c 
                        @{\hspace{2em}} 
                             X c c}
    &    \multicolumn{2}{c}{\textbf{(5)}}
        &    &  \multicolumn{2}{c}{\textbf{(5)}}                \\
    \cmidrule(lr){2-3}  \cmidrule(lr){5-6}
\thead{Levels}
    &   \thead{Mean} & \thead{s.d.}
        &   \thead{Levels}
            &   \thead{Mean} & \thead{s.d.} \\
    \cmidrule(r) {1-3}  \cmidrule(l){4-6}
\multirow{2}{*}{AIRQ\_better}           &   .554*** &   .171***
    &   \multirow{2}{*}{AESTH\_out}     &   .006    &   .159    \\
    &   (.021)  &   (.060)  &           &   (.027)  &   (.101)  \\
\multirow{2}{*}{AIRQ\_worse}            &  -.706*** &   .349***
    &   \multirow{2}{*}{AESTH\_out+in-} &  -.237*** &   .072    \\
    &   (.025)  &   (.036)  &           &   (.028)  &   (.213)  \\
\multirow{2}{*}{TEMP\_warm}             &   .090*** &   .196***
    &   \multirow{2}{*}{SAV\_20}        &  -.457*** &   .225*** \\
    &   (.012)  &   (.029)  &           &   (.021)  &   (.050)  \\
\multirow{2}{*}{COST\_low}              &   .365*** &
    &   \multirow{2}{*}{SAV\_80}        &   .479*** &   .304*** \\
    &   (.020)  &           &           &   (.021)  &   (.037)  \\
\multirow{2}{*}{COST\_high}             &  -.403*** &
    &   \multirow{2}{*}{NONE}           &  -.769*** &  3.308*** \\
    &   (.021)  &           &           &   (.074)  &   (.088)  \\
    \cmidrule[1pt](r) {1-3}  \cmidrule[1pt](l){4-6}
    \end{tabularx}
\end{table}
\end{frame}
\end{document}

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.