diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/tex/latex/diagnose/diagnose.sty | 59 |
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 |