[Tex/LaTex] How to cite with only year inside brackets, and not both name-year

biblatexbibliographiesbibtextexshop

I am new to using Bibtex and Latex, writing the document in Texshop. I have been able to get working my Bibliography which I particularly wanted in the Harvard Referencing Style. However, the result is that both name and year come within parentheses Eg. (Chatterjee et al. 2018), but I want this to be like Chatterjee et al. (2018).

The basic main.tex based packages I am using are outlined below:-

\usepackage[style=authoryear, backend=bibtex]{biblatex}
\addbibresource{references.bib}
\DeclareNameAlias{sortname}{family-given}

I am using \autocite{referencename} for the purpose of in-text citations, which is giving me the aforesaid result. I went through several more questions related to this on Stackexchange, but couldn't find how to get this done in an easy way, without much complex changes to the document. Any help in this regard would be greatly appreciated. Thanks!

Best Answer

\textcite will give output of the form

Sigfridsson and Ryde (1998)

If that should be your default referencing style you can make \autocite give the same result by defining a new \autocite flavour. (And I'm a big fan of using \autocite as much as possible.)

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

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

\DeclareAutoCiteCommand{inlinetext}{\textcite}{\textcites}
\ExecuteBibliographyOptions{autocite=inlinetext}

\addbibresource{biblatex-examples.bib}

\begin{document}
\autocite{sigfridsson}
\printbibliography
\end{document}

Sigfridsson and Ryde (1998)

If you need both the \parencite style '(Sigfridsson and Ryde 1998)' and \textcite style 'Sigfridsson and Ryde (1998)' in your document, you can unfortunately only choose one of the two as your \autocite flavour (\parencite would be inline, \textcite the newly defined inlinetext).