[Tex/LaTex] biblatex – volume and issue in words and with comma in front of them

biblatex

So the current product looks like this:

Gillies, A. (1933), “Herder and the Preparation of Goethe’s Idea of World Literature”,
in: Publications of the English Goethe Society 9 (2), pp. 46–67.

Due to guidelines I must produce this though:

Gillies, A. (1933), “Herder and the Preparation of Goethe’s Idea of World Literature”,
in: Publications of the English Goethe Society, vol. 9, iss. 2, pp. 46–67.

("Volume" and "issue" would be fine as well.)

Here is an MWE:

\documentclass[
12pt,
a4paper
]
{scrreprt}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
%\usepackage[english]{babel}

\usepackage{hyperref}
\usepackage[
language=auto,
style=authoryear,
backend=bibtex,
hyperref=true,
isbn=false,
doi=false,
citereset=chapter,
maxcitenames=3,
dashed=false,
sorting=nyt,
natbib=true, %faking natbib-commands
firstinits=true,
terseinits=false
maxbibnames=99,
%autopunct=true,
uniquename=init
]{biblatex}
\usepackage{xpatch}

\renewcommand*{\newunitpunct}{\addcomma\space} 

\begin{filecontents*}{lit.bib}

@Article{gillies,
  hyphenation     = {british},
  author      = {Gillies, Alexander},
  title       = {Herder and the Preparation of Goethe's Idea of World Literature},
  journaltitle    = {Publications of the English Goethe Society},
  volume      = {9},
    issue = {2},
  date        = {1933},
  pages       = {46--67},
  annotation      = {An \texttt{article} entry with a \texttt{series} and a \texttt{volume} field.
            Note that format of the \texttt{series} field in the database file}
}
\end{filecontents*}

\addbibresource{lit.bib}

\begin{document}
\chapter{First Chapter}
\begin{itemize}
    \item For the case of multiple editors, these are just some words.\footcite[See][p. xi]{gillies}.
\end{itemize}
\printbibliography
\end{document}

Best Answer

The following achieves the customization that you wanted. It is a lot of code (but mostly repetition of default code) purely because I wanted to make it a bit more robust. It's not perfect ( I ran out of time and hacked a bit) but it should work.

Note: As the solutions stands the comma and space before the number field in incollection will only be present if the series field is immediately before (should always be the case, though)

EDIT: if the incollection ref should print as-is, you need to comment out the lines marked in the code below - that way the representation of number will be unchanged

\documentclass[
12pt,
a4paper
]
{scrreprt}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
%\usepackage[english]{babel}

\usepackage{hyperref}
\usepackage[
language=auto,
style=authoryear,
backend=bibtex,
hyperref=true,
isbn=false,
doi=false,
citereset=chapter,
maxcitenames=3,
dashed=false,
sorting=nyt,
natbib=true, %faking natbib-commands
firstinits=true,
terseinits=false
maxbibnames=99,
%autopunct=true,
uniquename=init
]{biblatex}
\usepackage{xpatch}

\renewcommand*{\newunitpunct}{\addcomma\space} 

\begin{filecontents*}{lit.bib}
@InCollection{brandt,
  options     = {useprefix=false},
  hyphenation     = {german},
  indexsorttitle  = {Nordischen Lander von der Mitte des 11. Jahrhunderts bis 1448},
  author      = {von Brandt, Ahasver and Hoffmann, Erich},
  editor      = {Ferdinand Seibt},
  indextitle      = {Nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis 1448, Die},
  title       = {Die nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis 1448},
  shorttitle      = {Die nordischen L{\"a}nder},
  booktitle   = {Europa im Hoch- und Sp{\"a}tmittelalter},
  series      = {Handbuch der europ{\"a}ischen Geschichte},
  number      = {2},
  publisher   = {Klett-Cotta},
  location    = {Stuttgart},
  date        = {1987},
  pages       = {884--917},
  annotation      = {An \texttt{incollection} entry with a \texttt{series} and a \texttt{number}.
            Note the format of the printed name and compare the \texttt{useprefix} option in
            the \texttt{options} field as well as \texttt{vangennep}. Also note the
            \texttt{indextitle, and \texttt{indexsorttitle} fields}}
}
@Article{gillies,
  hyphenation     = {british},
  author      = {Gillies, Alexander},
  title       = {Herder and the Preparation of Goethe's Idea of World Literature},
  journaltitle    = {Publications of the English Goethe Society},
  volume      = {9},
    issue = {2},
  date        = {1933},
  pages       = {46--67},
  annotation      = {An \texttt{article} entry with a \texttt{series} and a \texttt{volume} field.
            Note that format of the \texttt{series} field in the database file}
}
\end{filecontents*}

\addbibresource{lit.bib}

%taken from standard.bbx
\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addspace}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addspace}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\addcomma\space}% THIS LINE CHANGED to add comma
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \newunit}

%taken from standard.bbx
\renewbibmacro*{issue+date}{%
  \printtext{%   REMOVED parenthesis here
    \iffieldundef{issue}
      {\usebibmacro{date}}
      {\printfield{issue}%
       \setunit*{\addspace}%
       \usebibmacro{date}}}%
  \newunit}

%modified from english.lbx
\DefineBibliographyStrings{english}{%
    issue  = {\lowercase{i}ss\adddot}, % avoid capitalization after dots.
}

%modified from biblatex.def
%starred version removes entry specific formatting
\DeclareFieldFormat*{volume}{\bibstring{volume}~#1\space}
\DeclareFieldFormat*{issue}{\bibstring{issue}~#1}
\DeclareFieldFormat*{number}{\bibstring{number}~#1} %comment to leave number as before
\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}\addcomma\space}
\DeclareFieldFormat{series}{{#1}\addcomma\space} %comment to leave number as before


\begin{document}
\chapter{First Chapter}
\begin{itemize}
    \item For the case of multiple editors, these are just some words.\footcite[See][p. xi]{gillies}.
    \item Something for the other thing.\footcite{brandt}
\end{itemize}
\printbibliography
\end{document}

If you would like to have 'vol.' instead of 'no.' an easy fix for that is to replace

\DefineBibliographyStrings{english}{%
    issue  = {\lowercase{i}ss\adddot}, % avoid capitalization after dots.
}

with

\DefineBibliographyStrings{english}{%
    number = {\lowercase{v}ol\adddot}, % avoid capitalization after dots.
    issue  = {\lowercase{i}ss\adddot}, % avoid capitalization after dots.
}