See ADDENDUM and BONUS
First, the original approach.
Here is a \newcolumntype
solution, except that, for a reason that I should know but I don't, it won't work in the last column of the tabular
. I'm sure David C. could tell me off the cuff why.
So I've provided C{}
, L{}
, and R{}
column types for specifying a minimum width, and an Q
column type to use for a phantom, to get around the deficiency I initially cited.
\documentclass{article}
\usepackage{tabularx,stackengine}
\newcolumntype{L}[1]{>{\minwd l{#1}}l<{\endminwd}}
\newcolumntype{C}[1]{>{\minwd c{#1}}c<{\endminwd}}
\newcolumntype{R}[1]{>{\minwd r{#1}}r<{\endminwd}}
\def\minwd#1#2#3\endminwd{\stackengine{0pt}{#3}{\rule{#2}{0pt}}{O}{#1}{F}{F}{L}}
\newcolumntype{Q}{@{}c@{}}
\begin{document}
\begin{tabular}{|C{1.2cm}|C{1.2cm}|R{2cm}|l|}
a & a& b& c\\
aaaaaaaaaaaaaaaaa& aa& bb& cc\\
\end{tabular}
\bigskip
\begin{tabular}{|C{1.2cm}|C{1.2cm}|R{2cm}|L{1.5cm}|Q}
a & a& b& c&\\
aaaaaaaaaaaaaaaaa& aa& bb& cc&\\
\end{tabular}
\end{document}

ADDENDUM
Apparently the way to overcome the deficiency I noted in my original solution is to use \collectcell
:
\documentclass{article}
\usepackage{tabularx,stackengine,collcell}
\let\endminwd\relax
\newcolumntype{L}[1]{>{\collectcell\xminwd l{#1}}l<{\endminwd\endcollectcell}}
\newcolumntype{C}[1]{>{\collectcell\xminwd c{#1}}c<{\endminwd\endcollectcell}}
\newcolumntype{R}[1]{>{\collectcell\xminwd r{#1}}r<{\endminwd\endcollectcell}}
\def\minwd#1#2#3\endminwd{\stackengine{0pt}{#3}{\rule{#2}{0pt}}{O}{#1}{F}{F}{L}}
\newcommand\xminwd[1]{\minwd#1}
\begin{document}
\begin{tabular}{|C{1.2cm}|C{1.2cm}|R{2cm}|L{1.5cm}|}
a & a& b& c\\
aaaaaaaaaaaaaaaaa& aa& bb& cc\\
\end{tabular}
\end{document}

And just for fun, if you set the vertical measure of the \rule
to something nonzero, say 1pt
, you can see how the rule comes into play:

BONUS
I realized the technique could be used for creating a D
column for aligning a specified number of trailing decimal places. EDITED to handle decimal free inputs.
\documentclass{article}
\usepackage{tabularx,stackengine,collcell}
\let\endecm\relax
\newcolumntype{D}[1]{>{\collectcell\Decm l{#1}}r<{..\endDecm\endcollectcell}}
\def\decm#1#2#3.#4.#5\endDecm{#3.\stackengine{0pt}{#4}{\rule{#2\wd0}{0pt}}{O}{#1}{F}{F}{L}}
\newcommand\Decm[1]{\setbox0=\hbox{0}\decm#1}
\begin{document}
\begin{tabular}{|D{3}|D{2}|D{4}|}
10.345 & 410.34 & 1310.34\\
10 & 11 & 12.\\
210.34 & 1210.3 & 310.3456\\
\end{tabular}
\end{document}
