0

I am using Beamer presentation, is it possible to create these two tables (I have create two tables that are equal) one above the other, considering the line-style that I have implemented?

enter image description here enter image description here

Code:

\documentclass{beamer}

\mode<presentation> {


\usetheme{Madrid}

}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{adjustbox}
\usepackage{color}
\usepackage{amsmath}
\usepackage{systeme}
\usepackage{graphicx} 
\usepackage{booktabs} 

\usepackage{caption, tabularx}
\usepackage{ragged2e}



\title[Title]{Title}

\author{Name} 
\date{\today} 

\begin{document}

\begin{frame}
\titlepage 
\end{frame}

\begin{frame}
\frametitle{Title} 
\tableofcontents 
\end{frame}


\section{Section}
\begin{frame}{Table}
   \begin{table}[h]
\caption{xxx}
\centering
    % \begin{adjustbox}{width=\textwidth,center}
    \begin{adjustbox}{center}
        \begin{tabular}{ccc}
            % \centering
            \toprule
            \multirow{}{}{X} & \multicolumn{1}{c}{Model1} & \multicolumn{1}{c}{Model2}\\
            \midrule
            \multirow{}{}{Var1}   & \multicolumn{1}{c}{...} 
                                  & \multicolumn{1}{c}{...} \\
            \multirow{}{}{Var2} & \multicolumn{1}{c}{...} 
                                  & \multicolumn{1}{c}{...} \\
            \multirow{}{}{Var3}    & \multicolumn{1}{c}{...} 
                                  & \multicolumn{1}{c}{...} \\
          \bottomrule
        \end{tabular}
    \end{adjustbox}
    % \vspace{ - 05 mm}
    \label{tab:xxx}
\end{table}
\end{frame}

\end{document}

EDIT: I have tried in this way, but I am not able to do more..

9
  • 4
    Please add a compilable code to the question. From \documentclass to \end{document} Nov 27, 2021 at 16:55
  • @SimonDispa You are right, I have edited the question! Nov 27, 2021 at 19:18
  • 3
    The table is missing! It takes time to guess your style. Nov 27, 2021 at 19:35
  • Do You want to make less space between tables? or no? Nov 27, 2021 at 20:25
  • 1
    @John_maddon just use \vspace{-1cm} between tables Nov 28, 2021 at 9:19

1 Answer 1

1

I guess, that you looking for something like this:

enter image description here

MWE (Minimal Working Example), which s focused only tables, is:

\documentclass{beamer}
\usetheme{Madrid}
\usepackage{booktabs, multirow}

\begin{document}
\begin{frame}
\frametitle{Table}
   \begin{table}
   \footnotesize
\caption{xxx}
\label{tab:xxx}
    \centering
\begin{tabular}{c cc cc}
    \toprule
\multirow{2.4}{*}{X}  & \multicolumn{2}{c}{First} & \multicolumn{2}{c}{Second}\\
    \cmidrule(r){2-3}  \cmidrule(l){4-5}
                    & Model 1 &  Model 2 & Model 1 &  Model 2    \\ 
    \midrule
Var1    & ... & ... & ... & ... \\
Var2    & ... & ... & ... & ... \\
Var3    & ... & ... & ... & ... \\
  \bottomrule
\end{tabular}

\medskip
\caption{yyyy}
\begin{tabular}{c cc cc}
    \toprule
\multirow{2.4}{*}{X}  & \multicolumn{2}{c}{First} & \multicolumn{2}{c}{Second}\\
    \cmidrule(r){2-3}  \cmidrule(l){4-5}
                    & Model 1 &  Model 2 & Model 1 &  Model 2    \\
    \midrule
Var1    & ... & ... & ... & ... \\
Var2    & ... & ... & ... & ... \\
Var3    & ... & ... & ... & ... \\
  \bottomrule
\end{tabular}
\end{table}
\end{frame}

\end{document}
1
  • that's perfect, thanks! Nov 28, 2021 at 11:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .