Preliminary Remark:
A document may contain labels referring to equations and subequations, respectively. Moreover, some of the equations may actually represent inequalities. When using the cleveref
package, it is a common problem that all of the references are of the same form, e. g., eq. (1)
. However, it would be more intuitive for the reader, if subequations would be referred to as eqs. (1)
and inequalities as ineq. (1)
or ineqs. (1)
. One possibility to solve this problem is to define the desired references via \crefname{pluralequation}{eqs.}{eqs.}
and use optional arguments for the respective labels to override the cross-reference type, e. g., \label[pluralequation]{eq1}
; see Referencing subequations with cleveref. A similar approach can be applied to inequalities as shown in How to reference an inequality with \cref?. Thus, the cross-reference type has to be manually defined for each of the labels with this method.
My question:
However, on page 9 in the cleveref manual, one can find the paragraph:
If you need to do this [i. e., overriding the cross-reference type] frequently, it can become tedious specifying the label explicitly each time. An alternative is to use the aliascnt package. This lets you define one counter to be an alias for another, so that effectively the same counter has two names. Since cleveref determines the label type from the counter name, the two counter aliases can have different cross-reference formats whilst really being the same counter. You have to somehow arrange for the correct counter alias to be used depending on which cross-reference format you want (probably by defining two variants of the environment in question). But the effort involved might be worth the convenience of not having to remember to pass an explicit optional argument to a large number of labels.
There is a brief example how this can be realized for theorem
environments. Unfortunately, no further explanations are given for actual equation environments. Therefore, I would like to know: How can aliascnt
be utilized to properly define subequations and inequality environments so that no optional arguments are necessary for the labels?
To be more precise, I would like to understand how the approach in the cited cleveref manual is supposed to work. As written in the manual, this alternative approach with aliascnt
should be superior to the above-mentioned approach of manually overriding the cross-reference type each time I want to refer to an inequality or subequation.
equality
-like environment that shares a counter with theequality
environment, while avoiding thealiascnt
package. See here.