%% Use Cases Style File %% Created by Tom Desair (http://www.tomdesair.com) %% Downloadable at: http://www.tomdesair.com/downloads/use-case-latex-template.zip %% Date Modified: 03/04/2012 % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. %------------------------------------------------------------------------------- % Required Packages %------------------------------------------------------------------------------- \usepackage{booktabs} \usepackage{multirow} \usepackage{longtable} %------------------------------------------------------------------------------- % \addtitle command: add the title of the use case %------------------------------------------------------------------------------- \newcommand\addtitle[2]{\hline \\ [-1.5ex] \textbf{#1} &\textbf{#2}\\ [1ex] \hline \\ [-1.5ex]} \newcommand\tabularhead{\begin{longtable}{lp{8.9cm}} } %------------------------------------------------------------------------------- % \addfield command: add a property of the use case %------------------------------------------------------------------------------- \newcommand\addfield[2]{\textit{#1} \\ [1ex] \hline \\ [-1.3ex] } %------------------------------------------------------------------------------- % \addscenario command: add the main (or alternative) scenario % of the use case %------------------------------------------------------------------------------- \newcommand\addscenario[2]{ \multicolumn{2}{l}{\textit{#1}} \\ \multicolumn{2}{l}{ \begin{minipage}[t]{13.2cm} \begin{enumerate} #2 \end{enumerate} \vspace{1.3ex} \end{minipage} } \\ [1ex] \hline \\ [-1.5ex] } %------------------------------------------------------------------------------- % \additemizedfield command: add a field with an item list %------------------------------------------------------------------------------- \newcommand\additemizedfield[2]{ \begin{minipage}[t][][t]{3.5cm} \textit{#1} \vspace{1.3ex} \end{minipage}% & \begin{minipage}[t][][t]{8.9cm} \begin{itemize} #2 \end{itemize} \vspace{1.5ex} \end{minipage}\\ [1ex] \hline \\ [-1.5ex] } %------------------------------------------------------------------------------- % Definition of the use case environment %------------------------------------------------------------------------------- \newenvironment{usecase}{\tabularhead} {\end{longtable}}