Reputation: 519
I want to get the name of the .bib
file and the bibkey for every bibentry to be printed when using \printbibliography
. So far my MWE is as follows:
(The bibkey part is already done. See below.)
\documentclass[12pt]{article}
\usepackage[a4paper,margin=2.05cm]{geometry}
\usepackage[backend=biber,
maxbibnames=99,
style=ieee,
sorting=ynt,
defernumbers=true
]{biblatex}
\usepackage{doi}
\usepackage{hyperref}
% https://tex.stackexchange.com/questions/488948/how-to-magically-add-the-file-field-to-each-entry-in-a-bib-file
% Prints the bibkey for every bib entry.
\DeclareFieldFormat{bibkey}{\path{[#1]}}
\renewbibmacro{finentry}{\printfield[bibkey]{entrykey}\finentry}
\addbibresource{file1.bib}
\addbibresource{file2.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
The file1.bib
is given by:
@article{smith2020,
author = {John Smith},
title = {A Great Paper},
journal = {Journal of Important Things},
year = {2020},
volume = {1},
pages = {1--10},
sourcefile = {mybibfile.bib}
}
@article{doe2020,
author = {John Doe},
title = {An Interesting Article},
journal = {Journal of Interesting Stuff},
year = {2020},
volume = {42},
number = {3},
pages = {123-456},
}
The file2.bib
is given by
@article{source1:entry1,
author = {Author One},
title = {Title One},
journal = {Journal One},
year = {2020},
}
@article{source2:entry1,
author = {Author Two},
title = {Title Two},
journal = {Journal Two},
year = {2021},
}
I want all the bib entries to have the following format:
[1] J. Doe, ``An interesting article," Journal of Interesting Stuff, vol. 42, no. 3,
pp. 123–456, 2020. [doe2020 @ file1.bib]
Upvotes: 1
Views: 53