1

This is my minimum working example:

\documentclass[twoside,12pt]{article}
\usepackage[a4paper, left=1in, top=1in, bottom=1in, right=0.5in]{geometry}

\usepackage[style=ieee]{biblatex} \addbibresource{testing_bib.bib}

\newcommand{\mkbibnodate}{n\adddot d\adddot} \AtEveryCitekey{\iffieldundef{labelyear}{\restorefield{labelyear}{\mkbibnodate}}{}} \AtEveryBibitem{\iffieldundef{labelyear}{\restorefield{year}{\mkbibnodate}}{}}

\DeclareLabeldate{ \field{date} \field{eventdate} \field{origdate} \literal{nodate} }

\begin{document} \cite{eb_bhp, cth_nuclear_energy, aspi_enrichment, bhp_history, bhp_olympic_dam, asno-annual-report-2019-20, dfat_npt} \printbibliography[heading=bibintoc, title={Bibliography}] \end{document}

This is testing_bib.bib:

@article{eb_bhp, 
    title       = {{BHP Billiton}}, 
    url         = {https://www.britannica.com/topic/BHP-Billiton}, 
    journal     = {Encyclopaedia Britannica}, 
    publisher   = {Encyclopaedia Britannica, Inc.}, 
    date        = {2006-05-11},
    urldate     = {2021-08-15}
}

@online{cth_nuclear_energy, author = {Ian Cronshaw}, title = {Australian electricity options : nuclear}, date = {2020-07-20}, url = {https://www.aph.gov.au/About_Parliament/Parliamentary_Departments/Parliamentary_Library/pubs/rp/rp2021/AustralianElectricityOptionsNuclear}, organization = {Parliament of Australia}, urldate = {2021-09-08}, }

@online{bhp_history, title = {Our History}, url = {https://www.bhp.com/our-approach/our-history/}, website = {{BHP website}}, urldate = {2021-08-15} }

@online{bhp_olympic_dam, title = {Olympic Dam}, url = {https://www.bhp.com/our-businesses/minerals-australia/olympic-dam/}, website = {{BHP website}}, urldate = {2021-08-25} }

@book{asno-annual-report-2019-20, title = "Australia's Uranium Production and Exports", booktitle = "Annual Report 2019-20", year = "2020", isbn = "978–1–74322–544–8", publisher = "Australian Safeguards and Non-Proliferation Office", }

@online{aspi_enrichment, author = {Rod Lyon}, title = {Australia and the enrichment option}, date = {2015-11-05}, url = {https://www.aspistrategist.org.au/australia-and-the-enrichment-option/}, organization = {Australian Strategic Policy Institute}, urldate = {2021-09-08}, }

@online{dfat_npt, title = {Treaties and initiatives}, url = {https://www.dfat.gov.au/international-relations/security/non-proliferation-disarmament-arms-control/nuclear-issues/treaties}, organization = {Department of Foreign Affairs and Trade (Australia)}, urldate = {2021-09-08}, }

This is what I get: enter image description here

Does anyone know how to:

  1. Make it so that the years on the references that do have a date get displayed and;
  2. Make it so that the 2nd reference's URL does run outside of the margins?

Thanks

Ken Ely
  • 187
  • On #2: I recommend you load the xurl package. – Mico Sep 10 '21 at 04:25
  • 2
    Please ask only about one thing per question. The two points 1 and 2 are completely unrelated. Asking separate questions makes it easier for people to answer (they won't have to debate whether or not to write one up if they can only solve one of the two issues) and it also makes your question more relevant for future visitors with a similar problem. – moewe Sep 10 '21 at 06:36

1 Answers1

2

Funnily enough I answered a very similar question (where the OP tried the same code as you did) only recently: Biblatex and entries with no date part 2.

We can use the same approach of modifying the date bibmacro.

\documentclass[twoside,12pt]{article}
\usepackage[a4paper, left=1in, top=1in, bottom=1in, right=0.5in]{geometry}

\usepackage[style=ieee]{biblatex}

\renewbibmacro*{date}{% \iffieldundef{year} {\bibstring{nodate}} {\printdate}}

\begin{filecontents}{\jobname.bib} @inreference{eb_bhp, title = {{BHP Billiton}}, url = {https://www.britannica.com/topic/BHP-Billiton}, booktitle = {Encyclopaedia Britannica}, publisher = {Encyclopaedia Britannica, Inc.}, date = {2006-05-11}, urldate = {2021-08-15} } @online{cth_nuclear_energy, author = {Ian Cronshaw}, title = {Australian electricity options: nuclear}, date = {2020-07-20}, url = {https://www.aph.gov.au/About_Parliament/Parliamentary_Departments/Parliamentary_Library/pubs/rp/rp2021/AustralianElectricityOptionsNuclear}, organization = {Parliament of Australia}, urldate = {2021-09-08}, } @online{bhp_history, title = {Our History}, url = {https://www.bhp.com/our-approach/our-history/}, website = {{BHP website}}, urldate = {2021-08-15}, } @online{bhp_olympic_dam, title = {Olympic Dam}, url = {https://www.bhp.com/our-businesses/minerals-australia/olympic-dam/}, website = {{BHP website}}, urldate = {2021-08-25}, } @book{asno-annual-report-2019-20, title = {Australia's Uranium Production and Exports}, booktitle = {Annual Report 2019-20}, year = {2020}, isbn = {978–1–74322–544–8}, publisher = {Australian Safeguards and Non-Proliferation Office}, } @online{aspi_enrichment, author = {Rod Lyon}, title = {Australia and the enrichment option}, date = {2015-11-05}, url = {https://www.aspistrategist.org.au/australia-and-the-enrichment-option/}, organization = {Australian Strategic Policy Institute}, urldate = {2021-09-08}, } @online{dfat_npt, title = {Treaties and initiatives}, url = {https://www.dfat.gov.au/international-relations/security/non-proliferation-disarmament-arms-control/nuclear-issues/treaties}, organization = {Department of Foreign Affairs and Trade (Australia)}, urldate = {2021-09-08}, } \end{filecontents} \addbibresource{\jobname.bib}

\begin{document} \cite{eb_bhp, cth_nuclear_energy, aspi_enrichment, bhp_history, bhp_olympic_dam, asno-annual-report-2019-20, dfat_npt} \printbibliography[heading=bibintoc, title={Bibliography}] \end{document}

“Our history.” (n.d.), [Online]. Available: https://www.bhp.com/our-approach/our-history/ (visited on 08/15/2021).

For the link you can try xurl as suggested by Mico in the comments or you can see if any of the ideas at How to adjust the breaking in the bibliography? can help you.

moewe
  • 175,683