# Customising @inbook or @incollection bibliography entry?

I'm very new to LaTeX, only started coding last weekend. I've learned the basics of bibtex and switched to biblatex to use for my bibliography.

I've been fighting my way through tutorials trying get my own version of the harvard-style. I need it to be authoryear backended with bibtex. I've formatted the @article to my liking, but I've been stumbling over the @inbook and @incollection formatting. If somebody could help me reorder the reference and format some delimiters, it would be great.

I need those to look as such:

• Smith, M. P. & Wu, C., 2000. The geology and genesis of the Bayan Obo Fe–REE–Nb deposit: a review. In: Porter, T.M. (Ed.), Hydrothermal Iron Oxide Copper–Gold and Related Deposits: a Global Perspective. Australian Mineral Foundation, Adelaide, pp. 271–281.

Thus far my code returns this (the 2 relevant @inbooks are #11 and #13):

MWE of my preamble thus far

\documentclass[a4paper, 12pt, twoside]{report}

\usepackage[top=1in, bottom=1in, left=1in, right=1in, paperwidth=8.5in, paperheight=11in]{geometry}
\usepackage{titlesec}
\usepackage[utf8]{inputenc}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}{0pt}{0pt}{20pt}
\usepackage{xcolor}
\usepackage{siunitx}
\usepackage[polish, english]{babel}
\usepackage{enumitem} % listing package

%Referencing Style
\usepackage{hyperref}
\hypersetup{colorlinks = true, citecolor = blue} % recolors hyperlinks

\usepackage
[backend=bibtex,
style=authoryear-comp,
citestyle=authoryear-icomp,
maxcitenames=2, % sets limit for et al in citations
maxbibnames=99, % frees up limits to authors listed in references
giveninits=true, % initialise each author
sorting=nyt, % sort by name, author and publication title
hyperref=true]{biblatex} % citation hyperlinks

\defbibenvironment{bibliography}
{\enumerate{}
{\setlength{\leftmargin}{\bibhang}%
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}}
{\endenumerate}
{\item}

%Corrections to referencing style

