# LaTeX template for use cases

Currently I am trying to create a template in LaTeX for my team members in order to create a set of use cases. I thought of using tabular to create something like the picture below 2 (without colors). No problem so far.

However, I hoped there is a nice way to structure the document a way, only commands have to be used, for instance \actor{1}{System user}, where 1 is use case #1.

I don't know how to approach this for sure, especially when more then one line of text is included, for instance Main path (M) (at the picture).

Has anyone an idea what would be a good way to structure such a template or could point me out the right documentation to look up this topic?

-

You should try and keep you author's interface as simple as possible. I would create an environment to simplify this and add complexity and presentational aspects on the setup.

\newenvironment{usecase}
\end{usecase}


Here is a minimal example to implement this:

\documentclass{article}
\usepackage{booktabs}

\hline
}

&\begin{minipage}[t][][t]{8cm}
\begin{enumerate} #2   \end{enumerate}
\end{minipage}\\ }

{\hline\end{tabular}}
\begin{document}
\begin{usecase}
\addrow{Precondition}{The system, shows, in the form part of an object type, the number   indication.}
\addrow{Postcondition}{A disconnected number indicating the type of other constructed object'.}
\addmulrow{Main path (M)}{\item User selects \ldots
\item System demands \ldots}
\end{usecase}

\end{document}
`

You can add counters to automatically increment numbering, if you want. I couldn't understand your numbering scheme and hence left that out of the example.

To summarize, keep the author's commands simple (they only need to deal with the semantics) and place your presentational aspects in separate commands.

-
This answer helped me a lot. I created a package and template based on it. I'm just posting this for people who are having the same problem. –  Vulcanor Apr 3 '12 at 18:11
@Vulcanor: This seems interesting. It would be very helpful if you posted an example here along with the output. Also, if you posted the original question you should associate your accounts. –  Peter Grill Apr 3 '12 at 21:35
@Vulcanor Great it worked for you. Nice blog, I bookmarked it. Drop in chat and ask one of the mods to associate your accounts as per Peter's suggestion. –  Yiannis Lazarides Apr 4 '12 at 6:46