I have a problem with enumerating a list of axioms in a custom style.
For instance, if I wanted to write down the axioms that a function will have to satisfy for it to be a homomorphism of rings, I'd prefer to call the axioms (HOM1) and (HOM2). I learnt that this is achievable by using this:
A map $f$ between two rings $R$ and $S$ is called a ring homomomorphism if
they respect the algebraic structure in both of them. More precisely,
\begin{itemize}
\item[HOM1] $f(r_1+r_2)=f(r_1)+f(r_2)$
\item[HOM2] $f(r_1 \cdot r_2)=f(r_1) \cdot f(r_2)$
\end{itemize}
But the problem is, I have absolutely no way of referring to exactly one of these axioms, say in a proof, without having to "brutally" type in the (HOM1) to refer to the axiom.
This looks slightly like not knowing how to refer to an equation when there are several of them, say, in an align construct.
Any help in achieving this will be appreciated.
Best Answer
1. Auto Generated Labels:
For the case where there is a simple pattern in the list names, one could use a normal
enumerate
from theenumitem
package as follows:and then the usual
\ref{item: FirstHom}
yields the desired results:2. Manually Specified Labels (Hack Alert) :
The more general case where the labels are manually specified in an arbitrary manner requires a minor change to the format in that the list content needs to be in a
{}
:With this syntax, and some hackery, using
\ref{item: FirstGrp}
, and\ref{item: FirstRng}
yields:Notes:
It should be noted that in this answer to strange interaction between mdframed and item, egreg mentions that
which is exactly what I have done for the Manually Specified Labels version, so perhaps an alternate solution might be needed if this fails under certain circumstances.
Code: