Head of table - combination of cells
How to make head of table like in the picture? Thank you
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
add a comment |
How to make head of table like in the picture? Thank you
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
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 loadingamsmath
,graphicx
,array
,babel
,multirow
,xcolor
,lmodern
[3 times!],textcomp
,bm
,dcolumn
,tocbibind
,tabularx
[3 times!], andragged2e
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
add a comment |
How to make head of table like in the picture? Thank you
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
How to make head of table like in the picture? Thank you
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
tables
edited Dec 8 at 10:16
asked Dec 8 at 5:14
Elisabeth
4396
4396
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 loadingamsmath
,graphicx
,array
,babel
,multirow
,xcolor
,lmodern
[3 times!],textcomp
,bm
,dcolumn
,tocbibind
,tabularx
[3 times!], andragged2e
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
add a comment |
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 loadingamsmath
,graphicx
,array
,babel
,multirow
,xcolor
,lmodern
[3 times!],textcomp
,bm
,dcolumn
,tocbibind
,tabularx
[3 times!], andragged2e
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
add a comment |
2 Answers
2
active
oldest
votes
Like this?
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}
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 thebabel
package with the optionczech
. 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 withusepackage{regexpatch}
and ends withmakeatother
. 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 changesetlengthtabcolsep{3pt}
tosetlengthtabcolsep{2pt}
, and changemytab{Řešení\světelných\křivek a RV}
tomytab{Ř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 thecellspace
package, which is something that's not related to my answer. If you have a new question about how to make thecellspace
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 thecellspace
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 thecellspace
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 thecellspace
(in)compatibility matter.
– Mico
Dec 8 at 11:06
|
show 8 more comments
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}
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
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Like this?
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}
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 thebabel
package with the optionczech
. 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 withusepackage{regexpatch}
and ends withmakeatother
. 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 changesetlengthtabcolsep{3pt}
tosetlengthtabcolsep{2pt}
, and changemytab{Řešení\světelných\křivek a RV}
tomytab{Ř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 thecellspace
package, which is something that's not related to my answer. If you have a new question about how to make thecellspace
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 thecellspace
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 thecellspace
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 thecellspace
(in)compatibility matter.
– Mico
Dec 8 at 11:06
|
show 8 more comments
Like this?
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}
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 thebabel
package with the optionczech
. 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 withusepackage{regexpatch}
and ends withmakeatother
. 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 changesetlengthtabcolsep{3pt}
tosetlengthtabcolsep{2pt}
, and changemytab{Řešení\světelných\křivek a RV}
tomytab{Ř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 thecellspace
package, which is something that's not related to my answer. If you have a new question about how to make thecellspace
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 thecellspace
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 thecellspace
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 thecellspace
(in)compatibility matter.
– Mico
Dec 8 at 11:06
|
show 8 more comments
Like this?
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}
Like this?
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}
edited Dec 8 at 8:35
answered Dec 8 at 6:41
Mico
273k30369756
273k30369756
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 thebabel
package with the optionczech
. 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 withusepackage{regexpatch}
and ends withmakeatother
. 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 changesetlengthtabcolsep{3pt}
tosetlengthtabcolsep{2pt}
, and changemytab{Řešení\světelných\křivek a RV}
tomytab{Ř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 thecellspace
package, which is something that's not related to my answer. If you have a new question about how to make thecellspace
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 thecellspace
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 thecellspace
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 thecellspace
(in)compatibility matter.
– Mico
Dec 8 at 11:06
|
show 8 more comments
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 thebabel
package with the optionczech
. 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 withusepackage{regexpatch}
and ends withmakeatother
. 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 changesetlengthtabcolsep{3pt}
tosetlengthtabcolsep{2pt}
, and changemytab{Řešení\světelných\křivek a RV}
tomytab{Ř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 thecellspace
package, which is something that's not related to my answer. If you have a new question about how to make thecellspace
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 thecellspace
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 thecellspace
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 thecellspace
(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
|
show 8 more comments
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}
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
add a comment |
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}
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
add a comment |
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}
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}
edited Dec 8 at 6:30
answered Dec 8 at 6:22
nidhin
3,342927
3,342927
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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!], andragged2e
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