# How to place parentheses around year in list of references

I am using bath BibLaTeX and need to add parentheses around the year in the generated references list.

It currently looks like this:

Beth, T. 1989

and I need it to look like this

Beth, T. (1989)

The source code is on GitHub, with the author mentioning that the .dtx file can be amended and recompiled? I have tried altering the text within the file, but can't compile it correctly.

Would someone be able to point me in the right direction please?

• Please provide a MWE that demonstrates your problem. There is not enough information given to answer your question. However, if indeed you are using biblatex, probably you are looking for the \textcite command. – David Purton Feb 24 '19 at 4:32
• While I'm fairly confident that I understood your question correctly, please keep in mind for future questions that it is much easier to answer questions like this if they come with a short example document, a so-called MWE (tex.meta.stackexchange.com/q/228/35864) or MWEB (tex.meta.stackexchange.com/q/4407/35864), that reproduces the status quo and tells us more about what you are doing. In LaTeX there are generally a great many ways to do things and it is not always entirely clear from the question which way was taken. – moewe Feb 24 '19 at 7:35

biblatex-bath is an extremely well-written style and its author implemented a field format datelabel to control the typesetting of the year in the bibliography. Together with nameyeardelim it only takes two lines to wrap the year in the bibliography in parentheses.

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

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

\DeclareFieldFormat{datelabel}{\mkbibparens{#1}}


It is worth pointing out that biblatex-bath is a style specifically designed to implement the author-year (Harvard) style as interpreted by the University of Bath's Library (http://library.bath.ac.uk/referencing/harvard-bath). If you want to deviate from custom styles it is often a be a better idea to start from one of the standard styles instead. Some small changes are often simple, but some things may turn out to be more complicated than initially thought (and more complicated than in the standard styles). But since biblatex-bath is a very well-written style the chances that you run into troubles are quite low.
For future readers: Note that this answer applies only to biblatex-bath. The standard styles automatically have parentheses around the year in citations. If you want to change that, have a look at How to (properly) remove the parentheses around the year in authoryear style? (v3).