테이블을 작성하고 싶습니다. 코드는 다음과 같습니다.
\documentclass{article}
\usepackage{bbm}
\usepackage{amsmath}
\usepackage{multirow}
\begin{document}
\begin{table}
\caption{Tipe opsi barrier.}
\begin{center}
\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-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-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-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-5}
&&&&$B\geq K$\\
\hline
\end{tabular}
\end{center}
\end{table}
\end{document}
해당 코드의 출력은 다음과 같습니다.
그런데 출력 결과에 오류가 있는 것 같습니다. 많은 스크립트가 셀 밖에 있습니다. 내 코드의 문제점은 무엇입니까?
답변1
오류는 \FloatBarrier
필수 placeins
패키지입니다.
\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{bbm}
\usepackage{placeins}
\usepackage{multirow}
\begin{document}
\FloatBarrier
\begin{table}
\caption{Tipe opsi barrier.}
\begin{center}
\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}_{\bigl\{\min\limits_{0\leq t\leq T}S_t>B\bigr\}}$}&$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}_{\bigl\{\min\limits_{0\leq t\leq T}S_t<B\bigr\}}$}&$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}_{\bigl\{\max\limits_{0\leq t\leq T}S_t<B\bigr\}}$}&$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}_{\bigl\{\max\limits_{0\leq t\leq T}S_t>B\bigr\}}$}&$B\leq K$\\
\cline{5-5}
&&&&$B\geq K$\\
\hline
\end{tabular}
\end{center}
\end{table}
\FloatBarrier
\end{document}
답변2
\left\{...\right\}
Sebastiano의 답변과 유사하게 아래와 같이 중괄호를 맞추는 데 사용합니다 .
\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{bbm}
\usepackage{multirow}
\begin{document}
\begin{table}
\caption{Tipe opsi barrier.}
\begin{center}
\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}_{\left\{\min\limits_{0\leq t\leq T}S_t>B\right\}}$}&$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}_{\left\{\min\limits_{0\leq t\leq T}S_t<B\right\}}$}&$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}_{\left\{\max\limits_{0\leq t\leq T}S_t<B\right\}}$}&$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}_{\left\{\max\limits_{0\leq t\leq T}S_t>B\right\}}$}&$B\leq K$\\
\cline{5-5}
&&&&$B\geq K$\\
\hline
\end{tabular}
\end{center}
\end{table}
\end{document}
그리고 그 결과는