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
@book{aristotle,
Author = {Aristotle},
Booktitle = {Works of Aristotle},
Title = {Categoriae},
Year = {{n.d.}}}
Example LaTeX
\documentclass{article}
\usepackage[authoryear]{natbib}
\bibliographystyle{apalike}
\begin{document}
Lorem ipsum dolor sit amet \citep{aristotle}, consectetur adipiscing elit.
\bibliography{file.bib}
\end{document}
(Ugly, incorrect) output
Lorem ipsum dolor (Aristotle, nd) sit amet.
REFERENCES
Aristotle (n.d.). Categoriae.
Best Answer
The function
calc.label
inapalike.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
tomyapalike.bst
and change the function defined in lines 896-912 to becomethen
\bibliographystyle{myapalike}
will acceptyear={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 orn.d.
, all should go well.