summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/har2nat
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-11-23 20:11:37 +0000
committerNorbert Preining <preining@logic.at>2007-11-23 20:11:37 +0000
commit8df8568414bdd80fc1559023f365ae2b41dd5011 (patch)
tree3f31319d0b9c845faeb335fcf5ec079cb0d26130 /Master/texmf-dist/tex/latex/har2nat
parentf385fa454ee3d165f431d1a11e72d5d630bd5289 (diff)
new package har2nat
git-svn-id: svn://tug.org/texlive/trunk@5572 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/har2nat')
-rw-r--r--Master/texmf-dist/tex/latex/har2nat/har2nat.sty36
1 files changed, 36 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/har2nat/har2nat.sty b/Master/texmf-dist/tex/latex/har2nat/har2nat.sty
new file mode 100644
index 00000000000..b99153b9153
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/har2nat/har2nat.sty
@@ -0,0 +1,36 @@
+% har2nat package written by Bas Straathof, 2005/12/01
+% Eindhoven University of Technology, The Netherlands
+% bas.straathof@gmail.com.
+%
+% This small package allows a LaTeX document containing the citation commands
+% provided by the Harvard package (Peter Williams and Thorsten Schnier)
+% to be compiled using the natbib package (Patrick W. Daly). Migration from
+% harvard to natbib thus can be achieved simply by replacing
+%
+% \usepackage{harvard}
+%
+% with
+%
+% \usepackage{natbib}
+% \usepackage{har2nat}
+%
+% ---IMPORTANT---
+% har2nat must not be loaded before the natbib package as it redefines
+% the natbib commands \cite and \citeyear. All other natbib commands remain
+% unchanged and can be used alongside the Harvard commands.
+
+\NeedsTeXFormat{LaTeX2e} %
+\ProvidesPackage{har2nat}[2005/12/01 1.0 Harvard to natbib]%
+\RequirePackage{suffix} % Requires eTeX version 2, needed for starred commands
+\RequirePackage{natbib} %
+
+\renewcommand{\cite}{\citep}
+\WithSuffix\newcommand{\cite}*{\citep*}
+\newcommand{\citeaffixed}[2]{\citep[#2][]{#1}}
+\newcommand{\citeasnoun}{\citet}
+\WithSuffix\newcommand\citeasnoun*{\citet*}
+\renewcommand{\citename}{\citeauthor}
+\WithSuffix\newcommand\citename*{\citeauthor*}
+\renewcommand\citeyear\citeyearpar
+\WithSuffix\newcommand\citeyear*
+ {\begingroup\NAT@swafalse\def\NAT@ctype{2}\NAT@parfalse\NAT@citetp}