summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/diagnose/texinput
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/diagnose/texinput
Initial commit
Diffstat (limited to 'macros/latex/contrib/diagnose/texinput')
-rw-r--r--macros/latex/contrib/diagnose/texinput/diagnose.sty59
1 files changed, 59 insertions, 0 deletions
diff --git a/macros/latex/contrib/diagnose/texinput/diagnose.sty b/macros/latex/contrib/diagnose/texinput/diagnose.sty
new file mode 100644
index 0000000000..e9a6e414a4
--- /dev/null
+++ b/macros/latex/contrib/diagnose/texinput/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