Generalrecalling an equation without rewriting it?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
solomruby2018
Posts: 1
Joined: Mon Apr 23, 2018 5:40 am

recalling an equation without rewriting it?

Post by solomruby2018 »

Hello there,
When writing a very long document full of formulae, one often needs to recall them a few times at different pages. An easy way to do this is, of course, to use cross referencing, i.e. \label{} and \ref{}.
Sometimes, cross referencing is not enough since one would like to see the equation again next to the one currently discussed, without having to use hyperlinks or going through the pages of a printed document.

Is there a way to recall an equation without rewriting it?
(I mean to automatically reprint the equation when needed by using a simple reference without having to rewrite it in the source text.)

In other words, is there something like a "\recallequation{}" command that could automatically regenerate the equation?
(The reference of this new equation should remain the same than the original one.)
(Hyperlinking to the new equation should come as an option.)

For instance, today one has to rewrite the same equation again to recall and reprint it:

- Page 1 -
[...]

... energy is given by the equation \ref{eq:energy} hereafter...
\begin{equation}
e = mc^2
\label{eq:energy}
\end{equation}

[...]


- Page 1000 -
[...]

... one recalls from equation \ref{eq:energy} that energy can be obtained by the equation \ref{eq:energybis} hereafter ...

\begin{equation}
e = mc^2
\label{eq:energybis}
\end{equation}

[...]

One would instead like to write the source of Page 1000 as follows:

- Page 1000 -
[...]

... one recalls from equation \ref{eq:energy} that energy can be obtained by the equation \ref{eq:energybis} hereafter ...

\recallequation[eq:energybis]{eq:energy}
[...]

Any idea?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

recalling an equation without rewriting it?

Post by Stefan Kottwitz »

Hi,

welcome to the forum!

A good way is to put the equation into a theorem-like environment, and use thmtools to repeat it. See 1.4 Repeating theorems in the manual.

Stefan
LaTeX.org admin
Post Reply