1

I looked at the code from vanden enter link description here

\documentclass{article}

\begin{document}

\begin{tabular}{cc}
    \begin{minipage}{.5\linewidth}
        \begin{tabular}{ll}
            1 & 2
        \end{tabular}
    \end{minipage} &

    \begin{minipage}{.5\linewidth}
        \begin{tabular}{ll}
        3 & 4 \\
        g & e \\
        f & e \\
        f & e \\
        \end{tabular}
    \end{minipage} 
\end{tabular}

\end{document}

How to do that tables start in the same level in the same hight of the page? And how to add caption to both tables? Thank you

enter image description here

  • Have a look at subcaption package –  May 05 '19 at 05:17
  • 1
    Replace \begin{minipage}{.5\linewidth} by \begin{minipage}[t][][b]{.48\linewidth} see https://tex.stackexchange.com/a/132240/121799 –  May 05 '19 at 05:21

1 Answers1

5

Maybe you are looking for

\documentclass{article}
\usepackage{subcaption}
\begin{document}
\begin{table}[htbp]
    \centering
    \caption{Common caption}
    \begin{subtable}[t]{.5\textwidth} % Look at option [t]
    \centering
        \caption{A caption}
        \begin{tabular}{ll}
            1 & 2
        \end{tabular}
    \end{subtable}%
    \begin{subtable}[t]{.5\textwidth}
    \centering
        \caption{Another caption}
        \begin{tabular}{ll}
            3 & 4 \\
            g & e \\
            f & e \\
            f & e
        \end{tabular}
    \end{subtable}
\end{table}
\end{document}

enter image description here

.5\textwidth is a bit too wide I think