%%
%% This is file `rdfmeta.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% rdfmeta.dtx  (with options: `package')
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{rdfmeta}[2019/03/20 v0.2 Metadata key upgrades]
\newif\if@rdfmeta@sectioning\@rdfmeta@sectioningfalse
\DeclareOption{sectioning}{\@rdfmeta@sectioningtrue}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{sref}
                           \PassOptionsToPackage{\CurrentOption}{modules}}
\ProcessOptions
\RequirePackage{sref}
\RequirePackage{modules}
\newcommand\rdfmeta@loaded{yes}
\if@rdfmeta@sectioning\newcommand\rdfmeta@sectioning{yes}\fi
\newcommand\keydef[2]{\addmetakey{#1}{#2}%
\expandafter\g@addto@macro\this@module{\addmetakey{#1}{#2}}}
\newcommand\listkeydef[2]{\addmetalistkey{#1}{#2}%
\expandafter\g@addto@macro\this@module{\addmetalistkey{#1}{#2}}}
\def\@yes@{yes}
\addmetakey*{upgrade}{idlabel}
\addmetakey*{upgrade}{optarg}
\addmetakey*[yes]{upgrade}{optargstar}
\addmetakey*{upgrade}{keygroup}
\def\rdfmeta@upgrade{\@ifstar\rdfmeta@upgrade@star\rdfmeta@upgrade@nostar}
\newcommand\rdfmeta@upgrade@nostar[2][]{\metasetkeys{upgrade}{#1}%
\ifx\upgrade@keygroup\@empty\def\@@group{#2}\else\def\@@group{\upgrade@keygroup}\fi
\rdfmeta@upgrade@base{#2}{\@nameuse{\@@group @\upgrade@optarg}}}
\newcommand\rdfmeta@upgrade@star[2][]{\metasetkeys{upgrade}{#1}%
\ifx\upgrade@keygroup\@empty\def\@@group{#2}\else\def\@@group{\upgrade@keygroup}\fi
\rdfmeta@upgrade@base@star{#2}{\@nameuse{\@@group @\upgrade@optarg}}}
\newcommand\rdfmeta@upgrade@base[2]{\@ifundefined{#1}{}%
{\message{redefining macro #1,}
\ifx\upgrade@idlabel\@empty\srefaddidkey{#1}\else\srefaddidkey[prefix=\upgrade@idlabel]{#1}\fi%
\expandafter\let\csname rdfmeta@#1@old\expandafter\endcsname\csname #1\endcsname%
\expandafter\renewcommand\csname #1\endcsname[2][]%
{\metasetkeys{#1}{##1}\@nameuse{rdfmeta@#1@old}[#2]{##2}}
\addmetakey*\@@group{\upgrade@optarg}}}
\newcommand\rdfmeta@upgrade@base@star[2]{\@ifundefined{#1}{}%
{\message{redefining macros #1 and #1*,}
\ifx\upgrade@idlabel\@empty\srefaddidkey{#1}\else\srefaddidkey[prefix=\upgrade@idlabel]{#1}\fi%
\expandafter\let\csname rdfmeta@#1@old\expandafter\endcsname\csname #1\endcsname%
\expandafter\renewcommand\csname #1\endcsname%
{\@ifstar{\@nameuse{rdfmeta@#1@star}}{\@nameuse{rdfmeta@#1@nostar}}}%
\expandafter\newcommand\csname rdfmeta@#1@nostar\endcsname[2][]%
{\metasetkeys{#1}{##1}\edef\@test{#2}%
\ifx\@test\@empty\@nameuse{rdfmeta@#1@old}{##2}%
\else\@nameuse{rdfmeta@#1@old}[#2]{##2}\fi}%
\ifx\upgrade@optargstar\@yes@%
\expandafter\newcommand\csname rdfmeta@#1@star\endcsname[2][]%
{\metasetkeys{#1}{##1}\@nameuse{rdfmeta@#1@old}*[#2]{##2}}%
\else%
\expandafter\newcommand\csname rdfmeta@#1@star\endcsname[2][]%
{\metasetkeys{#1}{##1}\@nameuse{rdfmeta@#1@old}*{##2}}%
\fi%
\addmetakey*\@@group{\upgrade@optarg}}}
\if@rdfmeta@sectioning
\message{redefining sectioning commands!}
\rdfmeta@upgrade*[optarg=short,optargstar=no]{part}
\rdfmeta@upgrade*[optarg=short,optargstar=no]{chapter}
\rdfmeta@upgrade*[optarg=short,optargstar=no]{section}
\rdfmeta@upgrade*[optarg=short,optargstar=no]{subsection}
\rdfmeta@upgrade*[optarg=short,optargstar=no]{subsubsection}
\rdfmeta@upgrade*[optarg=short,optargstar=no]{paragraph}
\fi
\endinput
%%
%% End of file `rdfmeta.sty'.
