4

So I have a long equation and I give it a label, what I want to do is call that entire equation in another page without retype the same equation.

e.g

\begin{equation}
    \label{eq1}
    a + b = c
\end{equation}

----------- on another page

reminder to previous equation : a + b = c

I dont want to retype the bold equation, but just call it, can I do that thank you

maulana
  • 41
  • 2
  • 1
    Duplicate of https://tex.stackexchange.com/questions/75831/how-do-i-show-the-equation-formula-again-instead-of-its-number-of-ref?noredirect=1&lq=1? – Torbjørn T. Dec 20 '17 at 20:31

1 Answers1

6

Relies on \literallabel{<label>}{<content>} to remember the equation label and content, and then \literalref{<label>} to recall the content in inline math mode.

EDITED to provide 2nd technique (uses environ package):

\begin{literaleq}{<label>}
  <content>
\end{literaleq}

which still uses the same recall syntax: \literalref{<label>}

\documentclass{article}
\usepackage{environ}
\newcommand\literallabel[2]{%
  \label{#1}
  \expandafter\gdef\csname literallabel_#1\endcsname{#2}
  #2
}
\NewEnviron{literaleq}[1]{%
  \begin{equation}
  \label{#1}
  \expandafter\gdef\csname literallabel_#1\expandafter\endcsname\expandafter{\BODY}
  \BODY
  \end{equation}%
}
\newcommand\literalref[1]{$\csname literallabel_#1\endcsname$}
\begin{document}
\begin{equation}
    \literallabel{eq1}
    {a + b = c}
\end{equation}
blah blah
reminder to equation~\ref{eq1}: \literalref{eq1}

Now with a literaleq
\begin{literaleq}{eq:leq2}
  E = mc^2
\end{literaleq}
Continuing, can I recall equation~\ref{eq:leq2}?  \literalref{eq:leq2}
\end{document}

enter image description here

  • Note: I took the OP's reference to "bold" only as an indicator of the content to be recalled. If it were actually desired to recall the literal content in bold, then \newcommand\literalref[1]{$\bm{\csname literallabel_#1\endcsname}$} with the bm package would do... – Steven B. Segletes Dec 20 '17 at 11:12