1

I am trying to add the final touches to a customisation of Biblatex. However, for book I am unable to call publisher or location. I am using

\DeclareBibliographyDriver{book}{%
    \printnames{author}%
\   \newblock
    \printtext[parens]{\printfield{year}}\addperiod%
\   \newblock
    \printfield{title}%
\   \newblock
    \printfield{edition}%
    \newunit\newblock
    \printfield{publisher}%
    \newunit\newblock
    \printfield{location}%
}

with the bibtem

@book{B:random-graphs,
    location = {{Cambridge}},
    title = {Random {{Graphs}}},
    edition = {2},
    series = {Cambridge Studies in Advanced Mathematics},
    publisher = {{Cambridge University Press}},
    date = {2001},
    author = {Bollob{\'a}s, B{\'e}la},
    doi = {10.1017/CBO9780511814068}
}

This outputs the following. <<output>>

I don't understand why the \printfield{publisher} and \printfield{location} lines don't make this as follows:

B. Bollobas (2001). Random Graphs 2nd ed. Cambridge University Press Cambridge

Assistance would be most appreciated! :)

2
  • 3
    Both the publisher and location fields are not actually fields in the sense of biblatex's data model, they are lists and must be printed with \printlist{publisher} and \printlist{location}. Check the documentation for the type of each field.
    – moewe
    Commented May 9, 2018 at 15:20
  • 1
    Magic, thank you! (Feel free to write it as an answer, and I'll accept)
    – Sam OT
    Commented May 9, 2018 at 15:25

1 Answer 1

3

biblatex 'fields' come in three major flavours

  1. field printed with \printfield
  2. list printed with \printlist
  3. name list printed with \printnames

So you need to know the type of the 'field' you want to print and choose the correct \print... command.

You can find out about the type of each 'field' in the biblatex documentation, §2.2 Entry Fields.

Both publisher and location are actually lists, so you need

\printlist{publisher}

and

\printlist{location}
4
  • Thanks very much! -- I've just added a follow up question, which is extremely similar. If you have time to look at it, I'd be most appreciative :)
    – Sam OT
    Commented May 9, 2018 at 15:42
  • @SamT Please consider making that a new question. It is for an entirely different reason: biblatex simply does not know the field mrclass and mrnumber. You'll have to tell Biber about it, see the second part of tex.stackexchange.com/q/150393/35864, tex.stackexchange.com/q/151628/35864 or tex.stackexchange.com/q/155532/35864. I'm currently writing up a lengthy answer to your other question, so you'll have to wait a bit for further input on that matter.
    – moewe
    Commented May 9, 2018 at 15:46
  • Ok, thank you. I'll read your other (extensive!) answers first, as linked; hopefully I can work out how to do it from those! :)
    – Sam OT
    Commented May 9, 2018 at 15:52
  • So I was able to work out the majority of it :) -- there was just a small part that I wasn't able to get. If you are able to have a look at it, I'd be hugely grateful. Even if you can't, you've done loads for me today and I'm extremely grateful! (Link: tex.stackexchange.com/questions/430862/…)
    – Sam OT
    Commented May 9, 2018 at 18:00

You must log in to answer this question.

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