2

I want to include the complicated equation into one of the cells of my table. I am using tabular environment, additionally I have some multirows. I would like to add something like this:

\begin{table}   
   \centering
   \begin{tabular}{l||p{6.5cm}|p{6cm}|p{3cm}|}
     \multirow{2}{*}{Problem}
     & a=3 & description & something \\
     &
     \[ l= \begin{cases} 
        a when sth \\
        b when sth else \\
        c when elsewhere;
       \end{cases}
     \] 
     & & \\
  \end{tabular}
\end{table}

The problem is precisely when I need to use \\ in purpose of proper cases environment look. In such a case it simply (compiler) get frozen... until whole processor is 'consumed'. Anyway anyone knows how to put the function, equation with cases into table?

  • Welcome to tex.sx. It would be much easier to answer the question if you edited it to make a complete document that showed the problem so that it can be reproduced. In general it should just work, but it is not easy to see what is wrong just from fragments of code. – David Carlisle May 7 '13 at 22:38
2

If I make a document from your fragments, it processes without error:

enter image description here

\documentclass{article}
\usepackage{amsmath,multirow}

\begin{document}
\begin{tabular}{cp{5cm}cc}
\multirow{2}{*}{Problem}
& equation 1 & description & something \\
& equation which contains cases
\[
l=
\begin{cases} 
a &\text{when sth }\\
b &\text{when sth else} \\
c &\text{when elsewhere;}
\end{cases}
\] & & \\
xx&yy&zz
\end{tabular}
\end{document}
  • Thanks for your replay and indeed after I made some tests it works in the empty document. Although as soon I glue the code into my article problem occurs. Now I suspect some strange interaction with one of the other packages, functions I am using... Nevertheless rather strange problem... – mihau May 7 '13 at 23:09
  • 1
    @mihau That's why we always ask people to post a complete document: start with the document with the problem, remove any text and packages that you can while keeping the problem, then post the resulting test document. (Of course often while making the minimal example you spot what the problem is as you see removing some package fixes it, then you don't need to post at all:-) Feel free to edit your question if you do make a test case. – David Carlisle May 7 '13 at 23:17

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.