summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/AkkTeX/akkconditional.sty
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-11-17 20:51:29 +0000
committerNorbert Preining <preining@logic.at>2007-11-17 20:51:29 +0000
commit56012c4c0dc3ceaff82d5e972f1ba8fce01fe19c (patch)
treeb6751807da50ae9d95961384adfb22c25ac19dc8 /Master/texmf-dist/tex/latex/AkkTeX/akkconditional.sty
parentf1e7cb488db35805dc683e0f4c40afebd559d88a (diff)
new package AkkTeX (->latexextra)
git-svn-id: svn://tug.org/texlive/trunk@5484 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/AkkTeX/akkconditional.sty')
-rw-r--r--Master/texmf-dist/tex/latex/AkkTeX/akkconditional.sty40
1 files changed, 40 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/AkkTeX/akkconditional.sty b/Master/texmf-dist/tex/latex/AkkTeX/akkconditional.sty
new file mode 100644
index 00000000000..f7fdf38ae5f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/AkkTeX/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}}
+%--------------------------
+