[Tex/LaTex] How to customize biblatex style

biblatexbibliographies

So I have been trying to learn latex in my uses, but I need to modify the biblatex referencing and citation styles to match those required by my institution. I found many questions on texsx and tried a few things but didn't work at all.

Here are some things I would like to change using authoryear style:

  • remove quotation marks from references in the bibliography
  • remove parenthesis from year on references in the bibliography
  • use ampersand "&" instead of "and" on citations

I tried to follow this reply (Guidelines for customizing biblatex styles) but none of the changes worked.

Need step by step help here please.

Here is a sample of something similar I might be doing:

\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\usepackage{lipsum}

\usepackage{filecontents}

\begin{filecontents}{ref.bib}
   @article{merdith_full-plate_2017,
    Author = {Merdith, Andrew S. and Collins, Alan S. and Williams, Simon E. and Pisarevsky, Sergei and Foden, John D. and Archibald, Donnelly B. and Blades, Morgan L. and Alessio, Brandon L. and Armistead, Sheree and Plavsa, Diana and Clark, Chris and M{\"u}ller, R. Dietmar},
   Date = {2017},
    Title = {A full-plate global reconstruction of the Neoproterozoic}}

   @article{england_active_1997,
   Author = {England, Philip and Molnar, Peter},
   Date = {1997},
   Number = {5338},
   Pages = {647--650},
   Title = {Active deformation of Asia: from kinematics to dynamics},
   Volume = {278}}
}
\end{filecontents}

\addbibresource{ref.bib}

\begin{document}
\lipsum[1-2]
\cite{merdith_full-plate_2017} and \cite{england_active_1997}

\printbibliography

\end{document}

enter image description here

Best Answer

For your three issues the solutions are actually quite short.

The only format with quotation marks is title for "dependent"/@in...-like entry types

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{#1\isdot}

Your second request could be dealt with as in biblatex: How to remove the parentheses around the year in authoryear style?, but I used the direct approach.

\renewbibmacro*{date+extrayear}{%
  \iffieldundef{labelyear}
    {}
    {\setunit{\addperiod\space}%
     \printtext{%
       \iffieldsequal{year}{labelyear}
         {\printlabeldateextra}%
         {\printfield{labelyear}%
          \printfield{extrayear}}}}}

For your third issue we can use the code from the question in Biblatex: have "and" in the citation but "&" in the bibliography, no need for separating citations and bibliographies

\DeclareDelimFormat{finalnamedelim}{%
  \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
  \addspace\&\space}

Full MWE with a bit of bonus code

\documentclass[british]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear,backend=biber]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
   @article{merdith_full-plate_2017,
    Author = {Merdith, Andrew S. and Collins, Alan S. and Williams, Simon E. and Pisarevsky, Sergei and Foden, John D. and Archibald, Donnelly B. and Blades, Morgan L. and Alessio, Brandon L. and Armistead, Sheree and Plavsa, Diana and Clark, Chris and M{\"u}ller, R. Dietmar},
   Date = {2017},
    Title = {A full-plate global reconstruction of the Neoproterozoic}}

   @article{england_active_1997,
   Author = {England, Philip and Molnar, Peter},
   Date = {1997},
   Number = {5338},
   Pages = {647--650},
   journal = {Science},
   Title = {Active deformation of Asia: from kinematics to dynamics},
   Volume = {278}}
}
\end{filecontents}

\addbibresource{\jobname.bib}

% issue 1
\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{#1\isdot}

% issue 2
\renewbibmacro*{date+extrayear}{%
  \iffieldundef{labelyear}
    {}
    {\setunit{\addperiod\space}%
     \printtext{%
       \iffieldsequal{year}{labelyear}
         {\printlabeldateextra}%
         {\printfield{labelyear}%
          \printfield{extrayear}}}}}

% issue 3
\DeclareDelimFormat{finalnamedelim}{%
  \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
  \addspace\&\space}

% bonus
\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
% (from https://tex.stackexchange.com/q/10682/35864)
\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}
\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}
\renewcommand*{\bibpagespunct}{\addcolon\space}
\DeclareFieldFormat[article]{pages}{#1}

\begin{document}
\cite{merdith_full-plate_2017} and \cite{england_active_1997}

\printbibliography

\end{document}
Related Question