
나는 2열 테이블을 가지려고 합니다(이것은 전체 문서에서 2열이 있는 유일한 섹션입니다). 일부 줄은 너무 길기 때문에 줄 바꿈하고 싶습니다(이 부분은 작동합니다). 그러나 이로 인해 행에 빈 줄이 짧은 텍스트가 됩니다(예: 첫 번째 행 - 왼쪽 열은 1줄이지만 오른쪽 열은 2줄입니다). 포장되어 빈 공간이 사라지도록 우아하게 편집하려면 어떻게 해야 합니까? 최악의 경우는 행을 수동으로 분할하여 별도의 행에 배치하는 것입니다. 아래 이미지는 위로 이동하려는 선의 예를 보여줍니다.
\documentclass[12pt, notitlepage]{article}
\usepackage[letterpaper, portrait, margin=1in]{geometry}
\usepackage{amsmath}
\begin{document}
\begin{tabular}{p{0.05\textwidth} p{0.4\textwidth} p{0.05\textwidth} p{0.05\textwidth} p{0.4\textwidth}}
\underline{\textbf{Sets}} &&& \underline{\textbf{Parameters}}\\
$\mathcal{V}$ & set of customers && $\delta_{trc}$ & Penalty for flow from scenario $t$ to scenario $r$ for cluster $c$\\
$\mathcal{S}_v$ & set of schedules for customer $v$ && $Q$ & Maximum capacity of vehicle\\
$\mathcal{T}_c$ & set of target demand scenarios for cluster $c$ && $\underline{q}{}_v$ & Minimum delivery quantity for customer $v$\\
$\mathcal{R}_c$ & set of demand scenarios for cluster $c$ && $D_v$ & Total demand of customer $v$ over all periods\\
$\mathcal{C}$ & set of clusters && $D^{CMI}$ & Total average daily CMI demand\\
$\mathcal{K}_c$ & set of customers in cluster $c$ && $\xi$ & Proportion of total average daily CMI demand to set aside in fleet\\
\underline{\textbf{Variables}} &&&$\underline{q}{}_{crv}$ & Lower bound of demand for customer $v$ in scenario $r$ of cluster $c$\\
$d_{vs}\in\{0,1\}$ & Customer $v$ served using schedule $s$ && $\overline{q}_{crv}$ & Upper bound of demand for customer $v$ in scenario $r$ of cluster $c$\\
$q_{vp}\in\{0,1\}$ & Delivered amount to customer $v$ on period $p$ && $\pi_{tc}$ & Target fraction of days of scenario $t$ for cluster $c$\\
$x_{vpk}\in\{0,1\}$ & Customer $v$ delivered in period $p$ using vehicle $k$\\
$y_{crp}\in\{0,1\}$ & Scenario $r$ of cluster $c$ occurs in period $p$\\
$f_{trc}\in\mathbb{R}$ & Optimal \emph{flow} from scenario $t$ to scenario $r$ for cluster $c$\\
$\Pi_{rc}\in\mathbb{R}$ & Fraction of days of serving scenario $s$ for cluster $c$\\
\\
\end{tabular}
\end{document}
답변1
tabularx
너비가 각각 0.57\linewidth
및 인 두 개의 병렬 2열 환경을 사용하는 것이 좋습니다 0.43\linewidth
. 왼쪽 tabularx
환경을 오른쪽 환경보다 넓게 만들어 tabularx
환경의 전체 길이를 대략 동일하게 만들 수 있습니다.
\documentclass[12pt]{article}
\usepackage[letterpaper,margin=1in]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{tabularx,ragged2e}
\newcolumntype{L}{>{\RaggedRight}X} % suspend full justification
\begin{document}
\begingroup % localize scope of next three instructions
\small % 10% linear reduction in font size
\setlength\tabcolsep{4pt} % default: 6pt
\setlength\extrarowheight{2pt} % default: 0pt
\noindent
\begin{tabularx}{0.57\linewidth}[t]{@{} >{$}l<{$} L }
\multicolumn{2}{@{}l}{\textbf{Sets}} \\
\mathcal{V} & set of customers \\
\mathcal{S}_v & set of schedules for customer $v$ \\
\mathcal{T}_c & set of target demand scenarios for cluster $c$ \\
\mathcal{R}_c & set of demand scenarios for cluster $c$ \\
\mathcal{C} & set of clusters \\
\mathcal{K}_c & set of customers in cluster $c$ \\[1ex]
\multicolumn{2}{@{}l}{\textbf{Variables}} \\
d_{vs}{\in}\{0,1\} & Customer $v$ served using schedule $s$ \\
q_{vp}{\in}\{0,1\} & Delivered amount to customer $v$ in period $p$ \\
x_{vpk}{\in}\{0,1\} & Customer $v$ delivered in period $p$ using vehicle $k$\\
y_{crp}{\in}\{0,1\} & Scenario $r$ of cluster $c$ occurs in period $p$\\
f_{trc}{\in}\mathbb{R} & Optimal \emph{flow} from scenario $t$ to scenario $r$ for cluster $c$\\
\Pi_{rc}{\in}\mathbb{R}& Fraction of days of serving scenario $s$ for cluster $c$\\
\end{tabularx}%
\begin{tabularx}{0.43\linewidth}[t]{ >{$}l<{$} L @{}}
\multicolumn{2}{l}{\textbf{Parameters}} \\
\delta_{trc} & Penalty for flow from scenario $t$ to scenario $r$ for cluster $c$\\
Q & Maximum capacity of vehicle\\
\underline{q}_v & Minimum delivery quantity for customer $v$\\
D_v & Total demand of customer $v$ over all periods\\
D^{\mathrm{CMI}} & Total average daily CMI demand\\
\xi & Proportion of total average daily CMI demand to set aside in fleet\\
\underline{q}_{crv}& Lower bound of demand for customer $v$ in scenario $r$ of cluster $c$\\
\overline{q}_{crv} & Upper bound of demand for customer $v$ in scenario $r$ of cluster $c$\\
\pi_{tc} & Target fraction of days of scenario $t$ for cluster $c$\\
\end{tabularx}
\endgroup
\end{document}