[Tex/LaTex] How to merge cells correctly in tabu

multicolumnmultirowtabu

I have a tabu table, and I need to make a table like this:
(I don't know how to create correctly 5th column)

enter image description here

Right now my code look like this:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}  % Включаем пакет для поддержки русского
\usepackage{tabu}
\usepackage[a4paper, portrait, margin=1in, hmargin=2cm, top=4cm, bottom=4cm, headheight=3cm, footskip=2.5cm]{geometry}

{\small \begin{center}
\tabulinesep=0.5mm
\begin{tabu} to \textwidth { | X[0.1,l,p] | X[0.8,l,p] |  X[0.5,l,p] | X[0.8,l,p] | X[0.8,l,p] |   }
\hline
 \textbf{№} & \textbf{Описание отклонения:}  & \textbf{Департамент:} & \textbf{Идентифицированный риск} & \textbf{Не идентифицированный риск 1}     \\ \hline
  1 & Отклонение 1  & Департамент 1 & Риск 1 & Описание не идентифицированного риска  \\ \hline
 \end{tabu}
\end{center}
\end{document}

enter image description here

Best Answer

I don't expect you still need an answer as it's been so long, but for posterity:

The tabu documentation: page 12/101 section 2.3 of tabu documentation provides a multicolumn demo that I combined with multirow. Please forgive the horrible translation, I didn't want to fight with the character map on my computer.

I prefer longtable, so I have included a crude implementation of both below.

Tabu Version

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}  % Включаем пакет для поддержки русского
\usepackage{tabu}
\usepackage[a4paper, portrait, margin=1in, hmargin=2cm, top=4cm, bottom=4cm, headheight=3cm, footskip=2.5cm]{geometry}

\usepackage{multirow}

\begin{document}

{\small \begin{center}
\tabulinesep=0.5mm

% DEMO from page 12/101 section 2.3 of tabu documentation
%\begin{tabu}{|X|X|X[2]|} \tabucline-
%   a & b & c \\ \tabucline-
%   \multicolumn2{|c|}{Hello} & World \\ \tabucline-
%   \tabuphantomline
%\end{tabu}


\begin{tabu} to \textwidth { | X[0.1,l,p] | X[0.8,l,p] |  X[0.5,l,p] | X[0.8,l,p] | X[0.8,l,p] |  X[0.8,l,p] | }
    \hline
    \textbf{№} & \textbf{Description of deviation:}  & \textbf{Department:} & \textbf{Identified risk} & \multicolumn2{|c|}{\textbf{Not Identified risk 1}}     \\ \hline
    \multirow{2}{*}{1} & \multirow{2}{*}{Deviation 1}  & \multirow{2}{*}{Department of 1} & \multirow{2}{*}{Risk 1} & Description no identified risk & Our Risk 1  \\ \cline{5-6}
    & & & & Objecct/Process during which risk appeared & Object 1  \\ \hline

  \tabuphantomline
\end{tabu}
\end{center}
\end{document}

enter image description here

Long table Version

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}  % Включаем пакет для поддержки русского
\usepackage[a4paper, portrait, margin=1in, hmargin=2cm, top=4cm, bottom=4cm, headheight=3cm, footskip=2.5cm]{geometry}

\usepackage{environ,longtable,threeparttablex,booktabs,multirow,array,adjustbox,supertabular}% table adjustment packages

% Wrapping text in multicolumn:  http://tex.stackexchange.com/questions/115668/wrapping-text-in-multicolumn
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
%http://tex.stackexchange.com/questions/70919/vertical-aligning-in-longtable-environment

\begin{document}

{\small \begin{center}
\begin{longtable}[l]{| L{0.025\textwidth} | L{0.1\textwidth} | L{0.15\textwidth} | L{0.2\textwidth} | L{0.3\textwidth} | L{0.15\textwidth} |}

    \hline
    \textbf{№} & \textbf{Description of deviation:}  & \textbf{Department:} & \textbf{Identified risk} & \multicolumn2{|c|}{\textbf{Not Identified risk 1}}     \\ \hline
    \multirow{2}{*}{1} & \multirow{2}{*}{Deviation 1}  & \multirow{2}{*}{Department of 1} & \multirow{2}{*}{Risk 1} & Description no identified risk & Our Risk 1  \\ \cline{5-6}
    & & & & Objecct/Process during which risk appeared & Object 1  \\ \hline
\end{longtable}
\end{center}
\end{document}

enter image description here

Related Question