Quiero escribir una tabla, aquí está mi código:
\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}
La salida de ese código:
Pero el resultado parece que hay errores. Muchos guiones están fuera de sus celdas. ¿Cuáles son los problemas de mi código?
Respuesta1
El error es \FloatBarrier
el paquete requerido 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}
Respuesta2
Al igual que con la respuesta de Sebastiano, utilizo \left\{...\right\}
para ajustar las llaves como se muestra a continuación.
\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}
Y el resultado es