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.
Any one can help please?
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.
Any one can help please?
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
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}
Here is a solution without multirow, using the tabularx environmen, and a slightly different layout with makecell:
\documentclass[11pt, french]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[showframe]{geometry}
\usepackage[table, svgnames]{xcolor}
\usepackage{ tabularx, makecell}
\usepackage{ragged2e}
\begin{document}
\begin{table}
\centering\sffamily
\setlength{\extrarowheight}{3pt}
\setlength{\tabcolsep}{3pt}
\renewcommand{\theadfont}{\normalsize\bfseries\color{white}}
\rowcolors{3}{white}{AliceBlue}
\arrayrulewidth = 0.8pt
\arrayrulecolor{SkyBlue}
\begin{tabularx}{\linewidth}{|c|>{\RaggedRight\hsize=0.75\hsize}X|c|>{\RaggedRight\hsize=1.25\hsize}X|l|}
\hline
\rowcolor{SteelBlue} \thead{ID\\ Module} & \thead{Module} & \thead{ID\\ Scénario} & \thead{Scénario} & \thead{Priorité}\\
\hline
1 & Gestion de l'inscription & 1.1 & En tant qu’utilisateur, je peux créer un compte pour accéder à l’application & Élevée \\
\hline
2 & Gestion d’authentification & 2.1 & En tant qu’utilisateur, je peux m’authentifier pour accéder à mon compte& Élevée \\
\cellcolor{white} & \cellcolor{white}& 2.2 & En tant qu’utilisateur, je peux m’authentifier pour accéder à mon compte & Élevée \\
\hline
3 & Gestion des comptes & 3.1 & En tant qu’utilisateur, je veux gérer les utilisateurs de la plate-forme & Élevée \\
\cellcolor{white} & \cellcolor{white}& 3.2 & En tant qu’utilisateur, je veux gérer mon compte & Élevée \\
\hline
4 & Gestion des produits & 4.1 & En tant qu’utilisateur, je veux con\-sulter les produits de Marketplace & Élevée \\
\cellcolor{white} & \cellcolor{white} & 4.2 & En tant qu’utilisateur, je veux modifier les produits de Marketplace & Élevée \\
& &4.3 & En tant qu’utilisateur, je veux supprimer les produits de Marketplace & Élevée \\
\hline
\end{tabularx}
\end{table}
\end{document}