summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-04-11 22:58:58 +0000
committerKarl Berry <karl@freefriends.org>2007-04-11 22:58:58 +0000
commit4b9b1bcdd965d2220397723d248a8c0e7a4cdd32 (patch)
tree9e1a6e4365eb2b61f8269a6a2a2648ec2bb20445 /Master
parent514d376562aded27012738499e8bdac6360e919b (diff)
new latex package doi (11apr07)
git-svn-id: svn://tug.org/texlive/trunk@4146 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-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
5 files changed, 73 insertions, 0 deletions
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"/>