دستور \parbox
یک گزینهی اختیاری داره که موقعیت جعبه را از لحاظ تراز عمودی تنظیم میکنه. کد زیر را ببینید
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{tabular}{ccc}
$\text{short text}$ & $\text{short text}$ & \parbox[t]{6.1cm}{ very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long text} \\
$\text{short text}$ & $\text{short text}$ & \parbox[t]{6.1cm}{ very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long text}\\
\hline
\end{tabular}
\end{document}
به صورت پیشفرض گزینهی \parbox[c]
فعال است که باعث میشه از لحاظ عمودی جعبه با متن افقی همتراز خود به صورت میانه تنظیم شود. اگر به جای [c]
از [t]
استفاده شود، بالای بسته با خط زمینه همتراز میشود. و اگر از [b]
استفاده کنید، پایین جعبه تراز میشود. نتیجهی خروجی کد بالا به صورت زیر است: