# Table with text wrapping and two “=” aligned equations in one cell

Regarding this post:

Table with text wrapping?

\documentclass{article}
\usepackage{array}
\newcolumntype{L}{>{\centering\arraybackslash}m{3cm}}

\begin{document}

\begin{table}
\begin{tabular}{|L|c|L|}\hline
one & two & three \\\hline
This is two line thing and centered & only one line&  \multicolumn{1}{m{3cm}|}{This is justified and may go to second line as well, neatly}\\\hline
one & two & three \\\hline
one & two & three \\\hline
\end{tabular}
\end{table}
\end{document}


Now I would like to enhance this table as follows:

1. Turn the Row 2, Column1 text into two equations aligned at the "=" within that cell. That is:

y=mx+b
y=x+1

2. Insert caption and label

3. Position the table and caption in the center of the page
-

Check out the following modified form of your MWE.

\documentclass{article}
\usepackage{array,amsmath}
\newcolumntype{L}{>{\centering\arraybackslash}m{3cm}}
\begin{document}
\begin{table}
\caption{The table's caption goes here}\label{tab:example}
\centering
\begin{tabular}{|L|c|L|}\hline
one & two & three \\
\hline
This is two line thing and centered & only one line&
\multicolumn{1}{m{3cm}|}{This is justified and may go to second line as well, neatly}\\
\hline
\begin{aligned} y&=mx+b\\ y&=x+1 \end{aligned} & two & three \\\hline
one & two & three \\\hline
\end{tabular}
\end{table}
\end{document}


• Row 2, Column 1, contains an aligned environment (inside the $ ... $ math mode delimiters), with the & symbol used to align the equations on the respective equal signs.
• There are new \caption and \label commands between \begin{table} and \begin{tabular}
• There's a \centering directive immediately before the \begin{tabular} statement. Note that the caption will be centered automatically (unless it's longer than \textwidth).