I have a two-column tabular* environment and I wish to automatically adjust the width of the first cell of each row to its content. How do I remove the horizontal space "x" in the attached image?
MWE is as follows:
\documentclass{article} %
\usepackage{tabularx}
\usepackage{blindtext}
\setlength\tabcolsep{1pt}
\newenvironment{twenty}{%
\begin{tabular*}
{\textwidth}{ll}}{%
\end{tabular*}}
\newcommand{\twentyitem}[4]{%
{#1}&\parbox[t]{0.75\textwidth}{%
\textbf{#2}%
\hfill%
{#3}\\%
#4\vspace{\parsep}}\\}
\begin{document}
\begin{twenty}
\twentyitem{2017 Sept~-~%\dots
a very long date here}{ABC Position}{City, Country}%
{\blindtext}
\twentyitem{2015 May~-~%\dots
2017 Sept}{XYZ Position}{City, Country}%
{\blindtext}
\end{twenty}
\end{document}
\begin{tabular*}{\textwidth}{ll}}
can not work, you are specifying the table be stretched but adding no flexibility. If you usetabular*
you have to use\extracolsep
to add stretchy space between the columns.