1

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

Rodrigues
  • 199
  • 5
    Please show us a compilable code you have tried so far. Add two bib entries to your question please. – Mensch Aug 16 '17 at 20:45
  • 1
    All quotation marks? Or just those added around the titles of articles etc.? Which citations? Does 'references' in the second desideratum mean 'references in the bibliography' (like the first) or 'citations' (like the third)? Really need a working example here - there are so many possible things you might be doing and might mean. What if you say \textcite? Would you want an & then? What about \fullcite? Etc, etc, – cfr Aug 16 '17 at 22:35
  • Please note that ideally questions on this site should revolve around one specific issue at a time and not three. As cfr points out your question lacks context and further explanation as well as an exact statement of what you need. As Kurt points out we don't know a lot about the way you produce your bibliography at the moment. A solution heavily depends on the bibliography package and style you use. We will need to see an MWEB/MWE as well as a more detailed description of what you want. – moewe Aug 17 '17 at 13:53
  • And please consider splitting up your question so that you only have one issue per question. Depending on how exactly we have to interpret the points you raise most of them have already been answered elsewhere on this site. – moewe Aug 17 '17 at 13:54
  • code and modifications added – Rodrigues Aug 17 '17 at 17:13
  • 1
    Can you get a bit more specific about what you want to achieve? There are good reasons for the distinction quotation marks/italics in the bibliography. Please consider splitting your questions into several parts, the three issues are not even tangentially related. – moewe Aug 17 '17 at 17:20
  • For question 2 see https://tex.stackexchange.com/q/12254/35864. For 3 I could find the exact opposite https://tex.stackexchange.com/q/67621/35864, though I would use the methods of https://tex.stackexchange.com/q/300968/35864. For 1 try \DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1\isdot} – moewe Aug 17 '17 at 17:50
  • @moewe see the figure I added – Rodrigues Aug 17 '17 at 19:18
  • I am confused now. What you show looks more like a biblkiography entry and not a citation. Where exactly do you want the '&'? In in-text citations (i.e. 'Sigfridsson & Ryde 2008'), in the bibliography/references at the end or both? – moewe Aug 18 '17 at 07:15
  • @moewe On both. The bibliography figure is just to show you how I need the bibliography to be. For the citation I just require ampersand instead of "and". For the bibliography there are many more changes needed.

    I tried the "apa" style but latex throws some error and doesn't compile with apa.

    – Rodrigues Aug 21 '17 at 13:22
  • Do you actually want APA style? Because your desired format in the picture comes close to APA, but is not exactly APA. – moewe Aug 21 '17 at 17:43
  • Exactly. I figured it would be easier to change a few things from apa instead of a lot from authoryear. Is there any tutorial out there where I can learn these "hacky" ways of customizing styles in biblatex? – Rodrigues Aug 21 '17 at 17:53
  • The problem is that heavily-customised styles such as APA or biblatex-chicago can be really hard to modify. – moewe Aug 21 '17 at 18:00

1 Answers1

3

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}
moewe
  • 175,683