The solonums package^{∗}

Andrew D. Lewis

1997/03/10

1 What solonums does

By loading solonums you will make your proclamations and equations be numbered consecutively throughout the document (i.e., not reset in every section or chapter). If you are using a document class which defines \chapter then the figures will be numbered consecutively as well. It uses the package removefromreset.

2 Implementation

Real easy if you have removefromreset.

1 ⟨∗solonums⟩

2

 3 \RequirePackage{removefromreset}

4

 5 \@ifundefined{theequation}{}{\renewcommand\theequation{\arabic{equation}}}
 6 \@ifundefined{thetheorem}{}{\renewcommand\thetheorem{\arabic{theorem}}}
 7 \@ifundefined{theproposition}{}{\renewcommand\theproposition{\arabic{proposition}}}
 8 \@ifundefined{thelemma}{}{\renewcommand\thelemma{\arabic{lemma}}}
 9 \@ifundefined{thesublemma}{}{\renewcommand\thesublemma{\arabic{sublemma}}}
10 \@ifundefined{thecorollary}{}{\renewcommand\thecorollary{\arabic{corollary}}}
11 \@ifundefined{theclaim}{}{\renewcommand\theclaim{\arabic{claim}}}
12 \@ifundefined{theconjecture}{}{\renewcommand\theconjecture{\arabic{conjecture}}}
13 \@ifundefined{theaxiom}{}{\renewcommand\theaxiom{\arabic{axiom}}}
14 \@ifundefined{thethesis}{}{\renewcommand\thethesis{\arabic{thesis}}}
15 \@ifundefined{thedefinition}{}{\renewcommand\thedefinition{\arabic{definition}}}
16 \@ifundefined{theremark}{}{\renewcommand\theremark{\arabic{remark}}}
17 \@ifundefined{theremarks}{}{\renewcommand\theremarks{\arabic{remarks}}}
18 \@ifundefined{theexample}{}{\renewcommand\theexample{\arabic{example}}}
19 \@ifundefined{theexamples}{}{\renewcommand\theexamples{\arabic{examples}}}
20 \@ifundefined{thecounterexample}{}{\renewcommand\thecounterexample{\arabic{counterexample}}}
21 \@ifundefined{thenotation}{}{\renewcommand\thenotation{\arabic{notation}}}
22 \@ifundefined{theproblem}{}{\renewcommand\theproblem{\arabic{problem}}}
23 \@ifundefined{theproblems}{}{\renewcommand\theproblems{\arabic{problems}}}

∗This file has version number v1.0, last revised 1997/03/10.

24 \@ifundefined{thequestion}{}{\renewcommand\thequestion{\arabic{question}}}
25 \@ifundefined{theassumption}{}{\renewcommand\theassumption{\arabic{assumption}}}
26 \@ifundefined{theassumptions}{}{\renewcommand\theassumptions{\arabic{assumptions}}}
27 \@ifundefined{chapter}{
28 \@removefromreset{equation}{section}
29 \@removefromreset{figure}{section}
30 \@removefromreset{theorem}{section}
31 \@removefromreset{proposition}{section}
32 \@removefromreset{lemma}{section}
33 \@removefromreset{sublemma}{section}
34 \@removefromreset{corollary}{section}
35 \@removefromreset{claim}{section}
36 \@removefromreset{conjecture}{section}
37 \@removefromreset{axiom}{section}
38 \@removefromreset{thesis}{section}
39 \@removefromreset{definition}{section}
40 \@removefromreset{remark}{section}
41 \@removefromreset{remarks}{section}
42 \@removefromreset{example}{section}
43 \@removefromreset{examples}{section}
44 \@removefromreset{counterexample}{section}
45 \@removefromreset{notation}{section}
46 \@removefromreset{problem}{section}
47 \@removefromreset{problems}{section}
48 \@removefromreset{question}{section}
49 \@removefromreset{assumption}{section}
50 \@removefromreset{assumption}{section}

51 } 52 {

53 \@removefromreset{equation}{chapter}
54 \@removefromreset{figure}{chapter}
55 \@removefromreset{theorem}{chapter}
56 \@removefromreset{proposition}{chapter}
57 \@removefromreset{lemma}{chapter}
58 \@removefromreset{sublemma}{chapter}
59 \@removefromreset{corollary}{chapter}
60 \@removefromreset{claim}{chapter}
61 \@removefromreset{conjecture}{chapter}
62 \@removefromreset{axiom}{chapter}
63 \@removefromreset{thesis}{chapter}
64 \@removefromreset{definition}{chapter}
65 \@removefromreset{remark}{chapter}
66 \@removefromreset{remarks}{chapter}
67 \@removefromreset{example}{chapter}
68 \@removefromreset{examples}{chapter}
69 \@removefromreset{counterexample}{chapter}
70 \@removefromreset{notation}{chapter}
71 \@removefromreset{problem}{chapter}
72 \@removefromreset{problems}{chapter}
73 \@removefromreset{question}{chapter}

74 \@removefromreset{assumption}{chapter}
75 \@removefromreset{assumption}{chapter}

76 }

77

78 ⟨/solonums⟩

I didn’t write it. I am just including it for completeness.

79 ⟨∗removefromreset⟩

80

81 \def\@removefromreset#1#2{\let\@tempb\@elt
82 \def\@tempa#1{@&#1}\expandafter\let\csname @*#1*\endcsname\@tempa
83 \def\@elt##1{\expandafter\ifx\csname @*##1*\endcsname\@tempa\else
84  \noexpand\@elt{##1}\fi}%
85 \expandafter\edef\csname cl@#2\endcsname{\csname cl@#2\endcsname}%
86 \let\@elt\@tempb
87 \expandafter\let\csname @*#1*\endcsname\@undefined}

88

89 ⟨/removefromreset⟩