\DeclareFieldFormat*{title}{{#1}} % * clears formatting of publication titles
\DeclareFieldFormat*{journaltitle}{\mkbibemph{#1}\isdot} % italicised journal titles

\renewbibmacro{volume+number+eid}{%
\setunit{\adddot\addspace}%
\printfield{volume}%
\printfield{number}%
\setunit{\addcomma\space}%
\printfield{eid}} % changed volume-number-pages layout

\renewcommand*{\bibpagespunct}{\addcolon} % colon between volume numbers and pages
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}} % parentheses around volume number

\DeclareDelimFormat{translatortypedelim}{\addspace} % parentheses bracket around Ed.

\DeclareBibliographyDriver{inbook}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\printdelim{nametitledelim}}\newblock
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock % <- change
\printfield{chapter}
\DeclareFieldFormat[chapter]{
\usebibmacro{in:}%
\usebibmacro{byeditor+others}%
\newunit\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}

\DeclareNameAlias{sortname}{family-given} % puts given names after surname
\DeclareFieldFormat{postnote}{#1}% no postnote prefix in "normal" citation commands
\DeclareFieldFormat{multipostnote}{#1}% no postnote prefix in "multicite" commands
\DeclareFieldFormat{pages}{#1}% no prefix for the pages field in the bibliography
\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}}%emboldens volume #
\renewbibmacro{in:}{}

\newcommand{\biband}{\ifcurrentname{labelname}{\bibstring{and}}{\&}} % changes citation 'and' to ampersand
\renewcommand*\finalnamedelim{ \& } % references delimiter becomes ampersand
\renewcommand*{\nameyeardelim}{\addcomma\space} % adds comma between cited author and year

\addbibresource{Bib/References.bib}

%Paragraph indentation
\setlength{\parindent}{2em}
\setlength{\parskip}{0.5em}

\begin{document}


And my .bib file:

@Article{Salvi1996,
author  = {Stefano Salvi and Anthony E. Williams-Jones},
title   = {The role of hydrothermal processes in concentrating high-field strength elements in the Strange Lake peralkaline complex, Northeastern Canada},
journal = {Geochimica et Cosmochimica Acta},
year    = {1996},
volume  = {60},
number  = {11},
pages   = {1917-1932},
}

@InBook{Smith2000,
chapter   = {The geology and genesis of the Bayan-Obo Fe-REE-Nb deposit: a review},
pages     = {271-281},
title     = {Hydrothermal iron-oxide, copper-gold and related deposits: a global perspective},
publisher = {Australian Mineral Foundation},
year      = {2000},
author    = {M. P. Smith and C. Wu},
editor    = {Porter, T.M.},
address   = {Adelaide},
}

@Article{Smith2007,
author    = {M.P. Smith},
title     = {Metasomatic silicate chemistry at the Bayan Obo Fe{\textendash}{REE}{\textendash}Nb deposit, Inner Mongolia, China: Contrasting chemistry and evolution of fenitising and mineralising fluids},
journal   = {Lithos},
year      = {2007},
volume    = {93},
number    = {1-2},
pages     = {126--148},
month     = {jan},
doi       = {10.1016/j.lithos.2006.06.013},
publisher = {Elsevier {BV}},
}

@InBook{Wu1996,
chapter   = {Rare earth deposits in China},
pages     = {281–310.},
title     = {Rare Earth Minerals: Chemistry, Origin and Ore Deposits},
publisher = {Chapman and Hall},
year      = {1996},
author    = {C. Wu and Z. Yuan and G. Bai},
editor    = {A.P. Jones and F. Wall and C.T. Williams},
}

@Article{Yang2004,
author    = {Xue-Ming Yang and Le Bas, M.J.},
title     = {Chemical compositions of carbonate minerals from Bayan Obo, Inner Mongolia, China: implications for petrogenesis},
journal   = {Lithos},
year      = {2004},
volume    = {72},
number    = {1-2},
pages     = {97--116},
month     = {jan},
doi       = {10.1016/j.lithos.2003.09.002},
publisher = {Elsevier {BV}},
}

@Article{Zhang2017,
author    = {Shuan-Hong Zhang and Yue Zhao and Yongsheng Liu},
title     = {A precise zircon Th-Pb age of carbonatite sills from the world's largest Bayan Obo deposit: Implications for timing and genesis of {REE}-Nb mineralization},
journal   = {Precambrian Research},
year      = {2017},
volume    = {291},
pages     = {202--219},
month     = {apr},
doi       = {10.1016/j.precamres.2017.01.024},
publisher = {Elsevier {BV}},
}



I need:

1. To remove the 'Chap.' prefix when chapter is printed. Just to have an unformatted title.
2. Have booktitle go after the 'In:' and the editor names. It'd be great if it was italicised.
3. Have 'Ed. (or Eds, if several editors are named) precede the booktitle)
4. Have the remaining information like publisher come after these.
5. To have pp. visible before the pages for @inbook and not for other references where volume and number are defined.

Sorry if there's something I haven't provided. I tried looking up the previous questions, but it seems to me preferences on formatting of these are countless and it's difficult to dislodge the principle driving biblatex from other answers. I mostly end up copying somebody else's code, often without being able to tell ins and outs of it all.

Hope someone could help! Thanks!

PS - if anybody by a chance has an idea how to format the bibliography in authoryear style so that the enumerate labels are indented to be almost within the page margin instead of squeezing the text into the middle of the frame, that'd be of big help as well!

• Welcome to TeX.SX! Please note that you have a much better chance of getting good answers quickly if you only ask about one thing per question (however related the several issues here may be). That way you don't risk scaring away those who only have solutions to some of your desiderata. Keeping several requests separate also helps keeping the site relevant for other people as well. See tex.meta.stackexchange.com/q/7425/35864 – moewe Jun 20 at 20:07
• Ad 1) and 2) The chapter title of an @inbook/@incollection should be given in the title field, not in chapter (chapter should just contain the chapter number). The title of the book/collection should go into booktitle and not title. – moewe Jun 20 at 20:10
• Ad 3) and 4) This is possible, but requires changes to the driver. You already modify the inbook driver (I haven't had a closer look at the code, maybe that is no longer necessary once you fix the issues mentioned above?), but some more work would be needed. See for example tex.stackexchange.com/q/173638/35864 – moewe Jun 20 at 20:13
• Ad 5) Maybe just replace \DeclareFieldFormat{pages}{#1} with \DeclareFieldFormat[article]{pages}{#1}? – moewe Jun 20 at 20:14
• Not sure about your PS. Please ask a new question with more explanations what you mean about that if you are interested in a solution- – moewe Jun 20 at 20:15

## 1 Answer

In both cases in which you currently employ the @inbook entry type, you really ought to be employing the @incollection entry type. Moreover, as was already noted by @moewe in his comments, you should change the title fields to booktitle and the chapter fields to title.

@incollection{Smith2000,
author    = {M. P. Smith and C. Wu},
title     = {The geology and genesis of the Bayan-Obo Fe-REE-Nb deposit: a review},
editor    = {Porter, T. M.},
booktitle = {Hydrothermal iron-oxide, copper-gold and related deposits: a global perspective},
year      = {2000},
pages     = {271--281},
publisher = {Australian Mineral Foundation},
address   = {Adelaide},
}

@incollection{Wu1996,
author    = {C. Wu and Z. Yuan and G. Bai},
title     = {Rare earth deposits in China},
editor    = {Adrian P. Jones and Frances Wall and C. Terry Williams},
booktitle = {Rare Earth Minerals: Chemistry, Origin and Ore Deposits},
year      = {1996},
chapter   = {11},
pages     = {281--310},
publisher = {Chapman and Hall},
series    = {Mineralogical Society Series},
number    = {7},
}

• Cheers for replying! Any particular reason why I should use @incollection rather than @inbook? Is it to do with the default arrangement of fields in either of those? – Wolfe79 Jun 21 at 18:04
• @Wolfe79 There is a difference between @book and @collection that carries through to @inbook and @incollection. A @book is usually a work written in its entirety by a set of authors who are jointly responsible for the complete work. The biblatex documentation explains "A [...] book with one or more authors where the authors share credit for the work as a whole." A @collection is a, well ... collection, of works by several authors. The complete work is curated, compiled and edited by a team of editors. ... – moewe Jun 22 at 5:16
• ... The biblatex docs have "A [...] collection with multiple, self-contained contributions by distinct authors which have their own title. The work as a whole has no overall author but it will usually have an editor. " The editors' names are usually associated with the whole @collection, but they need not have authored a significant part of the book (save for maybe a short introduction). If a work explicitly mentions the authors of each chapter and there is little overlap between the authors of each chapter and the complete work has an editor, it's probably a @collection. – moewe Jun 22 at 5:17
• For many intents in purposes biblatex will still give acceptable results if you mix up @incollection and @inbook (I just tested the two entries here with style=authoryear and the results in the bibliography were the same for @inbook and @incollection), but there are some subtle differences and it is a good idea to pick the right entry type for the job. – moewe Jun 22 at 5:24