I need to cite a work from antiquity that has no known date, using natbib and author-year citations. The best suggestion I've found is to write the citation using "n.d." (no date) for the year of publication, but putting that into by bibtex file renders an ugly citation without periods:

(Author nd)

when what I'd like is:

(Author n.d.)

Wrapping it in curly braces ("{n.d.}") doesn't seem to help with the in-line citation (though it works in the bibliography).

How can I force BibTex to render the date in an in-line citation with punctuation?

Example .bib

    Author = {Aristotle},
    Booktitle = {Works of Aristotle},
    Title = {Categoriae},
    Year = {{n.d.}}}

Example LaTeX



Lorem ipsum dolor sit amet \citep{aristotle}, consectetur adipiscing elit.


(Ugly, incorrect) output

Lorem ipsum dolor (Aristotle, nd) sit amet.

Aristotle (n.d.). Categoriae.
  • 2
    It seems that apalike.bst strips everything from the contents of the year field except for the last up to four letters or digits. The culprit is the function calc.label; if the call to purify$ is removed, then n.d. is accepted (as it consists of four characters).
    – egreg
    Commented Jul 19, 2012 at 15:18

1 Answer 1


The function calc.label in apalike.bst is responsible of this: it strips away all non alphanumeric characters and keeps the last up to four characters remaining.

If you copy apalike.bst to myapalike.bst and change the function defined in lines 896-912 to become

FUNCTION {calc.label}
{ type$ "book" =
  type$ "inbook" =
    { type$ "proceedings" =
        'editor.key.label                       % apalike ignores organization
        'author.key.label                       % for labeling and sorting
  ", "                                                  % these three lines are
  *                                                     % for apalike, which
  year field.or.null #-1 #4 substring$          % uses all four digits
  'label :=

then \bibliographystyle{myapalike} will accept year={n.d.} as you wish: it consists of four characters, after all!

The change consists simply in removing the string purify$. I can't say if this may have adverse effects on other entries; but, as long as you have only years or n.d., all should go well.

  • Ah, excellent. That feels like a bit of a hack, but it definitely gets the job done. Thanks!
    – Doches
    Commented Jul 19, 2012 at 19:30
  • 1
    @Doches You should consider switching to biblatex.
    – egreg
    Commented Jul 19, 2012 at 19:42

You must log in to answer this question.

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