TransWikia.com

How to build a table with specific multicolumns?

TeX - LaTeX Asked by user230843 on June 6, 2021

Trying to format a table in the format of this poorly drawn Paint picture.enter image description here

I’ve seen similar examples posted of formatting tables like this, but I can’t for the life of me get it to work as I want it. I’ve tried using multicolumn but it just doesn’t come out correctly… if someone can point out the similar question I’ve missed, or advise on how to do it I’d be really grateful.

Thanks for the help in advance!

One Answer

Your question unfortunately not provide enough information about desired table, so the following suggestion is based on guessing:

documentclass{article}
usepackage{tabularx}
newcommandmccc[1]{multicolumn{3}{c|}{#1}}

begin{document}
    begin{table}
begin{tabularx}{linewidth}{|l|*{9}{>{centeringarraybackslash}X|}}
    hline
        &   mccc{Rouge 1}  &   mccc{Rouge 2}  &   mccc{Rouge 2}  
        cline{2-10}
        & F1 & P & R & F1 & P & R & F1 & P & R                      
    hline
text    &    &   &   &    &   &   &    &   &                        
    hline                          
        &    &   &   &    &   &   &    &   &                             
    hline
        &    &   &   &    &   &   &    &   &                                 
    hline
end{tabularx}
    end{table}
end{document}

enter image description here

Correct answer by Zarko on June 6, 2021

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