We are currently working on a document which contains lists of things that are identified by 'semi-numbered' identifiers in a way that is easy for humans to understand but difficult to 1:1 automate using a new counter.
(To be precise, we're tasked with numbering our 'functional and nonfunctional requirements' according to the naming scheme indicated by the professor of a university course in software architecture. Some examples are HL-1
, FR-1.2
, NFR-2.4b
)
Nonetheless We'd like to refer to these from throughout the document, as their identifier and ordering might change.
This is the reason why we are looking for a general way to define a label on a small piece of text that we can refer to (using \ref
, \nameref
or \autoref
) which should then print the name we specified rather than e.g. the name of the section it was written in.
How could this be done?
There is some overlap between this question and Link to arbitrary part of text?. However, whereas the solution posted there works well when the reference is free in deciding what to name the links, in our case we'd want to use whatever name is configured at the label to be used for all the references to it.
newenvironment
? Ornewcommand
? Could you give us a short example?