summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:54:09 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:54:09 +0000
commitc0329927c34c03827e08a56ae4c4f8cc9165f203 (patch)
tree0b59d5a1f01691bf778384a2fe07a094456edf11 /Master/texmf-dist/tex
parentac62703bb41d6c1d0a42740965c508d0f9db377f (diff)
diagnose
git-svn-id: svn://tug.org/texlive/trunk@822 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/diagnose/diagnose.sty59
1 files changed, 59 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/diagnose/diagnose.sty b/Master/texmf-dist/tex/latex/diagnose/diagnose.sty
new file mode 100644
index 00000000000..e9a6e414a47
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/diagnose/diagnose.sty
@@ -0,0 +1,59 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% File: diagnose.sty
+% Author: Oliver Corff
+% Date: April 10, 2001
+% Version: 0.2
+% Copyright: Ulaanbaatar, Beijing, Berlin, Shanghai
+%
+% Description: Diagnostic Functions
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% ------------------- identification -------------------
+\ProvidesFile{diagnose.sty}
+ [2000/11/01 v0.2 Diagnostic Utility]
+
+\newif\ifmessagetext
+
+\newcommand{\TextMessageNo}{
+ \messagetextfalse
+}
+
+\newcommand{\TextMessageYes}{
+ \messagetexttrue
+}
+
+\newcommand{\TextMessage}[1]{%
+ \ifmessagetext %
+ #1%
+ \fi %
+}
+
+\newcommand{\TokenDiagnostics}[4]{%
+ \newcounter{#2}% % Counter name
+ \ifx#1\undefined % Token name
+ \setcounter{#2}{0}% % `No' assignment to counter
+ \TextMessage{#4}% % `No' text in document
+ \message{^^J#4^^J^^J}% % `No' text in message and log file
+ \else %
+ \setcounter{#2}{1}% % `Yes' assignment to counter
+ \TextMessage{#3}% % `Yes' text in document
+ \message{^^J#3^^J^^J}% % `Yes' text in message and log file
+ \fi %
+}
+
+\newcommand{\PackageDiagnostics}[4]{%
+ \newcounter{#2}% % Counter name
+ \IfFileExists{#1}{% % Package name
+ \setcounter{#2}{1}% % `Yes' assignment to counter
+ \TextMessage{#3}% % `Yes' text in document
+ \message{^^J#3^^J^^J}% % `Yes' text in message and log file
+ } %
+ {\setcounter{#2}{0}% % `No' assignment to counter
+ \TextMessage{#4}% % `No' text in document
+ \message{^^J#4^^J^^J}% % `No' text in message and log file
+ }
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\TextMessageNo
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput % End of package diagnose.sty