summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hyper/contrib/harvard-to.hyp
blob: c4cfce13771998e8b28e7a071a5819a4fcb0692d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
%% harvard.hyp - Amendments to harvard bibliography style Version 2.0.5
%%               to be used together with the hyper package
%% Author: Renate Schmidt (schmidt@mpi-sb.mpg.de)
%% Copyright: Renate Schmidt, May 1995
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesFile{harvard-to.hyp}[95/05/15]

%% An apaptation of the original \harvarditem command that inserts a
%  \blindhyperanchor for each item in the biliography and \hyperreference
%  links around the citation-year.
\renewcommand{\harvarditem}[4][\null]{%
  \hyper@setcurrent%
  \item[\blindhyperanchor{\@currenthyper}]%
  \if@filesw{ \def\protect##1{\string ##1\space}%
      \ifthenelse{\equal{#1}{\null}}
        {\def\next{{#4}{#2}{#2}{\hyperreference{\@currenthyper}{#3}}}}
        {\def\next{{#4}{#2}{#1}{\hyperreference{\@currenthyper}{#3}}}}
      \immediate\write\@auxout{\string\harvardcite\next}%
  }\fi%
  \protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces%
  }