11

I am constructing a table, where I have a multirow spanning 3 rows. Inside this multirow I would like a big curly bracket that spans the 3 rows. Unfortunately, I have not been able to get it to work. I have tried align and other ways of inserting an equation into the table, but since I'm very new to Tex, I have not been able to get it to work.

This is a minimal working example of what my table looks like at the moment:

\documentclass[11pt]{report} 
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{array}


\begin{document}

\begin{center}
\begin{tabular}{c c c c}
\textbf{Cycle Step} & \textbf{Temp (C)} & \textbf{Time}\\
\hline
1 & 95 & 5 min &\\
2 & 95 & 30s & \multirow{3}{*}{\}x35cycles} \\
3 & 60 & 30s &  \\
4 & 68 & 40s & \\
5 & 68 & 5 min & \\
\end{tabular}
\end{center}

\end{document}

So my question is, how do I get the } in the multirow to span row 2-4 so that it's clear that it's these three rows that should be repeated? Right now it only has the height of one row.

3 Answers 3

11

Something like that?

Addendum

Another solution to let the right brace out of the tabular, with an ugly hack, to mimic what @Bernard proposed.

\documentclass[11pt]{report} 
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{array}
\usepackage{siunitx}
\usepackage{booktabs}


\begin{document}

    \begin{center}
        \begin{tabular}{@{}c c l@{}}
            \toprule
            \textbf{Cycle Step} & \textbf{Temp $\left(\si{\celsius}\right)$} & \textbf{Time}\\
            \midrule
            1 & 95 & \SI{5}{\minute} \\
            2 & 95 & \multirow{3}{*}{$\left.\begin{array}{l}
                \SI{30}{\second}\\
                \SI{30}{\second}\\
                \SI{45}{\second}
                \end{array}\right\rbrace\times\SI{35}{cycles}$} \\
            3 & 60 &  \\
            4 & 68 & \\
            5 & 68 & \SI{5}{\minute}\\
            \bottomrule
        \end{tabular}

        \begin{tabular}{@{}c cc@{} l@{}}
            \cmidrule{1-3}
            \textbf{Cycle Step} & \textbf{Temp $\left(\si{\celsius}\right)$} & \textbf{Time}\\
            \cmidrule{1-3}
            1 & 95 & \SI{5}{\minute} & \\
            2 & 95 & \SI{30}{\second} & \multirow{3}{*}{\hspace{-1em}$\left.\begin{array}{l}
                \\
                \\
                \\
                \end{array}\right\rbrace\times\SI{35}{cycles}$} \\
            3 & 60 & \SI{30}{\second} & \\
            4 & 68 & \SI{45}{\second} &\\
            5 & 68 & \SI{5}{\minute}\\
            \cmidrule{1-3}
        \end{tabular}
    \end{center}

\end{document}

enter image description here

0
16

The bigdelimpackage, which comes with multirow is designed for this sort of things. I added some improvements of the table with makecell and booktabs:

\documentclass[11pt]{report}
\usepackage{textcomp}
\usepackage{amsmath}
\usepackage{array, multirow, bigdelim, makecell, booktabs} 

\begin{document}

\begin{center}
\renewcommand{\theadfont}{\normalsize\bfseries}
\begin{tabular}{c c cl}
\thead{Cycle\\ Step} & \thead{Temp \\(\textcelsius)} & \thead{Time}\\
\cmidrule{1-3}
1 & 95 & 5\,min \\
2 & 95 & 30\,s & \hspace{-1em}\rdelim\}{3}{*}[${}\times35$ cycles] \\
3 & 60 & 30\,s \\
4 & 68 & 40\,s \\
5 & 68 & 5\,min \\
\end{tabular}
\end{center}

\end{document} 

enter image description here

3

You can use nicematrix:

\documentclass[11pt]{report} 
\usepackage{amsmath}
\usepackage{nicematrix}
\usepackage{booktabs}
\usepackage{siunitx}


\begin{document}

\begin{center}
\begin{NiceTabular}{c c c l}
\toprule
Cycle Step & Temp (\si{\celsius}) & Time \\
\midrule
1 & 95 & \qty{5}{min} \\
2 & 95 & \qty{30}{s} & \Block{3-1}{${}\times 35$ cycles} \\
3 & 60 & \qty{30}{s}  \\
4 & 68 & \qty{40}{s} \\
5 & 68 & \qty{5}{min} \\
\bottomrule
\CodeAfter\SubMatrix.{3-3}{5-3}\}
\end{NiceTabular}
\end{center}

\end{document}

enter image description here

You must log in to answer this question.

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