# How do I show the equation formula again instead of its number of ref?

I have an equation:

$$\label{eq:equation} f(x)=x$$


I would like to refer to this equation and show the whole formula again, and not only its number. In other words, I wanna get $f(x)=x$ instead of \eqref{eq:equation}.

How do I refer to the equation in order to reproduce its formula instead of its number?

-
Welcome to TeX.sx! –  henrique Oct 8 '12 at 14:43
A tip: indent with 4 spaces the code block to format it properly or use the button with the braces ({}) above the edit window. In the case of inline code, either put the code between backticks () or select and press Ctrl+K. –  Count Zero Oct 8 '12 at 14:45
The answer to the question at tex.stackexchange.com/questions/47570/… suggests a way to write a command that "remembers" text in one place to use in another. It might work for you if you don't need to do it often. For a systematic solution, you will have to wait for one of the regulars here to chip in. –  Ethan Bolker Oct 8 '12 at 15:15

I just found this question that was asked earlier: Is it possible to re-insert a LaTeX equation by label?

It cites "Equation Reuse" from LaTeX-Community Forum as a solution.

Namely:

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}

\begin{document}

%defining the box
\newsavebox\myeq
%filling the box
\savebox\myeq{\vbox{\begin{align*}
a &= b\\
&= c\\
&= d\\
&= e\\
&= f
\end{align*}}}

%using the box
\usebox\myeq

%using the box
\usebox\myeq

%using the box
\usebox\myeq

\end{document}


Hope this helps!

-
It works pretty well. I would like to turn off the numbering when I use equation or align instead of align*. For instance, the first time the equation apear, I want to number it. The next time it apears, I want turn off the number. Anyone have an idea? –  Diogo Oct 8 '12 at 22:31
You could have the first instance be in the equation environment and define a separate box with the equation in displaymath. It's not a great solution, unfortunately. –  kanatzidis Oct 8 '12 at 23:33

This might be a solution, but I don't see how it would help the reader.

\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand{\repeatable}[2]{%
\label{#1}\global\@namedef{repeatable@#1}{#2}#2
}
\newcommand{\eqrepeat}[1]{%
\@ifundefined{repeatable@#1}{NOT FOUND}{$\@nameuse{repeatable@#1}$}%
~\eqref{#1}}
\makeatother

\begin{document}

$$\repeatable{eq:good}{f(x)=x}$$

This is seen in \eqrepeat{eq:good}.

\end{document}


@Diogo Use equation*`. But I don't find particular merits in the practice of repeating the whole equation; to be honest I consider it heavy. –  egreg Nov 27 '13 at 7:25