I have these equations with one label:
\section{This is super math section}
\begin{eqnarray}
c + d \\
\label{eq:eq2}
a + b
\end{eqnarray}
But how to do if I want get the section number where is the equation placed and make reference to this section (from the number)?
Equation \eqref{eq:eq2} on page \pageref{eq:eq2} in section \???{eq:eq2} is brilliant!
EDIT: using ref to definition environmet.
\documentclass[a4paper,11pt,twocolumn]{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{yhmath}
\usepackage{cleveref}
\theoremstyle{definition}
\newtheorem{defi}{Definition}[section]
\begin{document}
Definition \ref{def:def1} on page \pageref{def:def1} in section \cref{def:def1} is brilliant!
\section{Definitions}
\begin{defi}\label{def:def1}
This is body of definition.
\end{defi}
\end{document}
Giving: Definition 1.1 on page 1 in section Definition 1.1 is brilliant!
Need: Definition 1.1 on page 1 in section 1 is brilliant!
\label
statement immediately following the\section
statement. E.g., you might write\section{This is a super math section} \label{sec:supermath}
. Elsewhere in the document, you'd write "as is shown inSection~\ref{sec:supermath}
, ..." Incidentally, don't use theeqnarray
environment. Instead, learn to use thealign
environment provided by theamsmath
package.