diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty b/Master/texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty new file mode 100644 index 00000000000..cdfd81223cc --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty @@ -0,0 +1,68 @@ +%% +%% 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}[2012/01/28 v0.2 Metadata key upgrades] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\if@rdfmeta@sectioning\@rdfmeta@sectioningfalse +\DeclareOption{sectioning}{\@rdfmeta@sectioningtrue} +\ProcessOptions +\RequirePackage{sref,modules} +\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'. |