summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/exp-testopt
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-03-07 00:46:50 +0000
committerKarl Berry <karl@freefriends.org>2009-03-07 00:46:50 +0000
commit0b1aff326b63ee76fb6332beef1696f753d8e591 (patch)
tree0bd2eb2ee2e633bf4dc9dc0846d72b0c2bccd931 /Master/texmf-dist/tex/latex/exp-testopt
parent6aea4681407ba3c56e1e32095d600610f8d2f3dd (diff)
new latex package exp-testopt (6mar09)
git-svn-id: svn://tug.org/texlive/trunk@12327 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/exp-testopt')
-rw-r--r--Master/texmf-dist/tex/latex/exp-testopt/exp-testopt.sty101
1 files changed, 101 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/exp-testopt/exp-testopt.sty b/Master/texmf-dist/tex/latex/exp-testopt/exp-testopt.sty
new file mode 100644
index 00000000000..9ab9750c8bb
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/exp-testopt/exp-testopt.sty
@@ -0,0 +1,101 @@
+%%
+%% This is file `exp-testopt.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exp-testopt.dtx (with options: `package')
+%%
+%% ,--------------------------------------------------.
+%% | Das ist eine generierte Datei. |
+%% | |
+%% | (c) 2009 Paul Ebermann. |
+%% '--------------------------------------------------'
+%% (C) 2008 Paul Ebermann
+%%
+%% Package exp-testopt - expandible testopt-Variante.
+%%
+%% Die Datei exp-testopt.dtx sowie die dazugeh^^c3^^b6rige
+%% exp-testopt.ins sowie die damit generierte
+%% exp-testopt.sty stehen unter der
+%% "LaTeX Project Public License" (LPPL, zu finden
+%% unter http://www.latex-project.org/lppl/, sowie
+%% auch in den meisten TeX-Distributionen in
+%% texmf/docs/latex/base/lppl*.txt), Version 1.3b oder
+%% sp^^c3^^a4ter (nach Wahl des Verwenders).
+%%
+%% Der 'maintenance-status' ist (zur Zeit) 'author-maintained'.
+%%
+%% Das hei^^c3^^9ft u.a., die Dateien d^^c3^^bcrfen frei vertrieben werden,
+%% bei ^^c3^^84nderungen (durch andere Personen als Paul Ebermann)
+%% ist aber der Name der Datei zu ^^c3^^a4ndern.
+\NeedsTeXFormat{LaTeX2e}[2005/12/01]%
+\ProvidesPackage{exp-testopt}[2009/03/06 v0.3 (PE)]
+
+\newcommand*{\@expandable@testopt}[2]{%
+ \@expandable@ifopt{#1}{#1[#2]}%
+}
+
+\newcommand{\@expandable@ifopt}[3]{%
+ \expandafter\ifx% '\ifx' komparas la difinojn de du makrooj, nome \dots
+ \csname exp-testopt@@\string#3@\endcsname% \dots makronomo kreita el la
+ \exp@testopt@opt@% \dots kaj tiu anta^^c5^^addifinita makroo.
+ \afterfi{#1#3}% En la jes-kazo, vokas la unuan argumenton
+ \else% \dots en la ne-kazo la duan.
+ \@expandable@ifOneToken#3\@expandable@ifOneToken% Tiu
+ {\afterfi{#2#3}}%
+ {\afterfi{#2{#3}}}%
+ \fi%
+}%
+
+\def\exp@testopt@opt@{<<<[>>>}% tio estas la nomo, kies valoron ni
+\@namedef{exp-testopt@@\string[@}{<<<[>>>}% Tio -- '\exp-testopt@@[@' -- estas
+
+\long\def\@expandable@ifOneToken#1#2\@expandable@ifOneToken#3#4{%
+ \expandafter\ifx%
+ \csname exp-testopt@@\string#2@\endcsname%
+ \exp@testopt@empty@%
+ \afterfi{#3}%
+ \else
+ \afterfi{#4}%
+ \fi
+}
+
+\def\exp@testopt@empty@{<<<>>>}% tio
+\@namedef{exp-testopt@@@}{<<<>>>}% Tio --
+
+\long\def\@exp@xargdef#1[#2][#3]#4{%
+ \@ifdefinable#1{% { \color{Green}
+ \expandafter\def\expandafter#1\expandafter{%
+ \expandafter%
+ \@expandable@testopt%
+ \csname\string#1\endcsname%
+ {#3}}% }
+ \expandafter\@yargdef%
+ \csname\string#1\endcsname%
+ \tw@%
+ {#2}%
+ {#4}%
+ }%
+}
+
+\def\expnewcommand{%
+ \@star@or@long\expnew@command%
+}
+\def\expnew@command#1{%
+ \@testopt{\exp@newcommand#1}0%
+}
+\def\exp@newcommand#1[#2]{%
+ \@ifnextchar [{\@exp@xargdef#1[#2]}% ^^c4^^88i
+ {\@argdef#1[#2]}% Tiu estas la originalo.
+}
+
+\@ifundefined{afterfi}{%
+ \def\afterfi#1#2\fi{%
+ \fi#1%
+ }%
+}{}%
+
+\endinput
+%%
+%% End of file `exp-testopt.sty'.