# How to create an equation library, to be called like bibtex?

I am newby in LateX, but I want to create an stand alone document to be used as a equation library where I can select my equations by calling them by name, and finally produce a list of equations used in the working document, or a glossary with the equation and description. Thank you in advance.

• The sounds like it has quite limited applicability, no? – Mariano Suárez-Álvarez Feb 10 '11 at 22:10
• @Mariano: Why? If you have to cite the same equations over and over again in several papers you can make good use of it. I would guess the glossaries package could be used for it, or using biblatex for it, somehow. – Martin Scharrer Feb 10 '11 at 22:17
• @Martin: Does anyone write sufficiently many papers containing the same equations (for I assume no one sanely repeats the same equation in a paper many times...), of sufficient complexity each to justofy not simply retyping them, to make this significative? Only the remarkable notational consistency implied such a feat implies is worthy of praise! – Mariano Suárez-Álvarez Feb 11 '11 at 20:37
• @Mariano: I published only five papers so far and already had the same idea. And then there are also: thesis, presentation and, if you are a lecture, class notes, etc... Re-typing is out of the question for more complex equation. Ok, then there is still Copy&Paste. – Martin Scharrer Feb 11 '11 at 20:46

## 2 Answers

can be improved for your needs

\documentclass[12pt]{article}
\usepackage{float}
\newfloat{EQN}{H}{eqn}
\begin{document}

\begin{EQN}
\begin{equation}
y=f(x)
\end{equation}
\caption{my first equation}
\end{EQN}

\begin{EQN}
\begin{equation}
y=f(x)
\end{equation}
\caption{my second equation}
\end{EQN}

\listof{EQN}{my equations}

\end{document} • I think part of what the OP wants is to call equations several times, like you might cite the same book several times... – Seamus Feb 10 '11 at 22:56

Based on Herbert's answer, with glossaries package:

\documentclass[a4paper]{article}
\usepackage{glossaries}

\usepackage{float}
\newfloat{EQN}{H}{eqn}

\newcommand\eqcite{%
\begin{EQN}%
\begin{equation}%
\glssymbol{#1}%
\end{equation}%
\caption{\glsentryname{#1}}
\end{EQN}
}

\loadglsentries{glossdata.tex}
\makeglossaries

\begin{document}
\eqcite{eq1}
\eqcite{eq2}

\listof{EQN}{My equations}
\printglossaries
\end{document}


Your database is in file glossdata.tex

\newglossaryentry{eq1}{
name={First equation}
,symbol={y=f(x)}
,description={Some equation}
}
\newglossaryentry{eq2}{
name={Second equation}
,symbol={y=a+f(x)}
,description={Another equation}
}


To get list of descriptions, you have to run some indexing program, makeglossaries, makeindex or xindy.

makeglossaries nameofyourdocument 