I am trying to write text into a matrix to describe what an element at a particular row and column represents. The following is as far as I got ( after a few hours! ):
\begin{equation*}
P_{m,n} =
\begin{pmatrix}
\text{description 1 - some text} & p_{1,2} \\
p_{2,1} & \text{description 2 - some more text} \\
\end{pmatrix}
\end{equation*}
The text does not wrap and its size is too big relative to the rows and columns that do not have a description. Is it possible to write wrapped text in a matrix using LaTeX ( I am using Markdown in RStudio )? – if it is – what are the LaTeX commands?
Best Answer
You can put the text in a
\parbox
and specify both the text width and size. Also, I show a TABstack alternative in which the row baselineskip22pt
and column gap3pt
are easily specified.