15

I am trying to print an entire *.bib file. I would like to print the citation key along with all the entries in the .bib file. I can print my bibligraphic data file (.bib) but cannot get it to print my cite key. I can use BibTeX or biblatex. Any ideas how to do this?

Here is a clearer explanation:

My MCMC.bib file contains:

@ARTICLE{Ait04,
  author = {Y. A\"{i}t-Sahalia},
  title = {Disentangling Diffusion from Jumps},
  journal = {Journal of Financial Economics },
  year = {2004},
  volume = {74},
  pages = {487-528}
}

@ARTICLE{Ait02,
  author = {Y. A\"{i}t-Sahalia},
  title = {Maximum-Likelihood Estimation of Discretely-Sampled Diffusions: A Closed-Form Approximation Approach},
  journal = {Econometrica },
  year = {2002},
  volume = {70},
  pages = {223-262}
}

I use the following LaTeX file:

\documentclass[12pt]{article}
\usepackage[style=verbose,citestyle=alphabetic,sorting=nty,natbib=true]{biblatex}
\bibliography{MCMC}
\begin{document}
\nocite{*}
\printbibliography 
\end{document}

I would like the output file to contain the cite keys Ait04 and Ait02 at the start of each citation so that I know what key I have assigned to each citation. Any help would be most appreciated.

1
  • Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). Also, I think you're using BibTeX and biblatex in your example; simply put, biblatex as a front-end and BibTeX as a back-end. For more information on the two, see tex.stackexchange.com/q/25701/4012. Besides, kudos for your MWE! For .bib files, the filecontents environment is useful.
    – doncherry
    Apr 8, 2012 at 8:34

1 Answer 1

19

The showkeys package might do just what you're looking for:

\documentclass[12pt]{article}
\usepackage[style=verbose,citestyle=alphabetic,sorting=nty,natbib=true]{biblatex}
\begin{filecontents}{MCMC.bib}
@ARTICLE{Ait04,
  author = {Y. A\"{i}t-Sahalia},
  title = {Disentangling Diffusion from Jumps},
  journal = {Journal of Financial Economics },
  year = {2004},
  volume = {74},
  pages = {487-528}
}
@ARTICLE{Ait02,
  author = {Y. A\"{i}t-Sahalia},
  title = {Maximum-Likelihood Estimation of Discretely-Sampled Diffusions: A Closed-Form Approximation Approach},
  journal = {Econometrica },
  year = {2002},
  volume = {70},
  pages = {223-262}
}
\end{filecontents}
%\bibliography{MCMC}
\addbibresource{MCMC.bib}% is recommended for biblatex
\usepackage{showkeys}
\begin{document}
\nocite{*}
\printbibliography 
\end{document}

the output

You must log in to answer this question.

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