2

My code:

\documentclass{article}
\usepackage[british]{babel}
\usepackage[style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}

Read \textcite{sarfraz}

\printbibliography
\end{document}

Reference list this creates:

Sarfraz, M. and M. F. A. Razzak (2002). “Technical section: An algorithm for automatic capturing of the font outlines”. In: Computers and Graphics 26.5, pp. 795–804. issn: 0097-8493.

But the output I need is:

Sarfraz, M. and M. F. A. Razzak (2002). “Technical section: An algorithm for automatic capturing of the font outlines”. In: Computers and Graphics, 26(5), pp. 795–804. issn: 0097-8493.

So instead of "Computers and Graphics 26.5,", I want "Computers and Graphics, 26(5),".

So I try this:

\documentclass{article}
\usepackage[british]{babel}
\usepackage[style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareFieldFormat{journaltitle}{\mkbibemph{#1\isdot\addcomma}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\begin{document}

Read \textcite{sarfraz}

\printbibliography
\end{document}

Now I get:

Sarfraz, M. and M. F. A. Razzak (2002). “Technical section: An algorithm for automatic capturing of the font outlines”. In: Computers and Graphics, 26.(5), pp. 795–804. issn: 0097-8493.

This is almost what I want except that I still need to get rid of the dot from "26.(5)". How can I change "26.(5)" to "26(5)"?

1 Answer 1

1

You could redefine the volume+number+eid macro:

\documentclass{article}
\usepackage[british]{babel}
\usepackage[style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}

\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
%  \setunit*{\adddot}%
  \printfield{number}%
  \setunit{\bibeidpunct}%
  \printfield{eid}}


\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\begin{document}

Read \textcite{sarfraz,angenendt}

\printbibliography
\end{document}

Or you could switch to a style from the biblatex-ext package. Then you could simply do \renewcommand*{\volnumdelim}{} to remove the period:

\documentclass{article}
\usepackage[british]{babel}
\usepackage[style=ext-authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}
\renewcommand*{\volnumdelim}{}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\begin{document}

Read \textcite{sarfraz,angenendt}

\printbibliography
\end{document}

enter image description here

2
  • Adding trailing punctuation in field formats as in \DeclareFieldFormat{journaltitle}{\mkbibemph{#1\isdot\addcomma}} is rarely a good idea as it bypasses biblatex's punctuation buffer and relies on other bits of biblatex's punctuation tracking to avoid double punctuation (which may not always work). With biblatex-ext you have \jourvoldelim available to modify the relevant punctuation command. With plain biblatex you have to redefine journal+issuetitle as well.
    – moewe
    Commented Jan 24, 2023 at 16:04
  • @moewe I removed this line as it is not directly related to the question. Commented Jan 24, 2023 at 16:12

You must log in to answer this question.

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