JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.61k stars 2.57k forks source link

Feature request: JabRef shows which citations are used in LaTeX document #9687

Open bf opened 1 year ago

bf commented 1 year ago

Is your suggestion for improvement related to a problem? Please describe. I have large library with many entries. I want to see which references have been used in my latex document.

Describe the solution you'd like JabRef could use checkcites in the background and highlight library entries which are used / not used in the LaTeX document.

Additional context This seems very specific to LaTeX use case, not sure what other use cases JabRef should support.

Example output of checkcites script:

checkcites output.aux
     _           _       _ _
 ___| |_ ___ ___| |_ ___|_| |_ ___ ___
|  _|   | -_|  _| '_|  _| |  _| -_|_ -|
|___|_|_|___|___|_,_|___|_|_| |___|___|

checkcites.lua -- a reference checker script (v2.5)
Copyright (c) 2012, 2019, Enrico Gregorio, Paulo Cereda
Copyright (c) 2022, Enrico Gregorio, Island of TeX

Great, I found 41 citations in 1 file. I also found 1 bibliography file.
Let me check this file and extract the references. Please wait a moment.

Fantastic, I found 153 references in 1 bibliography file. Please wait a
moment while the reports are generated.

--------------------------------------------------------------------------
Report of unused references in your TeX document (that is, references
present in bibliography files, but not cited in the TeX source file)
--------------------------------------------------------------------------

Unused references in your TeX document: 112
=> Hussain2014a
=> Hussain2014b
=> Vatrapu2016
=> kim2019says
=> Vosoughi2017
=> Hoang2012
=> TwitterAPI2020
=> Shao2017
=> Wiederhold2020
=> Donovan2020
=> WHO2020
=> Kim2019
=> Hevner2010
=> Babakar2016
=> Bakir2018
=> Bakshy2015
=> Barbera2015
=> Bengio2012
=> Bovet2019
=> Briggs2011
=> Cai2017
=> Carlsson2005
=> Choi2018
=> Chollet2017
=> Chollet2018
=> Ciampaglia2015
=> Dungs2018
=> Dunn2016
=> Dietterich2000
=> DeCockBuning2018
=> Figueira2017
=> Flaxman2016
=> Fletcher2018
=> Gelfert2018
=> GildeZuniga2017
=> Goodfellow2016
=> Goodfellow2014
=> Guess2018
=> Gulrajani2019
=> Friedman2001
=> He2016
=> Srivastava2014
=> Hinton2012
=> Hinton2006
=> Howard2017
=> Huang2017
=> Huh2018
=> Ioffe2015
=> Jacobson2016
=> Jin2016
=> Karpathy2016
=> Karras2019
=> Ketkar2017
=> Kittler2002
=> Korshunov2018
=> Lazer2018
=> Lee2017
=> Levy2017
=> Lilleker2017
=> McCulloch1943
=> Metzger2010
=> Miller2003
=> Minsky2017
=> Mitchell1997
=> Nataraj2019
=> Newman2017
=> Nizza2008
=> ONeil2019
=> Odena2018
=> Pattanayak2017
=> PerezRosas2017
=> Radford2015
=> Ragas2014
=> Rapoza2017
=> DepartmentofComputerScience2019
=> Reed1999
=> Rochlin2017
=> Rosenblatt1958
=> Rumelhart1986
=> Sandler2018
=> Thornhill2009
=> Schwartz2018
=> Sharda2012
=> Sharma2016
=> Shearer2018
=> Gottfried2016
=> Shu2017
=> Silverman2016
=> Simonyan2014
=> A.Smith2019
=> Spohr2017
=> Szegedy2017
=> TandocJr2015
=> TandocJr2018
=> TandocJr2018a
=> Thielman2016
=> Torrey2009
=> Turcotte2015
=> Warren2016
=> Welbers2016
=> Xia2017
=> Yaman2018
=> Zhao2015
=> Zoph2018
=> Guess2021
=> Allcott2019
=> Thero2022
=> Evans2022
=> Zhang2020
=> Zhou2021
=> Egelhofer2019
=> Raponi2022

--------------------------------------------------------------------------
Report of undefined references in your TeX document (that is, references
cited in the TeX source file, but not present in the bibliography files)
--------------------------------------------------------------------------

Undefined references in your TeX document: 0
Siedlerchr commented 1 year ago

Have you checked Tools -> Search for citations in latex files?

bf commented 1 year ago

Yes, I was thinking about an indicator in the JabRef table itself, e.g. a highlight of entries which are used.

koppor commented 1 year ago

Just for link comleteness: The tab "LaTeX citatations" is helpful for a concrete reference. See https://blog.jabref.org/2019/08/06/GSoC-LatexCitationsTab/.

koppor commented 1 year ago

This is the inverse of the group "Cited entries", because the main table has feature to show the groups of each entries.

image

Maybe, we can "quickly" configure the group "Cited entries" to have a boolean "show cited entries" (being enabled by default) - and if disabled, only the uncited entries are shown.

koppor commented 1 year ago

Adding to my comment. The initial feature requests reads

I have large library with many entries. I want to see which references have been used in my latex document.

Thus, creating a group "Cited entries" fulfills this wish. Please assign a "good" color @bf. See the screenshot in my last comment for the configuration. You really need to select the .aux file.

I will keep this issue open, because not cited entries are currently not covered.