summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/labelcas
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-05-08 00:14:17 +0000
committerKarl Berry <karl@freefriends.org>2006-05-08 00:14:17 +0000
commit43eb693e2ae21ee4f917a27c625aad510ab5e2c1 (patch)
treec9cab934f1a3bdaa8aea5a1853b8f3f07b45b1d8 /Master/texmf-dist/tex/latex/labelcas
parentaebc7413643392b97f19dcd5f383185ee502eb27 (diff)
new package labelcas
git-svn-id: svn://tug.org/texlive/trunk@1573 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/labelcas')
-rw-r--r--Master/texmf-dist/tex/latex/labelcas/labelcas.sty220
1 files changed, 220 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/labelcas/labelcas.sty b/Master/texmf-dist/tex/latex/labelcas/labelcas.sty
new file mode 100644
index 00000000000..71dc998e541
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/labelcas/labelcas.sty
@@ -0,0 +1,220 @@
+%%
+%% This is file `labelcas.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% labelcas.dtx (with options: `labelcas')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2006 by Ulrich Diez <ulrich.diez@alumni.uni-tuebingen.de>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2003/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{labelcas}
+ [2006/04/27 v1.07 check label-existence and fork accordingly]
+\DeclareOption{DefineLabelcase}%
+ {\global\let\DefineLabelcase\DefineLabelcase}%
+\begingroup
+\newcommand\DefineLabelcase[4]{%
+ \expandafter\@ifdefinable\csname#3lc@remtrailspace\endcsname{%
+ \expandafter\long
+ \expandafter\def
+ \csname#3lc@remtrailspace\endcsname##1#1#2##2#2#1{%
+ \begingroup
+ \toks@{##2}%
+ \edef\@tempa{\the\toks@}%
+ \expandafter\endgroup
+ \ifx\@tempa\@empty
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\csname#3lc@remleadspace\endcsname#2##1#1#2#2}%
+ {\csname#3lc@remtrailspace\endcsname##1#2#1#2#2#1}%
+ }%
+ }%
+ \expandafter\@ifdefinable\csname#3lc@remleadspace\endcsname{%
+ \expandafter\long
+ \expandafter\def
+ \csname#3lc@remleadspace\endcsname##1#2#1##2#2#2{%
+ \begingroup
+ \toks@{##1}%
+ \edef\@tempa{\the\toks@}%
+ \expandafter\endgroup
+ \ifx\@tempa\@empty
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\csname#3lc@remleadspace\endcsname#2##2#2#2}%
+ {\@tempa##1#2}%
+ }%
+ }%
+ \expandafter\@ifdefinable\csname#3lc@iterate\endcsname{%
+ \expandafter\long
+ \expandafter\def
+ \csname#3lc@iterate\endcsname##1#2{%
+ \toks@{#1}%
+ \begingroup
+ \long\def\@tempa#2####1#2{\toks@{####1}\edef\@tempa{\the\toks@}}%
+ \csname#3lc@remleadspace\endcsname#2##1#2#1#2#2%
+ \toks@{##1}%
+ \edef\@tempb{\the\toks@}%
+ \toks@{#1\@nil}%
+ \edef\@tempc{\the\toks@}%
+ \toks@{\csname#3lc@remtrailspace\endcsname##1#2#1#2#2#1}%
+ \edef\@tempd{\the\toks@}%
+ \ifx\@tempb\@tempc
+ \expandafter\endgroup
+ \else
+ \ifx\@tempa\@empty
+ \expandafter\endgroup
+ \else
+ \expandafter\expandafter
+ \expandafter \endgroup
+ \expandafter\@tempd
+ \fi
+ \csname#3lc@iterate\expandafter\expandafter
+ \expandafter\endcsname
+ \expandafter\the
+ \expandafter\toks@
+ \fi
+ }%
+ }%
+ \expandafter\@ifdefinable\csname#3eachlabelcase\endcsname{%
+ \expandafter\DeclareRobustCommand
+ \csname#3eachlabelcase\endcsname[2][]{%
+ {%
+ \long\def\@tempa#2####1#2{%
+ \@tempb####1#2#1#2#2%
+ }%
+ \long\def\@tempb####1{%
+ \begingroup
+ \long\def\@tempb########1########2########3{%
+ \expandafter\expandafter
+ \expandafter\endgroup
+ \expandafter\ifx
+ \csname r@########1\endcsname\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\@temptokena\expandafter{\the\@temptokena########3}}%
+ {\@temptokena\expandafter{\the\@temptokena########2}}%
+ }%
+ \begingroup
+ \toks@{}%
+ \long\def\@tempb########1{%
+ \long\def\@tempa#2################1#2{%
+ \toks@\expandafter{\the\toks@{################1}}%
+ \expandafter\endgroup\expandafter\@tempb\the\toks@
+ }%
+ \toks@\expandafter{\the\toks@{########1}}%
+ \csname#3lc@remleadspace\endcsname#2%
+ }%
+ \toks@{{####1}}\csname#3lc@remleadspace\endcsname#2%
+ }%
+ \@temptokena{}%
+ \csname#3lc@iterate\endcsname#1##2#2\@nil#2%
+ \lc@macrodefiner{##1}%
+ \expandafter}\the\@temptokena
+ }%
+ }%
+ \expandafter\@ifdefinable\csname#3lotlabelcase\endcsname{%
+ \expandafter\DeclareRobustCommand
+ \csname#3lotlabelcase\endcsname[6][]{%
+ {%
+ \long\def\@tempa#2####1#2{%
+ {\expandafter\expandafter\expandafter}\expandafter
+ \ifx\csname r@####1\endcsname\relax
+ \let\@tempb\relax
+ \else
+ \let\@tempc\relax
+ \fi
+ }%
+ \def\@tempb{}%
+ \def\@tempc{}%
+ \csname#3lc@iterate\endcsname#1##2#2\@nil#2%
+ \ifx\@tempb\@empty
+ \ifx\@tempc\@empty
+ \@temptokena{##6}%
+ \else
+ \@temptokena{##3}%
+ \fi
+ \else
+ \ifx\@tempc\@empty
+ \@temptokena{##4}%
+ \else
+ \@temptokena{##5}%
+ \fi
+ \fi
+ \lc@macrodefiner{##1}%
+ \expandafter}\the\@temptokena
+ }%
+ }%
+ {\toks@{#4}\edef\@tempa{\the\toks@}\def\@tempb{\global}\expandafter}%
+ \ifx\@tempa\@tempb
+ \expandafter\global\expandafter\let
+ \csname#3lc@remtrailspace\expandafter\endcsname
+ \csname#3lc@remtrailspace\endcsname
+ \expandafter\global\expandafter\let
+ \csname#3lc@remleadspace\expandafter\endcsname
+ \csname#3lc@remleadspace\endcsname
+ \expandafter\global\expandafter\let
+ \csname#3lc@iterate\expandafter\endcsname
+ \csname#3lc@iterate\endcsname
+ \expandafter\global\expandafter\let
+ \csname#3eachlabelcase\expandafter\endcsname
+ \csname#3eachlabelcase\endcsname
+ \expandafter\global\expandafter\let
+ \csname#3lotlabelase\expandafter\endcsname
+ \csname#3lotlabelcase\endcsname
+ \fi
+}%
+\ProcessOptions\relax
+\expandafter\endgroup\DefineLabelcase{ }{,}{}{\global}%
+\newcommand\lc@macrodefiner[1]{%
+ {\def\@tempa{#1}\expandafter}%
+ \ifx\@tempa\@empty
+ \else
+ \@temptokena\expandafter{%
+ \expandafter\begingroup
+ \expandafter\toks@
+ \expandafter\expandafter
+ \expandafter {%
+ \expandafter\expandafter
+ \expandafter \@temptokena
+ \expandafter\expandafter
+ \expandafter {%
+ \expandafter\the
+ \expandafter\@temptokena
+ \expandafter}%
+ \expandafter}%
+ \expandafter\@temptokena
+ \expandafter{%
+ \expandafter\@temptokena
+ \expandafter{%
+ \the\@temptokena}%
+ \@ifdefinable#1{\edef#1{\the\@temptokena}}}%
+ \expandafter\expandafter
+ \expandafter \endgroup
+ \expandafter\the
+ \expandafter\@temptokena
+ \the\toks@
+ }%
+ \fi
+}%
+\endinput
+%%
+%% End of file `labelcas.sty'.