summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ifallfalse
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-03 21:05:14 +0000
committerKarl Berry <karl@freefriends.org>2021-07-03 21:05:14 +0000
commit7861879d3e5c051b1d2f2a3318b028c5a3a159aa (patch)
treecfd8f4fac65080e9319828e77586543a59a7d5f8 /Master/texmf-dist/tex/latex/ifallfalse
parent216fc1292fb6a1c61b54770de19e591ac8488e73 (diff)
ifallfalse (3jul21)
git-svn-id: svn://tug.org/texlive/trunk@59821 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ifallfalse')
-rw-r--r--Master/texmf-dist/tex/latex/ifallfalse/ifallfalse.sty43
1 files changed, 43 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ifallfalse/ifallfalse.sty b/Master/texmf-dist/tex/latex/ifallfalse/ifallfalse.sty
new file mode 100644
index 00000000000..1de8858f96b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ifallfalse/ifallfalse.sty
@@ -0,0 +1,43 @@
+%%
+%% This is file `ifallfalse.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ifallfalse.dtx (with options: `package')
+%% This work may be distributed and/or modified under
+%% the conditions the LaTeX Project Public License (LPPL),
+%% either version 1.3 of this license or (at your option)
+%% any later version. The latest version of this license
+%% can be found in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{ifallfalse}[2021/07/01 v1.0.0 Compare string against set of other strings]
+
+\newenvironment{allfalse}[2]
+{
+ \def\comparedstring{#1}
+ \def\logicbody{#2}
+}
+{
+ \logicbody
+}
+\newcommand*\@allfalsename{allfalse}
+
+\newcommand{\orcheck}[1]{
+ \ifx\@currenvir\@allfalsename
+ \protected@edef\logicbody{
+ \ifnum\pdfstrcmp{\comparedstring}{#1}=0\else\logicbody\fi
+ }
+ \else
+ \PackageError{ifallfalse}{
+ \protect\orcheck\space should be nested within the allfalse environment
+ }{}
+ \fi
+}
+\endinput
+%%
+%% End of file `ifallfalse.sty'.