I've implemented a circa tag in my .bib file using natbib as per the this tex.stackexchange.com answer.

Is there an easy way to modify this so that I can produce the "ca." in the in-text citation? As far as I can tell, natbib extracts the last four characters in the year field to be produced in the in-text citation, so I am not sure of how to easily add characters to the front without doing an \xpatchcmd{} or similar.


The .bst is here.



\newcommand{\noopsort}[1]{} % old BibTeX trick

    title = {Paradiso},
    author = {Alighieri, Dante},
    year = {\noopsort{1317}ca. 1317},
    note = {Canto XVI}

  title={I, Robot},
  author={Asimov, I.},
  series={Panther science fiction},
  publisher={Dennis Dobson}


    In \textit{Paradiso}, Dante writes
        E come 'l volger del ciel de la luna \\
        cuopre e discuopre i liti sanza posa, \\
        così fa di Fiorenza la Fortuna: \\
            -- Alighieri (ca. 1317)\nocite{dante_paradiso_1317}

    which is a really cool line in Canto XVI. Also in \textit{I, Robot}, Asimov introduces the three laws of robotics:

        The First Law: A robot may not injure a human being or, through inaction, allow a human being to come to harm. \\
        The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. \\
        The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.
            -- \citet{asimov_robot_1950}


MWE Output:

The output of the MWE.

Desired Output:

My desired output

1 Answer 1


In short, I needed to edit the .bst file. In the definition of calc.label,

  year field.or.null purify$ #-1 #4 substring$  % use all four digits


  year field.or.null #-1 #8 substring$  % use all eight characters (year + "ca. " if it exists)

If you want to use a shorter "ca. ", change #8. The digit must be 4+number of characters preceding the year in the .bib key to include.

You must log in to answer this question.

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