LaTeX: Simple referencing is another reason to use LaTeX for requirements specifications

I've written a lot of use case documents lately for software requirements specifications, and as use cases get more complex, I find the need for "sub use cases" or "alternate scenarios". When referring to these from the main use case (or anywhere else), it's nice to be able to use LaTeX's reference capability.

The LaTeX reference capability lets you refer to one part of a document from another part of the same LaTeX document, and I've found it to be really powerful when creating both PDF and HTML documents from LaTeX code (i.e., LaTeX PDF and LaTeX HTML documents).

LaTeX reference example

Without any further introduction, what I like to do is created a LaTeX document that looks like this:

\documentclass[a4paper,11pt]{article}
\author{Al Alexander}
\title{}

\begin{document}

\section{Main Use Case}

\begin{enumerate}
\item Do something 
\item Do something else
\item Do something more (branch to Sub Use Case (Section ~\ref{label:SubUseCase} on 
      page ~\pageref{label:SubUseCase}))
\item Yada yada yada
\end{enumerate}

\section{Some Other Section}

Note that there might be a lot of other stuff between the reference above and the actual section 
that I'm referring to. So, this is some fluff to simulate that possibility.


\section{\label{label:SubUseCase}Sub Use Case}

\begin{enumerate}
\item Do something 2
\item Do something else 2
\item Do something more 2
\end{enumerate}

\end{document}

This input leads to output that looks like this:

1 Main Use Case
  1. Do something
  2. Do something else
  3. Do something more (branch to Sub Use Case (Section 3 on page 1)
  4. Yada yada yada

2 Some Other Section
  Note that there might be a lot of other stuff between the reference above
  and the actual section that I?m referring to. So, this is some fluff to simulate
  that possibility.

3 Sub Use Case
  1. Do something 2
  2. Do something else 2
  3. Do something more 2b

LaTeX example - discussion

In this case I've simulated what the output looks like (rather than include a PDF document here), but I hope you can see the value of this. Simply stated, it provides a nice linking mechanism from my main use case to a Sub Use Case that is referred to.

This feature/capability is “Reason Number 94” that I use LaTeX to create my PDF and HTML requirements specification documents. :)