When citing an @incollection
item, the format is
chapterauthor, “Title”, in booktitle, …
However, it should be
chapterauthor, “Title” in booktitle, …
without the comma after “Title”.
I have tried modifying the command that defines the in collection citation but to no avail. Another thing I tried was to implement the following hack from here: How to remove the comma in title bibmacro for ieee style in biblatex?
which removed the comma but capitalised the “in”.
Do you know of a way to remove the comma? I am attaching a MWE that puts the comma behind the title (the patch is commented out).
The fully working example is below. You can simply copy and paste the files into text documents and name them as indicated below and run them in overleaf.
main.tex
is
\documentclass{article}
% Language setting
% Replace `english' with e.g. `spanish' to change the document language
\usepackage[english]{babel}
\usepackage{csquotes}
% Set page size and margins
% Replace `letterpaper' with `a4paper' for UK/EU standard size
\usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
% Useful packages
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorlinks=true, allcolors=blue]{hyperref}
\usepackage{xpatch}
\usepackage[backend=biber, style=mhra]{biblatex}
%hack number one
%\xpatchbibmacro{bbx:title}{\addcomma\space}{\addspace}{}{}
%hack number two
%\xpatchbibdriver{incollection}
%{\usebibmacro{title}}
%{\setunit{\printdelim{nametitledelim}}{}\usebibmacro{title}\printunit%{\intitlepunct}}
%{}
%{}
%\renewcommand{\intitlepunct}{\addbthinspace}
\addbibresource{sample.bib}
\title{Your Paper}
\author{You}
\begin{document}
\maketitle
\begin{abstract}
Your abstract.
\end{abstract}
\section{Introduction}
\href{https://www.overleaf.com/help/97-how-to-include-a-bibliography-using-bibtex}{video tutorial here} to learn more about BibTeX. We ask for\footnote{\cite[xi.]{crut1997}}. We switch reference\footcite{fuentes1986} and come back in the next sentence. Lately, \footnote{\cite[22.]{crut1997}} shows how the "in" is capitalized\footnote{\cite{Taschen-Belifante}}.
\printbibliography
\end{document}
Then, the bibliography sample.bib
is
@article{greenwade93,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351"
}
@book{crut1997,
address = {Cambridge},
author = {Alan Cruttenden},
edition = {2},
publisher = {Cambridge University Press},
title = {Intonation},
year = 1997,
}
@book{mcarthur1986,
author = {Tom McArthur},
title = {Worlds of Reference},
subtitle = {Lexicography, Learning and Language from the Clay Tablet to the Computer},
date = {1986},
publisher = {Cambridge University Press},
location = {Cambridge},
}
@book{fuentes1986,
author = {Carlos Fuentes},
title = {Aura},
date = {1986},
editor = {Peter Standish},
publisher = {University of Durham},
location = {Durham},
series = {Durham Modern Language Series: Hispanic Texts},
number = {1},
}
@book{starobinski1986,
author = {Jean Starobinski},
title = {Montaigne in Motion},
date = {1986},
translator= {Arthur Goldhammer},
publisher = {University of Chicago Press},
location = {Chicago},
}
@incollection{Taschen-Belifante,
author = {Judith C.E. Belifante},
booktitle = {Charlotte Salomon Life? or Theatre? A Selection of 450 Gouaches},
date-added = {2022-09-27 16:33:17 +0100},
date-modified = {2022-09-28 11:42:46 +0100},
publisher = {Taschen},
title = {What is Life? or Theatre??},
year = {2017}}
The file mhra.cbx
is (and I believe here the fix could be made):
\ProvidesFile{mhra.cbx}[$Id: 2011/11/6 v0.1 mhra biblatex citation style$]
% see /usr/local/texlive/2018/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx
\RequireCitationStyle{verbose-ibid}
% Custom strings
\DeclareLanguageMapping{british}{british-mhra}
% Long format for URL date
\ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict,
pagetracker, autocite=footnote,
urldate=long}
\DeclareLabelname[book]{%
\field{author}
\field{editor}
\field{translator}
}
\renewcommand*{\newunitpunct}{\addcomma\addspace}
% "in " rather than "in: ", and don't display for articles
\renewcommand*{\intitlepunct}{\space}
\renewbibmacro{in:}{%
\iffieldequalstr{entrytype}{article}
{}
{%
\printtext{%
\bibstring{in}\intitlepunct}}}
\renewbibmacro*{cite:citepages}{}
\renewbibmacro*{cite:full}{%
\usebibmacro{cite:full:citepages}%
\printtext[bibhypertarget]{%
\usedriver
{\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}%
\usebibmacro{shorthandintro}}
\renewbibmacro*{cite}{%
\ifciteseen
{\iffieldundef{shorthand}
{\ifboolexpr{
test {\ifciteibid}
and
not test {\iffirstonpage}
}
{\usebibmacro{cite:ibid}}
{\usebibmacro{cite:short}}}
{\usebibmacro{cite:shorthand}}}
{\usebibmacro{cite:full}}}
\endinput
Finally, the file mhra.bbx
is:
\ProvidesFile{mhra.bbx}[2011/11/6 v0.1 biblatex bibliography style]
% see /usr/local/texlive/2018/texmf-dist/tex/latex/biblatex/bbx/verbose-ibid.bbx
% -> /usr/local/texlive/2018/texmf-dist/tex/latex/biblatex/bbx/authortitle.bbx
% -> /usr/local/texlive/2018/texmf-dist/tex/latex/biblatex/bbx/standard.bbx
% /usr/local/texlive/2018/texmf-dist/tex/latex/biblatex/biblatex.def
\RequireBibliographyStyle{verbose-ibid}
% Custom strings
\DeclareLanguageMapping{british}{british-mhra}
% TODO: Fix to add page number ({#1}) and parentheses (but no parentheses for subsequent references)
% remove the comma , (pp. 1--2) (try extpostnotedelim)
% for now, use \footnote{\cite{ref} (pp.\ 1--2).}
%\DeclareFieldFormat[article,incollection]{postnote}{\mkbibparens{\mkpageprefix[pagination]{#1}}}
% Don't show pp. before page numbers for article, except for newspapers (no volume number)
\DeclareFieldFormat[article]{pages}{%
\iffieldundef{volume}
{\mkpageprefix[bookpagination]{#1}}
{#1}}
\renewbibmacro*{publisher+location+date}{%
\addspace%
\setunit{}%
\mkbibparens{%
\printlist{location}%
\setunit*{\addcolon\space}%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}}
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\setunit*{\addspace}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}%
\setunit{\addspace}}%
\setunit{\addspace}%
\addcomma%
\usebibmacro{volume+number+eid}%
\setunit{\addspace}%
\usebibmacro{issue+date}%
\setunit{\addcolon\space}%
\usebibmacro{issue}%
\newunit}
% For newspapers (no volume number), do not put the date in parentheses
\renewbibmacro*{issue+date}{%
\iffieldundef{volume}
{\printfield{issue}%
\setunit*{\addspace}%
\usebibmacro{date}}
{\printtext[parens]{%
\printfield{issue}%
\setunit*{\addspace}%
\usebibmacro{date}}}%
\newunit}
\DeclareBibliographyDriver{incollection}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
% incollectionshort - Hack to not include publisher+location+date (use booktitle + editor)
\DeclareFieldFormat[incollectionshort]{title}{\mkbibquote{#1\isdot}}
\DeclareFieldFormat[incollectionshort]{citetitle}{\mkbibquote{#1\isdot}}
\DeclareBibliographyDriver{incollectionshort}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\printtext{in\addspace}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
% online - adapted from standard.bbx
% title in quotes
\DeclareFieldFormat[online]{title}{\mkbibquote{#1\isdot}}
% urls in angle brackets, in normal format using \StrSubstitute from xtring package (line breaks)
\DeclareFieldFormat{url}{\href{#1}{\printtext{<}\StrSubstitute{#1}{/}{\slash}}\printtext{>}}
% square brackets for seen date
\DeclareFieldFormat{urldate}{\mkbibbrackets{\bibstring{urlseen}\space#1}}
% no date
\DeclareBibliographyDriver{online}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\printdelim{nametitledelim}}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{version}%
\newunit
\printfield{note}%
\newunit\newblock
\printlist{organization}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\newunit\newblock
\usebibmacro{url+urldate}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
% inbook, adapted from standard.bbx
% don't show comma if bookauthor is same as author
\DeclareBibliographyDriver{inbook}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\printdelim{nametitledelim}}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\ifnamesequal{author}{bookauthor}
{}
{\newunit\newblock}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{publisher+location+date}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\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}}
% inbookshort - Hack to not include publisher+location+date (use booktitle + bookauthor)
\DeclareFieldFormat[inbookshort]{title}{\mkbibquote{#1\isdot}}
\DeclareFieldFormat[inbookshort]{citetitle}{\mkbibquote{#1\isdot}}
\DeclareBibliographyDriver{inbookshort}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\printdelim{nametitledelim}}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\ifnamesequal{author}{bookauthor}
{}
{\newunit\newblock}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\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}}
% NB: DeclareFieldFormat above doesn't apply to bookinbookshort, so title will be in italics
\DeclareBibliographyAlias{bookinbookshort}{inbookshort}
\endinput