I want to make the words "words words words" be directly below n^k
. What I have tried so far has not worked. That is, \newline
, \\
, and \underset{}
cannot accomplish what I desire.
Example Code
\begin{center}
\begin{tabular}{ | l | l | p{5cm} |}
\hline
& Order Matters & Order Doesn't Matter \\ \hline
Repetition Allowed & $\displaystyle{n^k} $\par{ words words words}& $\displaystyle {n+k-1 \choose k-1}$ \\ \hline
No Repetition Allowed& $\frac{n!}{(n-k)!}$ & ${n \choose k}$ \\ \hline
\end{tabular}
\end{center}
Best Answer
You can only use
\par
inside a fixed-widthp
-column. Here is a toned-down implementation of yourtabular
:It uses
\binom
fromamsmath
instead of the plain-TeX\choose
. A\displaystyle
version is available as\dbinom
.Another option that allows for paragraph breaks as needed (with the aid of
varwidth
. A fixed-width column is created usingL{<width>}
which will produce aL
eft-aligned column no wider than<width>
: