0

I have the problem with a few websites I am citing for my thesis using biblatex-chicago. For example, I have several wikipedia pages I am citing, all which have no date and therefore appear with "n.d.".

So far so good, but now every citation in my text shows up as "(Wikipedia, n.d.)" without differentiating between the different sources, because there is no year to which the usual a,b,c,... would be added.

My code looks like this:

\documentclass[11pt]{article}

\usepackage[authordate, 
backend=biber, 
maxbibnames=999, 
maxcitenames=2, 
uniquelist=false, 
noibid, 
sorting=nyt]{biblatex-chicago}

\addbibresource{masterthesis.bib}
\makeatletter
\AtEveryBibitem{\global\undef\bbx@lasthash}
\makeatother

\begin{document}

\parencite{wiki-rurbanisation}
\parencite{wiki-gdp}

\printbibliography

\end{document}

This produces in the text:

enter image description here

and in the bibliography: enter image description here

How do I make it that it says something like "(Wikipedia, n.d.-a)(Wikipedia, n.d.-b)" or "(Wikipedia-a, n.d.)(Wikipedia-b, n.d.)" in the text?

Thanks in advance!

1
  • Welcome to TeX.SE! Can you please add the two bib entries to your question?
    – Mensch
    Commented Oct 15, 2021 at 23:31

1 Answer 1

1

I don't know what the CMS has to say about this, but this is probably something you want to tell the maintainer of biblatex-chicago about. (Even if strictly speaking the CMS insists on not having disambiguation letters for sources without date, it might be a sensible idea to give users the option to disambiguate those citations.) You can find the contact address on the first page of the biblatex-chicago documentation.

Here is a workaround that does the right thing in standard settings. It may not work with all different options of biblatex-chicago (that's why you want to tell the maintainer about it.)

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[authordate,
  backend=biber,
  maxbibnames=999,
  maxcitenames=2,
  uniquelist=false,
  noibid,
]{biblatex-chicago}

\makeatletter
\AtEveryBibitem{\global\undef\bbx@lasthash}

\DeclareFieldFormat{extradate}{%
  \iffieldnums{labelyear}
    {}
    {-}%
  \mknumalph{#1}}

\renewbibmacro*{standard+labelyear+extrayear}{%
  \ifthenelse{\iffieldundef{labelyear}\OR%
    \iffieldequalstr{labelyear}{nodate}}% or new declaration ???
    {\ifboolexpr{%
        test {\ifentrytype{misc}}%
        or
        test {\ifentrytype{dataset}}%
        or
        not togl {cms@nodates}}%
      {}%
      {\bibstring{nodate}%
       \printfield{extradate}}}%
    {\iffieldundef{year}%
      {\iffieldundef{eventyear}%
        {\iffieldundef{origyear}%
          {\iffieldundef{userd}%
            {\ifboolexpr{%
                togl {cms@nodates}%
                and
                not test {\ifentrytype{misc}}%
                and
                not test {\ifentrytype{dataset}}%
              }%
              {\bibstring{nodate}}%
              {}}%
            {\printurldateextra%
              \usebibmacro{clear+datefield}{url}}}%
          {\printorigdateextra%
            \usebibmacro{clear+datefield}{orig}}}%
        {\printeventdateextra%
          \usebibmacro{clear+datefield}{event}}}%
      {\printdateextra%
        \usebibmacro{clear+datefield}{}}}}%

\renewbibmacro*{cite:standard+labelyear+extrayear}{%
  \ifthenelse{\iffieldundef{labelyear}\OR%
    \iffieldequalstr{labelyear}{nodate}}%
  {\ifboolexpr{%
      test {\ifentrytype{misc}}%
      or
      test {\ifentrytype{dataset}}%
      or
      not togl {cms@nodates}%
    }%
    {}%
    {\printtext[cmsyearhyper]{\bibstring{nodate}\printfield{extradate}}}}% For CMS?
  {\printtext[cmsyearhyper]{%
      \iffieldundef{year}%
      {\iffieldundef{eventyear}%
        {\iffieldundef{origyear}%
          {\iffieldundef{userd}%
            {\ifboolexpr{%
                togl {cms@nodates}%
                and
                not test {\ifentrytype{misc}}%
                and
                not test {\ifentrytype{dataset}}%
              }%
              {\bibstring{nodate}}%
              {}}%
            {\printurldateextra}}%
          {\printorigdateextra}}%
        {\printeventdateextra}}%
      {\printdateextra}}}}%
\makeatother

\begin{filecontents}[overwrite]{\jobname.bib}
@online{elk:bronto,
  author    = {Anne Elk},
  title     = {A Theory on Brontosauruses},
  url       = {https://example.edu/~elk/bronto.pdf},
}
@online{elk:other,
  author    = {Anne Elk},
  title     = {A Theory on Other Sauruses},
  url       = {https://example.edu/~elk/other.pdf},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{elk:bronto}
ipsum \autocite{elk:other}

Lorem \autocite{knuth:ct:b}
ipsum \autocite{knuth:ct:c}

\printbibliography
\end{document}

Lorem (Elk, n.d.-a) ipsum (Elk, n.d.-b)

You must log in to answer this question.

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