| 1 |
\documentclass[parskip=full]{scrartcl} |
| 2 |
|
| 3 |
\usepackage[colorlinks]{hyperref} |
| 4 |
\usepackage[capitalise,nameinlink]{cleveref} |
| 5 |
\usepackage{refenums} |
| 6 |
|
| 7 |
%Always add a dot behind the definition |
| 8 |
\renewcommand{\refenumenclosing}[1]{#1.} |
| 9 |
|
| 10 |
|
| 11 |
\begin{document} |
| 12 |
|
| 13 |
\title{Demonstration of the refenums package} |
| 14 |
\date{} |
| 15 |
\author{} |
| 16 |
\maketitle |
| 17 |
|
| 18 |
\vspace{-12ex} |
| 19 |
This documents demonstrates the usage and results of the \href{http://www.ctan.org/pkg/refenums}{refenums} package. |
| 20 |
All content appearing in this work is fictitious. |
| 21 |
Any resemblance to real artefacts, items, or persons, living or dead, is purely coincidental. |
| 22 |
|
| 23 |
\Crefrange{sec:reqs}{sec:milestones} show defined referenceable enums. |
| 24 |
\Cref{sec:discussion} references the defined enums. |
| 25 |
|
| 26 |
\tableofcontents |
| 27 |
\clearpage |
| 28 |
|
| 29 |
%Setup ``requirements'' |
| 30 |
\setupRefEnums{R}{Requirement} |
| 31 |
|
| 32 |
%Setup ``capabilities'', without any separator |
| 33 |
\setupRefEnums[]{C}{Capability} |
| 34 |
|
| 35 |
%Setup ``Notes'' showing the usage of defineReferenceableEnumElementInline |
| 36 |
\setupRefEnums{N}{Note} |
| 37 |
|
| 38 |
%Setup ``Steps'' not having a print form |
| 39 |
\setupRefEnums[ ]{Step}{ONLYSHORT} |
| 40 |
|
| 41 |
%Setup ``Issue'' not having a print form |
| 42 |
\setupRefEnums[ ]{Issue}{ONLYSHORT} |
| 43 |
|
| 44 |
%Setup ``Milestones'' where the print name and the short name is combined |
| 45 |
\setupRefEnums[COMBINED]{M}{Milestone} |
| 46 |
|
| 47 |
|
| 48 |
\section{Requirements} |
| 49 |
\label{sec:reqs} |
| 50 |
\defRefEnum{R}{Scalability}{sca} |
| 51 |
We see scalability as important requirement. |
| 52 |
|
| 53 |
\defRefEnum{R}{Portability}{port} |
| 54 |
We also see portability as important requirement. |
| 55 |
|
| 56 |
|
| 57 |
\section{Capabilities} |
| 58 |
\defRefEnum{C}{Maintainability}{maint} |
| 59 |
|
| 60 |
\section{Notes} |
| 61 |
\defRefEnumInline{N}{Blue}{blue} It should be a blue note, shouldn't it? |
| 62 |
\defRefEnumInline{N}{Red}{Red} There should also be a red note, shouldn't it? |
| 63 |
|
| 64 |
|
| 65 |
\section{Steps} |
| 66 |
\label{sec:steps} |
| 67 |
|
| 68 |
\defRefEnum[subsection]{Step}{Requirements Analysis}{rqa} |
| 69 |
\label{sec:rqa} |
| 70 |
The heading is defined using the macro. |
| 71 |
|
| 72 |
\defRefEnum[subsection]{Step}{Software Specification}{spec} |
| 73 |
The heading is defined using the macro. |
| 74 |
|
| 75 |
\section{Other Steps} |
| 76 |
\label{sec:osteps} |
| 77 |
|
| 78 |
This section shows how an enum can be reused. |
| 79 |
One has to take care to use different labels as in the first usage. |
| 80 |
|
| 81 |
\setcounter{Step}{0} |
| 82 |
\defRefEnumInline{Step}{Think}{think} First think. |
| 83 |
\defRefEnumInline{Step}{Work}{work} Then work. |
| 84 |
|
| 85 |
\section{Issues} |
| 86 |
\defRefEnum{Issue}{Fictional}{fi} |
| 87 |
|
| 88 |
\defRefEnum{Issue}{Unrealistic}{unr} |
| 89 |
|
| 90 |
|
| 91 |
\section{Milestones} |
| 92 |
\label{sec:milestones} |
| 93 |
\defRefEnum[subsection]{M}{Basic Model}{bm} |
| 94 |
|
| 95 |
|
| 96 |
\section{Discussion} |
| 97 |
\label{sec:discussion} |
| 98 |
In \cref{sec:reqs}, we discussed \refEnumFull{R}{sca} and \refEnumFull{R}{port}. |
| 99 |
|
| 100 |
We showed the capability \refEnumFull{C}{maint}. |
| 101 |
|
| 102 |
We also had a note \refEnumFull{N}{blue}. |
| 103 |
|
| 104 |
In \cref{sec:steps}, we started with \refEnumFull{Step}{rqa}. |
| 105 |
\LaTeX{} put that step into \cref{sec:rqa}. |
| 106 |
Afterwards, \refEnumFull{Step}{spec} has been described. |
| 107 |
|
| 108 |
We reused the enumeration environment for other steps in \cref{sec:osteps}. |
| 109 |
There, we started with \refEnumFull{Step}{think}. |
| 110 |
|
| 111 |
Some issues such as \refEnumFull{Issue}{fi} were raised. |
| 112 |
|
| 113 |
First, the milestone \refEnumFull{M}{bm} has to be reached. |
| 114 |
|
| 115 |
Following properties are the most important ones: |
| 116 |
\begin{itemize} |
| 117 |
\item \refEnumFullT{R}{sca} |
| 118 |
\item \ldots |
| 119 |
\end{itemize} |
| 120 |
|
| 121 |
\end{document} |