4

Suppose I want the output in latex to be some equation number, for example (1.1). Then we use the command

\begin{equation}
\end{equation}

Now I want the output to be $(1.1)^{p}$ for some $p$. That is I want the output to the power of an equation number.

Is there some command for that?

6
  • 1
    $\text{\eqref{<label>}}^p$ (requires package amsmath) – Henri Menke Jul 19 '20 at 8:42
  • Thank you very much. But I think there is a little misunderstanding. Suppose I use the command \begin{equation}\label{1}\end{equation}, then I get some output with an equation number, for example (1.1) but not with a power. Here I want the output an equation with a power for example (1.1)^p. – Mathlover Jul 19 '20 at 8:47
  • Then look up \tag{...} – daleif Jul 19 '20 at 8:52
  • Can you kindly elaborate a bit more. Thanks. – Mathlover Jul 19 '20 at 9:03
  • 2
    I just came here to read about the secret powers of equation numbers :) – Philipp Imhof Jul 19 '20 at 9:17
3

If p is a fixed exponent, it can easily be done with the \newtagform command from mathtools:

\documentclass{article}
\usepackage{mathtools} %
\newtagform{power}({)$ ^p $}
\counterwithin{equation}{section}

\begin{document}

\section{Fermat’s equation}

\usetagform{power}

\begin{equation}
  x^n + y^n = z^n \label{pdf}
\end{equation}
For $n = 2$, equation \eqref{pdf} is known as the \emph{Pythagorean triples} problem.

\end{document} 

enter image description here

1
  • Thank you very much. – Mathlover Jul 23 '20 at 15:47
5

You can use \tag*.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

We have a standard equation
\begin{equation}
|a+b| \le |a|+|b| \label{standard}
\end{equation}
but also its generalization to different exponents
\begin{equation}
\sqrt[\uproot{2}p]{|a|^p+|b|^p}\le |a|+|b| \tag*{(\ref{standard})\makebox[0pt][l]{$^p$}}
\end{equation}
for every $p\ge1$.

We can refer to equation~\eqref{standard} and to equation~\eqref{standard}$^p$.

\end{document}

enter image description here

2
  • What is the difference between \tag and \tag*? – LSpice Jul 19 '20 at 17:40
  • 1
    @LSpice \tag supplies the parentheses around the argument, \tag* doesn't. SInce I wanted the exponent outside the parentheses, \tag* is necessary. – egreg Jul 19 '20 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.