%%
%% This is file `xkeyval.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% xkeyval.dtx  (with options: `latex')
%% 
%% ---------------------------------------
%% Copyright (C) 2004-2005 Hendri Adriaens
%% ---------------------------------------
%%
%% This work 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.
%%
%% This work has the LPPL maintenance status "maintained".
%%
%% This Current Maintainer of this work is Hendri Adriaens.
%%
%% This work consists of the files xkeyval.dtx and pst-xkey.dtx and
%% the from xkeyval.dtx derived files keyval.tex, xkvtxhdr.tex,
%% xkeyval.sty, xkeyval.tex, xkvltxp.sty, xkveca.cls, xkvecb.cls,
%% xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, xkvex2.tex,
%% xkvex3.tex and xkvex4.tex and the from pst-xkey.dtx derived
%% files pst-xkey.sty and pst-xkey.tex.
%%
%% The following files constitute the xkeyval bundle and must be
%% distributed as a whole: readme, pst-xkey.pdf, xkeyval.pdf, keyval.tex,
%% pst-xkey.sty, pst-xkey.tex, xkeyval.sty, xkeyval.tex, xkvltxp.sty,
%% xkvtxhdr.tex, pst-xkey.dtx and xkeyval.dtx.
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{xkeyval}[2005/01/30 v2.0 package option processing (HA)]
\ifx\XKeyValLoaded\endinput\else\input xkeyval.tex \fi
\edef\XKVcatcodes{%
  \catcode`\noexpand\=\the\catcode`\=\relax
  \catcode`\noexpand\,\the\catcode`\,\relax
  \catcode`\noexpand\:\the\catcode`\:\relax
  \let\noexpand\XKVcatcodes\relax
}
\catcode`\=12\relax
\catcode`\,12\relax
\catcode`\:12\relax
\let\XKV@doxs\relax
\def\XKV@warn#1{\PackageWarning{xkeyval}{#1}}
\def\XKV@err#1{\PackageError{xkeyval}{#1}\@ehc}
\ifx\XKV@documentclass\@undefined
  \XKV@whilist\XKV@tempa:=\@filelist\do\ifx\XKV@documentclass\@undefined\fi{%
    \filename@parse\XKV@tempa
    \ifx\filename@ext\@clsextension
      \edef\XKV@documentclass{\filename@base.\filename@ext}%
    \fi
  }
  \ifx\XKV@documentclass\@undefined
    \XKV@err{xkeyval loaded before \protect\documentclass}%
    \let\XKV@documentclass\@empty
    \let\XKV@classoptionslist\@empty
  \else
    \let\XKV@classoptionslist\@classoptionslist
    \def\XKV@tempa#1{%
      \let\@classoptionslist\@empty
      \XKV@tempb#1,\@nil,%
    }
    \def\XKV@tempb#1,{%
      \def\XKV@tempa{#1}%
      \ifx\XKV@tempa\@nnil\else
        \in@{=}{#1}%
        \ifin@\else\XKV@addtolist@n\@classoptionslist{#1}\fi
        \expandafter\XKV@tempb
      \fi
    }
    \expandafter\XKV@tempa\expandafter{\@classoptionslist}
  \fi
\fi
\def\XKV@testoptc#1{%
  \XKV@ifstar{\XKV@sttrue\XKV@t@stoptc#1}{\XKV@stfalse\XKV@t@stoptc#1}%
}
\def\XKV@t@stoptc#1{\@testopt{\XKV@t@st@ptc#1}{KV}}
\def\XKV@t@st@ptc#1[#2]{%
  \XKV@makepf{#2}%
  \@ifnextchar<{\XKV@@t@st@ptc#1}{\XKV@@t@st@ptc#1<\@currname.\@currext>}%
}
\def\XKV@@t@st@ptc#1<#2>{%
  \XKV@sp@deflist\XKV@fams{#2}%
  \@testopt#1{}%
}
\def\DeclareOptionX{%
  \let\@fileswith@pti@ns\@badrequireerror
  \XKV@ifstar\XKV@dox\XKV@d@x
}
\long\def\XKV@dox#1{\XKV@toks{#1}\edef\XKV@doxs{\the\XKV@toks}}
\def\XKV@d@x{\@testopt\XKV@@d@x{KV}}
\def\XKV@@d@x[#1]{\@ifnextchar<{\XKV@@@d@x[#1]}{\XKV@@@d@x[#1]<\@currname.\@currext>}}
\def\XKV@@@d@x[#1]<#2>#3{\@testopt{\define@key[#1]{#2}{#3}}{}}
\def\ExecuteOptionsX{\XKV@stfalse\XKV@plfalse\XKV@t@stoptc\XKV@setkeys}
\def\ProcessOptionsX{\XKV@stfalse\XKV@plfalse\XKV@testoptc\XKV@pox}
\def\XKV@pox[#1]{%
  \let\XKV@tempa\@empty
  \XKV@inpoxtrue
  \let\@fileswith@pti@ns\@badrequireerror
  \edef\XKV@testclass{\@currname.\@currext}%
  \ifx\XKV@testclass\XKV@documentclass
    \let\@unusedoptionlist\XKV@classoptionslist
    \XKV@ifundefined{ver@xkvltxp.sty}{}{%
      \@onelevel@sanitize\@unusedoptionlist
    }%
  \else
    \ifXKV@st
      \def\XKV@tempb##1,{%
        \def\CurrentOption{##1}%
        \ifx\CurrentOption\@nnil\else
          \XKV@g@tkeyname##1=\@nil\CurrentOption
          \XKV@key@if@ndefined{\CurrentOption}{}{%
            \XKV@useoption{##1}%
            \XKV@addtolist@n\XKV@tempa{##1}%
          }%
          \expandafter\XKV@tempb
        \fi
      }%
      \expandafter\XKV@tempb\XKV@classoptionslist,\@nil,%
    \fi
  \fi
  \expandafter\XKV@addtolist@o\expandafter
    \XKV@tempa\csname opt@\@currname.\@currext\endcsname
  \def\XKV@tempb{\XKV@setkeys[#1]}%
  \expandafter\XKV@tempb\expandafter{\XKV@tempa}%
  \let\XKV@doxs\relax
  \let\XKV@rm\@empty
  \XKV@inpoxfalse
  \let\@fileswith@pti@ns\@@fileswith@pti@ns
  \AtEndOfPackage{\let\@unprocessedoptions\relax}%
}
\def\XKV@useoption#1{%
  \def\XKV@resa{#1}%
  \XKV@ifundefined{ver@xkvltxp.sty}{}{%
    \@onelevel@sanitize\XKV@resa
  }%
  \@expandtwoargs\@removeelement{\XKV@resa}{\@unusedoptionlist}\@unusedoptionlist
}
\DeclareOptionX*{\PackageWarning{xkeyval}{Unknown option `\CurrentOption'}}
\ProcessOptionsX
\XKVcatcodes
\endinput
%%
%% End of file `xkeyval.sty'.
