Is there a way to use the equation
counter for referencing single symbols inside the equation instead of the whole equation? For example like this
\documentclass[10pt]{scrartcl}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\begin{document}
$$\Phi(x)\underset{(1)}{=}\lambda x~,$$
Reference (1) later in the text.
\end{document}
Whole equations and symbol references should use the same counter, so they cannot interfere with one another and the symbol reference should work in $$...$$
as well as align*
environment.
My first attempt implementing this looks like this
\documentclass[10pt]{scrartcl}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\newcommand{\oplabel}[1]{\refstepcounter{equation}(\theequation\label{#1})}
\begin{document}
$$\Phi(x)\underset{\oplabel{somename}}{=}\lambda x~,$$
Reference \eqref{somename} later in the text.
\end{document}
and it works for $$...$$
, but neither for \begin{align}...\nonumber\end{align}
nor for \begin{align*}...\end{align*}
.
Is there a way to use the equation
counter in the align*
environment too? (I know the *
stands for "no line counting", but I'd like to manually add references where I need them without numbering every line.)
$$...$$
is deprecated. Use\[...\]
. Andalign*
does not use the equation counter. Another issue is that thealign
etc. redefine\label