Interesting exercise.
Definition of "like" is going to be key.
First step is seeing what styles are closest. The @article
bib entry type contains only data; all formatting, parsing and processing is done by the style coding.
Before we start:
Some minor things in the .bib file, not crucial, but helps keep things tidier for later.
For quotation marks in titles, do not hard code them, use \mkbibquote
instead. It will take care of quote nesting, and work in conjunction with the csquotes
package.
Title = {Parents \mkbibquote{want kids taught digital skills}},
For dates, I put them in ISO format in the date field.
date = {2014-01-12}
Biblatex is quite adept at dates (and names) and will parse them into their components and recombine and reformat them as required.
Having the newspapers in their own entry, a @periodical
entry, is also handy. The child @article
entry then needs a crossref
field, to inherit everything from the parent @periodical
.
@periodical{j1,journaltitle={The Sydney Morning Herald},location={Sydney},date = {2014-01-12}}
@article{SMH,
Author = {McNeilage, A.},
Title = {Computer science reforms to test teachers' skills},
url = {<http://www.smh.com.au/national/computer-science-reforms-to-test-teachers-skills-20140111-30nj4.html>},
urldate = {2015-03-18},
entrysubtype = {newspaper},
crossref={j1},
}
Part 1
A whirlwind tour of some biblatex styles that do author-year ("Harvard") styling in various ways.
OXYEAR

BATH

NOTTINGHAM

PHILOSOPHY-MODERN
Rather elegant.
TRAD-ALPHA

MLA

Wise choice when it comes to URLs.
APA

Part 2
Now, biblatex is, in effect, a programming language, and what the biblatex style writers do is, using the raw input data from the .bib file, fields and constraints are defined; parts of components are derived and calculated; components are built up into citation and bibliographic component blocks and sub-blocks, then into bibmacros (which can then form part of more complex bibmacros) and then those go in the entry type's "driver".
In the case at hand, randomly taking the oxyear
biblatex style as a starting point (and it is already building on the default biblatex styles and defining and redefining and xpatching all over the place, across multiple files, very astutely), and stepping through our required changes one at a time:
First: Tracking down the part that prints the url and date, it turns out to be a bibmacro called url+urldate
Here it is:
\newbibmacro*{url+urldate}{%
\usebibmacro{url}%
\iffieldundef{urlyear}
{}
{\setunit*{\addspace}%
\usebibmacro{urldate}}}
It prints the URL, and, if there is a URL-seen date, prints that date with a space before the date. We need to reverse the seen-date and the URL, so that the URL comes last.
Let's redefine the bibmacro to print space + seen-date + colon + space + URL (we'll do this in the preamble of our current document, but in a proper style definition, the code would be in its own file(s)).
\newbibmacro*{url+urldate}{%
\iffieldundef{urlyear}
{}
{\setunit*{\addspace}%
\usebibmacro{urldate}%
\addcolon\addspace\usebibmacro{url}
}%if
}
But urldate
is formatted to have the local language equivalent of the word "seen" + space put before the date.
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
We want it to say "viewed" (when the language is English).
All string constants are defined in the matching .lbx file, usually named after the language. We'll make a custom file (call it pcc\jobname.lbx
). It will contain:
\NewBibliographyString{urlviewed}
\DeclareBibliographyStrings{%
inherit = {english},
urlviewed = {{viewed}{viewed}},
}
The bibstring urlviewed
is defined with the full form of the string constant that we want, and the abbreviated form. In this case, both are the same.
The inherit
is important, because otherwise biblatex will not know, for example, what "Jan" means.
And in our preamble we map to the file with:
\DeclareLanguageMapping{english}{pcc\jobname}
Running the code produces output, including a dot at the end of the item in the bibliography: the reader will ask, "Is the dot part of the URL?"
To visually identify the URL, we will wrap it with "<" and ">".
Back to the .lbx, which now reads:
\NewBibliographyString{urlviewed,urlleftangle,urlrightangle}
\DeclareBibliographyStrings{%
inherit = {english},
urlviewed = {{viewed}{viewed}},
urlleftangle = {{<}{<}},
urlrightangle = {{>}{>}},
}
We need to update the bibmacro definition to include these bibstrings.
\newbibmacro*{url+urldate}{%
\iffieldundef{urlyear}
{}
{\setunit*{\addspace}%
\usebibmacro{urldate}%
\addcolon\addspace\bibstring{urlleftangle}\usebibmacro{url}\bibstring{urlrightangle}
}%if
}
Note for the curious: for items without a URL, what in the code above stops "<>" from being printed at the end of the item?
Next is converting the newspaper name (journaltitle
) to plain text, not italics. That is (luckily) done within this style by redefining the formatting directive to just print the value (#1
, for the current bib item being processed) without any adornment:
\DeclareFieldFormat{journaltitle}{#1}
The original definition doing the emphasis is:
\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}}
Next is the date with brackets after the author name. That is done via bibmacro date+extradate
, with the year
part of date coming from the internally-derived field labelyear
, so we can redefine the bracketless bibmacro as:
\renewbibmacro{date+extradate}{%
\addspace\printfield{labelyear}%
}
Next is the (day-month-year) after the newspaper name: remove the brackets, and only show day and month (and a comma). Luckily, the style writers are consistent, and the day
and month
components of date
are stored in labelday
and labelmonth
(in this style). There is also a handy biblatex macro that can convert the year-month-day numbers into text (remember the .lbx file, with its inherit?). So we have:
\renewbibmacro{issue+date}{%
\addcomma\addspace\mkbibdatelong{}{labelmonth}{labelday}%
}
That's it.
Result:

