summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hyper/scontrib/harvard.hyp
blob: 53fd4fc98c3aa92330c4d937706245d69048ecc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
%% harvardfull.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.hyp}[95/05/15]

%% The following defines anchors not just for the year but also for the
%% abbr-citation, the full-citation and the name.
\renewcommand{\harvarditem}[4][\null]{%
  \hyper@setcurrent%
  \item[\blindhyperanchor{\@currenthyper}]%
  \if@filesw{ \def\protect##1{\string ##1\space}%
      \ifthenelse{\equal{#1}{\null}}
        {\def\next{{#4}{\hyperreference{\@currenthyper}{#2}}{\hyperreference{\@currenthyper}{#2}}{\hyperreference{\@currenthyper}{#3}}}}
        {\def\next{{#4}{\hyperreference{\@currenthyper}{#2}}{\hyperreference{\@currenthyper}{#1}}{\hyperreference{\@currenthyper}{#3}}}}
      \immediate\write\@auxout{\string\harvardcite\next}%
  }\fi%
  \protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces%
  }