my question is how to enter a multiline equation (or several equations on different lines) in a box of a latex table. I have the table made as follows:
\begin{table}[h]
\begin{center}
\begin{tabular}{|c|c|c|}
Casilla 1 & Casilla 2 & Casilla 3 \\ \hline
Casilla 4 & Casilla 5 & Casilla 6 \\ \hline
\end{tabular}
\end{center}
\end{table}
I have tried with "multiline", "gather", "align" and it gives me an error. However, outside the table it does not give me any error. I hope you help me with my problem. Thank you very much.
To enter multi-line material in a cell of a table (whether it is a multi-equation mathematical environment or simply a paragraph) the column to which that cell belongs must be a type
p
and you must specify its width.You can do this in the parameter that receives
tabular
, for example\begin{tabular}{|c|p{5cm}|c}
, in which case all the cells of that column are of that width and of type "paragraph", or in a specific cell using\multicolumn
for that cell.An example for the second approach:
Produces:
An alternative answer to the accepted one, even without
amsmath
( plain LaTeX):Add this to the header to improve the margins:
I'm sorry but I only speak Italian and I used Google translate :)