[Tex/LaTex] how to create a nested table

nestingtablestabularx

I searched how to create a nested table but I didn't find a solution that works for me.
What I need is to create this table.

enter image description here

Any one can help please?

Best Answer

In my opinion, your table example is more a merge/span of several rows from the column "ID scénario" than a nested table. In Excel, which seems to be your original model, this would be the equivalent of merge.

For documentation, this page provides an example, using the multirow package, under the section "Multiple rows". Let me know if you need a full example, I'll add it here below.

Bonne chance, Xavier

Edit 1 - Example 1

And here it is, this produce a similar table, with the first 2 columns being merges by rows, according to your example.

\documentclass[11pt]{article}
\usepackage{multirow}
\usepackage{tabulary}
% \usepackage{polyglossia}
% \setmainlanguage{french}

\begin{document}
\begin{table}
\begin{tabulary}{\linewidth}{|c|l|l|L|L|}
    \hline
    ID Module & Module & ID Scenario & Scenario & Priorite \\
    \hline
    1 & Gestion de l'inscription & 1.1 & En tant que & Elevee \\    
    \hline  
    \multirow{2}{*}{2} & \multirow{2}{*}{Gestion de l'inscription} & 2.1 & En tant que & Elevee \\
    & & 2.2 & En tant que & Elevee \\   
    \hline
\end{tabulary}
\end{table}

\end{document}