TransWikia.com

Multirow and Two Lines in One Cell on Table

TeX - LaTeX Asked by Lis on December 4, 2020

I have problems here is table that I will rewrite.

enter image description here

Then I write code like this:

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{minlimits_{0leq tleq T}S_t>Bbiggr}}$}&$Bleq K$\
    cline{5}
    &&&&$Bgeq 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{minlimits_{0leq tleq T}S_t<Bbiggr}}$}&$Bleq K$\
    cline{5}
    &&&&$Bgeq 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{maxlimits_{0leq tleq T}S_t<Bbiggr}}$}&$Bleq K$\
    cline{5}
    &&&&$Bgeq 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{maxlimits_{0leq tleq T}S_t>Bbiggr}}$}&$Bleq K$\
    cline{5}
    &&&&$Bgeq K$\
    hline
end{tabular}
    end{document}

What is the problem?

One Answer

You're missing in cline command. It should be cline{5-5} instead of cline{5}. Your code become this.

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}_{{minlimits_{0leq tleq T}S_t>B}}$}&$Bleq K$\
    cline{5-5}
    &&&&$Bgeq 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}_{{minlimits_{0leq tleq T}S_t<B}}$}&$Bleq K$\
    cline{5-5}
    &&&&$Bgeq 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}_{{maxlimits_{0leq tleq T}S_t<B}}$}&$Bleq K$\
    cline{5-5}
    &&&&$Bgeq 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}_{{maxlimits_{0leq tleq T}S_t>B}}$}&$Bleq K$\
    cline{5-5}
    &&&&$Bgeq K$\
    hline
end{tabular}
end{document}

And the result as below.

enter image description here

Correct answer by Ongky Denny Wijaya on December 4, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP