summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/doi/README21
-rw-r--r--Master/texmf-dist/tex/latex/doi/doi.sty57
-rw-r--r--Master/texmf-dist/tpm/doi.tpm8
3 files changed, 70 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/latex/doi/README b/Master/texmf-dist/doc/latex/doi/README
index 18d6914a2a4..493551acab4 100644
--- a/Master/texmf-dist/doc/latex/doi/README
+++ b/Master/texmf-dist/doc/latex/doi/README
@@ -1 +1,20 @@
-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.
+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 user-level command \doi{}, which takes a doi number,
+and creates a hyperlink from it. The format of the doi can be controlled by
+redefining the \doitext command, which does not take an argument (unlike the
+command with the same name in the doipubmed package).
+
+Note: the \doi{} command connot be used within other macros.
+
+This style file is based original code written by Heiko Oberdiek
+and published on comp.text.tex. It was packaged with permission
+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.
+
+Original discussion on Google under:
+http://groups.google.com/group/comp.text.tex/msg/922919daa207d613
+
diff --git a/Master/texmf-dist/tex/latex/doi/doi.sty b/Master/texmf-dist/tex/latex/doi/doi.sty
index 5e686c47e64..1bbc14e0f0d 100644
--- a/Master/texmf-dist/tex/latex/doi/doi.sty
+++ b/Master/texmf-dist/tex/latex/doi/doi.sty
@@ -1,31 +1,63 @@
\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
+\ProvidesPackage{doi}[2007/04/17 handle doi numbers]
+
+%% This style file is based original code written by Heiko Oberdiek
+%% and published on comp.text.tex. It was packaged with permission
+%% 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.
+%%
+%% Original discussion on Google under:
+%% http://groups.google.com/group/comp.text.tex/msg/922919daa207d613
+%%
+%% 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 user-level command \doi{}, which takes a doi number,
+%% and creates a hyperlink from it. The format of the doi can be controlled by
+%% redefining the \doitext command, which does not take an argument (unlike the
+%% command with the same name in the doipubmed package).
%%
-%% This code is placed under the LPPL
+%% Note: the \doi{} command connot be used within other macros.
+
+%% Change history:
+%% December 15, 2003: original code posted on Usenet (see link above)
+%% Somewhere in 2005: Bruno Voisin suggests some changes to accomodate the
+%% Apple pdf framework on the Tex on Mac OS X mailing list.
+%% April 2007: Maarten packages the lot, and Karl Ove Hufthammer fixes a
+%% few bugs introduced by Maarten (oops).
+%% A \doitext command is added, following the example from doipubmed.
+%% Some comments are added to make the code a little more readable.
%% We need hyperref, but you probably want to load hyperref
%% beforehand, or set some options later on.
\RequirePackage{hyperref}
+%% to change the default prefix, redefine this command within your own code.
+%% It takes no argument, which is different from the doipubmed package.
+\newcommand{\doitext}{doi:}
+
+%% the meat of the code
+%% the first command opens a group, and changes a few catcodes.
\newcommand*{\doi}{%
\begingroup
\lccode`\~=`\#\relax
- \lowercase{\def~{\#}}
+ \lowercase{\def~{\#}}%
\lccode`\~=`\<\relax
- \lowercase{\def~{\textless}}
+ \lowercase{\def~{\textless}}%
\lccode`\~=`\>\relax
- \lowercase{\def~{\textgreater}}
+ \lowercase{\def~{\textgreater}}%
\lccode`\~=0\relax
\catcode`\#=\active
\catcode`\<=\active
\catcode`\>=\active
\@doi
-}%
+}
+%% this is the actual command which processes the argument, with the catcodes
+%% set in the previous command
+%% it closes the group, and spits out the url.
\def\@doi#1{%
\let\#\relax
\let\textless\relax
@@ -37,6 +69,9 @@
\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}
+ \edef\x{\endgroup\doitext\the\toks1 \the\toks0}%
\x
}
+
+%% that's all folks.
+\endinput
diff --git a/Master/texmf-dist/tpm/doi.tpm b/Master/texmf-dist/tpm/doi.tpm
index 340c31f4bc4..879b04dc174 100644
--- a/Master/texmf-dist/tpm/doi.tpm
+++ b/Master/texmf-dist/tpm/doi.tpm
@@ -3,20 +3,20 @@
<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:Date>2007/04/18 19:28: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:Size>2326</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="1988">
+ <TPM:RunFiles size="3747">
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:DocFiles size="971">texmf-dist/doc/latex/doi/README</TPM:DocFiles>
<TPM:Provides>Package/doi</TPM:Provides>
</rdf:Description>
</rdf:RDF>