(except for removing the dot after the author's name - that may be left as an exercise for the reader).
MWE:
\documentclass[a4paper,10pt]{article}
%\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\newcommand\abibstyle{style=oxyear}
\usepackage[
\abibstyle ,
% style=authoryear-ibid,
% backend=biber,
eprint=false,
]{biblatex}
\newcommand\mynote{biblatex option used: \texttt{\abibstyle}, tweaked in half a dozen places.}
\defbibnote{abibnote}{\mynote}
\usepackage{csquotes}
\usepackage{filecontents}
\begin{filecontents*}{pcc\jobname.lbx}
\NewBibliographyString{urlviewed,urlleftangle,urlrightangle}
\DeclareBibliographyStrings{%
inherit = {english},
urlviewed = {{viewed}{viewed}},
urlleftangle = {{<}{<}},
urlrightangle = {{>}{>}},
}
\end{filecontents*}
\begin{filecontents*}{\jobname.bib}
@online{VCAA,
Author = {{Victorian Curriculum and Assessment Authority}},
Title = {The {Australian} Curriculum in {Victoria}},
Year = 2015,
url = {<http://ausvels.vcaa.vic.edu.au/>},
Urldate = {2015-03-18}}
@periodical{j1,journaltitle={The Sydney Morning Herald},location={Sydney},date = {2014-01-12}}
@article{SMH,
Author = {McNeilage, A.},
Title = {Computer science reforms to test teachers' skills},
url = {<http://www.smh.com.au/national/computer-science-reforms-to-test-teachers-skills-20140111-30nj4.html>},
urldate = {2015-03-18},
entrysubtype = {newspaper},
crossref={j1},
}
@article{DigitalNative,
Author = {Demirbilek, M.},
Title = {The \mkbibquote{digital natives} debate: an investigation of the digital
propensities of university students},
Journaltitle = {Eurasia Journal of Mathematics, Science \& Technology Education},
Year = {2014},
volume = {10},
number = {2},
pages = {115--123}}
@article{scratch,
Author = {Resnick, M. and Maloney, J. and Monroy-Hern\'andez, A. and others},
title = {Scratch: programming for all},
Journaltitle = {Communications of the ACM},
number = {11},
year = {2009},
volume = {52},
pages = {60--67}}
@periodical{j2,journaltitle={iTwire},date = {2015-02-23},}
@article{itwire,
Author = {Philipson, G.},
Title = {Parents \mkbibquote{want kids taught digital skills}},
% Year = {2015},
% Month = {2},
% day = {23},
url = {<http://www.itwire.com/government-tech-news/govenrment-tech-policy/67067-parents-%E2%80%98want-kids-taught-digital-skills%E2%80%99>},
urldate={2015-03-18},
% Journal = {iTwire},
entrysubtype = {newspaper},
crossref={j2},
}
@periodical{j3,journaltitle={The Guardian},date={2015-02-06},}
@article{guardian,
Author = {Williams, R.},
Title = {Why, and how, to teach computer hacking.},
% Year = {2015},
% Month = feb,
url = {<http://www.theguardian.com/education/2015/jan/06/computer-hacking-security-teaching-schools>},
% day = {6},
urldate={2015-03-20},
entrysubtype = {newspaper},
crossref={j3},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
%The .lbx file: has the string definitions:
\DeclareLanguageMapping{english}{pcc\jobname}
%\DefineBibliographyStrings{english}{%
% urlseen = { {Accessed}{Accessed}},
%}
%\DeclareNameAlias{sortname}{last-first}
%\DeclareNameAlias{default}{last-first}
%\renewbibmacro{in:}{%
% \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}} % suppress in if not article
%}
%\DeclareFieldFormat{url}{\url{#1}}
%
%\patchcmd{\bibsetup}{\interlinepenalty=5000}{\interlinepenalty=10000}{}{}
%Orig: biblatex.def
%\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}
\DeclareFieldFormat{urldate}{\bibstring{urlviewed}\space#1}
%Orig:
%\newbibmacro*{url+urldate}{%
% \usebibmacro{url}%
% \iffieldundef{urlyear}
% {}
% {\setunit*{\addspace}%
% \usebibmacro{urldate}}}
%redefine as without italics:
\DeclareFieldFormat{journaltitle}{#1}
%For exploring:
%\newbibmacro*{url+urldate}{%
% \iffieldundef{urlyear}
% {}
% {\setunit*{\addspace}%
% \usebibmacro{urldate}%
% \addcolon\addspace\bibstring{urlleftangle}\usebibmacro{url}\bibstring{urlrightangle}\usebibmacro{date} \printfield{title} \printnames{author} xxx\printfield{datelabel} yyy\printfield{labeldate} zzz \usebibmacro{date+extradate} aaa \printfield{labelyear} bbb \printfield{labelday} ccc \printfield{labelmonth} ddd \printfield{title} \usebibmacro{title} \usebibmacro{labeltitle} eee \mkbibdatelong{}{labelmonth}{labelday} fff \printfield{citetitle} ggg \printfield{shorttitle} hhh \usebibmacro{title} iii \usebibmacro{journal+issuetitle} jjj \printfield{issuetitle} kkk \printfield{title} lll \printfield{journaltitle} mmm \usebibmacro{date} nnn \usebibmacro{issue} ooo \usebibmacro{issue+date}%
% }%if
%}
\newbibmacro*{url+urldate}{%
\iffieldundef{urlyear}
{}
{\setunit*{\addspace}%
\usebibmacro{urldate}%
\addcolon\addspace\bibstring{urlleftangle}\usebibmacro{url}\bibstring{urlrightangle}
}%if
}
%(yyyy) > yyyy
\renewbibmacro{date+extradate}{%
\addspace\printfield{labelyear}%
}
%(dd mmm yyyy) > dd mmm,
\renewbibmacro{issue+date}{%
\addcomma\addspace\mkbibdatelong{}{labelmonth}{labelday}%
}
%italic journal title (issue date) > plain title, date, :
%\newbibmacro
%\renewbibmacro{journal+issuetitle}{%
% \def\mytemp{\usebibmacro{journal+issuetitle}}
% \mytemp\addcomma\addspace\mkbibdatelong{}{labelmonth}{labelday}\addcomma\addspace
%}
%\renewbibmacro{journaltitle}{%
% \addspace\printfield{labelyear}%
%}
%\DeclareFieldFormat{datelabel}{\mkbibparens{#1}}
%\DeclareFieldFormat{labeldate}{%
% \iflabeldateisdate{%
% \def\currentfield{date}%
% }{%
% \iflabeldateisanydate{%
% \def\currentfield{\thefield{labeldatesource}date}%
% }{%
% \def\currentfield{\thefield{labeldatesource}}}}%
%\newbibmacro*{date}{\mkbibbold{\printdate{date}}}
%\renewbibmacro*{date}{xxx\printdate}
\begin{document}
Need to format \texttt{@article} entry \texttt{newspaper} subentry in the bibliography as \begin{quotation}Norton, A 2011, 'Why teaching must be rated', The Age, 11 October, viewed 13 October 2011, link\end{quotation}
Critics to this sort of adjustment may well point to under-training
of teachers as a significant barrier to implement any kind of drastic
overhaul of the ICT curriculum \autocite{guardian}.
And also \autocite{SMH}. Text itwire \autocite{itwire}.
Not online: \autocite{scratch}.
\printbibliography[prenote=abibnote]
\end{document}
Part 3
That took about six or so (leisurely-paced) hours. What we need is a plug-and-playable modification ability. Currently, the code is, shall I say?, "linear" and layered, and style-builders may easily get their declarations and IFs "interlocked" in terms of logic and sequence. On the other hand, there is a linguistic-like elegance in the structures at a meta-level, so open-ended and not constrained.
P.S.
IN terms of time to expend, I expect your university was asking you to do something like Part 1. If you were being asked to do Part 2, could you please also invent a new three-dimensional Dewey classification system at the same time? :) It would be a great addition and handy to see knowledge as if along the planes and orientations of a crystalline or snowflake structure.
Part 4
To answer the question, a similar type of exercise would have to be done with the original MWE's style=authoryear
style, if that were the one to be used.
===
Edit:
Moewe is quite right in the comments, from the contents of the bib file all the way to the methods of assembling the units, there are better and more efficient ways than the rudimentary hacks presented here. (In effect, the intention was to see how and what a set of change instructions would begin to look like, and the time and effort involved; there is not even a logical certainty that the changes would even work in the @article class beyond the four bib entries in the example (indeed, as moewe shows, in items 3, 5 and 6 on the comments)).
Note the date hack breaks very easily in other styles.
Further, the changes done do not take into consideration all possible scenarios that a usable style should and ought (missing data, different data, non-article entry types, or in combinations, for example like "when the url was seen in footcites too when the author is unknown" as a different question asks). Something may break anywhere along there.
Also, testing the changes on the other styles revealed that most of them will need additional general tweaking, especially so for the date processing. Different style authors do things different ways.
So tweaking must then have a defined purpose and a specific boundary of application.
How well do the changes live with other styles?
Testing against other styles:
authoryear - OK
apa - different date fields used for the article; URL date missing the 'viewed' text
mla - different date fields used; long journal title difference (treated like a name?); URL has doubled << and >>; style uses a print
bibstring for ending the segment, and the bibstring is undefined (unstranslated) for the non-online entry
trad-alpha - different date fields
philosophy-modern - different date fields; it affected indentation of the first line
nottsclassic - OK; viewed date doesn't convert to month-name, though
bath - OK; adds [Online] to journal title; but inserts "Available from: " in front of the URL, before the < and > are added.