I have some problems with creating a table. I'd like to have a table with no borders that fills the total text width, with 2 columns aligned right and left respectively. However, I can either make a table with the total text width or aligned left and right but not both. I tried to do it with >{\raggedright \arraybackslash}m{0.05\linewidth}
with adding a 3rd. empty column, but I can't make it to align left or right.
Could someone please help ?
basic code:
\begin{tabular}{lr}
a & b \\
& d
\end{tabular}
Best Answer
First with
tabularx
, you can make a columnr
ight aligned bywhile
X
column type takes care of the column width automatically.Next with
tabular*
. Here we uselr
columns but the space in between is filled with a total width equal to\textwidth
.With
p
column type andtabular
, we have to calculate the width of columns and then issue\raggedleft
for second column.