summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/refenums/demo.tex
blob: f74589970be7d35032097c66403f8d672b661d56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
\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}