I would like to introduce 3 labelled equations inside a table. One of the equations goes inside a multirow. It should look like this:

enter image description here

I tried the following code and I get an error. When the equation inside the multirow is deleted and, instead, a text (xxx) is written, the error disappears.

Do you have an idea, how I can solve it? Thank you in advance.

        \textbf{a} & \textbf{b} &\textbf{c} & {\textbf{d}} & {\textbf{e}}\\
        1 & blabla & aaa & \multirow{2}{*}{x} & \begin{equation} m  = \frac{n}{z} \label{eq:bla2} \end{equation} \\
        2 & bloblo & bbb & & \begin{equation} m2  = \frac{n2}{z2} \label{eq:bla3} \end{equation} \\

% x -->  a  = \frac{b}{c} \label{eq:bla1} \end{equation}
  • could you please make it a compilable MWE? – Raaja Jan 9 at 16:20

for what you like to obtain the tabulary table environment is not good choice ... try with tabularx instead:

enter image description here

(red lines indicate text borders)

\usepackage{multirow, tabularx}
%---------------- show page layout. don't use in a real document!
\textbf{a} & \textbf{b} &\textbf{c} & {\textbf{d}} & {\textbf{e}}\\
1 & blabla & aaa &
                    a = \frac{b}{c} \label{eq:bla2}
                    &   \begin{equation}
                        m  = \frac{n}{z} \label{eq:bla2}
                        \end{equation} \\
2 & bloblo & bbb &  & \begin{equation}
                        m2  = \frac{n2}{z2} \label{eq:bla2} \end{equation} \\

edit: or maybe you will more prefer the following table looks:

enter image description here

for above images are made two changes in above mwe:

  • after \begin{table} is added line \renewcommand\tabularxcolumn[1]{m{#1}}
  • number of spanned lines in multirow is reduced: \multirow{4}{=}{ .... }


  • in question always provide complete but small document beginning with \documentclasss... and ending with \end{document} which reproduce your problem. with this you will help all who would be willing help you. it is not fun to reconstruct missing part of your code knowing that it already exist at you ...
  • many time the source of problems are in used document packages, your defined commands (if existes) and similar

  • newer add \\ after ˙\hlineor\cline`. it cause spurious vertical space in table

  • displayed equations in table had to be paragraph style cells (like p{...}˙ orXfromtabularx`), which should have enough with to place equation in it.
  • for multirow in case that it contain displayed equation, you should prescribe ith width or use option = if the column, where is multirow cell has defined width.
  • Thanks a lot Zarko! However, I do not understand what you mean with: to complete my mwe please first extend your code sniped to complete small document! --------- I have problems compiling your code, I get the following error: "missing # inserted in alignment preamble". I already have \usepackage{tabularx}. Maybe it has todo with your comment. – CRH Jan 9 at 17:08
  • @CRH, please add to your code fragment document preamble and other missed parts, that it can be compiled as it is. such document we call mwe (minimal working example). see comment below your question. – Zarko Jan 9 at 17:29
  • I added the whole code in my question above. Now it should be compilable). – CRH Jan 9 at 17:31
  • @CRH, thank you very much. Now i complete my code (since i now know preamble of your document). – Zarko Jan 9 at 17:33
  • I didn't know the preamble was so important. Actually instead of article I have the following. I'm gonna change it in the question right now. \RequirePackage[patch]{kvoptions} \documentclass{DissOnlineLatex} – CRH Jan 9 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.