Skip to content

Check integrity: Support for BibTeX .blg files #11998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks
koppor opened this issue Oct 16, 2024 · 11 comments · Fixed by #12866
Closed
4 tasks

Check integrity: Support for BibTeX .blg files #11998

koppor opened this issue Oct 16, 2024 · 11 comments · Fixed by #12866
Assignees
Labels
📍 Assigned Assigned by assign-issue-action (or manually assigned) good second issue Issues that involve a tour of two or three interweaved components in JabRef 📌 Pinned

Comments

@koppor
Copy link
Member

koppor commented Oct 16, 2024

When using pdflatex and bibtex on following LNCS class, one gets errors

\documentclass[runningheads,a4paper,english]{llncs}[2022/01/12]
\bibliographystyle{splncs04}
\begin{document}
\title{Paper Title}
\author{Firstname Lastname \and Firstname Lastname}
\institute{Institute}
\maketitle
\begin{abstract}
...
\end{abstract}
\section{Introduction}
...
\section{Related Work}
There are multiple systematic literature reviews (e.g., \cite{Tan_2021} and \cite{Scholey_2013}) ...
\bibliography{Chocolate}
\end{document}

(The .bib file used is

).

The style file: splncs04.bst
Database file #1: Chocolate.bib
Warning--empty journal in Scholey_2013
Warning--empty year in Scholey_2013
Warning--empty journal in Tan_2021
Warning--empty year in Tan_2021
(There were 4 warnings)

JabRef should be able to present these errors.

JabRef already has an integrity check:

Image

It should be possible to handle the bibtex warnings and errors.

Idea: Two tabs: "Internal" and "BibTeX"

  • At the bibtex tab, the user selects a .blg file. (filename field + browse button)
  • As default value, the current library name is used (.bib exchanged with .blg)
  • The dialog remembers the file per library (in case not the default value is used). The setting is stored in the JabRef preferences (not in the library itself). Changing the file to the default value removes the preference
  • Parse the .blg file and show the warnings as messages in the dialog (this is a new class in logic; please also add test cases for it)
@koppor koppor added the good first issue An issue intended for project-newcomers. Varies in difficulty. label Oct 16, 2024
@github-project-automation github-project-automation bot moved this to Free to take in Good First Issues Oct 16, 2024
@Allan541a
Copy link

Hello Kopper, I have studied Java for a year and am very interested in this issue. Can I work on it?

@koppor koppor added FirstTimeCodeContribution Triggers GitHub Greeter Workflow 📍 Assigned Assigned by assign-issue-action (or manually assigned) labels Oct 17, 2024
@koppor koppor moved this from Free to take to Assigned in Candidates for University Projects Oct 17, 2024
Copy link
Contributor

Welcome to the vibrant world of open-source development with JabRef!

Newcomers, we're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

⚠ Note that this issue will become unassigned if it isn't closed within 30 days.

🔧 A maintainer can also add the Pinned label to prevent it from being unassigned automatically.

Happy coding! 🚀

@koppor koppor moved this from Free to take to Assigned in Good First Issues Oct 17, 2024
@github-actions github-actions bot removed the 📍 Assigned Assigned by assign-issue-action (or manually assigned) label Feb 24, 2025
@koppor koppor added good second issue Issues that involve a tour of two or three interweaved components in JabRef and removed FirstTimeCodeContribution Triggers GitHub Greeter Workflow good first issue An issue intended for project-newcomers. Varies in difficulty. labels Feb 25, 2025
@koppor koppor moved this from Assigned to Free to take in Candidates for University Projects Feb 25, 2025
@mabeysekera
Copy link

/assign-me

@github-actions github-actions bot added the 📍 Assigned Assigned by assign-issue-action (or manually assigned) label Mar 5, 2025
Copy link
Contributor

github-actions bot commented Mar 5, 2025

👋 Hey @mabeysekera, thank you for your interest in this issue! 🎉

We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! 🚀

⏳ Please note, you will be automatically unassigned if the issue isn't closed within 45 days (by 19 April 2025). A maintainer can also add the "📌 Pinned"" label to prevent automatic unassignment.

@github-actions github-actions bot removed the 📍 Assigned Assigned by assign-issue-action (or manually assigned) label Mar 20, 2025
Copy link
Contributor

📋 Assignment Update

Hi @mabeysekera, due to inactivity, you have been unassigned from this issue.

Next steps

