TransWikia.com

How to split Table header into 2 lines

TeX - LaTeX Asked on December 26, 2020

I have a table with a long header text

enter image description here

I tried to split the header into 2 rows but I got an error in the Tex when I added

Here is my tex

begin{table*}[htbp]
    caption{AutoML platforms used in the healthcare research}
    begin{center}
        begin{tabular}{|c|c|c|c|c|c|c|c|}
            hline
            textbf{textit{Research}} & textbf{{Commercial AutoML (Google AutoML and Apple Create ML)}}&  textbf{textit{T1}}& textbf{textit{T2}}& textbf{textit{T3}}
            & textbf{textit{T4}}& textbf{textit{T5}}
            & textbf{textit{T6}}
            hline
            [36]&.&.&.&.&.&.&X
            hline          
            [37]&.&.&.&.&.&.&X
            hline

            
        end{tabular}
        label{graph_i}
    end{center}
end{table*}

Is there a way to break the header into to 2 lines?

Thanks

One Answer

   textbf{textit{Research}} & textbf{thead{Commercial AutoML (Google AutoML and Apple Create ML)}}&  textbf{textit{T1}}& textbf{textit{T2}}& textbf{textit{T3}}

enter image description here

documentclass[demo]{article}
usepackage{nicematrix}
usepackage{tikz}
usepackage{calc}
usepackage{booktabs}
usepackage{xcolor,colortbl}
usepackage{graphicx}

usepackage{makecell}
begin{document}
begin{tabular}{|c|c|c|c|c|c|c|c|}
    hline
    textbf{textit{Research}} & textbf{thead{Commercial AutoML (Google AutoML and Apple Create ML)}}&  textbf{textit{T1}}& textbf{textit{T2}}& textbf{textit{T3}}
    & textbf{textit{T4}}& textbf{textit{T5}}
    & textbf{textit{T6}}
    hline
    [36]&.&.&.&.&.&.&X
    hline          
    [37]&.&.&.&.&.&.&X
    hline
    
    
end{tabular}
end{table}
end{document}

Correct answer by js bibra on December 26, 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