
Estoy intentando tener una tabla de 2 columnas (esta es la única sección con 2 columnas en todo mi documento). Como algunas líneas son demasiado largas, me gustaría que se ajustaran (esta parte funciona). Sin embargo, esto provoca que las líneas en blanco en las filas tengan texto corto (por ejemplo, primera fila: la columna de la izquierda es solo 1 línea pero la columna de la derecha es 2). ¿Cómo edito esto elegantemente para que quede envuelto y los espacios vacíos desaparezcan? El peor de los casos sería dividir las filas manualmente y colocarlas en filas separadas. La siguiente imagen muestra el ejemplo de la línea que quiero subir.
\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}
Respuesta1
Le sugiero que emplee dos entornos de dos columnas uno al lado del otro tabularx
, con anchos de 0.57\linewidth
y 0.43\linewidth
, respectivamente. Al hacer que el entorno de la izquierda sea tabularx
más ancho que el de la derecha, las longitudes totales de los tabularx
entornos se pueden hacer aproximadamente iguales.
\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}