9

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.

4
  • The sounds like it has quite limited applicability, no? – Mariano Suárez-Álvarez Feb 10 '11 at 22:10
  • 4
    @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

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} 

enter image description here

1
  • 1
    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
1

Based on Herbert's answer, with glossaries package:

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

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

\newcommand\eqcite[1]{%
\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

Equations, list of equations and glossary

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.