0

I was working with a lot of little tables and I used this link to include them on my script. Now I would like to put a formula related to the table next to each one. The formula has to be between a "cases" environment with three rows. Here is an example of two tables. There should be two "cases" environment, one next to each subtable, but I don't know how to include them. Thank you in advance.

\begin{table}[h!]

    \begin{subtable}{.5\linewidth}\centering
        {\begin{tabular}{cc}
                \toprule
                \ $X$ & $Y$  \\
                \midrule
                12,5  & 0,11\\
                25    & 0,20\\
                50    & 0,37\\
                100   & 0,55\\
                \bottomrule
            \end{tabular}}
        \caption{ $I=0,5\,A$}\label{tab:minisubtabladif_I=0,5}
    \end{subtable}%
    \begin{subtable}{.5\linewidth}\centering
        {\begin{tabular}{cc}

            \toprule
                \ $X$ & $Y$  \\             
                \midrule
                12,5  & 0,18\\
                25    & 0,4\\
                50    & 0,73\\
                100   & 1,27\\
                \bottomrule
            \end{tabular}}

        \caption{$I=1\,A$.}\label{tab:minisubtabladif_I=1}
    \end{subtable}
\end{table}

enter image description here

1 Answers1

1

is this what you wanted (more or less)? The current version will not fit in 0.5\linewidth. Also, I wasn't sure if you were using legal label names.

stab in the dark

\documentclass{article}
\usepackage{mathtools}
\usepackage{booktabs}% for \toprule, etc.
\usepackage{subcaption}

\begin{document}

\begin{table}[h!]

    \begin{subtable}{.75\linewidth}\centering
        {\begin{tabular}{cc}
                \toprule
                \ $X$ & $Y$  \\
                \midrule
                12,5  & 0,11\\
                25    & 0,20\\
                50    & 0,37\\
                100   & 0,55\\
                \bottomrule
            \end{tabular} \(=\begin{cases}%
               m=(2,50\pm0,02)\,m\\
               n=(4,5\pm 0,2)\,s\\
               R=0,9998\end{cases}\)}
      \caption{ $I=0,5\,A$}\label{tab:minisubtabla1}
    \end{subtable}%

    \begin{subtable}{.75\linewidth}\centering
        {\begin{tabular}{cc}
            \toprule
                \ $X$ & $Y$  \\             
                \midrule
                12,5  & 0,18\\
                25    & 0,4\\
                50    & 0,73\\
                100   & 1,27\\
                \bottomrule
            \end{tabular} \(=\begin{cases}%
               m=(2,50\pm0,02)\,m\\
               n=(4,5\pm 0,2)\,s\\
               R=0,9998\end{cases}\)}
       \caption{$I=1\,A$.}\label{tab:minisubtabla2}
       \end{subtable}
\end{table}

\end{document}
John Kormylo
  • 79,712
  • 3
  • 50
  • 120
  • The environment cases must be on the right side of the table. The environment contains three lines, for example, the first one would be m=(2,50\pm0,02),m, n=(4,5\pm 0,2),s the second and R=0,9998 the third. – Miguel Angel Jimenez Herrera Dec 04 '15 at 23:20