diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/doi')
-rw-r--r-- | Master/texmf-dist/tex/latex/doi/doi.sty | 10 |
1 files changed, 8 insertions, 2 deletions
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}}}% |