Math & ScienceEquation reuse

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
barbarious
Posts: 1
Joined: Wed Mar 31, 2010 11:42 am

Equation reuse

Post by barbarious »

Hello all,

I would like to reuse an already defined and labeled equation further away in my text.
Is there such an option which doesn't include retyping it from scratch?

Thx, B

Recommended reading 2024:

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

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Equation reuse

Post by gmedina »

Hi,

you could "box" the equation to reuse it:

Code: Select all

\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}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply