EngineeringSoftwareDesign
Tables

Description

The code is a LaTeX document that defines a table with a gray header row and alternating row colors. The table contains information related to a use case identified as "UC1 - Login". The table has several columns for different attributes of the use case, including identifier/name, importance, difficulty, actors, goal, preconditions, summary, steps, and postcondition. The information in the table provides details about the use case, such as the steps involved and the expected outcome. The table is formatted using the xcolor package, which defines a custom light blue color and sets row colors using the rowcolors command. The table is typeset within the document using the tabular environment.

Keywords

latex, table, rowcolors, tabular, rowcolor, textcolor, definecolor, documentclass.

Source Code

EngineeringSoftwareDesign

\documentclass{report}
\usepackage[table]{xcolor}
\definecolor{lightblue}{rgb}{0.93,0.95,1.0}
 
\begin{document}
 \rowcolors{1}{lightgray}{white}   %% <--- here
 \noindent
 \begin{tabular}[!ht]{>{\bfseries}l <{\raggedright}p{10cm}}
      \rowcolor{black!90}\textcolor{white}{Identifier/Name} & \textcolor{white}{\textbf{UC1 - Login}}  \\
      Importance    & 5/5\\
      Difficulty    & 1/5\\
      Actor(s)      & Generalized User\\
      Goal          & To allow the user to access the system.\\
      Preconditions & The user is at the login page. \\
      Summary       & Will validate the users name and password and subsequently give them access to the
      system.\\
      Steps         & 
                      {\begin{tabular}{@{}p{4cm} | p{4cm}@{}}
                          1. User provides username and password. & 2. System directs user to main system page. \\
                      \end{tabular}} \\
      Postcondition & \textbf{Success:} User is logged in. \newline \textbf{Failure:} The system reamins at the login state. \\
  \end{tabular}
\end{document}
Deploy to Overleaf