I'm using biblatex + biber with a bib file containing entries like this:

  author={Pritsker, Matthew},
  title={The hidden dangers of historical simulation},
  journal={Journal of Banking \& Finance},

I want to show the file field. How can I do that?

  • 1
    Check this answer – henrique Nov 10 '12 at 2:15
  • 1
    @henrique The field file is already defined in BibLaTeX, but it is not used in the vast majority of existing styles. Indeed it is possible to use the map facilities of biber to map it to something used by an existing style. – Guido Nov 10 '12 at 7:57
  • @Guido Yes, but that seems too much of a hack, your approach is way better (I learned a lot with it!) – henrique Nov 10 '12 at 11:10

The BibTeX field file is not support by the standard BibLaTeX styles. A style supporting it is the reading one.

To use it in other styles, the first thing is to provide formatting instructions for it:

\DeclareFieldFormat{file}{\bibstring{file}\addcolon\space \url{#1}}

The second thing to do is to give instructions to print the field (and at the right position), this means to redefine some existing bib macro to include the field in it. To print it at the end of an entry a possibility is to redefine the finentry bib macro.


Another possibility would be to include the information in the block to print URL or DOI.


The code above could be refined to include a option (file) in the same way as the option for doi, url and eprint, namely:


to be activated by \usepackage[file,...]{biblatex}, and the last line of the code above can be replaced by


EDIT Solution using \AtEveryBibitem:

\AtEveryBibitem executes the code in its argument immediately after the item code. Thus using \printfield{file} would result that the file name will be printed before the content of the entry. However, one can append it at the end of the content of the driver. The content of the driver is available with the control sequence blx@bbx@<entrytype>. The command \thefield{entrytype} will give us the string needed. Thus, to print the file name at the end of a bib item, we can use the following instruction:

  • Guido, I used your first possibility. It worked as I needed. My best guess was with \AtEveryBibitem which printed the file field as the first one. And that was not what I needed. Thank you so much! jbs – jbs Nov 10 '12 at 13:30
  • @jbs Glad it helped. You might consider to accept the answer, see How do you accept an answer? – Guido Nov 10 '12 at 21:15
  • I tried to accept your answer, I read the post you sugested about accepting an answer, but I couldn't manage to accept it. I don't know if this is because I post the question without being registered to stackexchange. I register to accept your answer but the accept icon simply doesn't appear – jbs Nov 12 '12 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.