4

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}
  • 1
    I notice that you want the number field to also print 'vol.', is that correct ? – ach May 15 '13 at 19:43
  • Oh. Nice catch. No, I do not want that. I amended my MWE. – henry May 15 '13 at 20:12
  • So you want to print the incollection article as is ? My answer below assumes the original objective – ach May 15 '13 at 20:25
  • Actually, after a second thorough look into the guidelines, you highlighted an ambiguous item which seems to be technically wrong. So thanks for that as well, your comment about the number field printing volume or vol. is quite helpful. I am to try out the code you provided, I am sure it is going to work and I can choose either method. – henry May 16 '13 at 8:30
3

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.
}
  • I have a question: so I had this in my biblatex-file. Now that I see your last paragraph with the some same fieldformat declarations, I am wondering if if can use both, except for your journaltitle. They way I see it, I think these are indeed different fields and there should be no consistency problem. Right? – henry May 16 '13 at 9:55
  • 1
    Yes you should be able to use your field formats, removing my journaltitle one. – ach May 16 '13 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.