TeX - LaTeX Asked on April 30, 2021
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?
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}
Correct answer by Bernard on April 30, 2021
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 $pge1$.
We can refer to equation~eqref{standard} and to equation~eqref{standard}$^p$.
end{document}
Answered by egreg on April 30, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP