summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBuild/tools/tpm-ctan-check3
-rw-r--r--Master/texmf-dist/doc/latex/doi/README1
-rw-r--r--Master/texmf-dist/tex/latex/doi/doi.sty42
-rw-r--r--Master/texmf-dist/tpm/doi.tpm23
-rw-r--r--Master/texmf/lists/doi6
-rw-r--r--Master/texmf/tpm/collection-latexextra.tpm1
6 files changed, 75 insertions, 1 deletions
diff --git a/Build/tools/tpm-ctan-check b/Build/tools/tpm-ctan-check
index 3db69975fe3..a40588d2c43 100755
--- a/Build/tools/tpm-ctan-check
+++ b/Build/tools/tpm-ctan-check
@@ -29,7 +29,8 @@ my @WorkingTPM = qw(
currvita curve curve2e curves
custom-bib cyrillic
dancers dashbox dateiliste datetime dcpic decimal digiconfigs
- dinat dingbat directory dk-bib doipubmed dottex doublestroke dpfloat
+ dinat dingbat directory dk-bib doi doipubmed dottex
+ doublestroke dpfloat
draftwatermark dramatist dtxtut dvdcoll dvipsconfig dyntree
ebong ebsthesis eCards economic ecv ednotes eemeir egameps
egplot eijkhout
diff --git a/Master/texmf-dist/doc/latex/doi/README b/Master/texmf-dist/doc/latex/doi/README
new file mode 100644
index 00000000000..18d6914a2a4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/doi/README
@@ -0,0 +1 @@
+You can hyperlink DOI numbers to dx.doi.org. Some publishers have elected to use some nasty characters in their doi numbering scheme (<, >, ; have all been spotted). This will either upset (La)TeX, or your pdf reader. This style file contains a single user-level command \doi{}, which takes a doi number, and creates a hyperlink from it.
diff --git a/Master/texmf-dist/tex/latex/doi/doi.sty b/Master/texmf-dist/tex/latex/doi/doi.sty
new file mode 100644
index 00000000000..5e686c47e64
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/doi/doi.sty
@@ -0,0 +1,42 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{doi}[2005/03/24 handle doi numbers]
+%% original code written by Heiko Oberdiek and published on comp.text.tex
+%% Packaged as a style file by Maarten Sneep, with some minor
+%% changes suggested by Bruno Voisin to accomodate the Apple
+%% pdf framework
+%%
+%% This code is placed under the LPPL
+
+%% We need hyperref, but you probably want to load hyperref
+%% beforehand, or set some options later on.
+\RequirePackage{hyperref}
+
+\newcommand*{\doi}{%
+ \begingroup
+ \lccode`\~=`\#\relax
+ \lowercase{\def~{\#}}
+ \lccode`\~=`\<\relax
+ \lowercase{\def~{\textless}}
+ \lccode`\~=`\>\relax
+ \lowercase{\def~{\textgreater}}
+ \lccode`\~=0\relax
+ \catcode`\#=\active
+ \catcode`\<=\active
+ \catcode`\>=\active
+ \@doi
+}%
+
+\def\@doi#1{%
+ \let\#\relax
+ \let\textless\relax
+ \let\textgreater\relax
+ \edef\x{\toks0={{#1}}}%
+ \x
+ \edef\#{\@percentchar23}%
+ \edef\textless{\@percentchar3C}% instead of {\string<} for Apple
+ \edef\textgreater{\@percentchar3E}% instead of {\sting>} for Apple
+ \edef\x{\toks1={\noexpand\href{http://dx.doi.org/#1}}}%
+ \x
+ \edef\x{\endgroup\the\toks1 \the\toks0}
+ \x
+}
diff --git a/Master/texmf-dist/tpm/doi.tpm b/Master/texmf-dist/tpm/doi.tpm
new file mode 100644
index 00000000000..340c31f4bc4
--- /dev/null
+++ b/Master/texmf-dist/tpm/doi.tpm
@@ -0,0 +1,23 @@
+<!DOCTYPE rdf:RDF SYSTEM "../../support/tpm.dtd">
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/">
+ <rdf:Description about="http://texlive.dante.de/texlive/Package/doi.zip">
+ <TPM:Name>doi</TPM:Name>
+ <TPM:Type>Package</TPM:Type>
+ <TPM:Date>2007/04/11 12:12:00</TPM:Date>
+ <TPM:Version></TPM:Version>
+ <TPM:Creator>karl</TPM:Creator>
+ <TPM:Title>The doi package.</TPM:Title>
+ <TPM:Description></TPM:Description>
+ <TPM:Author></TPM:Author>
+ <TPM:Size>1498</TPM:Size>
+ <TPM:License></TPM:License>
+ <TPM:Build/>
+ <TPM:RunFiles size="1988">
+texmf-dist/tex/latex/doi/doi.sty
+texmf-dist/tpm/doi.tpm
+ </TPM:RunFiles>
+ <TPM:DocFiles size="338">texmf-dist/doc/latex/doi/README</TPM:DocFiles>
+ <TPM:Provides>Package/doi</TPM:Provides>
+ </rdf:Description>
+</rdf:RDF>
+
diff --git a/Master/texmf/lists/doi b/Master/texmf/lists/doi
new file mode 100644
index 00000000000..810a54ad7b8
--- /dev/null
+++ b/Master/texmf/lists/doi
@@ -0,0 +1,6 @@
+texmf-dist/doc/latex/doi/README
+
+texmf-dist/tex/latex/doi/doi.sty
+texmf-dist/tpm/doi.tpm
+
+texmf/lists/doi
diff --git a/Master/texmf/tpm/collection-latexextra.tpm b/Master/texmf/tpm/collection-latexextra.tpm
index eee33399076..f7438f67677 100644
--- a/Master/texmf/tpm/collection-latexextra.tpm
+++ b/Master/texmf/tpm/collection-latexextra.tpm
@@ -115,6 +115,7 @@ A large collection of add-on packages for LaTeX.
<TPM:Package name="dk-bib"/>
<TPM:Package name="dnaseq"/>
<TPM:Package name="docmfp"/>
+ <TPM:Package name="doi"/>
<TPM:Package name="dotseqn"/>
<TPM:Package name="dpfloat"/>
<TPM:Package name="draftcopy"/>