Guest User

Untitled

a guest
Feb 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. documentclass[11pt, parskip=false]{scrartcl}
  2.  
  3. % Bibliography preamble
  4. usepackage[giveninits=true, style=philosophy-modern, yearleft=true, dateabbrev=false]{biblatex}
  5. addbibresource{testbib.bib}
  6.  
  7. DeclareFieldFormat[online]{title}{#1}
  8.  
  9. renewcommand{postsep}{% Add comma to end of author section
  10. addcomma
  11. nullparnobreakvskippostnamesep%
  12. hskip-bibhangignorespaces}
  13.  
  14. DeclareFieldFormat{urldate}{% Reformats urldate field to read "accessed", replacing "(visted on)"
  15. accessed %
  16. thefield{urlday}addspace
  17. mkbibmonth{thefield{urlmonth}}addspace%
  18. thefield{urlyear}isdot}
  19.  
  20. renewbibmacro*{url+urldate}{% Makes URL begin on a new line, adds comma after URL, before URLdate
  21. printunit{newline}usebibmacro{url}%
  22. iffieldundef{urlyear}
  23. {}
  24. {setunit*{addcommaaddspace}%
  25. usebibmacro{urldate}}}
  26.  
  27. begin{document}
  28. Sentence containing citation parencite{blogWithoutAuthor, blogWithAuthor}.
  29.  
  30. printbibliography
  31. end{document}
  32.  
  33. @online{blogWithoutAuthor,
  34. date = {2018},
  35. title = {Historians in the News},
  36. maintitle = {History Matters},
  37. organization = {The University of Sydney},
  38. url = {http://blogs.usyd.edu.au/historymatters/2018/02/historians_in_the_news_2018.html},
  39. urldate = {2018-02-23}
  40. }
  41.  
  42. @online{blogWithAuthor,
  43. date = {2018},
  44. title = {Historians in the News},
  45. maintitle = {History Matters},
  46. organization = {The University of Sydney},
  47. url = {http://blogs.usyd.edu.au/historymatters/2018/02/historians_in_the_news_2018.html},
  48. urldate = {2018-02-23},
  49. author = {McDonnell, Mike}
  50. }
  51.  
  52. usepackage{xpatch}% Modifies online bibdriver to remove author field, and add maintitle field after title
  53. xpatchbibdriver{online}
  54. {usebibmacro{author/editor+others/translator+others}%
  55. setunit{labelnamepunct}newblock
  56. usebibmacro{title}}
  57. {usebibmacro{date+extradate}%
  58. setunit{labelnamepunct}newblock
  59. usebibmacro{title}%
  60. newunitnewblock
  61. usebibmacro{maintitle}%
  62. newunit}
  63. {}
  64. {typeout{failed to remove author field, add maintitle field to driver for 'online'}}
Add Comment
Please, Sign In to add comment