1

Sorry I tried to see other answers but I can't solve the issue. My table is out of margin. This is the code:

\centering

\begin{tabularx}{\linewidth}{lXX} \rowcolor{cyan} \multicolumn{2}{c}{\textit{\textbf{USE CASE #1}}} & \multicolumn{1}{c}{\textit{\textbf{Improvements of a subject}}} \tabularnewline \textbf{Goal context} & \multicolumn{2}{|c|}{Conoscere gli sviluppi di una materia} \tabularnewline \midrule \textbf{Preconditions} & \multicolumn{2}{c}{Lo studente deve aver svolto almeno due esercizi di una stessa materia} \tabularnewline \midrule \textbf{Success end condition} & \multicolumn{2}{c}{Lo studente viene a conoscenza degli sviluppi di una materia} \tabularnewline \midrule \textbf{Failed end condition} & \multicolumn{2}{c}{ la macchina non trova i valori richiesti o \newline lo studente ha svolto meno die due esercizi }\tabularnewline \midrule \textbf{Primary Actor} & \multicolumn{2}{|c|}{Lo studente} \tabularnewline \midrule \textbf{Trigger} & \multicolumn{2}{|c|}{Lo studente tramite comando vocale seleziona l'opzione dal menù} \tabularnewline \bottomrule

\rowcolor{cyan} \multicolumn{3}{c}{\textit{\textbf{Descrizione}}} \tabularnewline \rowcolor{cyan} \textbf{Step} & \textbf{Studente} & \textbf{Sistema} \end{tabularx} \caption{tabularx-version with booktabs: Brief overview of all economic schools and their understanding of cyclical drivers.\cite{BormotovMichael2009}} \label{table:economicSchools3}

\end{table}

David Carlisle
  • 757,742

1 Answers1

1

Structure of your table is not enterally clear to me. I have problems with intention if the last two table rows.

Anyway, source of your problem is already explained in comments above, so here is possible solution how to write your table with use of the tabularray package:

\documentclass{article}
\usepackage{xcolor}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}

\begin{document} \begin{table} \centering \begin{tblr}{colspec = {Q[l, font=\bfseries] X[j] X[j]}, row{1,Y} = {font=\itshape\bfseries, bg=cyan}, row{Z} = {font=\bfseries}, hspan = minimal } \toprule USE CASE #1 &\SetCell[c=2]{c} Improvements of a subject
& \ \midrule Goal context &\SetCell[c=2]{j} Conoscere gli sviluppi di una materia & \ Preconditions &\SetCell[c=2]{j} Lo studente deve aver svolto almeno due esercizi di una stessa materia & \ Success end condition
&\SetCell[c=2]{j} Lo studente viene a conoscenza degli sviluppi di una materia & \ Failed end condition &\SetCell[c=2]{j} la macchina non trova i valori richiesti o \newline lo studente ha svolto meno die due esercizi & \ Primary Actor &\SetCell[c=2]{j} Lo studente & \ Trigger &\SetCell[c=2]{j} Lo studente tramite comando vocale seleziona l'opzione dal menù & \ \midrule \SetCell[c=3]{c} Descrizione & & \ \midrule Step & Studente
& Sistema \
\bottomrule \end{tblr}

\caption{tabularx-version with booktabs: Brief overview of all economic schools and their understanding of cyclical drivers.\cite{BormotovMichael2009}} \label{table:economicSchools3}

\end{table} \end{document}

enter image description here

Zarko
  • 296,517