![我怎样才能让这些 \parbox 边距在 LaTeX 中更宽](https://linux22.com/image/386223/%E6%88%91%E6%80%8E%E6%A0%B7%E6%89%8D%E8%83%BD%E8%AE%A9%E8%BF%99%E4%BA%9B%20%5Cparbox%20%E8%BE%B9%E8%B7%9D%E5%9C%A8%20LaTeX%20%E4%B8%AD%E6%9B%B4%E5%AE%BD.png)
我有以下命令,后面跟着我想要显示的文本。我附上了输出的显示。我希望顶部中间的文本有更宽的边距。我尝试使用 \textwidth 调整 \parbox 命令,但没有达到我想要的结果。
\newcommand\rexbox[1]{%
\parbox{.333\textwidth}{#1}%
}
\noindent\rexbox{\small City, State}\rexbox{\small This is the text that I want to be on multiple lines but would like the horiz. margins wider}\rexbox{\hfill \small Oct 2018}\\
\noindent City, State \hfill This is text that is fine on one line \hfill Oct 2018\\
答案1
您应该将其设置为tabularx
(如果您不关心需要跨越页面边界的内容:
\documentclass{article}
\usepackage{tabularx}
\begin{document}
\noindent
\begin{tabularx}{\linewidth}{ @{} l X r @{} }
City, State &
This is the text that I want to be on multiple lines but would like the horiz. margins wider &
Oct 2018 \\
City, State &
This is text that is fine on one line &
Oct 2018
\end{tabularx}
\end{document}
在设置完其他(左对齐和右对齐)列之后,列的宽度X
将拉伸以填充剩余的部分。\linewidth
l
r