Head of table - combination of cells

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}{>{\Centering\arraybackslash\hspace{0pt}}X}
\newcommand\mytab[1]{%
   \bgroup%
   \setlength\extrarowheight{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!]
\setlength\extrarowheight{2pt}
\setlength\tabcolsep{3pt}  % default: 6pt
\begin{tabularx}{\textwidth}{| *{4}{C|} 
    >{\hsize=1.3\hsize\linewidth=\hsize}C|    
    >{\hsize=0.7\hsize\linewidth=\hsize}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\\
\hline\hline
& & & & & & & & \\
\hline
& & & & & & & & \\
\hline
\end{tabularx}
\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}
\footnotesize\setlength{\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

Tags:

Tables