I would like to have a table to looks like this:
\documentclass{article}
\usepackage[english]{babel}
\begin{document}
\begin{center}
\begin{tabular}{ | p{5cm} | l | l | p{5cm} |}
\hline
& Taylor expansion & & Power series \\ \hline
& $$f(x)=\sum_{k=0}^{n}a_k(x-1)^{k}+o((x-a)^{n})$$ & & $$f(x)=\sum_{n\geq 0} a_k(x-1)^{k}$$ \\ \hline
Order & $DL_{n}(0)$ & $DL_{5}(0)$ & \\ \hline
exp(x) & $$\sum_{k=0}^{n}\dfrac{x^k}{k!}+o(x^n) $$ & $$1+x+\drac{x^2}{2}+ $$ & $$\sum_{k=0}^{n}\dfrac{x^k}{k!}$$ \\ \hline
\end{tabular}
\end{center}
\end{document}
Best Answer
Like this:
Note: Use of
$$ ... $$
is in LaTeX deprecate. Instead it you should use\[ ... \]
or\begin{equation*} ... \end{equation*}
. Since all this math environments don't work in column typesc
,l
andr
, instead them I use$\displaystyle ... $
. For shorter code I modified columns type to>{$\displaystyle}c<{$}
so the whoole column is in math mode (except\multicolumn
s). Therefore the text in header of the last column had to be in wrote as\text{Power series}
.More vertical space around cells content is obtained by macros
\setcellgapes{5pt}
and\makegapedcells
from packagemakecell
.