# Errors using dmath for multiline equation breaking in a table with booktabs package?

I would appreciate if you can help me find a solution/way out to the following problem.

I am using the booktabs package to get a nice looking table.

I have a long equation in the table which I split using the death environment provided by the breqn package (to keep the left and right parentheses' size the same).

Without using the booktabs package, it works as expected, but with booktabs the table generates many errors of the type Missing \endgroup inserted, missing \cr inserted.

My goal is to do both, equation breaking without delimiters of \right and \left problems and still use the booktabs package for a professionally-looking table.

Here is a sample of the code

\documentclass[journal,12pt,draftcls,onecolumn,a4paper]{IEEEtran}
%\usepackage{amsmath,amssymb,amsthm}
\usepackage{array}
\usepackage{breqn}
\usepackage{booktabs}
\newcommand{\tn}{\tabularnewline}

\begin{document}

% This table can not be generated (many errors) when using dmath environment in conjunction with booktabs table

\begin{table}
\begin{tabular}{@{}ll@{}}\toprule
Scheme & rule \\ \midrule
Scheme name &
\begin{dmath*}
a\left(1- \frac{1}{c!}\binom{N-1}{j-1}\sum\limits_{l=N-j}^{N-1}\binom{j-1}{N-l}(-1)^{l-N}\frac{l!}{(1+l)^{c-1}}\\
\sum\limits_{i_0,i_1,\ldots,i_{c-1}=0}^{l}\left(\prod\limits_{t=0}^{c-1}\frac{\left(\frac{1}{(1+l)t}\right)}{i_t!}\right)\left(c+\sum\limits_{t=0}^{c-1}\, i_t\right)\right)
\end{dmath*} \\ \hline
\bottomrule
\end{tabular}
\end{table}

%This way does work (normal table style)

\begin{table}
\begin{tabular}{|>{\arraybackslash}m{2.3cm}||>{\arraybackslash}m{14.3cm}|}\hline
Scheme & rule \tn[5pt] \hline
Scheme name &
\begin{dmath*}
a\left(1- \frac{1}{c!}\binom{N-1}{j-1}\sum\limits_{l=N-j}^{N-1}\binom{j-1}{N-l}(-1)^{l-N}\frac{l!}{(1+l)^{c-1}}\\
\sum\limits_{i_0,i_1,\ldots,i_{c-1}=0}^{l}\left(\prod\limits_{t=0}^{c-1}\frac{\left(\frac{1}{(1+l)t}\right)}{i_t!}\right)\left(c+\sum\limits_{t=0}^{c-1}\, i_t\right)\right)
\end{dmath*} \tn[5pt] \hline
\end{tabular}
\end{table}

\end{document}

• Welcome to TeX.SX! I reformatted your question for better readability. You can't use death in an l column: the second one works just because you used m type. Commented Nov 13, 2013 at 15:25

This has nothing to with booktabs. The important thing is that the dmath be in a column of paragraph type, so p{6cm} or m{6cm} but not l or c. Here is your second table with booktab commands and dmath, typeset with two different column widths, the second demonstrating the bad breaking dmath can make:

\documentclass[journal,12pt,draftcls,onecolumn,a4paper]{IEEEtran}

\usepackage{array}
\usepackage{breqn}
\usepackage{booktabs}

\begin{document}

\begin{table}
\begin{tabular}{lm{9cm}}
\toprule
Scheme & Rule \\
\midrule
Scheme name &
\begin{dmath*}
a\left(1- \frac{1}{c!} \binom{N-1}{j-1} \* \sum\limits_{l=N-j}^{N-1}\binom{j-1}{N-l}(-1)^{l-N}\frac{l!}{(1+l)^{c-1}}\\
\sum\limits_{i_0,i_1,\ldots,i_{c-1}=0}^{l}\left(\prod\limits_{t=0}^{c-1}\frac{\left(\frac{1}{(1+l)t}\right)}{i_t!}\right)\left(c+\sum\limits_{t=0}^{c-1}\, i_t\right)\right)
\end{dmath*} \\
\bottomrule
\end{tabular}
\end{table}

\begin{table}
\begin{tabular}{lm{6cm}}
\toprule
Scheme & Rule \\
\midrule
Scheme name &
\begin{dmath*}
a\left(1- \frac{1}{c!} \binom{N-1}{j-1} \* \sum\limits_{l=N-j}^{N-1}\binom{j-1}{N-l}(-1)^{l-N}\frac{l!}{(1+l)^{c-1}}\\
\sum\limits_{i_0,i_1,\ldots,i_{c-1}=0}^{l}\left(\prod\limits_{t=0}^{c-1}\frac{\left(\frac{1}{(1+l)t}\right)}{i_t!}\right)\left(c+\sum\limits_{t=0}^{c-1}\, i_t\right)\right)
\end{dmath*} \\
\bottomrule
\end{tabular}
\end{table}

\end{document}