2

Context

I have a thesis of over 340 pages written using LaTeX and one massive BibTeX file for references (.bib). The thesis employs the \cite{} command for all in-text citations, there is a zillion of these scattered in all the chapters. I know there are other questions tackling transforming from BibTeX + natbib to BibLaTeX & vice versa.

When using natbib + BibTeX TO BibLaTeX, the solution would be to add the option natbib=true but this relies on using already \citet and \citep throughout the document not the traditional \cite{} if I am not mistaken.

Anyway my context is different. I only have the \cite{} command used. This is why I called it the pure Vanilla BibTeX \cite{} command - no other packages used. I wanted to change my citation style to an author-year style so I moved to BibLaTeX and used the apa style. The previous citation style was numerical: [1-3]

\usepackage[backend=biber,style=apa,citestyle=authoryear]{biblatex}

The first problem encountered is that all \cite{} instances gave me the traditional non-parenthetical citations which I do not want. Ex: Cabanier et al., 2014 instead of (Cabanier et al., 2014).

That can be solved by changing every \cite{} to \autocite{} or \parencite{} but that would be cumbersome to do for all the instances. I have thousands of instances.

The second problem encountered is that only part of citation i.e. the year is clickable not the whole citation. I am using also hyperref.

Question

Apologies! I am new to BibLaTeX, any suggestions on how to solve both problems, are greatly appreciated.

  • I'd not use style=apa,citestyle=authoryear. style=apa is a full-blown implementation of APA style for biblatex, whereas authoryear is 'just' a simple author-year style. I'd use style=apa only if APA style or something extremely close to APA style is required. If citestyle=authoryear is appropriate, chances are you don't actually want APA style. – moewe May 21 at 19:58
2

Every good text editor should have a search-and-replace feature.

It should be quite safe to replace

  • \cite[ with \autocite[ and
  • \cite{ with \autocite{.

Make a backup of your file, then perform the search-and-replace, compile and scrutinise the output carefully.

In theory you could just take the definition of \parencite from the .cbx and replace \parencite with \cite to redefine \cite to give the same output as \parencite. But that feels like cheating, is inconsistent with usual behaviour, prevents you from using the real \cite should you want to and may have some subtle stumbling blocks that mean that the output is slightly different (think delimiter contexts).


The link thingy is a commonly mentioned issue, have a look at hyperlink name with biblatex authoryear (biblatex 1.4b) and linked questions.

  • Thanks a lot for the answer. – HB87 May 22 at 14:30
  • I hoped to find solutions such as having some sort of a redefinition of \cite{} command to behave like \autocite{} or some sort of a macro or some option in the package that I am not aware of. But your solution will do it also. I do believe a good addition to the package is an option to change the behaviour of \cite{}. I hope I can contact the BibLaTeX developpers, maybe this might be interesting to add as a feature. Thx again – HB87 May 22 at 14:39
  • @HB87 You can already change the behaviour of \cite. And as I mentioned it would quite easily be possible to redefine \cite to behave more or less like \parencite. I did not explore this in more depth because I believe it is the wrong approach: The set of citation commands in biblatex is quite sensible and it is a very good idea to use the high-level \autocite command. (Plus it would be confusing if \cite behaved differently in your document) The search-and-replace job should be easily done in most editors and is not complicated or tricky, so I see little point in not going for it. – moewe May 22 at 14:44
  • Thx a lot for all the help – HB87 May 22 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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