Head of table - combination of cells











up vote
3
down vote

favorite












How to make head of table like in the picture? Thank you
enter image description here



documentclass{article}
usepackage{array}
usepackage{makecell, multirow, booktabs}
usepackage{caption}

begin{document}

begin{table}[h]
centering
caption{title}
footnotesizesetlength{extrarowheight}{2pt}
begin{tabular}{ccccccccccc}
toprule
multirowcell{1}[-1pt]{Element} & multirowcell{3}[-1pt]{citep{M}} & multirowcell{2}[-1pt]{citep{C}} & multirowcell{1}[-1pt]{citep{R}}& multirowcell{3}[-1pt]{citep{P}} \
cmidrule(lr){5-6}
& multicolumn{3}{c}{PHOEBE fotometrie a RV} & multicolumn{1}{c}{multirow{2}{*}{POWR analýza} & multicolumn{1}{c}{multirow{2}{*}{Řešení světelných křivek a RV} & multicolumn{1}{c}{multirow{2}{*}{CFF} } & multicolumn{3}{c}{Model} \

& multicolumn{1}{c}{Řešení I} & multicolumn{1}{c}{Řešení II} & multicolumn{1}{c}{Řešení III} & & & & multicolumn{1}{c}{malá hmotnost} & multicolumn{1}{c}{střední hmotnost} & multicolumn{1}{c}{velká hmotnost} \

midrule
& & & & & & & & & &
bottomrule
end{tabular}
label{table}
end{table}

end{document}


EDIT



documentclass[12pt,a4paper]{report}
setlengthtextwidth{145mm}
setlengthtextheight{247mm}
setlengthoddsidemargin{15mm}
setlengthevensidemargin{15mm}
setlengthtopmargin{0mm}
setlengthheadsep{0mm}
setlengthheadheight{0mm}
letopenright=clearpage

usepackage{amsmath, graphicx}
usepackage{array}

usepackage{caption}
usepackage[output-decimal-marker={,}]{siunitx}
NewDocumentCommand{anote}{}{makebox[0pt][l]{$^*$}}

usepackage[usenames]{xcolor}
usepackage[a-2u]{pdfx}
usepackage[english,czech]{babel}
usepackage{lmodern}
usepackage[T1]{fontenc}
usepackage{textcomp}
usepackage[utf8]{inputenc}

usepackage{amsfonts} % matematické fonty
usepackage{amsthm} % sazba vět, definic apod.
usepackage{bbding} % balíček s nejrůznějšími symboly
% (čtverečky, hvězdičky, tužtičky, nůžtičky, ...)
usepackage{bm} % tučné symboly (příkaz bm)
usepackage{fancyvrb} % vylepšené prostředí pro strojové písmo
usepackage{indentfirst} % zavede odsazení 1. odstavce kapitoly
usepackage{natbib} % zajištuje možnost odkazovat na literaturu
% stylem AUTOR (ROK), resp. AUTOR [ČÍSLO]
usepackage[nottoc]{tocbibind} % zajistí přidání seznamu literatury,
% obrázků a tabulek do obsahu
usepackage{icomma}
usepackage{booktabs} % lepší vodorovné linky v tabulkách
usepackage{paralist} % lepší enumerate a itemize
usepackage{makecell}
usepackage{amssymb}
usepackage{dcolumn}
setlengthheavyrulewidth{0.25ex}
usepackage{cellspace, multirow, tabularx}
newcommand{mc}[1]{multicolumn{1}{c}{#1}}
usepackage{ragged2e}
newcolumntype{d}[1]{D{.}{,}{#1}}
newcolumntype{L}{>{RaggedRightarraybackslash}X}
newcommandstack[1]{multicolumn{1}{c}{shortstack{#1}}}
newcommand{angstrom}{mbox{normalfontAA}}

newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}
newcommandmytab[1]{%
bgroup%
setlengthextrarowheight{0pt}%
smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}%
egroup}
%%% code block to handle the OP's follow-up question -- see
%%% https://tex.stackexchange.com/a/112002/5001 for the source
usepackage{regexpatch}
makeatletter
% Change the `-` delimiter to an active character
xpatchparametertext@cline{-}{cA-}{}{}
makeatother

begin{document}


begin{table}[ht!]
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default: 6pt
begin{tabularx}{textwidth}{| *{4}{C|} >{hsize=1.3hsize}C| >{hsize=0.7hsize}C| *{3}{C|}}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{ c|}{P} \
hline
multicolumn{3}{|c|}{PHOEBE fotometrie a RV} &
mytab{POWR\analýza} &
mytab{Řešení\světelných\křivek a RV} &
CFF & multicolumn{3}{c|}{Model} \
cline{1-3} cline{7-9}
Řešení I & Řešení II & Řešení III & & & & malá hmotnost & střední hmotnost & velká hmotnost\
hlinehline
& & & & & & & & \
hline
& & & & & & & & \
hline
end{tabularx}
end{table}

end{document}









share|improve this question
























  • Is it important that the underlying 9 columns have the same widths? Should line-wrapping be allowed inside the cells?
    – Mico
    Dec 8 at 6:04












  • No, columns don't have same widths - it depends on situation. Yes line-wrapping be allowed inside the cells.
    – Elisabeth
    Dec 8 at 6:21










  • You should really, really try much harder not to load packages more than once. What exactly are you trying to achieve by loading amsmath, graphicx, array, babel, multirow, xcolor, lmodern [3 times!], textcomp, bm, dcolumn, tocbibind, tabularx [3 times!], and ragged2e twice or even three times? Absolutely nothing good -- and quite possibly something bad -- is going to result from this bad habit. After you've cleaned out the duplicates, you should probably also examine whether all packages that remain are even needed.
    – Mico
    Dec 8 at 9:58

















up vote
3
down vote

favorite












How to make head of table like in the picture? Thank you
enter image description here



documentclass{article}
usepackage{array}
usepackage{makecell, multirow, booktabs}
usepackage{caption}

begin{document}

begin{table}[h]
centering
caption{title}
footnotesizesetlength{extrarowheight}{2pt}
begin{tabular}{ccccccccccc}
toprule
multirowcell{1}[-1pt]{Element} & multirowcell{3}[-1pt]{citep{M}} & multirowcell{2}[-1pt]{citep{C}} & multirowcell{1}[-1pt]{citep{R}}& multirowcell{3}[-1pt]{citep{P}} \
cmidrule(lr){5-6}
& multicolumn{3}{c}{PHOEBE fotometrie a RV} & multicolumn{1}{c}{multirow{2}{*}{POWR analýza} & multicolumn{1}{c}{multirow{2}{*}{Řešení světelných křivek a RV} & multicolumn{1}{c}{multirow{2}{*}{CFF} } & multicolumn{3}{c}{Model} \

& multicolumn{1}{c}{Řešení I} & multicolumn{1}{c}{Řešení II} & multicolumn{1}{c}{Řešení III} & & & & multicolumn{1}{c}{malá hmotnost} & multicolumn{1}{c}{střední hmotnost} & multicolumn{1}{c}{velká hmotnost} \

midrule
& & & & & & & & & &
bottomrule
end{tabular}
label{table}
end{table}

end{document}


EDIT



documentclass[12pt,a4paper]{report}
setlengthtextwidth{145mm}
setlengthtextheight{247mm}
setlengthoddsidemargin{15mm}
setlengthevensidemargin{15mm}
setlengthtopmargin{0mm}
setlengthheadsep{0mm}
setlengthheadheight{0mm}
letopenright=clearpage

usepackage{amsmath, graphicx}
usepackage{array}

usepackage{caption}
usepackage[output-decimal-marker={,}]{siunitx}
NewDocumentCommand{anote}{}{makebox[0pt][l]{$^*$}}

usepackage[usenames]{xcolor}
usepackage[a-2u]{pdfx}
usepackage[english,czech]{babel}
usepackage{lmodern}
usepackage[T1]{fontenc}
usepackage{textcomp}
usepackage[utf8]{inputenc}

usepackage{amsfonts} % matematické fonty
usepackage{amsthm} % sazba vět, definic apod.
usepackage{bbding} % balíček s nejrůznějšími symboly
% (čtverečky, hvězdičky, tužtičky, nůžtičky, ...)
usepackage{bm} % tučné symboly (příkaz bm)
usepackage{fancyvrb} % vylepšené prostředí pro strojové písmo
usepackage{indentfirst} % zavede odsazení 1. odstavce kapitoly
usepackage{natbib} % zajištuje možnost odkazovat na literaturu
% stylem AUTOR (ROK), resp. AUTOR [ČÍSLO]
usepackage[nottoc]{tocbibind} % zajistí přidání seznamu literatury,
% obrázků a tabulek do obsahu
usepackage{icomma}
usepackage{booktabs} % lepší vodorovné linky v tabulkách
usepackage{paralist} % lepší enumerate a itemize
usepackage{makecell}
usepackage{amssymb}
usepackage{dcolumn}
setlengthheavyrulewidth{0.25ex}
usepackage{cellspace, multirow, tabularx}
newcommand{mc}[1]{multicolumn{1}{c}{#1}}
usepackage{ragged2e}
newcolumntype{d}[1]{D{.}{,}{#1}}
newcolumntype{L}{>{RaggedRightarraybackslash}X}
newcommandstack[1]{multicolumn{1}{c}{shortstack{#1}}}
newcommand{angstrom}{mbox{normalfontAA}}

newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}
newcommandmytab[1]{%
bgroup%
setlengthextrarowheight{0pt}%
smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}%
egroup}
%%% code block to handle the OP's follow-up question -- see
%%% https://tex.stackexchange.com/a/112002/5001 for the source
usepackage{regexpatch}
makeatletter
% Change the `-` delimiter to an active character
xpatchparametertext@cline{-}{cA-}{}{}
makeatother

begin{document}


begin{table}[ht!]
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default: 6pt
begin{tabularx}{textwidth}{| *{4}{C|} >{hsize=1.3hsize}C| >{hsize=0.7hsize}C| *{3}{C|}}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{ c|}{P} \
hline
multicolumn{3}{|c|}{PHOEBE fotometrie a RV} &
mytab{POWR\analýza} &
mytab{Řešení\světelných\křivek a RV} &
CFF & multicolumn{3}{c|}{Model} \
cline{1-3} cline{7-9}
Řešení I & Řešení II & Řešení III & & & & malá hmotnost & střední hmotnost & velká hmotnost\
hlinehline
& & & & & & & & \
hline
& & & & & & & & \
hline
end{tabularx}
end{table}

end{document}









share|improve this question
























  • Is it important that the underlying 9 columns have the same widths? Should line-wrapping be allowed inside the cells?
    – Mico
    Dec 8 at 6:04












  • No, columns don't have same widths - it depends on situation. Yes line-wrapping be allowed inside the cells.
    – Elisabeth
    Dec 8 at 6:21










  • You should really, really try much harder not to load packages more than once. What exactly are you trying to achieve by loading amsmath, graphicx, array, babel, multirow, xcolor, lmodern [3 times!], textcomp, bm, dcolumn, tocbibind, tabularx [3 times!], and ragged2e twice or even three times? Absolutely nothing good -- and quite possibly something bad -- is going to result from this bad habit. After you've cleaned out the duplicates, you should probably also examine whether all packages that remain are even needed.
    – Mico
    Dec 8 at 9:58















up vote
3
down vote

favorite









up vote
3
down vote

favorite











How to make head of table like in the picture? Thank you
enter image description here



documentclass{article}
usepackage{array}
usepackage{makecell, multirow, booktabs}
usepackage{caption}

begin{document}

begin{table}[h]
centering
caption{title}
footnotesizesetlength{extrarowheight}{2pt}
begin{tabular}{ccccccccccc}
toprule
multirowcell{1}[-1pt]{Element} & multirowcell{3}[-1pt]{citep{M}} & multirowcell{2}[-1pt]{citep{C}} & multirowcell{1}[-1pt]{citep{R}}& multirowcell{3}[-1pt]{citep{P}} \
cmidrule(lr){5-6}
& multicolumn{3}{c}{PHOEBE fotometrie a RV} & multicolumn{1}{c}{multirow{2}{*}{POWR analýza} & multicolumn{1}{c}{multirow{2}{*}{Řešení světelných křivek a RV} & multicolumn{1}{c}{multirow{2}{*}{CFF} } & multicolumn{3}{c}{Model} \

& multicolumn{1}{c}{Řešení I} & multicolumn{1}{c}{Řešení II} & multicolumn{1}{c}{Řešení III} & & & & multicolumn{1}{c}{malá hmotnost} & multicolumn{1}{c}{střední hmotnost} & multicolumn{1}{c}{velká hmotnost} \

midrule
& & & & & & & & & &
bottomrule
end{tabular}
label{table}
end{table}

end{document}


EDIT



documentclass[12pt,a4paper]{report}
setlengthtextwidth{145mm}
setlengthtextheight{247mm}
setlengthoddsidemargin{15mm}
setlengthevensidemargin{15mm}
setlengthtopmargin{0mm}
setlengthheadsep{0mm}
setlengthheadheight{0mm}
letopenright=clearpage

usepackage{amsmath, graphicx}
usepackage{array}

usepackage{caption}
usepackage[output-decimal-marker={,}]{siunitx}
NewDocumentCommand{anote}{}{makebox[0pt][l]{$^*$}}

usepackage[usenames]{xcolor}
usepackage[a-2u]{pdfx}
usepackage[english,czech]{babel}
usepackage{lmodern}
usepackage[T1]{fontenc}
usepackage{textcomp}
usepackage[utf8]{inputenc}

usepackage{amsfonts} % matematické fonty
usepackage{amsthm} % sazba vět, definic apod.
usepackage{bbding} % balíček s nejrůznějšími symboly
% (čtverečky, hvězdičky, tužtičky, nůžtičky, ...)
usepackage{bm} % tučné symboly (příkaz bm)
usepackage{fancyvrb} % vylepšené prostředí pro strojové písmo
usepackage{indentfirst} % zavede odsazení 1. odstavce kapitoly
usepackage{natbib} % zajištuje možnost odkazovat na literaturu
% stylem AUTOR (ROK), resp. AUTOR [ČÍSLO]
usepackage[nottoc]{tocbibind} % zajistí přidání seznamu literatury,
% obrázků a tabulek do obsahu
usepackage{icomma}
usepackage{booktabs} % lepší vodorovné linky v tabulkách
usepackage{paralist} % lepší enumerate a itemize
usepackage{makecell}
usepackage{amssymb}
usepackage{dcolumn}
setlengthheavyrulewidth{0.25ex}
usepackage{cellspace, multirow, tabularx}
newcommand{mc}[1]{multicolumn{1}{c}{#1}}
usepackage{ragged2e}
newcolumntype{d}[1]{D{.}{,}{#1}}
newcolumntype{L}{>{RaggedRightarraybackslash}X}
newcommandstack[1]{multicolumn{1}{c}{shortstack{#1}}}
newcommand{angstrom}{mbox{normalfontAA}}

newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}
newcommandmytab[1]{%
bgroup%
setlengthextrarowheight{0pt}%
smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}%
egroup}
%%% code block to handle the OP's follow-up question -- see
%%% https://tex.stackexchange.com/a/112002/5001 for the source
usepackage{regexpatch}
makeatletter
% Change the `-` delimiter to an active character
xpatchparametertext@cline{-}{cA-}{}{}
makeatother

begin{document}


begin{table}[ht!]
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default: 6pt
begin{tabularx}{textwidth}{| *{4}{C|} >{hsize=1.3hsize}C| >{hsize=0.7hsize}C| *{3}{C|}}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{ c|}{P} \
hline
multicolumn{3}{|c|}{PHOEBE fotometrie a RV} &
mytab{POWR\analýza} &
mytab{Řešení\světelných\křivek a RV} &
CFF & multicolumn{3}{c|}{Model} \
cline{1-3} cline{7-9}
Řešení I & Řešení II & Řešení III & & & & malá hmotnost & střední hmotnost & velká hmotnost\
hlinehline
& & & & & & & & \
hline
& & & & & & & & \
hline
end{tabularx}
end{table}

end{document}









share|improve this question















How to make head of table like in the picture? Thank you
enter image description here



documentclass{article}
usepackage{array}
usepackage{makecell, multirow, booktabs}
usepackage{caption}

begin{document}

begin{table}[h]
centering
caption{title}
footnotesizesetlength{extrarowheight}{2pt}
begin{tabular}{ccccccccccc}
toprule
multirowcell{1}[-1pt]{Element} & multirowcell{3}[-1pt]{citep{M}} & multirowcell{2}[-1pt]{citep{C}} & multirowcell{1}[-1pt]{citep{R}}& multirowcell{3}[-1pt]{citep{P}} \
cmidrule(lr){5-6}
& multicolumn{3}{c}{PHOEBE fotometrie a RV} & multicolumn{1}{c}{multirow{2}{*}{POWR analýza} & multicolumn{1}{c}{multirow{2}{*}{Řešení světelných křivek a RV} & multicolumn{1}{c}{multirow{2}{*}{CFF} } & multicolumn{3}{c}{Model} \

& multicolumn{1}{c}{Řešení I} & multicolumn{1}{c}{Řešení II} & multicolumn{1}{c}{Řešení III} & & & & multicolumn{1}{c}{malá hmotnost} & multicolumn{1}{c}{střední hmotnost} & multicolumn{1}{c}{velká hmotnost} \

midrule
& & & & & & & & & &
bottomrule
end{tabular}
label{table}
end{table}

end{document}


EDIT



documentclass[12pt,a4paper]{report}
setlengthtextwidth{145mm}
setlengthtextheight{247mm}
setlengthoddsidemargin{15mm}
setlengthevensidemargin{15mm}
setlengthtopmargin{0mm}
setlengthheadsep{0mm}
setlengthheadheight{0mm}
letopenright=clearpage

usepackage{amsmath, graphicx}
usepackage{array}

usepackage{caption}
usepackage[output-decimal-marker={,}]{siunitx}
NewDocumentCommand{anote}{}{makebox[0pt][l]{$^*$}}

usepackage[usenames]{xcolor}
usepackage[a-2u]{pdfx}
usepackage[english,czech]{babel}
usepackage{lmodern}
usepackage[T1]{fontenc}
usepackage{textcomp}
usepackage[utf8]{inputenc}

usepackage{amsfonts} % matematické fonty
usepackage{amsthm} % sazba vět, definic apod.
usepackage{bbding} % balíček s nejrůznějšími symboly
% (čtverečky, hvězdičky, tužtičky, nůžtičky, ...)
usepackage{bm} % tučné symboly (příkaz bm)
usepackage{fancyvrb} % vylepšené prostředí pro strojové písmo
usepackage{indentfirst} % zavede odsazení 1. odstavce kapitoly
usepackage{natbib} % zajištuje možnost odkazovat na literaturu
% stylem AUTOR (ROK), resp. AUTOR [ČÍSLO]
usepackage[nottoc]{tocbibind} % zajistí přidání seznamu literatury,
% obrázků a tabulek do obsahu
usepackage{icomma}
usepackage{booktabs} % lepší vodorovné linky v tabulkách
usepackage{paralist} % lepší enumerate a itemize
usepackage{makecell}
usepackage{amssymb}
usepackage{dcolumn}
setlengthheavyrulewidth{0.25ex}
usepackage{cellspace, multirow, tabularx}
newcommand{mc}[1]{multicolumn{1}{c}{#1}}
usepackage{ragged2e}
newcolumntype{d}[1]{D{.}{,}{#1}}
newcolumntype{L}{>{RaggedRightarraybackslash}X}
newcommandstack[1]{multicolumn{1}{c}{shortstack{#1}}}
newcommand{angstrom}{mbox{normalfontAA}}

newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}
newcommandmytab[1]{%
bgroup%
setlengthextrarowheight{0pt}%
smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}%
egroup}
%%% code block to handle the OP's follow-up question -- see
%%% https://tex.stackexchange.com/a/112002/5001 for the source
usepackage{regexpatch}
makeatletter
% Change the `-` delimiter to an active character
xpatchparametertext@cline{-}{cA-}{}{}
makeatother

begin{document}


begin{table}[ht!]
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default: 6pt
begin{tabularx}{textwidth}{| *{4}{C|} >{hsize=1.3hsize}C| >{hsize=0.7hsize}C| *{3}{C|}}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{ c|}{P} \
hline
multicolumn{3}{|c|}{PHOEBE fotometrie a RV} &
mytab{POWR\analýza} &
mytab{Řešení\světelných\křivek a RV} &
CFF & multicolumn{3}{c|}{Model} \
cline{1-3} cline{7-9}
Řešení I & Řešení II & Řešení III & & & & malá hmotnost & střední hmotnost & velká hmotnost\
hlinehline
& & & & & & & & \
hline
& & & & & & & & \
hline
end{tabularx}
end{table}

end{document}






tables






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 8 at 10:16

























asked Dec 8 at 5:14









Elisabeth

3616




3616












  • Is it important that the underlying 9 columns have the same widths? Should line-wrapping be allowed inside the cells?
    – Mico
    Dec 8 at 6:04












  • No, columns don't have same widths - it depends on situation. Yes line-wrapping be allowed inside the cells.
    – Elisabeth
    Dec 8 at 6:21










  • You should really, really try much harder not to load packages more than once. What exactly are you trying to achieve by loading amsmath, graphicx, array, babel, multirow, xcolor, lmodern [3 times!], textcomp, bm, dcolumn, tocbibind, tabularx [3 times!], and ragged2e twice or even three times? Absolutely nothing good -- and quite possibly something bad -- is going to result from this bad habit. After you've cleaned out the duplicates, you should probably also examine whether all packages that remain are even needed.
    – Mico
    Dec 8 at 9:58




















  • Is it important that the underlying 9 columns have the same widths? Should line-wrapping be allowed inside the cells?
    – Mico
    Dec 8 at 6:04












  • No, columns don't have same widths - it depends on situation. Yes line-wrapping be allowed inside the cells.
    – Elisabeth
    Dec 8 at 6:21










  • You should really, really try much harder not to load packages more than once. What exactly are you trying to achieve by loading amsmath, graphicx, array, babel, multirow, xcolor, lmodern [3 times!], textcomp, bm, dcolumn, tocbibind, tabularx [3 times!], and ragged2e twice or even three times? Absolutely nothing good -- and quite possibly something bad -- is going to result from this bad habit. After you've cleaned out the duplicates, you should probably also examine whether all packages that remain are even needed.
    – Mico
    Dec 8 at 9:58


















Is it important that the underlying 9 columns have the same widths? Should line-wrapping be allowed inside the cells?
– Mico
Dec 8 at 6:04






Is it important that the underlying 9 columns have the same widths? Should line-wrapping be allowed inside the cells?
– Mico
Dec 8 at 6:04














No, columns don't have same widths - it depends on situation. Yes line-wrapping be allowed inside the cells.
– Elisabeth
Dec 8 at 6:21




No, columns don't have same widths - it depends on situation. Yes line-wrapping be allowed inside the cells.
– Elisabeth
Dec 8 at 6:21












You should really, really try much harder not to load packages more than once. What exactly are you trying to achieve by loading amsmath, graphicx, array, babel, multirow, xcolor, lmodern [3 times!], textcomp, bm, dcolumn, tocbibind, tabularx [3 times!], and ragged2e twice or even three times? Absolutely nothing good -- and quite possibly something bad -- is going to result from this bad habit. After you've cleaned out the duplicates, you should probably also examine whether all packages that remain are even needed.
– Mico
Dec 8 at 9:58






You should really, really try much harder not to load packages more than once. What exactly are you trying to achieve by loading amsmath, graphicx, array, babel, multirow, xcolor, lmodern [3 times!], textcomp, bm, dcolumn, tocbibind, tabularx [3 times!], and ragged2e twice or even three times? Absolutely nothing good -- and quite possibly something bad -- is going to result from this bad habit. After you've cleaned out the duplicates, you should probably also examine whether all packages that remain are even needed.
– Mico
Dec 8 at 9:58












2 Answers
2






active

oldest

votes

















up vote
6
down vote



accepted










Like this?



enter image description here



documentclass{article}
usepackage[a4paper,margin=2.5cm]{geometry} % set suitable page parameters
usepackage[T1]{fontenc}
usepackage{lmodern,tabularx,ragged2e}
newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}
newcommandmytab[1]{%
bgroup%
setlengthextrarowheight{0pt}%
smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}%
egroup}
%%% code block to handle the OP's follow-up question -- see
%%% https://tex.stackexchange.com/a/112002/5001 for the source
usepackage[czech]{babel}
usepackage{regexpatch}
makeatletter
% Change the `-` delimiter to an active character
xpatchparametertext@cline{-}{cA-}{}{}
makeatother
%%% end of additional code

begin{document}

begin{table}[ht!]
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default: 6pt
begin{tabularx}{textwidth}{| *{4}{C|} >{hsize=1.3hsize}C| >{hsize=0.7hsize}C| *{3}{C|}}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{ c|}{P} \
hline
multicolumn{3}{|c|}{PHOEBE fotometrie a RV} &
mytab{POWR\analýza} &
mytab{Řešení\světelných\křivek a RV} &
CFF & multicolumn{3}{c|}{Model} \
cline{1-3} cline{7-9}
Řešení I & Řešení II & Řešení III & & & & malá hmotnost & střední hmotnost & velká hmotnost\
hlinehline
& & & & & & & & \
hline
& & & & & & & & \
hline
end{tabularx}
end{table}
end{document}





share|improve this answer



















  • 1




    @Elisabeth - Not knowing what you wrote in terms of LaTeX code, I have no idea how to interpret the error messages you're getting. For sure, it look like your code may differ significantly from what I wrote above.
    – Mico
    Dec 8 at 7:19






  • 1




    @Elisabeth - The problem arises from your use of the babel package with the option czech. Please see egreg's answer to the query Slovak (and Czech) babel gives problems with cmidrule and cline. In particular, do follow his instructions under the "A less invasive hack..." subheader, i.e., the code block that starts with usepackage{regexpatch} and ends with makeatother. I've also posted an update to my answer, to show how to make this patch work for the code shown here.
    – Mico
    Dec 8 at 8:10








  • 1




    @Elisabeth - Given your font size and page size settings, you should also change setlengthtabcolsep{3pt} to setlengthtabcolsep{2pt}, and change mytab{Řešení\světelných\křivek a RV} to mytab{Řešení\světel-\ných kři-\vek a RV}.
    – Mico
    Dec 8 at 8:30






  • 1




    @Elisabeth - The new problem appears to be related to your use of the cellspace package, which is something that's not related to my answer. If you have a new question about how to make the cellspace package compatible with the rest of your code, you should post a new query.
    – Mico
    Dec 8 at 9:47








  • 1




    @Elisabeth - Your use of the cellspace package was not disclosed in the version of the query upon which I constructed my answer. For what it's worth, I'm not familiar with the cellspace package. In particular, I have no idea how it interacts with one or more of the many other packages you (still) load. That's why I suggested you post a new query, in which you focus solely on the cellspace (in)compatibility matter.
    – Mico
    Dec 8 at 11:06


















up vote
3
down vote













You can try something like this:



documentclass{article}
usepackage{array}
usepackage{makecell, multirow, booktabs}
usepackage{caption}
begin{document}

begin{table}[h]
centering
caption{title}
footnotesizesetlength{extrarowheight}{2pt}
begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{c|}{P} \
hline
multicolumn{3}{|c|}{} & multirow{2}{*}{~}& & & multicolumn{3}{c|}{}\
cline{1-3} cline{7-9}
& & & & & & & & \
hline
col1 & col2 & col3 & col4 & col5 & col6 & col7 & col8 &col9 \
hline
end{tabular}
label{table}
end{table}
end{document}


enter image description here






share|improve this answer























  • Thank you very much. And please, what does this error mean [1]: i.stack.imgur.com/8JDlp.png? It appears when I add it to main file.
    – Elisabeth
    Dec 8 at 6:41












  • @Elisabeth Its difficult say without seeing the complete code. Please see this question: tex.stackexchange.com/q/166655/28557
    – nidhin
    Dec 8 at 6:52











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463770%2fhead-of-table-combination-of-cells%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
6
down vote



accepted










Like this?



enter image description here



documentclass{article}
usepackage[a4paper,margin=2.5cm]{geometry} % set suitable page parameters
usepackage[T1]{fontenc}
usepackage{lmodern,tabularx,ragged2e}
newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}
newcommandmytab[1]{%
bgroup%
setlengthextrarowheight{0pt}%
smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}%
egroup}
%%% code block to handle the OP's follow-up question -- see
%%% https://tex.stackexchange.com/a/112002/5001 for the source
usepackage[czech]{babel}
usepackage{regexpatch}
makeatletter
% Change the `-` delimiter to an active character
xpatchparametertext@cline{-}{cA-}{}{}
makeatother
%%% end of additional code

begin{document}

begin{table}[ht!]
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default: 6pt
begin{tabularx}{textwidth}{| *{4}{C|} >{hsize=1.3hsize}C| >{hsize=0.7hsize}C| *{3}{C|}}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{ c|}{P} \
hline
multicolumn{3}{|c|}{PHOEBE fotometrie a RV} &
mytab{POWR\analýza} &
mytab{Řešení\světelných\křivek a RV} &
CFF & multicolumn{3}{c|}{Model} \
cline{1-3} cline{7-9}
Řešení I & Řešení II & Řešení III & & & & malá hmotnost & střední hmotnost & velká hmotnost\
hlinehline
& & & & & & & & \
hline
& & & & & & & & \
hline
end{tabularx}
end{table}
end{document}





share|improve this answer



















  • 1




    @Elisabeth - Not knowing what you wrote in terms of LaTeX code, I have no idea how to interpret the error messages you're getting. For sure, it look like your code may differ significantly from what I wrote above.
    – Mico
    Dec 8 at 7:19






  • 1




    @Elisabeth - The problem arises from your use of the babel package with the option czech. Please see egreg's answer to the query Slovak (and Czech) babel gives problems with cmidrule and cline. In particular, do follow his instructions under the "A less invasive hack..." subheader, i.e., the code block that starts with usepackage{regexpatch} and ends with makeatother. I've also posted an update to my answer, to show how to make this patch work for the code shown here.
    – Mico
    Dec 8 at 8:10








  • 1




    @Elisabeth - Given your font size and page size settings, you should also change setlengthtabcolsep{3pt} to setlengthtabcolsep{2pt}, and change mytab{Řešení\světelných\křivek a RV} to mytab{Řešení\světel-\ných kři-\vek a RV}.
    – Mico
    Dec 8 at 8:30






  • 1




    @Elisabeth - The new problem appears to be related to your use of the cellspace package, which is something that's not related to my answer. If you have a new question about how to make the cellspace package compatible with the rest of your code, you should post a new query.
    – Mico
    Dec 8 at 9:47








  • 1




    @Elisabeth - Your use of the cellspace package was not disclosed in the version of the query upon which I constructed my answer. For what it's worth, I'm not familiar with the cellspace package. In particular, I have no idea how it interacts with one or more of the many other packages you (still) load. That's why I suggested you post a new query, in which you focus solely on the cellspace (in)compatibility matter.
    – Mico
    Dec 8 at 11:06















up vote
6
down vote



accepted










Like this?



enter image description here



documentclass{article}
usepackage[a4paper,margin=2.5cm]{geometry} % set suitable page parameters
usepackage[T1]{fontenc}
usepackage{lmodern,tabularx,ragged2e}
newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}
newcommandmytab[1]{%
bgroup%
setlengthextrarowheight{0pt}%
smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}%
egroup}
%%% code block to handle the OP's follow-up question -- see
%%% https://tex.stackexchange.com/a/112002/5001 for the source
usepackage[czech]{babel}
usepackage{regexpatch}
makeatletter
% Change the `-` delimiter to an active character
xpatchparametertext@cline{-}{cA-}{}{}
makeatother
%%% end of additional code

begin{document}

begin{table}[ht!]
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default: 6pt
begin{tabularx}{textwidth}{| *{4}{C|} >{hsize=1.3hsize}C| >{hsize=0.7hsize}C| *{3}{C|}}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{ c|}{P} \
hline
multicolumn{3}{|c|}{PHOEBE fotometrie a RV} &
mytab{POWR\analýza} &
mytab{Řešení\světelných\křivek a RV} &
CFF & multicolumn{3}{c|}{Model} \
cline{1-3} cline{7-9}
Řešení I & Řešení II & Řešení III & & & & malá hmotnost & střední hmotnost & velká hmotnost\
hlinehline
& & & & & & & & \
hline
& & & & & & & & \
hline
end{tabularx}
end{table}
end{document}





share|improve this answer



















  • 1




    @Elisabeth - Not knowing what you wrote in terms of LaTeX code, I have no idea how to interpret the error messages you're getting. For sure, it look like your code may differ significantly from what I wrote above.
    – Mico
    Dec 8 at 7:19






  • 1




    @Elisabeth - The problem arises from your use of the babel package with the option czech. Please see egreg's answer to the query Slovak (and Czech) babel gives problems with cmidrule and cline. In particular, do follow his instructions under the "A less invasive hack..." subheader, i.e., the code block that starts with usepackage{regexpatch} and ends with makeatother. I've also posted an update to my answer, to show how to make this patch work for the code shown here.
    – Mico
    Dec 8 at 8:10








  • 1




    @Elisabeth - Given your font size and page size settings, you should also change setlengthtabcolsep{3pt} to setlengthtabcolsep{2pt}, and change mytab{Řešení\světelných\křivek a RV} to mytab{Řešení\světel-\ných kři-\vek a RV}.
    – Mico
    Dec 8 at 8:30






  • 1




    @Elisabeth - The new problem appears to be related to your use of the cellspace package, which is something that's not related to my answer. If you have a new question about how to make the cellspace package compatible with the rest of your code, you should post a new query.
    – Mico
    Dec 8 at 9:47








  • 1




    @Elisabeth - Your use of the cellspace package was not disclosed in the version of the query upon which I constructed my answer. For what it's worth, I'm not familiar with the cellspace package. In particular, I have no idea how it interacts with one or more of the many other packages you (still) load. That's why I suggested you post a new query, in which you focus solely on the cellspace (in)compatibility matter.
    – Mico
    Dec 8 at 11:06













up vote
6
down vote



accepted







up vote
6
down vote



accepted






Like this?



enter image description here



documentclass{article}
usepackage[a4paper,margin=2.5cm]{geometry} % set suitable page parameters
usepackage[T1]{fontenc}
usepackage{lmodern,tabularx,ragged2e}
newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}
newcommandmytab[1]{%
bgroup%
setlengthextrarowheight{0pt}%
smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}%
egroup}
%%% code block to handle the OP's follow-up question -- see
%%% https://tex.stackexchange.com/a/112002/5001 for the source
usepackage[czech]{babel}
usepackage{regexpatch}
makeatletter
% Change the `-` delimiter to an active character
xpatchparametertext@cline{-}{cA-}{}{}
makeatother
%%% end of additional code

begin{document}

begin{table}[ht!]
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default: 6pt
begin{tabularx}{textwidth}{| *{4}{C|} >{hsize=1.3hsize}C| >{hsize=0.7hsize}C| *{3}{C|}}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{ c|}{P} \
hline
multicolumn{3}{|c|}{PHOEBE fotometrie a RV} &
mytab{POWR\analýza} &
mytab{Řešení\světelných\křivek a RV} &
CFF & multicolumn{3}{c|}{Model} \
cline{1-3} cline{7-9}
Řešení I & Řešení II & Řešení III & & & & malá hmotnost & střední hmotnost & velká hmotnost\
hlinehline
& & & & & & & & \
hline
& & & & & & & & \
hline
end{tabularx}
end{table}
end{document}





share|improve this answer














Like this?



enter image description here



documentclass{article}
usepackage[a4paper,margin=2.5cm]{geometry} % set suitable page parameters
usepackage[T1]{fontenc}
usepackage{lmodern,tabularx,ragged2e}
newcolumntype{C}{>{Centeringarraybackslashhspace{0pt}}X}
newcommandmytab[1]{%
bgroup%
setlengthextrarowheight{0pt}%
smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}%
egroup}
%%% code block to handle the OP's follow-up question -- see
%%% https://tex.stackexchange.com/a/112002/5001 for the source
usepackage[czech]{babel}
usepackage{regexpatch}
makeatletter
% Change the `-` delimiter to an active character
xpatchparametertext@cline{-}{cA-}{}{}
makeatother
%%% end of additional code

begin{document}

begin{table}[ht!]
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default: 6pt
begin{tabularx}{textwidth}{| *{4}{C|} >{hsize=1.3hsize}C| >{hsize=0.7hsize}C| *{3}{C|}}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{ c|}{P} \
hline
multicolumn{3}{|c|}{PHOEBE fotometrie a RV} &
mytab{POWR\analýza} &
mytab{Řešení\světelných\křivek a RV} &
CFF & multicolumn{3}{c|}{Model} \
cline{1-3} cline{7-9}
Řešení I & Řešení II & Řešení III & & & & malá hmotnost & střední hmotnost & velká hmotnost\
hlinehline
& & & & & & & & \
hline
& & & & & & & & \
hline
end{tabularx}
end{table}
end{document}






share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 8 at 8:35

























answered Dec 8 at 6:41









Mico

272k30369756




272k30369756








  • 1




    @Elisabeth - Not knowing what you wrote in terms of LaTeX code, I have no idea how to interpret the error messages you're getting. For sure, it look like your code may differ significantly from what I wrote above.
    – Mico
    Dec 8 at 7:19






  • 1




    @Elisabeth - The problem arises from your use of the babel package with the option czech. Please see egreg's answer to the query Slovak (and Czech) babel gives problems with cmidrule and cline. In particular, do follow his instructions under the "A less invasive hack..." subheader, i.e., the code block that starts with usepackage{regexpatch} and ends with makeatother. I've also posted an update to my answer, to show how to make this patch work for the code shown here.
    – Mico
    Dec 8 at 8:10








  • 1




    @Elisabeth - Given your font size and page size settings, you should also change setlengthtabcolsep{3pt} to setlengthtabcolsep{2pt}, and change mytab{Řešení\světelných\křivek a RV} to mytab{Řešení\světel-\ných kři-\vek a RV}.
    – Mico
    Dec 8 at 8:30






  • 1




    @Elisabeth - The new problem appears to be related to your use of the cellspace package, which is something that's not related to my answer. If you have a new question about how to make the cellspace package compatible with the rest of your code, you should post a new query.
    – Mico
    Dec 8 at 9:47








  • 1




    @Elisabeth - Your use of the cellspace package was not disclosed in the version of the query upon which I constructed my answer. For what it's worth, I'm not familiar with the cellspace package. In particular, I have no idea how it interacts with one or more of the many other packages you (still) load. That's why I suggested you post a new query, in which you focus solely on the cellspace (in)compatibility matter.
    – Mico
    Dec 8 at 11:06














  • 1




    @Elisabeth - Not knowing what you wrote in terms of LaTeX code, I have no idea how to interpret the error messages you're getting. For sure, it look like your code may differ significantly from what I wrote above.
    – Mico
    Dec 8 at 7:19






  • 1




    @Elisabeth - The problem arises from your use of the babel package with the option czech. Please see egreg's answer to the query Slovak (and Czech) babel gives problems with cmidrule and cline. In particular, do follow his instructions under the "A less invasive hack..." subheader, i.e., the code block that starts with usepackage{regexpatch} and ends with makeatother. I've also posted an update to my answer, to show how to make this patch work for the code shown here.
    – Mico
    Dec 8 at 8:10








  • 1




    @Elisabeth - Given your font size and page size settings, you should also change setlengthtabcolsep{3pt} to setlengthtabcolsep{2pt}, and change mytab{Řešení\světelných\křivek a RV} to mytab{Řešení\světel-\ných kři-\vek a RV}.
    – Mico
    Dec 8 at 8:30






  • 1




    @Elisabeth - The new problem appears to be related to your use of the cellspace package, which is something that's not related to my answer. If you have a new question about how to make the cellspace package compatible with the rest of your code, you should post a new query.
    – Mico
    Dec 8 at 9:47








  • 1




    @Elisabeth - Your use of the cellspace package was not disclosed in the version of the query upon which I constructed my answer. For what it's worth, I'm not familiar with the cellspace package. In particular, I have no idea how it interacts with one or more of the many other packages you (still) load. That's why I suggested you post a new query, in which you focus solely on the cellspace (in)compatibility matter.
    – Mico
    Dec 8 at 11:06








1




1




@Elisabeth - Not knowing what you wrote in terms of LaTeX code, I have no idea how to interpret the error messages you're getting. For sure, it look like your code may differ significantly from what I wrote above.
– Mico
Dec 8 at 7:19




@Elisabeth - Not knowing what you wrote in terms of LaTeX code, I have no idea how to interpret the error messages you're getting. For sure, it look like your code may differ significantly from what I wrote above.
– Mico
Dec 8 at 7:19




1




1




@Elisabeth - The problem arises from your use of the babel package with the option czech. Please see egreg's answer to the query Slovak (and Czech) babel gives problems with cmidrule and cline. In particular, do follow his instructions under the "A less invasive hack..." subheader, i.e., the code block that starts with usepackage{regexpatch} and ends with makeatother. I've also posted an update to my answer, to show how to make this patch work for the code shown here.
– Mico
Dec 8 at 8:10






@Elisabeth - The problem arises from your use of the babel package with the option czech. Please see egreg's answer to the query Slovak (and Czech) babel gives problems with cmidrule and cline. In particular, do follow his instructions under the "A less invasive hack..." subheader, i.e., the code block that starts with usepackage{regexpatch} and ends with makeatother. I've also posted an update to my answer, to show how to make this patch work for the code shown here.
– Mico
Dec 8 at 8:10






1




1




@Elisabeth - Given your font size and page size settings, you should also change setlengthtabcolsep{3pt} to setlengthtabcolsep{2pt}, and change mytab{Řešení\světelných\křivek a RV} to mytab{Řešení\světel-\ných kři-\vek a RV}.
– Mico
Dec 8 at 8:30




@Elisabeth - Given your font size and page size settings, you should also change setlengthtabcolsep{3pt} to setlengthtabcolsep{2pt}, and change mytab{Řešení\světelných\křivek a RV} to mytab{Řešení\světel-\ných kři-\vek a RV}.
– Mico
Dec 8 at 8:30




1




1




@Elisabeth - The new problem appears to be related to your use of the cellspace package, which is something that's not related to my answer. If you have a new question about how to make the cellspace package compatible with the rest of your code, you should post a new query.
– Mico
Dec 8 at 9:47






@Elisabeth - The new problem appears to be related to your use of the cellspace package, which is something that's not related to my answer. If you have a new question about how to make the cellspace package compatible with the rest of your code, you should post a new query.
– Mico
Dec 8 at 9:47






1




1




@Elisabeth - Your use of the cellspace package was not disclosed in the version of the query upon which I constructed my answer. For what it's worth, I'm not familiar with the cellspace package. In particular, I have no idea how it interacts with one or more of the many other packages you (still) load. That's why I suggested you post a new query, in which you focus solely on the cellspace (in)compatibility matter.
– Mico
Dec 8 at 11:06




@Elisabeth - Your use of the cellspace package was not disclosed in the version of the query upon which I constructed my answer. For what it's worth, I'm not familiar with the cellspace package. In particular, I have no idea how it interacts with one or more of the many other packages you (still) load. That's why I suggested you post a new query, in which you focus solely on the cellspace (in)compatibility matter.
– Mico
Dec 8 at 11:06










up vote
3
down vote













You can try something like this:



documentclass{article}
usepackage{array}
usepackage{makecell, multirow, booktabs}
usepackage{caption}
begin{document}

begin{table}[h]
centering
caption{title}
footnotesizesetlength{extrarowheight}{2pt}
begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{c|}{P} \
hline
multicolumn{3}{|c|}{} & multirow{2}{*}{~}& & & multicolumn{3}{c|}{}\
cline{1-3} cline{7-9}
& & & & & & & & \
hline
col1 & col2 & col3 & col4 & col5 & col6 & col7 & col8 &col9 \
hline
end{tabular}
label{table}
end{table}
end{document}


enter image description here






share|improve this answer























  • Thank you very much. And please, what does this error mean [1]: i.stack.imgur.com/8JDlp.png? It appears when I add it to main file.
    – Elisabeth
    Dec 8 at 6:41












  • @Elisabeth Its difficult say without seeing the complete code. Please see this question: tex.stackexchange.com/q/166655/28557
    – nidhin
    Dec 8 at 6:52















up vote
3
down vote













You can try something like this:



documentclass{article}
usepackage{array}
usepackage{makecell, multirow, booktabs}
usepackage{caption}
begin{document}

begin{table}[h]
centering
caption{title}
footnotesizesetlength{extrarowheight}{2pt}
begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{c|}{P} \
hline
multicolumn{3}{|c|}{} & multirow{2}{*}{~}& & & multicolumn{3}{c|}{}\
cline{1-3} cline{7-9}
& & & & & & & & \
hline
col1 & col2 & col3 & col4 & col5 & col6 & col7 & col8 &col9 \
hline
end{tabular}
label{table}
end{table}
end{document}


enter image description here






share|improve this answer























  • Thank you very much. And please, what does this error mean [1]: i.stack.imgur.com/8JDlp.png? It appears when I add it to main file.
    – Elisabeth
    Dec 8 at 6:41












  • @Elisabeth Its difficult say without seeing the complete code. Please see this question: tex.stackexchange.com/q/166655/28557
    – nidhin
    Dec 8 at 6:52













up vote
3
down vote










up vote
3
down vote









You can try something like this:



documentclass{article}
usepackage{array}
usepackage{makecell, multirow, booktabs}
usepackage{caption}
begin{document}

begin{table}[h]
centering
caption{title}
footnotesizesetlength{extrarowheight}{2pt}
begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{c|}{P} \
hline
multicolumn{3}{|c|}{} & multirow{2}{*}{~}& & & multicolumn{3}{c|}{}\
cline{1-3} cline{7-9}
& & & & & & & & \
hline
col1 & col2 & col3 & col4 & col5 & col6 & col7 & col8 &col9 \
hline
end{tabular}
label{table}
end{table}
end{document}


enter image description here






share|improve this answer














You can try something like this:



documentclass{article}
usepackage{array}
usepackage{makecell, multirow, booktabs}
usepackage{caption}
begin{document}

begin{table}[h]
centering
caption{title}
footnotesizesetlength{extrarowheight}{2pt}
begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|}
hline
multicolumn{3}{|c|}{M} & multicolumn{2}{c|}{C} & R & multicolumn{3}{c|}{P} \
hline
multicolumn{3}{|c|}{} & multirow{2}{*}{~}& & & multicolumn{3}{c|}{}\
cline{1-3} cline{7-9}
& & & & & & & & \
hline
col1 & col2 & col3 & col4 & col5 & col6 & col7 & col8 &col9 \
hline
end{tabular}
label{table}
end{table}
end{document}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 8 at 6:30

























answered Dec 8 at 6:22









nidhin

3,324927




3,324927












  • Thank you very much. And please, what does this error mean [1]: i.stack.imgur.com/8JDlp.png? It appears when I add it to main file.
    – Elisabeth
    Dec 8 at 6:41












  • @Elisabeth Its difficult say without seeing the complete code. Please see this question: tex.stackexchange.com/q/166655/28557
    – nidhin
    Dec 8 at 6:52


















  • Thank you very much. And please, what does this error mean [1]: i.stack.imgur.com/8JDlp.png? It appears when I add it to main file.
    – Elisabeth
    Dec 8 at 6:41












  • @Elisabeth Its difficult say without seeing the complete code. Please see this question: tex.stackexchange.com/q/166655/28557
    – nidhin
    Dec 8 at 6:52
















Thank you very much. And please, what does this error mean [1]: i.stack.imgur.com/8JDlp.png? It appears when I add it to main file.
– Elisabeth
Dec 8 at 6:41






Thank you very much. And please, what does this error mean [1]: i.stack.imgur.com/8JDlp.png? It appears when I add it to main file.
– Elisabeth
Dec 8 at 6:41














@Elisabeth Its difficult say without seeing the complete code. Please see this question: tex.stackexchange.com/q/166655/28557
– nidhin
Dec 8 at 6:52




@Elisabeth Its difficult say without seeing the complete code. Please see this question: tex.stackexchange.com/q/166655/28557
– nidhin
Dec 8 at 6:52


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463770%2fhead-of-table-combination-of-cells%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Сан-Квентин

Алькесар

Josef Freinademetz