The following LaTeX code was saved in ~\Test.tex.
\documentclass{article}
\usepackage{cleveref}
\begin{document}
\begin{equation}\label{q}
x \leq y
\end{equation}
Behold~\cref{q}.
\end{document}
Then the following commands were executed in the Terminal.
> cd ~
> lualatex Test
Consequently a PDF file was generated in ~\Test.pdf. When opened in a PDF viewer, the file displayed as follows. (I screencaptured only the relevant part of the display.)
I would like to create an equality-like environment named inequality, which will be used to typeset inequalities, and whose cross-reference will read ineq. instead of eq. . The effect of this new feature should be such that if in the above LaTeX code the two occurrences of equality are replaced by inequality, the resulting PDF file will be almost the same as before, except that the abbreviation eq. will be replaced by ineq.. The new inequality environment should share a counter with the equality environment.
An attempt
I tried carrying out my goal using the following code.
\documentclass{article}
\usepackage{cleveref}
\newenvironment{inequality}{\begin{equation}}{\end{equation}}
\crefname{inequality}{ineq.}{ineqs.}
\Crefname{inequality}{Ineq.}{Ineqs.}
\begin{document}
\begin{inequality}\label{q}
x \leq y
\end{inequality}
Behold~\cref{q}.
\end{document}
However, the resulting PDF file looked the same as before. In particular the cross-reference was written as eq., and not as ineq.


ineqthat employs theequationcounter (and goes on to show how to create\cref-based cross-references). – Mico Dec 06 '22 at 05:50