6

I have the following code:

\documentclass[british]{article}
\usepackage[backend=biber,%
            style=authoryear,%
            mergedate=basic,
            ]{biblatex}
\begin{filecontents}{bib.bib}
@Article{frie2002,
  author =   {Jonathan Friedland},
  title =    {Across the Divide},
  journal =  {Guardian},
  year =     {2002},
  pages =    {10-11},
  date =     {2002-01-15},
  volume =   {section G2},
}
\end{filecontents}
\addbibresource{bib.bib} 
\begin{document} 
\nocite{*}
\printbibliography
\end{document}

The output it produces is

enter image description here

How do I get this output?

enter image description here

3
  • I've changed the question a bit as I've found out about mergedate=basic and the date field. So now I suppose the issue is more about the formatting of 'date' in articles. Commented Sep 1, 2016 at 14:28
  • 2
    Partial solution: 1) Use the opiton dateabbrev = false in order to fully spell out “January”. 2) Put “section G2” in the field note instead of volume. I’m not sure if volume would be appropriate at any rate, and note is put in the position where you want it. What’s missing here is 1) it’s “January 15“ instead of “15 January” and 2) the date is in parentheses (plus surrounding punctuation). Btw, nice MWE! :)
    – doncherry
    Commented Sep 1, 2016 at 19:54
  • I agree with doncherry that you wouldn't put section G2 into the volume field. It could be chapter, I suppose, but note would also be OK.
    – moewe
    Commented Sep 2, 2016 at 6:35

2 Answers 2

1

You could use entrysubtype = {newspaper} to distinguish newspaper articles form journal articles.

An entry would look like this (we use chapter instead of volume which didn't seem right)

@article{frie2002,
  author  = {Jonathan Friedland},
  title   = {Across the Divide},
  journal = {Guardian}, 
  pages   = {10-11},
  date    = {2002-01-15},
  chapter = {section G2}, 
  entrysubtype = {newspaper},
}

We can then modify several macros and check for newspaper

\DeclareFieldFormat{chapter}{\ifnumerals{#1}{\bibstring{chapter}~}{}#1}
\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addspace}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addspace}}%
  \usebibmacro{volume+number+eid}%
  \iffieldequalstr{entrysubtype}{newspaper}
    {\setunit{\addcomma\space}%
     \usebibmacro{newspaper:issue+date}}
    {\setunit{\addspace}%
     \usebibmacro{issue+date}%
     \setunit{\addcolon\space}%
     \usebibmacro{issue}}%
  \newunit}

\newbibmacro*{newspaper:issue+date}{%
  \printtext{%
    \iffieldundef{day}{}{%
      \mkdatezeros{\thefield{day}}%
      \iffieldundef{month}{}{\nobreakspace}}%
    \iffieldundef{month}
      {}
      {\mkbibmonth{\thefield{month}}}}}

\renewbibmacro*{note+pages}{%
  \printfield{note}%
  \newunit
  \iffieldequalstr{entrysubtype}{newspaper}
    {\printfield{chapter}}{}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \newunit}

MWE

\documentclass[british]{article}
\usepackage[backend=biber,%
            style=authoryear,%
            mergedate=basic,
            ]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{frie2002,
  author  = {Jonathan Friedland},
  title   = {Across the Divide},
  journal = {Guardian}, 
  pages   = {10-11},
  date    = {2002-01-15},
  chapter = {section G2}, 
  entrysubtype = {newspaper},
}
\end{filecontents}
\addbibresource{\jobname.bib} 
\addbibresource{biblatex-examples.bib} 

\renewcommand*{\newunitpunct}{\addcomma\space}
\DeclareFieldFormat{chapter}{\ifnumerals{#1}{\bibstring{chapter}~}{}#1}
\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addspace}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addspace}}%
  \usebibmacro{volume+number+eid}%
  \iffieldequalstr{entrysubtype}{newspaper}
    {\setunit{\addcomma\space}%
     \usebibmacro{newspaper:issue+date}}
    {\setunit{\addspace}%
     \usebibmacro{issue+date}%
     \setunit{\addcolon\space}%
     \usebibmacro{issue}}%
  \newunit}

\newbibmacro*{newspaper:issue+date}{%
  \printtext{%
    \iffieldundef{day}{}{%
      \mkdatezeros{\thefield{day}}%
      \iffieldundef{month}{}{\nobreakspace}}%
    \iffieldundef{month}
      {}
      {\mkbibmonth{\thefield{month}}}}}

\renewbibmacro*{note+pages}{%
  \printfield{note}%
  \newunit
  \iffieldequalstr{entrysubtype}{newspaper}
    {\printfield{chapter}}{}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \newunit}

\begin{document} 
\nocite{frie2002,sigfridsson}
\printbibliography
\end{document}

gives

Friedland, Jonathan (2002), “Across the Divide”, in: Guardian, 15 Jan., section G2, pp. 10–11.

Sigfridsson, Emma and Ulf Ryde (1998), “Comparison of methods for deriving atomic charges from the electrostatic potential and moments”, in: Journal of Computational Chemistry 19.4, pp. 377–395, doi: 10.1002/(SICI)1096- 987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P.

2
  • Great: thanks. Adding dateabbrev = false as an option (thanks @doncherry and @dudakl ) spells out January in full. Commented Sep 2, 2016 at 8:34
  • @GarethWalker Yes. I didn't want to make the output inconsistent by forcing the long string here regardless of the dateabbrev setting.
    – moewe
    Commented Sep 2, 2016 at 8:41
1

A maybe ugly, but working solution would be:

\documentclass[british]{article}
\usepackage[backend=biber,%
            style=authoryear,%
            dateabbrev=false
            ]{biblatex}
\begin{filecontents}{bib.bib}
@Article{frie2002,
  author =   {Jonathan Friedland},
  title =    {Across the Divide},
  journal =  {Guardian},
  year =     {2002},
  pages =    {10-11},
  date =     {2002-01-15},
  volume =   {section G2},
}
\end{filecontents}
\addbibresource{bib.bib} 

\renewbibmacro*{journal}{\printfield{journaltitle},}
\DeclareFieldFormat*{volume}{\printfield{day}. \mkbibmonth{\printfield{month}}, #1}


\begin{document} 
\nocite{*}
\printbibliography
\end{document}

Produces the desired output on my machine:desired-reference style

But I have to admit, this seems to be a somewhat strange way of layouting your references ;)

3
  • Thanks. I agree it's strange, but required in the style I am trying to work to (MHRA). Commented Sep 2, 2016 at 8:37
  • Please note that this method destroys the output for other @articles, that is probably not what you want.
    – moewe
    Commented Sep 2, 2016 at 8:38
  • As @moewe pointed out, my solution changes all @article elements in your .bib. But as far as I understand the MHRA-style-guide, you just have to put all references "in alphabetical order by names of author(s) or editor(s), followed by date of publication." , the "authoryear"-option should be sufficient...
    – dudakl
    Commented Sep 2, 2016 at 9:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .