%=====================================================================================================================================
% 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}}
%--------------------------

