我是 Latex 新手,我正在尝试使用多行,但似乎不起作用!它没有合并行,当我为合并定义一个空单元格时,它会给我一个文本。我还得到了一个未定义的控制序列
以下是代码:
\begin{table}[htb]
\centering
\begin{tabular}{|c|c|l|}
\hline
\multicolumn{3}{|c|}{\rule{0pt}{14pt} \textbf{{\large Tactical Planning (SND)}}} \\ \hline
\multirow{2}{|c|}{{}} & \textbf{Reference} & \qquad \qquad \textbf{Solution Approach} \\ \hline
& \multicolumn{2}{|c|} {\rule{0pt}{12pt} \textbf{{Dynamic SND with a variable network structure}}} \\ \hline
Deterministic & \cite{bai_optimisation_2018,crainic_modeling_2015,inghels_service_2016,li_design-balanced_2017} & Mixed-integer programming \\ \hline
Stochastic & \cite{bai_stochastic_2014,hewitt_scheduled_2019,hoff_metaheuristic_2010,wang_stochastic_2019} & Two-stage stochastic programming \\ \hline
& \multicolumn{2}{|c|}{\rule{0pt}{12pt} \textbf{{Dynamic SND with a given network structure}}} \\ \hline
\multirow{2}{|c|}{Deterministic} & \cite{duan_freight_2019}& Mixed-integer nonlinear programming \\ \hline
&\cite{heggen_intermodal_2019,sun_bi-objective_2019} & Mixed integer programming \\ \hline
\multirow{3}{|c|}{Stochastic} &\cite{hui_airfreight_2014, meng_carrying_2015} & Two-stage stochastic programming \\ \hline
& \cite{hrusovsky_hybrid_2018,layeb_simulation-optimization_2018,zhang_synchromodal_2016} & Simualtion/simulation optimization \\ \hline
&\cite{demir_green_2016,sun_bi-objective_2019,zhao_chance-constrained_2018} & Mixed integer programming \\ \hline
& \multicolumn{2}{|c|}{\rule{0pt}{12pt} \textbf{{Non-dynamic SND with a given network structure}}} \\ \hline
Deterministic & \cite{katayama_combined_2019,tawfik_bilevel_2019,wang_hybrid_2019,zetina_profit-oriented_2019} & Mixed integer programming \\ \hline
Stochastic & \cite{gao_uncertain_2016,rahmaniani_accelerating_2018,sun_stochastic_2017} & Two-stage stochastic programming\\ \hline
\end{tabular}
\caption{Tactical Planning Problems (SND) and Solution Methodologies}
\label{tab:tacticalsnd}
\end{table}
答案1
像这样?
\documentclass{article}
\usepackage{multirow}
\usepackage{cite}
\begin{document}
\begin{table}[htb]
\centering
\begin{tabular}{|c|c|l|}
\hline
\multicolumn{3}{|c|}{\rule{0pt}{14pt} \textbf{{\large Tactical Planning (SND)}}} \\ \hline
\multirow{2}{*}{{}} & \textbf{Reference} & \qquad \qquad \textbf{Solution Approach} \\ \hline
& \multicolumn{2}{|c|} {\rule{0pt}{12pt} \textbf{{Dynamic SND with a variable network structure}}} \\ \hline
Deterministic & \cite{bai_optimisation_2018,crainic_modeling_2015,inghels_service_2016,li_design-balanced_2017} & Mixed-integer programming \\ \hline
Stochastic & \cite{bai_stochastic_2014,hewitt_scheduled_2019,hoff_metaheuristic_2010,wang_stochastic_2019} & Two-stage stochastic programming \\ \hline
& \multicolumn{2}{|c|}{\rule{0pt}{12pt} \textbf{{Dynamic SND with a given network structure}}} \\ \hline
\multirow{2}{*}{Deterministic} & \cite{duan_freight_2019}& Mixed-integer nonlinear programming \\ \cline{2-3}
&\cite{heggen_intermodal_2019,sun_bi-objective_2019} & Mixed integer programming \\ \hline
\multirow{3}{*}{Stochastic} &\cite{hui_airfreight_2014, meng_carrying_2015} & Two-stage stochastic programming \\ \cline{2-3}
& \cite{hrusovsky_hybrid_2018,layeb_simulation-optimization_2018,zhang_synchromodal_2016} & Simualtion/simulation optimization \\ \cline{2-3}
&\cite{demir_green_2016,sun_bi-objective_2019,zhao_chance-constrained_2018} & Mixed integer programming \\ \hline
& \multicolumn{2}{|c|}{\rule{0pt}{12pt} \textbf{{Non-dynamic SND with a given network structure}}} \\ \hline
Deterministic & \cite{katayama_combined_2019,tawfik_bilevel_2019,wang_hybrid_2019,zetina_profit-oriented_2019} & Mixed integer programming \\ \hline
Stochastic & \cite{gao_uncertain_2016,rahmaniani_accelerating_2018,sun_stochastic_2017} & Two-stage stochastic programming\\ \hline
\end{tabular}
\caption{Tactical Planning Problems (SND) and Solution Methodologies}
\label{tab:tacticalsnd}
\end{table}
\end{document}
答案2
或者像这样:
使用tabularray
包装很简单:
\documentclass{article}
\usepackage{xcolor}
\usepackage{tabularray}
\begin{document}
\begin{table}[htb]
\centering
\begin{tblr}{hlines, vlines,
colspec = {ccl},
row{1-3} = {font=\bfseries, c, bg=gray9}
}
\SetCell[c=3]{font=\large\bfseries} Tactical Planning (SND)
& & \\
& Reference
& Solution Approach \\
\SetCell[c=3]{font=\bfseries} Dynamic SND with a variable network structure
& & \\
Deterministic
& \cite{bai_optimisation_2018,crainic_modeling_2015,inghels_service_2016,li_design-balanced_2017}
& Mixed-integer programming \\
Stochastic
& \cite{bai_stochastic_2014,hewitt_scheduled_2019,hoff_metaheuristic_2010,wang_stochastic_2019}
& Two-stage stochastic programming \\
\SetCell[c=3]{font=\bfseries, bg=gray9} Dynamic SND with a given network structure
& & \\
\SetCell[r=2]{c} Deterministic
& \cite{duan_freight_2019}
& Mixed-integer nonlinear programming \\
& \cite{heggen_intermodal_2019,sun_bi-objective_2019}
& Mixed integer programming \\
\SetCell[r=3]{c} Stochastic
& \cite{hui_airfreight_2014, meng_carrying_2015}
& Two-stage stochastic programming \\
& \cite{hrusovsky_hybrid_2018,layeb_simulation-optimization_2018,zhang_synchromodal_2016}
& Simualtion/simulation optimization \\
&\cite{demir_green_2016,sun_bi-objective_2019,zhao_chance-constrained_2018}
& Mixed integer programming \\
\SetCell[c=3]{font=\bfseries, bg=gray9} Non-dynamic SND with a given network structure
& & \\
Deterministic
& \cite{katayama_combined_2019,tawfik_bilevel_2019,wang_hybrid_2019,zetina_profit-oriented_2019}
& Mixed integer programming \\
Stochastic & \cite{gao_uncertain_2016,rahmaniani_accelerating_2018,sun_stochastic_2017}
& Two-stage stochastic programming \\
\end{tblr}
\caption{Tactical Planning Problems (SND) and Solution Methodologies}
\label{tab:tacticalsnd}
\end{table}
\end{document}