blob: 2c607807cc371cad5c738ac4b8a474013ba8e821 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
%%
%% This is file `unique.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% unique.dtx (with options: `code')
%% This is a generated file.
%%
%% This file is part of the `thmtools' package.
%% The `thmtools' package has the LPPL maintenance status: maintained.
%% Current Maintainer is Ulrich M. Schwarz, ulmi@absatzen.de
%%
%% Copyright (C) 2008 by Ulrich M. Schwarz.
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, version 1.3a.
%% This version is obtainable at
%% http://www.latex-project.org/lppl/lppl-1-3a.txt
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{unique}[2007/07/29 v0.1 test for uniqueness (ulmi)]
\newcommand\setuniqmark[1]{%
\expandafter\ifx\csname uniq@now@#1\endcsname\relax
\global\@namedef{uniq@now@#1}{\uniq@ONE}%
\else
\expandafter\ifx\csname uniq@now@#1\endcsname\uniq@MANY\else
\immediate\write\@auxout{%
\string\uniq@setmany{#1}%
}%
\ifuniq{#1}{%
\uniq@warnnotunique{#1}%
}{}%
\fi
\global\@namedef{uniq@now@#1}{\uniq@MANY}%
\fi
}
\newcommand\ifuniq[1]{%
\expandafter\ifx\csname uniq@last@#1\endcsname\uniq@MANY
\expandafter \@secondoftwo
\else
\expandafter\@firstoftwo
\fi
}
\def\uniq@ONE{\uniq@ONE}
\def\uniq@MANY{\uniq@MANY}
\newif\if@uniq@rerun
\def\uniq@setmany#1{%
\global\@namedef{uniq@last@#1}{\uniq@MANY}%
\AtEndDocument{%
\uniq@warnifunique{#1}%
}%
}
\def\uniq@warnifunique#1{%
\expandafter\ifx\csname uniq@now@#1\endcsname\uniq@MANY\else
\PackageWarningNoLine{uniq}{%
`#1' is unique now.\MessageBreak
Rerun LaTeX to pick up the change%
}%
\@uniq@reruntrue
\fi
}
\def\uniq@warnnotunique#1{%
\PackageWarningNoLine{uniq}{%
`#1' is not unique anymore.\MessageBreak
Rerun LaTeX to pick up the change%
}%
\@uniq@reruntrue
}
\def\uniq@maybesuggestrerun{%
\if@uniq@rerun
\PackageWarningNoLine{uniq}{%
Uniquenesses have changed. \MessageBreak
Rerun LaTeX to pick up the change%
}%
\fi
}
\AtEndDocument{%
\immediate\write\@auxout{\string\uniq@maybesuggestrerun}%
}
\endinput
%%
%% End of file `unique.sty'.
|