I want my all cells have horizontally and vertically centered except second column. I want my second column only vertically centered, but the alignment is on the left.
My attempt:
\documentclass[a4paper]{book} \usepackage{blindtext} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amsthm} \begin{document} \begin{center} \begin{tabular}{|c|c|p{4cm}|} \hline No. & $f(t)$ & $F(s)$\\ \hline 1. & Fungsi tangga konstan, $f(t)=1$ & $$\frac 1s;\, s>0$$\\ \hline 2. & Fungsi identitas, $f(t)=t$ & $$\frac 1{s^2};\, s>0$$\\ \hline 3. & Fungsi eksponensial, $f(t)=1$ & $$\frac 1s;\, s>0$$\\ \hline 4. & Fungsi tangga konstan, $f(t)=e^{-\omega t}$ & $$\frac 1{s+\omega};\, s>0$$\\ \hline \end{tabular} \end{center} \end{document} Can you help me? I've seen my possible duplicate, but seems like there is an error when I'm using \usepackage{ragged2e}. And I want the width to fit the text length naturally. For example, the first column has a smaller width.


\begin{tabular}{|c|l|m{4cm}|}should result in the desired alignment.arraypackage? Themcolumn type is only available when thearraypackage is loaded.