summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/eqname
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:54:59 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:54:59 +0000
commitc0c7943227586b57814cdb2ad4be79c7ca0178e2 (patch)
tree852661df1a6f169c93b1c5455fce5dfc66074b5c /Master/texmf-dist/tex/latex/eqname
parentf5ac4cb6c7336696103781c1acf35a2fc90043fe (diff)
eqname
git-svn-id: svn://tug.org/texlive/trunk@871 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/eqname')
-rw-r--r--Master/texmf-dist/tex/latex/eqname/eqname.sty34
1 files changed, 34 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/eqname/eqname.sty b/Master/texmf-dist/tex/latex/eqname/eqname.sty
new file mode 100644
index 00000000000..cf8db3c2c25
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/eqname/eqname.sty
@@ -0,0 +1,34 @@
+%%% LaTeX document style option eqname.sty
+%%% Gerd Neugebauer 4/92
+%%% gerd@intellektik.informatik.th-darmstadt.de
+%%%
+%%% This style option allows named equations as follows
+%%%
+%%% 1 + 1 = 2 (17)
+%%% 1 + 2 = 3 (bingo)
+%%% 1 + 3 = 4 (18)
+%%%
+%%% This can be produced by
+%%%
+%%% \begin{eqnarray}
+%%% 1+1=2 \label{e1}\\
+%%% 1+2=3 \eqname{bingo}\label{e2}\\
+%%% 1+3=4 \label{e3}
+%%% \end{eqnarray}
+%%%
+%%% Note: The \label has to go after the \eqname command.
+%%%
+%%% Bugs & Problems:
+%%% This style option does not work with leqno.sty
+%%%
+%%%----------------------------------------------------------------------------
+
+\newif\if@eqname
+\def\@eqname{}
+\def\@eqnnum{{\reset@font\rm
+ (\if@eqname\@eqname%
+ \addtocounter{equation}{-1}%
+ \global\let\@currentlabel=\theequation%
+ \global\@eqnamefalse%
+ \else\theequation\fi)}}
+\def\eqname#1{\xdef\@eqname{#1}\global\@eqnametrue\gdef\@currentlabel{#1}}