summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/thmtools/unique.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/thmtools/unique.sty')
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/unique.sty83
1 files changed, 83 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/thmtools/unique.sty b/Master/texmf-dist/tex/latex/thmtools/unique.sty
new file mode 100644
index 00000000000..2c607807cc3
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thmtools/unique.sty
@@ -0,0 +1,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'.