This is just a quick post about a $\LaTeX$ template I recently created. I’m currently doing a project on Software Architecture (designing a big and complicated application) and we had to write lots and lots of use cases. I searched the Internet for a nice $\LaTeX$ template or environment to write my use cases in, but I couldn’t find one. Therefor I created my own usecases package that adds an environment to write use cases in. I based my package on this post. You can download the template, style file and an example PDF HERE.

1. Drop the file usecases.sty in the same folder as your root $\LaTeX$ file.
2. Include the usecases package in the preamble of your root file with the command:
\usepackage{usecases}
3. Within your document, you can now use the usecase environment (make sure to take a look at the template file)

I’ll also give you a short manual:

• \begin{usecase} ... \end{usecase}: These commands define the use case. All the following commands should be within this environment.
• \addtitle{Use Case X}{Title}: This should be the first command you use in the use case environment. You can use it to show the use case number and the title.
• \addfield{Property:}{Value}: With this command, you can add a line with a use case specification. For example preconditions, postconditions, scope…
• \additemizedfield{Property:}{\item Value}: This command is similar to the \addfieldcommand but the values (must) appear in a bullet list.
• \addscenario{Scenario Name:}{\item Xth step}: Here you can specify the main (or an alternative) use case scenario. There are examples of both in the template.

In the file usecases.sty you can easily change the style for the use cases. The template you can download is based on the use case template presented in the book Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd Edition) by Craig Larman. Don’t expect too much of this template, I just created it for my project.

I hope this is useful to someone!

1. How do you add this template to Miktex 2.9?
I’ve dropped the files in the necessary folders and executed the library update, but when using the commands, TechnicCenter keeps on dropping errors.

2. thank you very much! Helped me a lot!

3. Well done, thanks a lot!

4. Thanks. Great help!

5. Thanks, useful for me during my SA project now. 😉

6. Thank you very much.

7. Thank you very much! Is it possible to add a background color to the title row? It would be an optical break and help to distinguish further use cases.

8. How can i position this fixed? The use-case I want to include is alwas positioned above the headline. I dont know where to start doing changes, can anyone give me a hint?

https://gist.github.com/brugr9/5178487

Have fun!

10. Thanks you, this template serves my needs and saves me some work.

11. Thank You I’ll use it , It is very difficult to find template regarding QA activities in Latex.
If someone has got other stuff regarding QA activities in Latex Feel free to contact me.

12. I’ll use it in my thesis, thank you!

13. Hi! I’m using it in my thesis too thx, how can I list the usecase items for being indexable like a /listoftables ?

Thx

14. Thank you for the template!

15. Thank you very much. Very simple to use and the fact that it doesn’t limit the names to use for each section of the use case is really nice. As once can just give the \addfield{anynamehere}{}.