summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/akktex/source/akktex/base/akkconditional.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/akktex/source/akktex/base/akkconditional.sty')
-rw-r--r--macros/latex/contrib/akktex/source/akktex/base/akkconditional.sty40
1 files changed, 40 insertions, 0 deletions
diff --git a/macros/latex/contrib/akktex/source/akktex/base/akkconditional.sty b/macros/latex/contrib/akktex/source/akktex/base/akkconditional.sty
new file mode 100644
index 0000000000..fc6ad504dc
--- /dev/null
+++ b/macros/latex/contrib/akktex/source/akktex/base/akkconditional.sty
@@ -0,0 +1,40 @@
+%=====================================================================================================================================
+% Package akkconditional by Igor Akkerman (c) 2004, 2005
+% Package providing utilities for handling conditionals.
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License (latest version).
+%
+% The latest version of this license can be found at
+% http://www.latex-project.org/lppl.txt
+%
+% This file may only be distributed together with the full 'AkkTeX' bundle.
+%=====================================================================================================================================
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{akkconditional}[2005/04/30 1.1.1 by Igor Akkerman (c) 2004, 2005 Package providing utilities for handling conditionals.]
+%=====================================================================================================================================
+
+\RequirePackage{ifthen}
+%------------------------------------------------------------------------------
+
+\newcommand \setnewboolean[2] {\newboolean{#1}\setboolean{#1}{#2}}
+
+\newcommand \ifthen[2] {\ifthenelse{#1}{#2}{}}
+\newcommand \ifelse[2] {\ifthenelse{#1}{}{#2}}
+\newcommand \ifbool[3] {\ifthenelse{\boolean{#1}}{#2}{#3}}
+\newcommand \ifbooltrue[2] {\ifthen{\boolean{#1}}{#2}}
+\newcommand \ifboolfalse[2] {\ifelse{\boolean{#1}}{#2}}
+
+%--------------------------
+% \ifset[<unsetstring>]{<expression>}{<code>}
+% Executes <code> if <expression> is not <unsetstring>; does nothing otherwise.
+% {<unsetstring> defaults to the empty string}
+%--------------------------
+% \ifthenelseset[<unsetstring>]{<expression>}{<thencode>}{<elsecode>}
+% Executes <thencode> if <expression> is not <unsetstring>; <elsecode> otherwise.
+% {<unsetstring> defaults to the empty string}
+%--------------------------
+\newcommand \ifset[3][] {\ifelse{\equal{#2}{#1}}{#3}}
+\newcommand \ifthenelseset[4][] {\ifthenelse{\equal{#2}{#1}}{#4}{#3}}
+%--------------------------
+