答案1
您可以在中间使用一个空的 p{} 列,如下所示:
\documentclass{article}
\begin{document}
\begin{table}
\label{my-label}
\begin{tabular}{lp{7cm}l}
Name & &Local address \\
Affliation & &Phone number \\
Address & &Email
\end{tabular}
\end{table}
\end{document}
或者像这样:
\documentclass{article}
\begin{document}
\begin{table}
\label{my-label}
\begin{tabular}{lp{7cm}r}
Name & &Local address \\
Affliation & &Phone number \\
Address & &Email
\end{tabular}
\end{table}
\end{document}
如果您想要半自动计算填充,您可以使用以下命令:
\documentclass{article}
\begin{document}
\begin{table}
\label{my-label}
\newsavebox{\sboxl}
\savebox{\sboxl}{Local address}
\newsavebox{\sboxr}
\savebox{\sboxr}{Affiliation}
\xdef\myfill{\dimexpr\linewidth-\wd\sboxl-\wd\sboxr-4\columnsep\relax}
\begin{tabular}{lp{\myfill}r}
Name & &Local address \\
Affliation & &Phone number \\
Address & &Email
\end{tabular}
\end{table}
\end{document}
我使用了最大长度和 4 的行\columnseps
来计算您必须编辑的更多列或不同值的长度。
使用 tabularx 包:
\documentclass{article}
\usepackage{tabularx}
\begin{document}
\begin{table}
\label{my-label}
\begin{tabularx}{\linewidth}{lXr}
Name & &Local address \\
Affliation & &Phone number \\
Address & &Email
\end{tabularx}
\end{table}
\end{document}