two feature proposals, add option of label in equations and braces around references to equations
Hello
Yesterday Ulrike Fischer helped me (thanks) to locally switch from the equationautorefname equations to inequality and back
(equationautorefname)
Then I discovered that cleverref has a more general solution.
Here is a MWE
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage[colorlinks]{hyperref}
\usepackage[nameinlink]{cleveref}
\crefalias{inequality}{equation}
\crefname{inequality}{Inequality}{Inequalities}
\creflabelformat{inequality}{#2\textup{(#1)}#3}
\begin{document}
\begin{equation}
\label{Pythagoras}
a^2+b^2= c^2
\end{equation}
\begin{equation}
\label[inequality]{cauchy-schwarz}
\left(\sum_{i=1}^n x_i \cdot y_i \right)^2 \leq \left(\sum_{i=1}^n x_i^2\right) \cdot \left(\sum_{i=1}^n y_i^2\right)
\end{equation}
\begin{enumerate}
\item Pythagoras: \Cref{Pythagoras}
\item Cauchy-Schwarz \Cref{cauchy-schwarz}
\end{enumerate}
\end{document}
now cleverref is not really maintainted anymore, and it is not compatible with mathtools.
So is there any possiblity that hyperref adds a similar feature?
The other feature proposal concerns the reference to equations: Equation (1) is more standard that Equation 1. There are hacks to solve this issue, like autoref-with-braces-equation-number
Any chance to have this feature implemented in the official hyperref version?
regards
Uwe Brauer
it is not compatible with mathtools
This is news to me. I'm using both cleveref and mathtools in all my documents.
"E" == Enivex @.***> writes:
it is not compatible with mathtools This is news to me. I'm using both cleveref and mathtools in all my documents.
Hm, even with the showonlyrefs option? I quote page 25 of the cleveref manual,
Cleveref is currently incompatible with the mathtools package’s showonlyrefs option, which automatically labels only those equations that are cross-referenced. The autonum package provides a possible alternative, which im- plements similar features in a cleveref-compatible manner.
I can provide a MWE if you wish.
-- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine.
"E" == Enivex @.***> writes: it is not compatible with mathtools This is news to me. I'm using both cleveref and mathtools in all my documents. Hm, even with the showonlyrefs option? I quote page 25 of the cleveref manual,
Cleveref is currently incompatible with the mathtools package’s showonlyrefs option, which automatically labels only those equations that are cross-referenced. The autonum package provides a possible alternative, which im- plements similar features in a cleveref-compatible manner.
I can provide a MWE if you wish. …
No, I do not use that option.
No, I do not use that option.
For me, this is the essential option.
-- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine.
You may want to check out https://ctan.org/pkg/zref-clever?lang=en, which is essentially the "successor" to cleveref. Based on the documentation it seems to claim to be compatible with that option.