Change bibliography for book section.

In my bibliography, book sections are like this:

Hoyo, J. del, Collar, N. & Christie, D. A. 2020. Eurasian Three-toed Woodpecker (Picoides tridactylus), version 1.0., in Billerman, S. M., Keeney, B. K., Rodewald, P. G. & Schulenberg, T. S. (ed.) Birds of the World. Cornell Lab of Ornithology, Ithaca, NY, USA.

I need them to be like this, therefore no comma before 'In', the word 'In' in title case and a colon just after 'In'

Hoyo, J. del, Collar, N. & Christie, D. A. 2020. Eurasian Three-toed Woodpecker (Picoides tridactylus), version 1.0. In: Billerman, S. M., Keeney, B. K., Rodewald, P. G. & Schulenberg, T. S. (ed.) Birds of the World. Cornell Lab of Ornithology, Ithaca, NY, USA.

How can I edit the csl file so book section come out like lower example?
  • What style are you using? That's the key info we need. ;)
  • I am using my own style, which is adapted from an existing style. I cannot see a way to attach the cal file here. Could I email it to you?
  • Upload it to pastebin.com
  • I've uploaded it to pastebin. Looks like this is link: https://pastebin.com/raw/aPubePnq
  • edited March 23, 2022
    Change the following 2 macros to this:

    <macro name="container-contributors">
    <choose>
    <if type="chapter paper-conference" match="any">
    <text macro="container-prefix" prefix=". " suffix=" "/>
    <group delimiter=". ">
    <names variable="container-author" delimiter=", ">
    <label form="short" prefix=" (" suffix=")" plural="never"/>
    </names>
    <names variable="editor translator" delimiter=", ">
    <name and="symbol" delimiter-precedes-last="never" initialize-with=". " name-as-sort-order="all"/>
    <label form="short" prefix=" (" suffix=")" plural="never"/>
    </names>
    </group>
    </if>
    </choose>
    </macro>


    <macro name="container-prefix">
    <text term="in" text-case="capitalize-first"/>
    </macro>


    If this style is actually for a journal called British Birds, we'd welcome if you submitted to the repository so other users can profit from your work as well. Let us know.
  • Many thanks. How do I put a colon after 'In'?

    Also, can I change 'ed.' to 'eds.' if there is more 1 editor?
  • 1. In above code box change <text macro="container-prefix" prefix=". " suffix=" "/> to <text macro="container-prefix" prefix=". " suffix=": "/>

    2. You need to set the editor label plural value from "never" to "contextual".

  • Many thanks for your amazing help on this :)

    In this line:

    '(eds.) Birds of the World'

    I need a comma like this:

    '(eds.), Birds of the World'

    Do you know how I can do this? Just had a half hour altering various parts of the code without success.
  • Do you know how I can put a comma before Birds of the World like this:

    '(eds.), Birds of the World'

    I have tried adding a comma to the 'suffix' in various macros, but this does not seem to be having any effect.
  • You're giving a tiny excerpt of a full citation. It is not clear what item type or which metadata fields this is in regards to. Also, as you probably have made many more changes to your initial code, we'd need to see your latest code. Without either, we can not help, and hence nobody had answered.
  • Many thanks for reply.

    Latest code: https://pastebin.com/T9QyiV0w

    For book section, the bibliography entry looks like this:

    Hoyo, J. del, Collar, N. & Christie, D. A. 2020. Eurasian Three-toed Woodpecker (Picoides tridactylus), version 1.0. In: Billerman, S. M., Keeney, B. K., Rodewald, P. G. & Schulenberg, T. S. (eds.) Birds of the World. Cornell Lab of Ornithology. Ithaca, NY, USA. [Retrieved from https://birdsoftheworld.org/bow/species/ettwoo1/cur/introduction?login#conserv on 15th December 2020].

    But I need it to have a comma between (eds.) Birds of the World, like this:

    Hoyo, J. del, Collar, N. & Christie, D. A. 2020. Eurasian Three-toed Woodpecker (Picoides tridactylus), version 1.0. In: Billerman, S. M., Keeney, B. K., Rodewald, P. G. & Schulenberg, T. S. (eds.), Birds of the World. Cornell Lab of Ornithology. Ithaca, NY, USA. [Retrieved from https://birdsoftheworld.org/bow/species/ettwoo1/cur/introduction?login#conserv on 15th December 2020].
  • Add the comma as a suffix in the group inside the container-contributors macro.
  • edited April 5, 2022
    I added suffix=", " to the code, bit it doesn't seem to have had any effect. Where exactly do I need to add suffix=", "?

    Original code:

    macro name="container-contributors"
    choose
    if type="chapter paper-conference" match="any"
    text macro="container-prefix" prefix=". " suffix=": "/
    group delimiter=". "
    names variable="container-author" delimiter=", "
    label form="short" prefix=" (" suffix=")" plural="contextual"/
    /names

    With suffix=", " added in second last line:

    macro name="container-contributors"
    choose
    if type="chapter paper-conference" match="any"
    text macro="container-prefix" prefix=". " suffix=": "/
    group delimiter=". "
    names variable="container-author" delimiter=", "
    label form="short" prefix=" (" suffix=")" plural="contextual" suffix=", "/
    /names
  • Do you know where exactly add the comma as a suffix?

    Also how do I make et al. in italics in the bibliography?
  • edited April 13, 2022
    You can add it on line 448 like so:
    <text macro="container-contributors" suffix=","/>

    You never answered if this style is actually for the journal British Birds. Chicago-based styles are inherently not beginner-friendly. If you are ok with it, I can go over the style and submit it to the repository for you.
  • Hi,
    Just following up here. Could you answer for which journal exactly (with a link) this is and if you're ok with me taking your code, refining and providing to all our user base and other researchers in the ornithology field?
  • Its this journal, but it calls itself a magazine: https://britishbirds.co.uk/

    I think my code will definitely need refining and I don't think it can be trusted. I didn't know what I was doing at all.
Sign In or Register to comment.