summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stex/dcm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-03-30 23:23:02 +0000
committerKarl Berry <karl@freefriends.org>2012-03-30 23:23:02 +0000
commit849996eca72af498b48b10fbea7f14c4b9d21b8f (patch)
tree2d40d42dfc9fc0b0622212cc220868f98345305f /Master/texmf-dist/tex/latex/stex/dcm
parentd82e1c23973fd0271f93686f487bd1cee8dcd947 (diff)
restore stex (ca. 28jan12)
git-svn-id: svn://tug.org/texlive/trunk@25792 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/dcm')
-rw-r--r--Master/texmf-dist/tex/latex/stex/dcm/dcm.sty86
-rw-r--r--Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml72
2 files changed, 158 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty b/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty
new file mode 100644
index 00000000000..d6bab773306
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty
@@ -0,0 +1,86 @@
+%%
+%% This is file `dcm.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% dcm.dtx (with options: `package')
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{dcm}[2012/01/28 v0.3 Dublin Core Metadata]
+\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}}
+\ProcessOptions
+\RequirePackage{workaddress}
+\RequirePackage[sectioning]{rdfmeta}
+\newenvironment{DCmetadata}[1][]%
+{\def\@style{#1}}% to set the way things are presented.
+{\@ifundefined{dcm@\@style @block}%
+{\message{style {\@style} not defined}}%
+{\csname dcm@\@style @block\endcsname}}
+\def\DCMcreators#1{\@for\@I:=#1\do{\wa@ref@test{person}\@I{id}}
+\gdef\dcm@creators{#1}}
+\def\DCMcontributors#1{\@for\@I:=#1\do{\wa@ref@test{person}\@I{id}}%
+\def\dcm@contributors{#1}}
+\def\DCMtitle#1{\def\dcm@title{#1}\providecommand{\dcm@shorttitle}{#1}}
+\def\dcm@subtitle{}
+\def\DCMsubtitle#1{\def\dcm@subtitle{#1}}
+\def\dcm@shorttitle{}
+\def\DCMshorttitle#1{\def\dcm@shorttitle{#1}}
+\def\DCMsubject#1{\def\dcm@subject{#1}}
+\long\def\DCMdescription#1{\long\def\dcm@description{#1}}
+\def\DCMpublisher#1{\def\dcm@publisher{#1}}
+\def\dcm@date{\today}
+\def\DCMdate#1{\def\dcm@date{#1}}
+\def\DCMtype#1{\def\dcm@type{#1}}
+\def\DCMidentifier#1#2{\def\dcm@scheme{#1}\def\dcm@identifier{#2}}
+\def\DCMsource#1{\def\dcm@source{#1}}
+\def\DCMlanguage#1{\def\dcm@language{#1}}
+\def\DCMrelation#1{\def\dcm@relation{#1}}
+\def\DCMrights#1{\long\def\dcm@rights{#1}}
+\def\DCMlicense#1{\def\dcm@license{#1}}
+\def\dcm@license{All rights reserved}
+\def\DCMlicensenotice#1{\long\def\dcm@license{\\[1ex]License: #1}}
+\def\DCMcopyrightnotice#1#2{\DCMrights{Copyright {\copyright} #1: #2}}
+\def\cclicense#1{\def\attribution{\def\dcm@by{yes}}
+ \def\noncommercial{\def\dcm@nc{yes}}
+ \def\sharealike{\defdcm@sharealike{yes}}
+ \def\noderivativeworks{\def\dcm@derivatives{no}}}
+\long\def\DCMabstract#1{\long\def\dcm@abstract{#1}}
+\def\dcm@titlepage@block{\begin{titlepage}
+ \null\vfil\vskip 60\p@
+ \begin{center}
+ \ifx\dcm@title\@empty
+ \PackageWarning{dcm}{No title specified}{\LARGE Add title here\par}
+ \else\LARGE \dcm@title \par\fi
+ \ifx\dcm@subtitle\@empty
+ \vskip 3em\Large \dcm@subtitle \par\vskip 3em
+ \else\large\lineskip .75em\WAauthorblock\dcm@creators\vskip 1.5em\fi
+ \ifx\dcm@date\@empty
+ \PackageWarning{dcm}{No date specified}{\large\today\par}
+ \else{\large\dcm@date\par}\vskip 2em\fi
+ \end{center}\vskip2em
+ \ifx\dcm@abstract\@empty
+ \PackageWarning{dcm}{No Abstract specified}\else
+ \begin{quote}\textbf\dcm@abstract@heading:\dcm@abstract\end{quote}\fi
+ \vskip 2em\par\vfil\noindent
+ {\small\noindent\dcm@rights\dcm@license}
+ \end{titlepage}}
+\def\dcm@maketitle@block{\def\@title{\dcm@title\ifx\dcm@subtitle\empty\else\newline\dcm@subtitle\fi}%
+\def\@author{\WAauthorblock\dcm@creators}%
+\def\@date{\dcm@date}\maketitle}
+\def\ISOtimestamp{\count1=\time\divide\count1 by 60 % hours
+\count2=\count1\multiply\count2 by 60% minutes in \count1 hours
+\count3=\time\advance\count3 by -\count2 % minutes
+\the\year -\ifnum\month>9\else0\fi\the\month-\ifnum\day>9\else0\fi\the\day
+T\ifnum\count1>9\else0\fi\the\count1:\ifnum\count3>9\else0\fi\the\count3:00Z}
+\def\dcm@abstract@heading{Abstract}
+\def\dcm@creators@heading{Author(s)}
+\def\dcm@contributors@connector{with contributions from}
+\def\dcm@chapter@heading{Chapter}
+\def\dcm@section@heading{Section}
+\def\dcm@subsection@heading{Subsection}
+\def\dcm@subsubsection@heading{Subsubsection}
+\def\dcm@paragraph@heading{Paragraph}
+\endinput
+%%
+%% End of file `dcm.sty'.
diff --git a/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml b/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml
new file mode 100644
index 00000000000..cdd386bbc6f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml
@@ -0,0 +1,72 @@
+# -*- CPERL -*-
+package LaTeXML::Package::Pool;
+use strict;
+use LaTeXML::Global;
+use LaTeXML::Package;
+RequirePackage('rdfmeta');
+RequirePackage('workaddress');
+sub FishOutMetadata {
+ my ($document,$keyvals)=@_;
+ foreach my $role(qw(creators contributors)) {
+ my $idlist_string=getKeyValue_noDelim($keyvals,$role);
+ my @ids = split(/,\s*/, $idlist_string);
+ foreach my $id(@ids) {
+ my $name = LookupValue('DCM_'.$id.'_name');
+ if ($name) {
+ my $prop_role = $role;
+chop $prop_role if $prop_role;
+ $document->insertElement("dc:$prop_role",$name) if $role;
+ } else {print STDERR "Warning: no $role with 'id' $id !\n";}
+ }
+ }
+ return;}#$
+DefEnvironment('{DCmetadata}[]', "<omdoc:metadata>#body</omdoc:metadata>");
+DefConstructor('\DCMcreators{}',sub{
+ my ($document,$args,%properties) = @_;
+ my $keyval = LaTeXML::KeyVals->new('wa@person',T_BEGIN,T_END,('creators'=>$args));
+ FishOutMetadata($document,$keyval);
+ return;});
+DefConstructor('\DCMcontributors{}',sub{
+ my ($document,$args,%properties) = @_;
+ my $keyval = LaTeXML::KeyVals->new('wa@person',T_BEGIN,T_END,('contributors'=>$args));
+ FishOutMetadata($document,$keyval);
+ return;});
+DefConstructor('\DCMtitle{}',"<dc:title>#1</dc:title>");
+DefConstructor('\DCMsubject{}',"<dc:subject>#1</dc:subject>");
+DefConstructor('\DCMdescription{}',"<dc:description>#1</dc:description>");
+DefConstructor('\DCMpublisher{}',"<dc:publisher>#1</dc:publisher>");
+DefConstructor('\DCMdate{}',"<dc:date>#1</dc:date>");
+DefConstructor('\DCMtype{}',"<dc:type>#1</dc:type>");
+DefConstructor('\DCMidentifier{}{}',"<dc:identifier scheme='#1'>#2</dc:identifier>");
+DefConstructor('\DCMsource{}',"<dc:source>#1</dc:source>");
+DefConstructor('\DCMlanguage{}',"<dc:language>#1</dc:language>");
+DefConstructor('\DCMrelation{}',"<dc:relation>#1</dc:relation>");
+DefConstructor('\DCMrights{}',"<dc:rights>#1</dc:rights>");
+DefMacro('\DCMlicensenotice{}','\DCMrights{#1}');
+DefMacro('\DCMcopyrightnotice{}{}','\DCMrights{Copyright {\copyright} #1: #2}');
+DefConstructor('\cclicense{}',"<cc:license>#1</cc:license>");
+DefConstructor('\attribution',"<cc:attribution/>");
+DefConstructor('\noncommercial',"<cc:noncommercial/>");
+DefConstructor('\sharealike',"<cc:sharealike/>");
+DefConstructor('\noderivativeworks',"<cc:noderivativeworks>");
+DefConstructor('\DCMabstract{}',"<dc:description>#1</dc:description>");
+Tag('dc:description',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1);
+Tag('dc:date',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1);
+Tag('dc:creator',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1);
+Tag('dc:contributor',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1);
+Tag('dc:title',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1);
+Tag('dc:subject',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1);
+Tag('dc:publisher',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1);
+Tag('dc:type',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1);
+Tag('dc:identifier',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1);
+Tag('dc:language',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1);
+Tag('dc:rights',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1);
+RawTeX('
+\def\ISOtimestamp{\count1=\time\divide\count1 by 60 % hours
+\count2=\count1\multiply\count2 by 60% minutes in \count1 hours
+\count3=\time\advance\count3 by -\count2 % minutes
+\the\year -\ifnum\month>9\else0\fi\the\month-\ifnum\day>9\else0\fi\the\day
+T\ifnum\count1>9\else0\fi\the\count1:\ifnum\count3>9\else0\fi\the\count3:00Z}
+');
+Tag('dc:title',afterOpen=>\&numberIt,afterClose=>\&locateIt);
+1;