Tabular de 2 colunas com quebra automática de linha

Tabular de 2 colunas com quebra automática de linha

Estou tentando ter uma tabela de 2 colunas (esta é a única seção com 2 colunas em todo o meu documento). Como algumas linhas são muito longas, gostaria que elas fossem agrupadas (esta parte funciona). No entanto, isso causa linhas em branco nas linhas do texto curto (por exemplo, primeira linha - a coluna da esquerda tem apenas 1 linha, mas a coluna da direita tem 2). Como edito isso com elegância, de modo que seja agrupado e os espaços vazios desapareçam. O pior caso seria dividir as linhas manualmente e colocá-las em linhas separadas. A imagem abaixo mostra o exemplo da linha que desejo mover para cima.

insira a descrição da imagem aqui

\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}

Responder1

Sugiro que você empregue dois tabularxambientes de duas colunas lado a lado, com larguras de 0.57\linewidthe 0.43\linewidth, respectivamente. Ao tornar o ambiente da esquerda tabularxmais largo do que o da direita, os comprimentos totais dos tabularxambientes podem ser aproximadamente iguais.

insira a descrição da imagem aqui

\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}

informação relacionada