Tables Cell – How to Change the Left Padding for One LaTeX Table’s Cell

celltables

Given the following table:

\begin{tabular}{|l|l|l|}
\hline
a & b & c \\ \hline
d & e & f \\ \hline
g & h & i \\ \hline
\end{tabular}

enter image description here

I could find the question Padding at the top of a table cell in LaTeX, saying about changing it for a top of the whole table.

How to set the left padding for the column a and for the cell f to 0, while keeping the rest of the cells and columns with default settings?

Best Answer

Like this?

enter image description here

\documentclass[12pt]{article}

\begin{document}
\begin{tabular}{|@{}l|l|l|}
\hline
a & b & c \\ \hline
d & e & \multicolumn{1}{@{}l|}{f} \\ \hline
g & h & i \\ \hline
\end{tabular}
\end{document}

Note: an above example is not moved content to left border of table but left border to content. Consequently, column is for \tabcolsep narrower (thank Mico for comment). For preserving equal column width (if this is requested) , this width can be added on the end of cell:

 \begin{tabular}{|@{}l@{\hspace{2\tabcolsep}}|l|l|}

which in treated case give:

enter image description here