diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml')
-rw-r--r-- | Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml | 159 |
1 files changed, 0 insertions, 159 deletions
diff --git a/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml b/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml deleted file mode 100644 index cdcc2bb2903..00000000000 --- a/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml +++ /dev/null @@ -1,159 +0,0 @@ -# -*- CPERL -*- -package LaTeXML::Package::Pool; -use strict; -use LaTeXML::Global; -use LaTeXML::Package; -RequirePackage('sref'); - sub getKeyValue_noDelim { - my ($keyval,$key)=@_; - my $valuelist = ToString($keyval->getValue($key)); - $valuelist =~ s/^{(.*)}$/$1/g if $valuelist; - return $valuelist; -} -sub ExportMetadata { - my $keys = shift; - my($id, $email,$affill,$address,$url,$name)=$keys - && map(getKeyValue_noDelim($keys,$_),qw(id email affiliation address url name)); - if ($id) { - AssignValue('DCM_'.$id.'_email',$email,'global') if $email; - AssignValue('DCM_'.$id.'_affiliation',$affill,'global') if $affill; - AssignValue('DCM_'.$id.'_address',$email,'global') if $email; - AssignValue('DCM_'.$id.'_url',$url,'global') if $url; - AssignValue('DCM_'.$id.'_name',$name,'global') if $name; - } else {print STDERR "Warning: key 'id' undefined in \\DCMperson\n"}; - return;} -DefKeyVal('dcm@person','id','Semiverbatim'); -DefKeyVal('dcm@person','birthdate','Semiverbatim'); -DefKeyVal('dcm@person','email','Semiverbatim'); -DefKeyVal('dcm@person','url','Semiverbatim'); -DefKeyVal('dcm@person','affiliation','Semiverbatim'); -DefKeyVal('dcm@person','personaltitle','Semiverbatim'); -DefKeyVal('dcm@person','academictitle','Semiverbatim'); -DefKeyVal('dcm@person','department','Semiverbatim'); -DefKeyVal('dcm@person','workaddress','Semiverbatim'); -DefKeyVal('dcm@person','privaddress','Semiverbatim'); -DefKeyVal('dcm@person','worktel','Semiverbatim'); -DefKeyVal('dcm@person','privtel','Semiverbatim'); -DefKeyVal('dcm@person','workfax','Semiverbatim'); -DefKeyVal('dcm@person','privfax','Semiverbatim'); -DefKeyVal('dcm@person','worktelfax','Semiverbatim'); -DefKeyVal('dcm@person','privtelfax','Semiverbatim'); - -DefConstructor('\DCMperson OptionalKeyVals:dcm@person {}','', -afterDigest=>sub { - my ($stomach,$whatsit)=@_; - my $keys=$whatsit->getArg(1); - my $name=ToString($whatsit->getArg(2)); - $keys->setValue('name',$name); - ExportMetadata($keys); - return; -});#$ -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('dcm@person',T_BEGIN,T_END,('creators'=>$args)); - FishOutMetadata($document,$keyval); - return;}); -DefConstructor('\DCMcontributors{}',sub{ - my ($document,$args,%properties) = @_; - my $keyval = LaTeXML::KeyVals->new('dcm@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('omdoc:omgroup', autoClose=>1); -DefConstructor('\DCMchapter OptionalKeyVals:omgroup {}',sub { - my ($document,$keyvals,$title,%properties) = @_; - my $id=$keyvals->getValue('id')||""; - $document->openElement('omdoc:chapter',('xml:id'=>$id)); - $document->openElement('omdoc:metadata'); - $document->insertElement('dc:title',$title); - FishOutMetadata($document,$keyvals); - return;}); -DefConstructor('\DCMsection OptionalKeyVals:omgroup {}',sub{ - my ($document,$keyvals,$title,%properties) = @_; - my $id=$keyvals->getValue('id')||""; - $document->openElement('omdoc:section',('xml:id'=>$id)); - $document->openElement('omdoc:metadata'); - $document->insertElement('dc:title',$title); - FishOutMetadata($document,$keyvals); - return;}); -DefConstructor('\DCMsubsection OptionalKeyVals:omgroup {}',sub{ - my ($document,$keyvals,$title,%properties) = @_; - my $id=$keyvals->getValue('id')||""; - $document->openElement('omdoc:subsection',('xml:id'=>$id)); - $document->openElement('omdoc:metadata'); - $document->insertElement('dc:title',$title); - FishOutMetadata($document,$keyvals); - return;}); -DefConstructor('\DCMsubsubsection OptionalKeyVals:omgroup {}',sub{ - my ($document,$keyvals,$title,%properties) = @_; - my $id=$keyvals->getValue('id')||""; - $document->openElement('omdoc:subsubsection',('xml:id'=>$id)); - $document->openElement('omdoc:metadata'); - $document->insertElement('dc:title',$title); - FishOutMetadata($document,$keyvals); - return;}); -DefConstructor('\DCMparagraph OptionalKeyVals:omgroup {}',sub{ - my ($document,$keyvals,$title,%properties) = @_; - my $id=$keyvals->getValue('id')||""; - $document->openElement('omdoc:paragraph',('xml:id'=>$id)); - $document->openElement('omdoc:metadata'); - $document->insertElement('dc:title',$title); - FishOutMetadata($document,$keyvals); - return;}); -Tag('omdoc:chapter',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); -Tag('omdoc:section',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); -Tag('omdoc:subsection',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); -Tag('omdoc:subsubsection',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); -Tag('omdoc:paragraph',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); -Tag('omdoc:subparagraph',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); -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 -\the\month-\the\day T\the\count1:\the\count3:00Z}'); -Tag('dc:title',afterOpen=>\&numberIt,afterClose=>\&locateIt); -1; |