表格中的一个单元格中有多行且有两行

表格中的一个单元格中有多行且有两行

我这里有一个问题,我将重写这个表。

在此处输入图片描述

然后我写这样的代码:

\documentclass{article}
    \begin{document}    
    \begin{tabular}{|c|c|c|c|c|}
    \hline
    Tipe Opsi&CBBC&\textit{Behavior}&\textit{Payoff}& \\
    \hline
    \multirow{8}{*}{Barrier \textit{Call}}& \multirow{2}{*}{\textit{Bull}}&\multirow{2}{*}{\begin{tabular}{@{}c@{}}\textit{down-and-out} \\ (\textit{knock-out})\end{tabular}}&\multirow{2}{*}{$(S_T-K)^+\mathbbm{1}_{\biggl\{\min\limits_{0\leq t\leq T}S_t>B\biggr\}}$}&$B\leq K$\\
    \cline{5}
    &&&&$B\geq K$\\
    \cline{2-5}
    &\multirow{6}{*}{}&\multirow{2}{*}{\begin{tabular}{@{}c@{}}\textit{down-and-in}\\(\textit{knock-in})\end{tabular}}&\multirow{2}{*}{$(S_T-K)^+\mathbbm{1}_{\biggl\{\min\limits_{0\leq t\leq T}S_t<B\biggr\}}$}&$B\leq K$\\
    \cline{5}
    &&&&$B\geq K$\\
    \cline{3-5}
    &&\multirow{2}{*}{\begin{tabular}{@{}c@{}}\textit{up-and-out}\\(\textit{knock-out})\end{tabular}}&\multirow{2}{*}{$(S_T-K)^+\mathbbm{1}_{\biggl\{\max\limits_{0\leq t\leq T}S_t<B\biggr\}}$}&$B\leq K$\\
    \cline{5}
    &&&&$B\geq K$\\
    \cline{3-5}
    &&\multirow{2}{*}{\begin{tabular}{@{}c@{}}\textit{up-and-in}\\(\textit{knock-in})\end{tabular}}&\multirow{2}{*}{$(S_T-K)^+\mathbbm{1}_{\biggl\{\max\limits_{0\leq t\leq T}S_t>B\biggr\}}$}&$B\leq K$\\
    \cline{5}
    &&&&$B\geq K$\\
    \hline
\end{tabular}
    \end{document}

问题是什么?

答案1

您缺少 in\cline命令。应该是\cline{5-5}而不是\cline{5}。您的代码变成了这样。

\documentclass{article}
\usepackage{bbm}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{comment}
\begin{document}    
\begin{tabular}{|c|c|c|c|c|}
    \hline
    Tipe Opsi&CBBC&\textit{Behavior}&\textit{Payoff}& \\
    \hline
    \multirow{8}{*}{Barrier \textit{Call}}& \multirow{2}{*}{\textit{Bull}}&\multirow{2}{*}{\begin{tabular}{@{}c@{}}\textit{down-and-out} \\ (\textit{knock-out})\end{tabular}}&\multirow{2}{*}{$(S_T-K)^+\mathbbm{1}_{\{\min\limits_{0\leq t\leq T}S_t>B\}}$}&$B\leq K$\\
    \cline{5-5}
    &&&&$B\geq K$\\
    \cline{2-5}
    &\multirow{6}{*}{}&\multirow{2}{*}{\begin{tabular}{@{}c@{}}\textit{down-and-in}\\(\textit{knock-in})\end{tabular}}&\multirow{2}{*}{$(S_T-K)^+\mathbbm{1}_{\{\min\limits_{0\leq t\leq T}S_t<B\}}$}&$B\leq K$\\
    \cline{5-5}
    &&&&$B\geq K$\\
    \cline{3-5}
    &&\multirow{2}{*}{\begin{tabular}{@{}c@{}}\textit{up-and-out}\\(\textit{knock-out})\end{tabular}}&\multirow{2}{*}{$(S_T-K)^+\mathbbm{1}_{\{\max\limits_{0\leq t\leq T}S_t<B\}}$}&$B\leq K$\\
    \cline{5-5}
    &&&&$B\geq K$\\
    \cline{3-5}
    &&\multirow{2}{*}{\begin{tabular}{@{}c@{}}\textit{up-and-in}\\(\textit{knock-in})\end{tabular}}&\multirow{2}{*}{$(S_T-K)^+\mathbbm{1}_{\{\max\limits_{0\leq t\leq T}S_t>B\}}$}&$B\leq K$\\
    \cline{5-5}
    &&&&$B\geq K$\\
    \hline
\end{tabular}
\end{document}

结果如下。

在此处输入图片描述

相关内容