1

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?

2
  • 3
    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. Commented Feb 24, 2019 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
    Commented Feb 24, 2019 at 7:35

1 Answer 1

2

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}

\DeclareDelimFormat[bib]{nameyeardelim}{\addspace}
\DeclareFieldFormat{datelabel}{\mkbibparens{#1}}

\addbibresource{biblatex-examples.bib}

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

Sigfridsson, E. and Ryde, U. (1998). Comparison of methods for deriving atomic charges from the electrostatic potential and moments. Journal of Computational Chemistry, 19(4), pp.377–395. Available from: https://doi.org/10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P.

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).

2
  • Thank you, is there a way to also change the position and wording of the text within the reference list? Commented Feb 24, 2019 at 12:13
  • @JasonHigginson Depends on what wording you mean and what you have in mind. Please ask a new question about that and include an MWE (tex.meta.stackexchange.com/q/228/35864, see the two comments below this question) as well as a detailed description of the status quo and what you would like to see instead.
    – moewe
    Commented Feb 24, 2019 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .