Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[11pt, parskip=false]{scrartcl}
- % Bibliography preamble
- usepackage[giveninits=true, style=philosophy-modern, yearleft=true, dateabbrev=false]{biblatex}
- addbibresource{testbib.bib}
- DeclareFieldFormat[online]{title}{#1}
- renewcommand{postsep}{% Add comma to end of author section
- addcomma
- nullparnobreakvskippostnamesep%
- hskip-bibhangignorespaces}
- DeclareFieldFormat{urldate}{% Reformats urldate field to read "accessed", replacing "(visted on)"
- accessed %
- thefield{urlday}addspace
- mkbibmonth{thefield{urlmonth}}addspace%
- thefield{urlyear}isdot}
- renewbibmacro*{url+urldate}{% Makes URL begin on a new line, adds comma after URL, before URLdate
- printunit{newline}usebibmacro{url}%
- iffieldundef{urlyear}
- {}
- {setunit*{addcommaaddspace}%
- usebibmacro{urldate}}}
- begin{document}
- Sentence containing citation parencite{blogWithoutAuthor, blogWithAuthor}.
- printbibliography
- end{document}
- @online{blogWithoutAuthor,
- date = {2018},
- title = {Historians in the News},
- maintitle = {History Matters},
- organization = {The University of Sydney},
- url = {http://blogs.usyd.edu.au/historymatters/2018/02/historians_in_the_news_2018.html},
- urldate = {2018-02-23}
- }
- @online{blogWithAuthor,
- date = {2018},
- title = {Historians in the News},
- maintitle = {History Matters},
- organization = {The University of Sydney},
- url = {http://blogs.usyd.edu.au/historymatters/2018/02/historians_in_the_news_2018.html},
- urldate = {2018-02-23},
- author = {McDonnell, Mike}
- }
- usepackage{xpatch}% Modifies online bibdriver to remove author field, and add maintitle field after title
- xpatchbibdriver{online}
- {usebibmacro{author/editor+others/translator+others}%
- setunit{labelnamepunct}newblock
- usebibmacro{title}}
- {usebibmacro{date+extradate}%
- setunit{labelnamepunct}newblock
- usebibmacro{title}%
- newunitnewblock
- usebibmacro{maintitle}%
- newunit}
- {}
- {typeout{failed to remove author field, add maintitle field to driver for 'online'}}
Add Comment
Please, Sign In to add comment