blob: cf8db3c2c25328101b07368d632859c97119891b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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}}
|