\documentclass[parskip=full]{scrartcl}

\usepackage[colorlinks]{hyperref}
\usepackage[capitalise,nameinlink]{cleveref}
\usepackage{refenums}

%Always add a dot behind the definition
\renewcommand{\refenumenclosing}[1]{#1.}


\begin{document}

\title{Demonstration of the refenums package}
\date{}
\author{}
\maketitle

\vspace{-12ex}
This documents demonstrates the usage and results of the \href{http://www.ctan.org/pkg/refenums}{refenums} package.
All content appearing in this work is fictitious.
Any resemblance to real artefacts, items, or persons, living or dead, is purely coincidental.

\Crefrange{sec:reqs}{sec:milestones} show defined referenceable enums.
\Cref{sec:discussion} references the defined enums.

\tableofcontents
\clearpage

%Setup ``requirements''
\setupRefEnums{R}{Requirement}

%Setup ``capabilities'', without any separator
\setupRefEnums[]{C}{Capability}

%Setup ``Notes'' showing the usage of defineReferenceableEnumElementInline
\setupRefEnums{N}{Note}

%Setup ``Steps'' not having a print form
\setupRefEnums[ ]{Step}{ONLYSHORT}

%Setup ``Issue'' not having a print form
\setupRefEnums[ ]{Issue}{ONLYSHORT}

%Setup ``Milestones'' where the print name and the short name is combined
\setupRefEnums[COMBINED]{M}{Milestone}


\section{Requirements}
\label{sec:reqs}
\defRefEnum{R}{Scalability}{sca}
We see scalability as important requirement.

\defRefEnum{R}{Portability}{port}
We also see portability as important requirement.


\section{Capabilities}
\defRefEnum{C}{Maintainability}{maint}

\section{Notes}
\defRefEnumInline{N}{Blue}{blue} It should be a blue note, shouldn't it?
\defRefEnumInline{N}{Red}{Red} There should also be a red note, shouldn't it?


\section{Steps}
\label{sec:steps}

\defRefEnum[subsection]{Step}{Requirements Analysis}{rqa}
\label{sec:rqa}
The heading is defined using the macro.

\defRefEnum[subsection]{Step}{Software Specification}{spec}
The heading is defined using the macro.

\section{Other Steps}
\label{sec:osteps}

This section shows how an enum can be reused.
One has to take care to use different labels as in the first usage.

\setcounter{Step}{0}
\defRefEnumInline{Step}{Think}{think} First think.
\defRefEnumInline{Step}{Work}{work} Then work.

\section{Issues}
\defRefEnum{Issue}{Fictional}{fi}

\defRefEnum{Issue}{Unrealistic}{unr}


\section{Milestones}
\label{sec:milestones}
\defRefEnum[subsection]{M}{Basic Model}{bm}


\section{Discussion}
\label{sec:discussion}
In \cref{sec:reqs}, we discussed \refEnumFull{R}{sca} and \refEnumFull{R}{port}.

We showed the capability \refEnumFull{C}{maint}.

We also had a note \refEnumFull{N}{blue}.

In \cref{sec:steps}, we started with \refEnumFull{Step}{rqa}.
\LaTeX{} put that step into \cref{sec:rqa}.
Afterwards, \refEnumFull{Step}{spec} has been described.

We reused the enumeration environment for other steps in \cref{sec:osteps}.
There, we started with \refEnumFull{Step}{think}.

Some issues such as \refEnumFull{Issue}{fi} were raised.

First, the milestone \refEnumFull{M}{bm} has to be reached.

Following properties are the most important ones:
\begin{itemize}
\item \refEnumFullT{R}{sca}
\item \ldots
\end{itemize}

\end{document}