summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-07-26 18:00:51 +0000
committerKarl Berry <karl@freefriends.org>2007-07-26 18:00:51 +0000
commitfbabe9c02ed44f25fc959d8917d915e6ac774181 (patch)
tree4c35a503fd120b01dee74b85fcd64a48dd50a549 /Master/texmf-dist
parent85d9421bba33f314d23a3cc34828fc357b01aacd (diff)
doi update (24jul07)
git-svn-id: svn://tug.org/texlive/trunk@4654 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/doi/README2
-rw-r--r--Master/texmf-dist/tex/latex/doi/doi.sty10
2 files changed, 10 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/latex/doi/README b/Master/texmf-dist/doc/latex/doi/README
index 493551acab4..00cf31c5919 100644
--- a/Master/texmf-dist/doc/latex/doi/README
+++ b/Master/texmf-dist/doc/latex/doi/README
@@ -12,6 +12,8 @@ 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
+Michael Orlov noticed that underscores were not handled appropriately
+and sends in a patch.
This code is placed under the LPPL.
diff --git a/Master/texmf-dist/tex/latex/doi/doi.sty b/Master/texmf-dist/tex/latex/doi/doi.sty
index 1bbc14e0f0d..5d8e5dbcfce 100644
--- a/Master/texmf-dist/tex/latex/doi/doi.sty
+++ b/Master/texmf-dist/tex/latex/doi/doi.sty
@@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{doi}[2007/04/17 handle doi numbers]
+\ProvidesPackage{doi}[2007/07/24 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
@@ -29,6 +29,7 @@
%% 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.
+%% July 2007: Michael Orlov sends in a patch to correctly handle underscores.
%% We need hyperref, but you probably want to load hyperref
%% beforehand, or set some options later on.
@@ -44,12 +45,15 @@
\begingroup
\lccode`\~=`\#\relax
\lowercase{\def~{\#}}%
+ \lccode`\~=`\_\relax
+ \lowercase{\def~{\_}}%
\lccode`\~=`\<\relax
\lowercase{\def~{\textless}}%
\lccode`\~=`\>\relax
\lowercase{\def~{\textgreater}}%
\lccode`\~=0\relax
\catcode`\#=\active
+ \catcode`\_=\active
\catcode`\<=\active
\catcode`\>=\active
\@doi
@@ -59,12 +63,14 @@
%% set in the previous command
%% it closes the group, and spits out the url.
\def\@doi#1{%
- \let\#\relax
+ \let\#\relax
+ \let\_\relax
\let\textless\relax
\let\textgreater\relax
\edef\x{\toks0={{#1}}}%
\x
\edef\#{\@percentchar23}%
+ \edef\_{_}%
\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}}}%