Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to build a Harvard reference template using biblatex. I at first gave the Harvard package a try but was then informed that this package is out-dated and instead should use biblatex. After setting up LaTex (see here) I went through the lovely 91 examples that came with the biblatex package. Sadly none of them had any full Harvard example. Which is a little strange seeing as this is the almost de-facto when it comes to references for academic papers.

My current code looks like this:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{refs.bib}
@BOOK
    {KandR,
     AUTHOR  = "Kernighan, Brian W. and Ritchie, Dennis M.",
     TITLE   = "{The C Programming Language Second Edition}",
     PUBLISHER = "Prentice-Hall, Inc.",
     YEAR = 1988
}
@ONLINE
{CUEDCplusplus,
     AUTHOR  = "Love, T.P.",
     TITLE   = "{CUED C++}",
     URL = "http://www-h.eng.cam.ac.uk/help/tpl/languages/C++.html",
     URLYEAR = 2010,
     PRESORT="aa"
}
\end{filecontents*}
\usepackage[style=authoryear-ibid,backend=biber]{biblatex}
\addbibresource{refs.bib}

\begin{document}

In 1988 C was totally awesome. \cite{KandR}
According to \cite{CUEDCplusplus} C++ was even better.

\printbibliography 
\end{document}

Does anybody know how I can instead have an output that fully matches the Harvard referencing system.

In other words, instead of looking like this (as it currently does) Current output

It will look like this (The bibliography is correct though, so no need to change that) Want

Any help would be really appreciated.

share|improve this question
3  
The 'Harvard' system is not really a reference style, it's a very broad term used for author-date styles. –  Joseph Wright Mar 15 '13 at 17:05
3  
The command \cite{<key>} can't read your mind as to when you want parenthetical citations versus citations as nouns. In the biblatex examples for the author-year styles you should have come across \parencite and \textcite. Loading biblatex with natbib=true will allow you to use natbib-like citation commands. –  Audrey Mar 15 '13 at 17:43
    
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  Guido Mar 16 '13 at 0:12

2 Answers 2

up vote 7 down vote accepted

There are almost as many flavours of author-year bibliography and citation style as there are of Christianity.

Depending on what you need, you should just be able to use \autocite, \parencite, or \textcite rather than \cite. Just to give a flavour:

In 1988 C was totally awesome \parencite{KandR},
while according to \textcite{CUEDCplusplus} C++ was even better.

enter image description here

share|improve this answer

The harvard citation management package does two things rather nicely. First, it provides several authoryear-style citation commands, including \citeasnoun and \possessivecite, that aren't provided by the core LaTeX system. Second, the harvard package provides several predefined bibliography styles. These are, in alphabetical order: agsm, aspr, dcu, jmr, jphysics8, kluwer, and nederlands. Which one of these styles were you planning on using?

I wasn't aware that the harvard package was "out-dated", as you put it. However, it is true that whereas the hyperref package works extremely well with the natbib citation management package, it works slightly less well with the harvard package. If you're a fan of the \citeasnoun and \possessivecite commands and don't wish to stop using them just because you want full interoperability with hyperref, here's a solution: Load both the natbib and the har2nat packages. (You have three guesses as to what the har2nat package does...) That way, you can use all of the harvard package's citation commands and fully use any and all of the package's bibliography styles, while enjoying full interoperability with hyperref.

share|improve this answer
    
I heard that the Harvard package was outdated ctan.org/tex-archive/macros/latex/contrib/harvard But if you can still use it, what are the advantages? ie: Are the Harvards Package's \citeasnoun and \possessivecite better than biblatex's \parencite or \textcite? –  John Crawford Mar 16 '13 at 18:46
1  
@JohnCrawford - The \parencite and \textcite commands of the \biblatex package are very similar to the \citep and \citet commands of the natbib package. The macro \citeasnoun of the \harvard package is replicated by natbib's \citeauthor command. To replicate harvard's \possessivecite command, you could load the har2nat package. Do read the user guide to familiarize yourself with the harvard package's citation-related commands and various bibliography styles. By the way, the link you provide doesn't seem to support the claim that the package is outdated. –  Mico Mar 16 '13 at 19:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.