I'm trying to write a table in LaTeX using multirows and multicolumns right in the header. I managed to get it just like I want it with this code (which I compiled easily in overleaf):
\documentclass[12pt,a4paper]{article}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\usepackage[margin=3cm]{geometry}% http://ctan.org/pkg/geometry
\usepackage{multirow}
\usepackage{array}
\begin{document}
\setlength\extrarowheight{2pt}%%precisei definir isso para dar meis espaço para a bottom rule da tabela
\noindent
\small
\centering
\begin{tabular}{ccccc}
\toprule
\multirow{2}{*}{\parbox{0.15\linewidth}{\centering Dimensão da Teoria do Fluxo}} \multirow{2}{*}{\parbox{0.15\linewidth}{\centering Componente do Framework}} & \multicolumn{3}{c}{\parbox{0.7\linewidth}{\centering Heurísticas}} \\ %%defini parboxes para setar as dimensões de cada coluna de acordo com a margem do texto.
\cmidrule{2-4}
& &
\parbox{0.1\linewidth}{\centering N} &
\parbox{0.3\linewidth}{\centering Descrição detalhada} &
\parbox{0.3\linewidth}{\centering Referências CALL} \\
\midrule
\bottomrule
\end{tabular}
\end{document}
It gives me the following table:
However, as soon as I enter some lines, the table gets stretched and it's not entering data according to my 5-cell rule, I don't know why!
{}
, this formats code in the question, hope someone can help!