If you still want to work on this:

  • Ask a maintainer to assign you again
  • If you're making progress, a maintainer can add the pin label to prevent future automatic unassignment

@wanling0000
Copy link
Contributor

Hi @koppor , I am very interested in this issue. Can I work on it?

To check if I understood your idea correctly, after reading the code, here's my initial plan:

What I understood:

  1. The Integrity Check dialog will have two tabs:

    • Internal: shows the current JabRef integrity messages
    • BibTeX: new tab that shows warnings from the .blg file (generated by bibtex)
  2. In the BibTeX tab, there will be:

    • A text field to show the path of the .blg file
    • A Browse button so users can pick the file manually
  3. Default path handling: If the user doesn't choose a file, JabRef will use the same name as the .bib file, but with .blg as the extension (e.g. refs.bib → refs.blg)

  4. Preference storage: If the user picks a custom .blg path, JabRef will remember it in Preferences.
    If they switch back to the default (same name as .bib), it clears the saved value.

What I plan to do:

Logic layer:

  • A parser class BibTeXLogParser will read a .blg file and extract multiple BibTeXWarning objects
  • Each BibTeXWarning represents a single warning message from the .blg file

My question:
Do you think this should implement the existing EntryChecker interface? Since these warnings are generated externally (by BibTeX), it might not fit well into the static model JabRef uses for internal checks?

GUI layer:

  • Add a new tab in the Integrity Check dialog that shows a table of BibTeX warnings
  • Include a small UI section with a file path input and a Browse... button
  • Add a ViewModel (similar to the internal tab) to manage and display the data

Please let me know if this aligns with your expectations. Thanks a lot!

@koppor
Copy link
Member Author

koppor commented Mar 25, 2025

Hi @koppor , I am very interested in this issue. Can I work on it?

Sure, everyone has the chance to work on an issue if it is not assigned yet.

To check if I understood your idea correctly, after reading the code, here's my initial plan:

Reads good. -- Note that it was an initial idea and we need to see how it "feels" for users.

   * BibTeX: new tab that shows warnings from the .blg file (generated by bibtex)

bibtex (BibTeX processor) or biber (BibLaTeX processer)

4. **Preference storage:** If the user picks a custom .blg path, JabRef will remember it in Preferences.

Remember it in the library properties -- the .blg file is tight to the current library. -- See latex citation tab code how this can be done.

   If they switch back to the default (same name as .bib), it clears the saved value.

Better add a "reset" button.

Show the default path as hint in the text field

* A parser class `BibTeXLogParser` will read a .blg file and extract multiple `BibTeXWarning` objects

call it BibtexLogParser (the casing BibTeX is strange)

If it covers both bibtex and biblatex, call it BibLogParser. Otherwise, introduce both BibtexLogParser and BiberLogParser.

* Each `BibTeXWarning` represents a single warning message from the .blg file

BibWarning.

My question: _Do you think this should implement the existing EntryChecker interface?

The interace takes a BibTeX entry (class BibEntry). The blg files are completely different.

If possible, please return IntegrityMessage, this is a good idea.

With this, maybe even there is no second tab necessary.

If have not investigated fully,

Maybe, there are checks without a field and one needs to create a new IntegrityMessageWithoutField object - or create inherticance (interface IntegrityMessage and one IntegrityMessageWithField/IntegrityMessageField and one IntegrityMessageWithoutField/IntegrityMessageBibEntry).

Please let me know if this aligns with your expectations. Thanks a lot!

Sounds great.

@wanling0000
Copy link
Contributor

Thanks! I’ll take some time to go through the suggestions carefully and start exploring the implementation

@wanling0000
Copy link
Contributor

/assign-me

@github-actions github-actions bot added the 📍 Assigned Assigned by assign-issue-action (or manually assigned) label Mar 25, 2025
Copy link
Contributor

👋 Hey @wanling0000, thank you for your interest in this issue! 🎉

We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! 🚀

⏳ Please note, you will be automatically unassigned if there is not a (draft) pull request within 14 days (by 08 April 2025).

Copy link
Contributor

Closed by #12866

Please head to https://builds.jabref.org/main to try it out.

For any feedback, add a comment to the pull request at #12866.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📍 Assigned Assigned by assign-issue-action (or manually assigned) good second issue Issues that involve a tour of two or three interweaved components in JabRef 📌 Pinned
Projects
Development

Successfully merging a pull request may close this issue.

4 participants