我想使用命令来避免每次定义表参数。
\begin{listliketab}
\begin{tabularx}{\linewidth}{@{}>{\bfseries}l @{\hspace{.5em}} XR}
2009--present & very long text 1, very long text 2, very long text 3, very long text 4, very long text 5, very long text 6, very long text 7, very long text 8, very long text 9, very long text 10 \\
2009 & Masters \\
2006 & Bachelors
\end{tabularx}
\end{listliketab}
参数:{\linewidth}{@{}>{\bfseries}l @{\hspace{.5em}} XR}
答案1
您可以定义新的环境,例如
\newenvironment{foo}{%
\tabularx{\linewidth}{@{}>{\bfseries}l @{\hspace{.5em}} XR}}{%
\endtabularx}
然后你的桌子只需要
\begin{foo}
1 & 2 & 3 \\
\end{foo}