Skip to content

Add support for LibreOffice's default bibliography styles #13050

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

DTT12912
Copy link

@DTT12912 DTT12912 commented May 2, 2025

Closes #13049

This PR adds support for LibreOffice's default bibliography styles in JabRef's LibreOffice integration. The changes include:

  1. Added new bibliography styles:

    • "Bibliography Heading" for the bibliography section heading
    • "Bibliography 1" for bibliography entries (default)
    • "Text body" as an additional style option
  2. Updated the UI:

    • Renamed "Modify bibliography title" dialog to "Modify bibliography properties"
    • Added a new dropdown to select bibliography body text format
    • Maintained backward compatibility with existing styles
  3. Backend changes:

    • Added new styles to CSLFormatUtils.Format enum
    • Updated OpenOfficePreferences to store bibliography body format
    • Modified CSLCitationOOAdapter to use the selected body format

These changes ensure that JabRef uses LibreOffice's default bibliography styles by default while still allowing users to choose alternative styles if desired.

Mandatory checks

  • [] I own the copyright of the code submitted and I license it under the MIT license
  • [] Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • [] Tests created for changes (if applicable)
  • [] Manually tested changed features in running JabRef (always required)
  • [] Screenshots added in PR description (if change is visible to the user)
  • [] Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • [] Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Comment on lines +35 to +38
HEADING_4("Heading 4"),
BIBLIOGRAPHY_HEADING("Bibliography Heading"),
BIBLIOGRAPHY_1("Bibliography 1"),
TEXT_BODY("Text body");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you read the issue properly? Did you understand the difference between formatting of the bibliography header and the bibliography text?

@subhramit
Copy link
Member

The PR is blindly copy-pasted (or AI-adapted) without manual testing, screenshots, proper preference settings, etc.
Tests are also failing.
Please go through the existing code again, try to understand it, make changes, test and mark ready for review once done.
Ask questions if you encounter any.
If the PR is at a ready for review state without proper understanding, I will be closing it (and you can work on simpler issues).

@subhramit
Copy link
Member

subhramit commented May 2, 2025

Also do not mark the mandatory checks blindly. We expect sincerity from contributors - read what you are marking as "done".

@DTT12912
Copy link
Author

DTT12912 commented May 2, 2025

Hi @subhramit Thank you for looking into the PR. I totally understand your frustration. Right now I'm just trying to figure out about the project . I will ping you if I have any questions or once I take the PR out of draft

@subhramit
Copy link
Member

Hi @subhramit Thank you for looking into the PR. I totally understand your frustration. Right now I'm just trying to figure out about the project . I will ping you if I have any questions or once I take the PR out of draft

Since you are probably a beginner, here are some more hints about the things that are missing:

  1. The root preference declaration and default setting should go into JabRefCliPreferences (you can find the corresponding code in the linked PR in the issue).
  2. The paragraph formatting for the title of the bibliography and the body will be separate. To understand this, try out the libreoffice integration. You can check out this as well as this. This will also help you test your changes.

Copy link

trag-bot bot commented May 2, 2025

@trag-bot didn't find any issues in the code! ✅✨

@jabref-machine
Copy link
Collaborator

Note that your PR will not be reviewed/accepted until you have gone through the mandatory checks in the description and marked each of them them exactly in the format of [x] (done), [ ] (not done yet) or [/] (not applicable).

subhramit added a commit to subhramit/jabref that referenced this pull request May 6, 2025
Co-authored-by: DTT12912 <derictonythomas@gmail.com>
Co-authored-by: subhramit <subhramit.bb@live.in>

Signed-off-by: subhramit <subhramit.bb@live.in>
subhramit pushed a commit to subhramit/jabref that referenced this pull request May 6, 2025
Co-authored-by: DTT12912 <derictonythomas@gmail.com>
Co-authored-by: subhramit <subhramit.bb@live.in>

Signed-off-by: subhramit <subhramit.bb@live.in>
subhramit added a commit to subhramit/jabref that referenced this pull request May 6, 2025
Co-authored-by: DTT12912 <derictonythomas@gmail.com>
Co-authored-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Bibliography Heading and Bibliography 1 styles for OO integration
3 participants