Repository: JabRef/jabref
Pull request #12996: CSL4LibreOffice - H [Non-bibliographic styles]
Author: login: subhramit
Labels: name: component: libre-office
Created: 2025-04-24T15:28:34Z | Merged: 2025-04-25T19:28:08Z

Follow-up to https://github.com/JabRef/jabref/pull/12951
Fixes https://github.com/JabRef/jabref/pull/12990#issuecomment-2826919222

## Support for non-bibliographic styles
Certain styles specified in our internal `.csl` files had a missing "bibliography" format specification section. Turns out there are styles that specify only citation formatting without bibliography. 
[Fun fact: Some of these styles happen to be "note" citation styles (characterized by `citation-format="note"` in the source)].

This PR introduces support for such styles, thus enabling support for **82** new styles like "_Oxford Art Journal_", "_Journal of Law, Medicine & Ethics_", "_Australian Historical Studies_", "_Business and Human Rights Journal_", "_Bluebook Law Review_", "_Journal of Applied Philosophy_", "_The Journal of Clinical Ethics_", "_South African Law Journal_", "_International Review of the Red Cross_" and so on.

**We now support a total of 2680 built-in styles.**

The entire list of additions can be found below:
<details>

```
- Agora
- AIB Studi
- Ancilla Iuris
- Art History
- Australian Historical Studies
- Bluebook Inline
- Bluebook Law Review
- Brumaire Verlag
- Business and Human Rights Journal
- Byzantine and Modern Greek Studies
- Cambridge Quarterly of Healthcare Ethics
- Catholic Biblical Association
- Chaucer Review
- Common Market Law Review
- Comparativ
- Comparative Politics
- Developing World Bioethics
- Early Medieval Europe
- Early Music History
- Ephemerides Theologicae Lovanienses
- Ethics Book Reviews
- Geopolitics
- Geschichte und Gesellschaft
- Health and Human Rights Journal
- Henoch
- History and Theory
- Humanistica Lovaniensia Journal of Neo-Latin Studies
- Instrumenta Patristica et Mediaevalia
- International Affairs
- International Relations
- International Review of the Red Cross
- International Security
- ISO 690 (Note, Czech version)
- Journal for the History of Astronomy
- Journal of Applied Philosophy
- Journal of Early Christian Studies
- Journal of International Peacekeeping
- Journal of Law, Medicine & Ethics
- Journal of Political Ideologies
- Journal of Political Philosophy
- Journal of the History of Collections
- Journal of the Indian Law Institute
- Journal of the Warburg and Courtauld Institutes
- Journal of Value Inquiry
- Leonardo
- London Review of International Law
- Mediaeval Studies
- Medical History
- Mercatus Center
- Oxford Art Journal
- Past and Present
- Philosophy and Public Affairs
- Pisa University Press
- Politix
- Refugee Survey Quarterly
- Review of International Studies
- Schweizerische Zeitschrift für Geschichte (Swiss Journal of History)
- Social History of Medicine
- Société Française d'Égyptologie
- South African Law Journal
- Speculum
- Stellenbosch Law Review
- Studia Theologica
- Textual Practice
- The British Journal for the History of Science
- The Chinese Journal of International Politics
- The Historical Journal
- The Journal of Clinical Ethics
- The Journal of Comparative Law
- Thomson Reuters Legal Tax and Accounting Australia
- Transnational Environmental Law
- U Schyłku Starożytności (In the Late Antiquity)
- United Nations Development Programme ICCA Legal Review
- Zeitgeschichte
- Zeitschrift für Antikes Christentum (Journal of Ancient Christianity)
- Zeitschrift für die Geschichte des Oberrheins
- Zeitschrift für Geschichtsdidaktik
- Zeitschrift für Medien und Kulturforschung
- Zeitschrift für Medienwissenschaft
- Zeitschrift für Ostmitteleuropa-Forschung
- Zeitschrift für Parlamentsfragen
- Zeitschrift für Politik
```
</details>

**Note:**
- The `Make/Sync bibliography` button will be disabled when such a style is selected.
- The preview viewer will display the citation instead of the bibliography preview for these styles.
- Tests added for these new variants.
- The JSON entries in the generated CSL catalog now have an additional field:
```json
{
  "path" : "academy-of-management-review.csl",
  "isNumeric" : false,
  "hasBibliography" : true,
  "title" : "Academy of Management Review"
}
```

### Other improvements
- Redundant variants of overloaded methods were collapsed in `CitationStyleGenerator`.
- Refactored and restructured some existing tests into more appropriate places.
- Added test for `CitationStyleCatalogGenerator`.
- Fixed old JavaDoc to adapt to current context post the CSL project.
- Simplified RegEx for updating bibliography citation numbers.
- De-coupled certain classes that should not be inter-dependent.

### Mandatory checks

<!--
Go through the checklist below. It is mandatory, even for a draft pull request.

Keep ALL the items. Replace the dots inside [.] and mark them as follows: 
[x] done 
[ ] not done 
[/] not applicable
-->

- [x] I own the copyright of the code submitted and I license it under the [MIT license](https://github.com/JabRef/jabref/blob/main/LICENSE)
- [x] Change in `CHANGELOG.md` described in a way that is understandable for the average user (if change is visible to the user)
- [x] Tests created for changes (if applicable)
- [x] Manually tested changed features in running JabRef (always required)
- [/] Screenshots added in PR description (if change is visible to the user)
- [x] [Checked developer's documentation](https://devdocs.jabref.org/): Is the information available and up to date? If not, I outlined it in this pull request.
- [x] [Checked documentation](https://docs.jabref.org/): 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.



Diff:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d8a7fa5ac1d..ee7d2710896 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -36,6 +36,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
 - We added a "LTWA" abbreviation feature in the "Quality > Abbreviate journal names > LTWA" menu [#12273](https://github.com/JabRef/jabref/issues/12273/)
 - We added path validation to file directories in library properties dialog. [#11840](https://github.com/JabRef/jabref/issues/11840)
 - We now support usage of custom CSL styles in the Open/LibreOffice integration. [#12337](https://github.com/JabRef/jabref/issues/12337)
+- We added support for citation-only CSL styles which don't specify bibliography formatting. [#12996](https://github.com/JabRef/jabref/pull/12996)
 
 ### Changed
 
diff --git a/src/main/java/org/jabref/gui/openoffice/ModifyCSLBibliographyTitleDialogView.java b/src/main/java/org/jabref/gui/openoffice/ModifyCSLBibliographyTitleDialogView.java
index 5a6c7b6b30c..96b269efffb 100644
--- a/src/main/java/org/jabref/gui/openoffice/ModifyCSLBibliographyTitleDialogView.java
+++ b/src/main/java/org/jabref/gui/openoffice/ModifyCSLBibliographyTitleDialogView.java
@@ -33,8 +33,7 @@ public ModifyCSLBibliographyTitleDialogView(OpenOfficePreferences openOfficePref
                   .setAsDialogPane(this);
 
         Button okButton = (Button) getDialogPane().lookupButton(ButtonType.OK);
-        okButton.setOnAction(event -> {
-            viewModel.updateSettings();
+        okButton.setOnAction(_ -> {
             this.close();
         });
     }
diff --git a/src/main/java/org/jabref/gui/openoffice/ModifyCSLBibliographyTitleDialogViewModel.java b/src/main/java/org/jabref/gui/openoffice/ModifyCSLBibliographyTitleDialogViewModel.java
index 5119bde87c3..ad4ac138af2 100644
--- a/src/main/java/org/jabref/gui/openoffice/ModifyCSLBibliographyTitleDialogViewModel.java
+++ b/src/main/java/org/jabref/gui/openoffice/ModifyCSLBibliographyTitleDialogViewModel.java
@@ -19,10 +19,8 @@ public class ModifyCSLBibliographyTitleDialogViewModel {
              new ReadOnlyListWrapper<>(FXCollections.observableArrayList(
                     Arrays.stream(CSLFormatUtils.Format.values()).map(CSLFormatUtils.Format::getFormat).toList()
             ));
-    private final OpenOfficePreferences openOfficePreferences;
 
     public ModifyCSLBibliographyTitleDialogViewModel(OpenOfficePreferences openOfficePreferences) {
-        this.openOfficePreferences = openOfficePreferences;
         this.cslBibliographyTitle.set(openOfficePreferences.getCslBibliographyTitle());
         this.cslBibliographySelectedHeaderFormat.set(openOfficePreferences.getCslBibliographyHeaderFormat());
 
@@ -41,8 +39,4 @@ public StringProperty cslBibliographySelectedHeaderFormatProperty() {
     public ReadOnlyListProperty<String> formatListProperty() {
         return formatListProperty;
     }
-
-    public void updateSettings() {
-        CSLFormatUtils.setBibliographyProperties(openOfficePreferences);
-    }
 }
diff --git a/src/main/java/org/jabref/gui/openoffice/OOBibBase.java b/src/main/java/org/jabref/gui/openoffice/OOBibBase.java
index 76d49db18d4..7518ec9bea1 100644
--- a/src/main/java/org/jabref/gui/openoffice/OOBibBase.java
+++ b/src/main/java/org/jabref/gui/openoffice/OOBibBase.java
@@ -1,6 +1,5 @@
 package org.jabref.gui.openoffice;
 
-import java.io.IOException;
 import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -26,7 +25,6 @@
 import org.jabref.logic.openoffice.frontend.OOFrontend;
 import org.jabref.logic.openoffice.frontend.RangeForOverlapCheck;
 import org.jabref.logic.openoffice.oocsltext.CSLCitationOOAdapter;
-import org.jabref.logic.openoffice.oocsltext.CSLFormatUtils;
 import org.jabref.logic.openoffice.oocsltext.CSLUpdateBibliography;
 import org.jabref.logic.openoffice.style.JStyle;
 import org.jabref.logic.openoffice.style.OOStyle;
@@ -73,11 +71,11 @@ public class OOBibBase {
 
     private final OOBibBaseConnect connection;
 
+    private final OpenOfficePreferences openOfficePreferences;
+
     private CSLCitationOOAdapter cslCitationOOAdapter;
     private CSLUpdateBibliography cslUpdateBibliography;
 
-    private OpenOfficePreferences openOfficePreferences;
-
     public OOBibBase(Path loPath, DialogService dialogService, OpenOfficePreferences openOfficePreferences)
             throws
             BootstrapException,
@@ -92,10 +90,8 @@ private void initializeCitationAdapter(XTextDocument doc) throws WrappedTargetEx
         if (cslCitationOOAdapter == null) {
             StateManager stateManager = Injector.instantiateModelOrService(StateManager.class);
             Supplier<List<BibDatabaseContext>> databasesSupplier = stateManager::getOpenDatabases;
-            OOStyle initialStyle = openOfficePreferences.getCurrentStyle(); // may be a jstyle, can still be used for detecting subsequent style changes in context of CSL
-            cslCitationOOAdapter = new CSLCitationOOAdapter(doc, databasesSupplier, initialStyle);
+            cslCitationOOAdapter = new CSLCitationOOAdapter(doc, databasesSupplier, openOfficePreferences);
             cslUpdateBibliography = new CSLUpdateBibliography();
-            CSLFormatUtils.setBibliographyProperties(openOfficePreferences);
         }
     }
 
@@ -614,7 +610,9 @@ public void guiActionInsertEntry(List<BibEntry> entries,
                     }
 
                     // If "Automatically sync bibliography when inserting citations" is enabled
-                    syncOptions.ifPresent(options -> guiActionUpdateDocument(options.databases, citationStyle));
+                    if (citationStyle.hasBibliography()) {
+                        syncOptions.ifPresent(options -> guiActionUpdateDocument(options.databases, citationStyle));
+                    }
                 } finally {
                     // Release controller lock
                     doc.unlockControllers();
@@ -641,7 +639,6 @@ public void guiActionInsertEntry(List<BibEntry> entries,
             OOError.from(ex).setTitle(errorTitle).showErrorDialog(dialogService);
         } catch (CreationException
                  | WrappedTargetException
-                 | IOException
                  | PropertyVetoException
                  | IllegalTypeException
                  | NotRemoveableException ex) {
@@ -900,8 +897,10 @@ public void guiActionUpdateDocument(List<BibDatabase> databases, OOStyle style)
                 OOError.fromMisc(ex).setTitle(errorTitle).showErrorDialog(dialogService);
             }
         } else if (style instanceof CitationStyle citationStyle) {
+            if (!citationStyle.hasBibliography()) {
+                return;
+            }
             try {
-
                 OOResult<XTextDocument, OOError> odoc = getXTextDocument();
                 if (testDialog(errorTitle, odoc.asVoidResult())) {
                     return;
diff --git a/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java b/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java
index 8b8d7b46ea9..27968dac28b 100644
--- a/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java
+++ b/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java
@@ -417,6 +417,7 @@ private void updateButtonAvailability() {
         boolean canCite = isConnectedToDocument && hasStyle && hasDatabase;
         boolean canRefreshDocument = isConnectedToDocument && hasStyle;
         boolean cslStyleSelected = currentStyle instanceof CitationStyle;
+        boolean canGenerateBibliography = currentStyle instanceof CitationStyle citationStyle && citationStyle.hasBibliography();
 
         selectDocument.setDisable(!isConnectedToDocument);
 
@@ -425,7 +426,7 @@ private void updateButtonAvailability() {
         pushEntriesEmpty.setDisable(!canCite);
         pushEntriesAdvanced.setDisable(!canCite || cslStyleSelected);
 
-        update.setDisable(!canRefreshDocument);
+        update.setDisable(!canRefreshDocument || !canGenerateBibliography);
         merge.setDisable(!canRefreshDocument || cslStyleSelected);
         unmerge.setDisable(!canRefreshDocument || cslStyleSelected);
         manageCitations.setDisable(!canRefreshDocument || cslStyleSelected);
diff --git a/src/main/java/org/jabref/gui/preview/ClipboardContentGenerator.java b/src/main/java/org/jabref/gui/preview/ClipboardContentGenerator.java
index a47915c206c..7f2f80e9795 100644
--- a/src/main/java/org/jabref/gui/preview/ClipboardContentGenerator.java
+++ b/src/main/java/org/jabref/gui/preview/ClipboardContentGenerator.java
@@ -66,7 +66,7 @@ private List<String> generateCitations(List<BibEntry> selectedEntries, CitationS
         }
 
         if (styleSource != null) {
-            return CitationStyleGenerator.generateBibliographies(
+            return CitationStyleGenerator.generateBibliography(
                     selectedEntries,
                     styleSource,
                     outputFormat,
diff --git a/src/main/java/org/jabref/logic/citationstyle/CSLStyleLoader.java b/src/main/java/org/jabref/logic/citationstyle/CSLStyleLoader.java
index e63806f7070..8d3e8557219 100644
--- a/src/main/java/org/jabref/logic/citationstyle/CSLStyleLoader.java
+++ b/src/main/java/org/jabref/logic/citationstyle/CSLStyleLoader.java
@@ -52,7 +52,7 @@ public static CitationStyle getDefaultStyle() {
                               .filter(style -> DEFAULT_STYLE.equals(style.getFilePath()))
                               .findFirst()
                               .orElseGet(() -> CSLStyleUtils.createCitationStyleFromFile(DEFAULT_STYLE)
-                                                            .orElse(new CitationStyle("", "Empty", false, "", true)));
+                                                            .orElse(new CitationStyle("", "Empty", false, false, "", true)));
     }
 
     /**
@@ -78,12 +78,13 @@ public static void loadInternalStyles() {
                     String path = (String) info.get("path");
                     String title = (String) info.get("title");
                     boolean isNumeric = (boolean) info.get("isNumeric");
+                    boolean hasBibliography = (boolean) info.get("hasBibliography");
 
                     // We use these metadata and just load the content instead of re-parsing for them
                     try (InputStream styleStream = CSLStyleLoader.class.getResourceAsStream(STYLES_ROOT + "/" + path)) {
                         if (styleStream != null) {
                             String source = new String(styleStream.readAllBytes());
-                            CitationStyle style = new CitationStyle(path, title, isNumeric, source, true);
+                            CitationStyle style = new CitationStyle(path, title, isNumeric, hasBibliography, source, true);
                             INTERNAL_STYLES.add(style);
                         }
                     } catch (IOException e) {
@@ -91,7 +92,7 @@ public static void loadInternalStyles() {
                         styleCount--;
                     }
                 }
-            LOGGER.info("Loaded {} CSL styles", styleCount);
+                LOGGER.info("Loaded {} CSL styles", styleCount);
             } else {
                 LOGGER.error("Citation style catalog is empty");
             }
diff --git a/src/main/java/org/jabref/logic/citationstyle/CSLStyleUtils.java b/src/main/java/org/jabref/logic/citationstyle/CSLStyleUtils.java
index 4e69553db66..03960f7e98b 100644
--- a/src/main/java/org/jabref/logic/citationstyle/CSLStyleUtils.java
+++ b/src/main/java/org/jabref/logic/citationstyle/CSLStyleUtils.java
@@ -21,16 +21,16 @@
  * Utility class for handling Citation Style Language (CSL) files.
  * Contains shared functionality used by both runtime ({@link CSLStyleLoader}) and build-time ({@link CitationStyleCatalogGenerator}) components.
  */
-public class CSLStyleUtils {
+public final class CSLStyleUtils {
     private static final String STYLES_ROOT = "/csl-styles";
     private static final XMLInputFactory XML_INPUT_FACTORY = XMLInputFactory.newInstance();
 
     private static final Logger LOGGER = LoggerFactory.getLogger(CSLStyleUtils.class);
 
     /**
-     * Style information record (title, isNumericStyle) pair for a citation style.
+     * Style information record (title, isNumericStyle, hasBibliography) triad for a citation style.
      */
-    public record StyleInfo(String title, boolean isNumericStyle) {
+    public record StyleInfo(String title, boolean isNumericStyle, boolean hasBibliography) {
     }
 
     static {
@@ -56,7 +56,7 @@ public static boolean isCitationStyleFile(String styleFile) {
      */
     public static Optional<CitationStyle> createCitationStyleFromFile(String styleFile) {
         if (!isCitationStyleFile(styleFile)) {
-            LOGGER.error("Can only load style files: {}", styleFile);
+            LOGGER.error("Not a .csl style file: {}", styleFile);
             return Optional.empty();
         }
 
@@ -95,7 +95,7 @@ private static Optional<CitationStyle> createCitationStyleFromSource(InputStream
             String content = new String(source.readAllBytes());
 
             Optional<StyleInfo> styleInfo = parseStyleInfo(filename, content);
-            return styleInfo.map(info -> new CitationStyle(filename, info.title(), info.isNumericStyle(), content, isInternal));
+            return styleInfo.map(info -> new CitationStyle(filename, info.title(), info.isNumericStyle(), info.hasBibliography(), content, isInternal));
         } catch (IOException e) {
             LOGGER.error("Error while parsing source", e);
             return Optional.empty();
@@ -115,6 +115,7 @@ public static Optional<StyleInfo> parseStyleInfo(String filename, String content
 
             boolean inInfo = false;
             boolean hasBibliography = false;
+            boolean hasCitation = false;
             String title = "";
             boolean isNumericStyle = false;
 
@@ -126,6 +127,7 @@ public static Optional<StyleInfo> parseStyleInfo(String filename, String content
 
                     switch (elementName) {
                         case "bibliography" -> hasBibliography = true;
+                        case "citation" -> hasCitation = true;
                         case "info" -> inInfo = true;
                         case "title" -> {
                             if (inInfo) {
@@ -146,10 +148,10 @@ public static Optional<StyleInfo> parseStyleInfo(String filename, String content
                 }
             }
 
-            if (hasBibliography && title != null) {
-                return Optional.of(new StyleInfo(title, isNumericStyle));
+            if (hasCitation && title != null) {
+                return Optional.of(new StyleInfo(title, isNumericStyle, hasBibliography));
             } else {
-                LOGGER.debug("No valid title or bibliography found for file {}", filename);
+                LOGGER.debug("No valid title or citation found for file {}", filename);
                 return Optional.empty();
             }
         } catch (XMLStreamException e) {
diff --git a/src/main/java/org/jabref/logic/citationstyle/CitationStyle.java b/src/main/java/org/jabref/logic/citationstyle/CitationStyle.java
index ddb70abae77..0f4dd779ba9 100644
--- a/src/main/java/org/jabref/logic/citationstyle/CitationStyle.java
+++ b/src/main/java/org/jabref/logic/citationstyle/CitationStyle.java
@@ -17,13 +17,15 @@ public class CitationStyle implements OOStyle {
     private final String filePath;
     private final String title;
     private final boolean isNumericStyle;
+    private final boolean hasBibliography;
     private final String source;
     private final boolean isInternalStyle;
 
-    public CitationStyle(String filePath, String title, boolean isNumericStyle, String source, boolean isInternalStyle) {
+    public CitationStyle(String filePath, String title, boolean isNumericStyle, boolean hasBibliography, String source, boolean isInternalStyle) {
         this.filePath = Path.of(Objects.requireNonNull(filePath)).toString(); // wrapping with Path.of takes care of extra slashes in path due to subsequent storage and retrieval (observed on Windows)
         this.title = Objects.requireNonNull(title);
         this.isNumericStyle = isNumericStyle;
+        this.hasBibliography = hasBibliography;
         this.source = Objects.requireNonNull(source);
         this.isInternalStyle = isInternalStyle;
     }
@@ -31,8 +33,8 @@ public CitationStyle(String filePath, String title, boolean isNumericStyle, Stri
     /**
      * Creates a new citation style with an auto-determined internal/external state.
      */
-    public CitationStyle(String filePath, String title, boolean isNumericStyle, String source) {
-        this(filePath, title, isNumericStyle, source, !Path.of(filePath).isAbsolute());
+    public CitationStyle(String filePath, String title, boolean isNumericStyle, boolean hasBibliography, String source) {
+        this(filePath, title, isNumericStyle, hasBibliography, source, !Path.of(filePath).isAbsolute());
     }
 
     public String getTitle() {
@@ -43,6 +45,10 @@ public boolean isNumericStyle() {
         return isNumericStyle;
     }
 
+    public boolean hasBibliography() {
+        return hasBibliography;
+    }
+
     /**
      * Currently, we have support for one alphanumeric CSL style.
      * There is no tag or field in .csl style files that can be parsed to determine if it is an alphanumeric style.
diff --git a/src/main/java/org/jabref/logic/citationstyle/CitationStyleCatalogGenerator.java b/src/main/java/org/jabref/logic/citationstyle/CitationStyleCatalogGenerator.java
index eff475a8163..acd1a0c5cec 100644
--- a/src/main/java/org/jabref/logic/citationstyle/CitationStyleCatalogGenerator.java
+++ b/src/main/java/org/jabref/logic/citationstyle/CitationStyleCatalogGenerator.java
@@ -73,6 +73,7 @@ private static void generateCatalog(List<CitationStyle> styles) throws IOExcepti
                                                             info.put("path", style.getFilePath());
                                                             info.put("title", style.getTitle());
                                                             info.put("isNumeric", style.isNumericStyle());
+                                                            info.put("hasBibliography", style.hasBibliography());
                                                             return info;
                                                         })
                                                         .toList();
diff --git a/src/main/java/org/jabref/logic/citationstyle/CitationStyleGenerator.java b/src/main/java/org/jabref/logic/citationstyle/CitationStyleGenerator.java
index 0a5a079c86e..544a5cce974 100644
--- a/src/main/java/org/jabref/logic/citationstyle/CitationStyleGenerator.java
+++ b/src/main/java/org/jabref/logic/citationstyle/CitationStyleGenerator.java
@@ -5,11 +5,12 @@
 import java.util.List;
 
 import org.jabref.logic.l10n.Localization;
+import org.jabref.model.database.BibDatabase;
 import org.jabref.model.database.BibDatabaseContext;
+import org.jabref.model.database.BibDatabaseMode;
 import org.jabref.model.entry.BibEntry;
 import org.jabref.model.entry.BibEntryTypesManager;
 
-import de.undercouch.citeproc.output.Citation;
 import org.jbibtex.TokenMgrException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -27,54 +28,48 @@ private CitationStyleGenerator() {
     }
 
     /**
-     * Generates a Citation based on a given list of entries and a style with a default {@link BibDatabaseContext}
+     * Generates a citation based on a given list of entries, .csl style source content and output format with a given {@link BibDatabaseContext}.
      *
      * @implNote the citation is generated using JavaScript which may take some time, better call it from outside the main Thread
      */
-    protected static String generateBibliography(List<BibEntry> bibEntries, CitationStyle style, BibEntryTypesManager entryTypesManager) {
-        return generateBibliography(bibEntries, style.getSource(), entryTypesManager);
+    public static String generateCitation(List<BibEntry> bibEntries, String style, CitationStyleOutputFormat outputFormat, BibDatabaseContext databaseContext, BibEntryTypesManager entryTypesManager) {
+        try {
+            return CSL_ADAPTER.makeCitation(bibEntries, style, outputFormat, databaseContext, entryTypesManager).getText();
+        } catch (IOException e) {
+            LOGGER.error("Could not generate BibEntry citation", e);
+            return Localization.lang("Cannot generate citation based on selected citation style.");
+        }
     }
 
     /**
-     * Generates a Citation based on a given list of entries and a style with a default {@link BibDatabaseContext}
+     * Generates a bibliography list in HTML format based on a given list of entries and .csl style source content with a default {@link BibDatabaseContext}.
      *
-     * @implNote the citation is generated using JavaScript which may take some time, better call it from outside the main Thread
+     * @implNote the bibliography is generated using JavaScript which may take some time, better call it from outside the main Thread
      */
     protected static String generateBibliography(List<BibEntry> bibEntries, String style, BibEntryTypesManager entryTypesManager) {
-        return generateBibliography(bibEntries, style, CitationStyleOutputFormat.HTML, new BibDatabaseContext(), entryTypesManager).getFirst();
+        BibDatabaseContext context = new BibDatabaseContext(new BibDatabase(bibEntries));
+        context.setMode(BibDatabaseMode.BIBLATEX);
+        return generateBibliography(bibEntries, style, CitationStyleOutputFormat.HTML, context, entryTypesManager).getFirst();
     }
 
     /**
-     * Generates a Citation based on a given list of entries, style, and output format
+     * Generates a bibliography list based on a given list of entries, .csl style source content and output format with a given {@link BibDatabaseContext}.
      *
-     * @implNote the citation is generated using JavaScript which may take some time, better call it from outside the main Thread
+     * @implNote The bibliographies are generated using JavaScript which may take some time, better call it from outside the main thread.
      */
     public static List<String> generateBibliography(List<BibEntry> bibEntries, String style, CitationStyleOutputFormat outputFormat, BibDatabaseContext databaseContext, BibEntryTypesManager entryTypesManager) {
-        return generateBibliographies(bibEntries, style, outputFormat, databaseContext, entryTypesManager);
-    }
-
-    public static Citation generateCitation(List<BibEntry> bibEntries, String style, CitationStyleOutputFormat outputFormat, BibDatabaseContext databaseContext, BibEntryTypesManager entryTypesManager) throws IOException {
-        return CSL_ADAPTER.makeCitation(bibEntries, style, outputFormat, databaseContext, entryTypesManager);
-    }
-
-    /**
-     * Generates the citation for multiple entries at once.
-     *
-     * @implNote The citations are generated using JavaScript which may take some time, better call it from outside the main thread.
-     */
-    public static List<String> generateBibliographies(List<BibEntry> bibEntries, String style, CitationStyleOutputFormat outputFormat, BibDatabaseContext databaseContext, BibEntryTypesManager entryTypesManager) {
         try {
             return CSL_ADAPTER.makeBibliography(bibEntries, style, outputFormat, databaseContext, entryTypesManager);
         } catch (IllegalArgumentException e) {
-            LOGGER.error("Could not generate BibEntry citation. The CSL engine could not create a preview for your item.", e);
-            return Collections.singletonList(Localization.lang("Cannot generate preview based on selected citation style."));
+            LOGGER.error("Could not generate BibEntry bibliography. The CSL engine could not create a bibliography output for your item.", e);
+            return Collections.singletonList(Localization.lang("Cannot generate bibliography based on selected citation style."));
         } catch (IOException | ArrayIndexOutOfBoundsException e) {
-            LOGGER.error("Could not generate BibEntry citation", e);
-            return Collections.singletonList(Localization.lang("Cannot generate preview based on selected citation style."));
+            LOGGER.error("Could not generate BibEntry bibliography", e);
+            return Collections.singletonList(Localization.lang("Cannot generate bibliography based on selected citation style."));
         } catch (TokenMgrException e) {
             LOGGER.error("Bad character inside BibEntry", e);
             // sadly one cannot easily retrieve the bad char from the TokenMgrError
-            return Collections.singletonList(Localization.lang("Cannot generate preview based on selected citation style.") +
+            return Collections.singletonList(Localization.lang("Cannot generate bibliography based on selected citation style.") +
                     outputFormat.getLineSeparator() +
                     Localization.lang("Bad character inside entry") +
                     outputFormat.getLineSeparator() +
diff --git a/src/main/java/org/jabref/logic/citationstyle/CitationStylePreviewLayout.java b/src/main/java/org/jabref/logic/citationstyle/CitationStylePreviewLayout.java
index 12feae5483e..7a8531ee557 100644
--- a/src/main/java/org/jabref/logic/citationstyle/CitationStylePreviewLayout.java
+++ b/src/main/java/org/jabref/logic/citationstyle/CitationStylePreviewLayout.java
@@ -18,6 +18,10 @@ public CitationStylePreviewLayout(CitationStyle citationStyle, BibEntryTypesMana
 
     @Override
     public String generatePreview(BibEntry entry, BibDatabaseContext databaseContext) {
+        if (!citationStyle.hasBibliography()) {
+            // style has no bibliography formatting instructions - fall back to citation
+            return CitationStyleGenerator.generateCitation(List.of(entry), citationStyle.getSource(), CitationStyleOutputFormat.HTML, databaseContext, bibEntryTypesManager);
+        }
         return CitationStyleGenerator.generateBibliography(List.of(entry), citationStyle.getSource(), CitationStyleOutputFormat.HTML, databaseContext, bibEntryTypesManager).getFirst();
     }
 
diff --git a/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLCitationOOAdapter.java b/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLCitationOOAdapter.java
index db4157e44ae..8989b122d46 100644
--- a/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLCitationOOAdapter.java
+++ b/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLCitationOOAdapter.java
@@ -1,6 +1,5 @@
 package org.jabref.logic.openoffice.oocsltext;
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.Iterator;
@@ -12,6 +11,8 @@
 
 import org.jabref.logic.citationstyle.CitationStyle;
 import org.jabref.logic.citationstyle.CitationStyleGenerator;
+import org.jabref.logic.citationstyle.CitationStyleOutputFormat;
+import org.jabref.logic.openoffice.OpenOfficePreferences;
 import org.jabref.logic.openoffice.style.OOStyle;
 import org.jabref.model.database.BibDatabase;
 import org.jabref.model.database.BibDatabaseContext;
@@ -32,6 +33,7 @@
 /**
  * This class processes CSL citations in JabRef and interacts directly with LibreOffice using an XTextDocument instance.
  * It is tightly coupled with {@link CSLReferenceMarkManager} for management of reference marks tied to the CSL citations.
+ * It uses {@link OpenOfficePreferences} to retrieve the initial style (last selected style), the bibliography title and its paragraph style.
  * Any method in this class is NOT supposed to be moved (OR internally refactored without complete understanding - see implementation note).
  *
  * @implNote UNO API calls are expensive, and any additional operation slows down the net "macro-task" we are trying to achieve in the document.
@@ -41,18 +43,24 @@
  */
 public class CSLCitationOOAdapter {
 
+    private static final CitationStyleOutputFormat HTML_OUTPUT_FORMAT = CitationStyleOutputFormat.HTML;
+
     private final XTextDocument document;
     private final CSLReferenceMarkManager markManager;
     private final Supplier<List<BibDatabaseContext>> databasesSupplier;
+    private final OpenOfficePreferences openOfficePreferences;
 
 
     private CitationStyle currentStyle;
     private boolean styleChanged;
 
-    public CSLCitationOOAdapter(XTextDocument doc, Supplier<List<BibDatabaseContext>> databasesSupplier, OOStyle initialStyle) throws WrappedTargetException, NoSuchElementException {
+    public CSLCitationOOAdapter(XTextDocument doc, Supplier<List<BibDatabaseContext>> databasesSupplier, OpenOfficePreferences openOfficePreferences) throws WrappedTargetException, NoSuchElementException {
         this.document = doc;
         this.markManager = new CSLReferenceMarkManager(doc);
         this.databasesSupplier = databasesSupplier;
+        this.openOfficePreferences = openOfficePreferences;
+
+        OOStyle initialStyle = openOfficePreferences.getCurrentStyle(); // may be a jstyle, can still be used for detecting subsequent style changes in context of CSL
 
         if (initialStyle instanceof CitationStyle citationStyle) {
             this.currentStyle = citationStyle; // else the currentStyle purposely stays null, still causing a difference with the subsequent style if CSL (valid comparison)
@@ -75,7 +83,7 @@ public void setStyle(CitationStyle newStyle) {
      * Comparable to LaTeX's \cite command.
      */
     public void insertCitation(XTextCursor cursor, CitationStyle selectedStyle, List<BibEntry> entries, BibDatabaseContext bibDatabaseContext, BibEntryTypesManager bibEntryTypesManager)
-            throws CreationException, IOException, Exception {
+            throws CreationException, Exception {
         setStyle(selectedStyle);
 
         // Placing this at the beginning reduces the number of updates needed by 1 (in the positive case)
@@ -93,7 +101,7 @@ public void insertCitation(XTextCursor cursor, CitationStyle selectedStyle, List
         if (isAlphanumericStyle) {
             citation = CSLFormatUtils.generateAlphanumericCitation(entries, bibDatabaseContext);
         } else {
-            citation = CitationStyleGenerator.generateCitation(entries, style, CSLFormatUtils.OUTPUT_FORMAT, bibDatabaseContext, bibEntryTypesManager).getText();
+            citation = CitationStyleGenerator.generateCitation(entries, style, HTML_OUTPUT_FORMAT, bibDatabaseContext, bibEntryTypesManager);
         }
 
         String formattedCitation = CSLFormatUtils.transformHTML(citation);
@@ -113,7 +121,7 @@ public void insertCitation(XTextCursor cursor, CitationStyle selectedStyle, List
      * @implNote Very similar to the {@link #insertCitation(XTextCursor, CitationStyle, List, BibDatabaseContext, BibEntryTypesManager) insertCitation} method.
      */
     public void insertInTextCitation(XTextCursor cursor, CitationStyle selectedStyle, List<BibEntry> entries, BibDatabaseContext bibDatabaseContext, BibEntryTypesManager bibEntryTypesManager)
-            throws IOException, CreationException, Exception {
+            throws CreationException, Exception {
         setStyle(selectedStyle);
 
         if (styleChanged) {
@@ -134,7 +142,7 @@ public void insertInTextCitation(XTextCursor cursor, CitationStyle selectedStyle
             if (isAlphanumericStyle) {
                 inTextCitation = CSLFormatUtils.generateAlphanumericInTextCitation(currentEntry, bibDatabaseContext);
             } else {
-                inTextCitation = CitationStyleGenerator.generateCitation(List.of(currentEntry), style, CSLFormatUtils.OUTPUT_FORMAT, bibDatabaseContext, bibEntryTypesManager).getText();
+                inTextCitation = CitationStyleGenerator.generateCitation(List.of(currentEntry), style, HTML_OUTPUT_FORMAT, bibDatabaseContext, bibEntryTypesManager);
             }
 
             String formattedCitation = CSLFormatUtils.transformHTML(inTextCitation);
@@ -175,9 +183,13 @@ public void insertEmptyCitation(XTextCursor cursor, CitationStyle selectedStyle,
      */
     public void insertBibliography(XTextCursor cursor, CitationStyle selectedStyle, List<BibEntry> entries, BibDatabaseContext bibDatabaseContext, BibEntryTypesManager bibEntryTypesManager)
             throws WrappedTargetException, CreationException {
+        if (!selectedStyle.hasBibliography()) {
+            return;
+        }
+
         boolean isNumericStyle = selectedStyle.isNumericStyle();
 
-        OOText title = OOFormat.paragraph(OOText.fromString(CSLFormatUtils.getBibliographyTitle()), CSLFormatUtils.getBibliographyHeaderFormat());
+        OOText title = OOFormat.paragraph(OOText.fromString(openOfficePreferences.getCslBibliographyTitle()), openOfficePreferences.getCslBibliographyHeaderFormat());
         OOTextIntoOO.write(document, cursor, OOText.fromString(title.toString()));
         OOText ooBreak = OOFormat.paragraph(OOText.fromString(""), CSLFormatUtils.DEFAULT_BIBLIOGRAPHY_BODY_PARAGRAPH_FORMAT);
         OOTextIntoOO.write(document, cursor, ooBreak);
@@ -189,7 +201,7 @@ public void insertBibliography(XTextCursor cursor, CitationStyle selectedStyle,
             entries.sort(Comparator.comparingInt(entry -> markManager.getCitationNumber(entry.getCitationKey().orElse(""))));
 
             for (BibEntry entry : entries) {
-                String bibliographyEntry = CitationStyleGenerator.generateBibliography(List.of(entry), style, CSLFormatUtils.OUTPUT_FORMAT, bibDatabaseContext, bibEntryTypesManager).getFirst();
+                String bibliographyEntry = CitationStyleGenerator.generateBibliography(List.of(entry), style, HTML_OUTPUT_FORMAT, bibDatabaseContext, bibEntryTypesManager).getFirst();
                 String citationKey = entry.getCitationKey().orElse("");
                 int currentNumber = markManager.getCitationNumber(citationKey);
 
@@ -200,7 +212,7 @@ public void insertBibliography(XTextCursor cursor, CitationStyle selectedStyle,
             }
         } else {
             // Ordering will be according to citeproc item data provider (default)
-            List<String> bibliographyEntries = CitationStyleGenerator.generateBibliography(entries, style, CSLFormatUtils.OUTPUT_FORMAT, bibDatabaseContext, bibEntryTypesManager);
+            List<String> bibliographyEntries = CitationStyleGenerator.generateBibliography(entries, style, HTML_OUTPUT_FORMAT, bibDatabaseContext, bibEntryTypesManager);
 
             for (String bibliographyEntry : bibliographyEntries) {
                 String formattedBibliographyEntry = CSLFormatUtils.transformHTML(bibliographyEntry);
@@ -264,7 +276,7 @@ private String updateSingleOrMultipleCitationNumbers(String citation, List<BibEn
      * Hence, we keep {@link CSLReferenceMarkManager} independent of {@link CitationStyleGenerator} and {@link CitationStyle}, and keep the following two methods here.
      */
     private void updateAllCitationsWithNewStyle(CitationStyle style, boolean isInTextStyle)
-            throws IOException, Exception, CreationException {
+            throws Exception, CreationException {
         boolean isNumericStyle = style.isNumericStyle();
         boolean isAlphaNumericStyle = style.isAlphanumericStyle();
 
@@ -314,7 +326,7 @@ private void updateAllCitationsWithNewStyle(CitationStyle style, boolean isInTex
                     if (isAlphaNumericStyle) {
                         newCitation = CSLFormatUtils.generateAlphanumericInTextCitation(currentEntry, unifiedBibDatabaseContext);
                     } else {
-                        newCitation = CitationStyleGenerator.generateCitation(List.of(currentEntry), style.getSource(), CSLFormatUtils.OUTPUT_FORMAT, unifiedBibDatabaseContext, bibEntryTypesManager).getText();
+                        newCitation = CitationStyleGenerator.generateCitation(List.of(currentEntry), style.getSource(), HTML_OUTPUT_FORMAT, unifiedBibDatabaseContext, bibEntryTypesManager);
                     }
 
                     String formattedCitation = CSLFormatUtils.transformHTML(newCitation);
@@ -352,7 +364,7 @@ private void updateAllCitationsWithNewStyle(CitationStyle style, boolean isInTex
                     newCitation = CSLFormatUtils.generateAlphanumericCitation(entries, unifiedBibDatabaseContext);
                 } else {
                     newCitation = CitationStyleGenerator.generateCitation(entries, style.getSource(),
-                            CSLFormatUtils.OUTPUT_FORMAT, unifiedBibDatabaseContext, bibEntryTypesManager).getText();
+                            HTML_OUTPUT_FORMAT, unifiedBibDatabaseContext, bibEntryTypesManager);
                 }
 
                 String formattedCitation = CSLFormatUtils.transformHTML(newCitation);
diff --git a/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLFormatUtils.java b/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLFormatUtils.java
index a5262183827..dd8069cd97e 100644
--- a/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLFormatUtils.java
+++ b/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLFormatUtils.java
@@ -7,7 +7,6 @@
 
 import org.jabref.logic.citationkeypattern.BracketedPattern;
 import org.jabref.logic.citationstyle.CitationStyleOutputFormat;
-import org.jabref.logic.openoffice.OpenOfficePreferences;
 import org.jabref.model.database.BibDatabaseContext;
 import org.jabref.model.entry.AuthorList;
 import org.jabref.model.entry.BibEntry;
@@ -24,7 +23,7 @@
  * Contains utility constants and methods for processing of CSL citations as generated by methods of <a href="https://github.com/michel-kraemer/citeproc-java">citeproc-java</a> ({@link org.jabref.logic.citationstyle.CitationStyleGenerator}).
  * <p>These methods are used in {@link CSLCitationOOAdapter} which inserts CSL citation text into an OO document.</p>
  */
-public class CSLFormatUtils {
+public final class CSLFormatUtils {
 
     public enum Format {
         TITLE("Title"),
@@ -46,26 +45,12 @@ public String getFormat() {
         }
     }
 
-    public static final CitationStyleOutputFormat OUTPUT_FORMAT = CitationStyleOutputFormat.HTML;
-
     public static final String DEFAULT_BIBLIOGRAPHY_BODY_PARAGRAPH_FORMAT = "Body Text";
-    
-    private static String bibliographyTitle;
-    private static String bibliographyHeaderFormat;
-    
-    private static final Pattern YEAR_IN_CITATION_PATTERN = Pattern.compile("(.)(.*), (\\d{4}.*)");
-
-    public static String getBibliographyTitle() {
-        return bibliographyTitle;
-    }
 
-    public static String getBibliographyHeaderFormat() {
-        return bibliographyHeaderFormat;
-    }
+    private static final Pattern YEAR_IN_CITATION_PATTERN = Pattern.compile("(.)(.*), (\\d{4}.*)");
 
-    public static void setBibliographyProperties(OpenOfficePreferences openOfficePreferences) {
-        bibliographyTitle = openOfficePreferences.getCslBibliographyTitle();
-        bibliographyHeaderFormat = openOfficePreferences.getCslBibliographyHeaderFormat();
+    private CSLFormatUtils() {
+        // prevent instantiation
     }
 
     /**
@@ -179,7 +164,7 @@ public static String generateAlphanumericInTextCitation(BibEntry entry, BibDatab
      * @return the bibliographic citation with resolved number.
      */
     public static String updateSingleBibliographyNumber(String citation, int currentNumber) {
-        Pattern pattern = Pattern.compile("(\\[|\\()?(\\d+)(\\]|\\))?(\\.)?\\s*");
+        Pattern pattern = Pattern.compile("([\\[(])?(\\d+)([])])?(\\.)?\\s*");
         Matcher matcher = pattern.matcher(citation);
         StringBuilder sb = new StringBuilder();
         boolean numberReplaced = false;
diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties
index 0b4b2bc6b97..ff6576e59d2 100644
--- a/src/main/resources/l10n/JabRef_en.properties
+++ b/src/main/resources/l10n/JabRef_en.properties
@@ -695,7 +695,8 @@ Preview=Preview
 Current\ Preview=Current Preview
 Add\ BST\ file=Add BST file
 
-Cannot\ generate\ preview\ based\ on\ selected\ citation\ style.=Cannot generate preview based on selected citation style.
+Cannot\ generate\ bibliography\ based\ on\ selected\ citation\ style.=Cannot generate bibliography based on selected citation style.
+Cannot\ generate\ citation\ based\ on\ selected\ citation\ style.=Cannot generate citation based on selected citation style.
 Bad\ character\ inside\ entry=Bad character inside entry
 Error\ while\ generating\ citation\ style=Error while generating citation style
 Preview\ style\ changed\ to\:\ %0=Preview style changed to: %0
diff --git a/src/test/java/org/jabref/logic/citationstyle/CSLStyleLoaderTest.java b/src/test/java/org/jabref/logic/citationstyle/CSLStyleLoaderTest.java
new file mode 100644
index 00000000000..52c8ecea64b
--- /dev/null
+++ b/src/test/java/org/jabref/logic/citationstyle/CSLStyleLoaderTest.java
@@ -0,0 +1,22 @@
+package org.jabref.logic.citationstyle;
+
+import java.util.List;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class CSLStyleLoaderTest {
+    @Test
+    void getDefault() {
+        assertNotNull(CSLStyleLoader.getDefaultStyle());
+    }
+
+    @Test
+    void discoverInternalCitationStylesNotNull() {
+        List<CitationStyle> styleList = CSLStyleLoader.getInternalStyles();
+        assertNotNull(styleList);
+        assertFalse(styleList.isEmpty());
+    }
+}
diff --git a/src/test/java/org/jabref/logic/citationstyle/CSLStyleUtilsTest.java b/src/test/java/org/jabref/logic/citationstyle/CSLStyleUtilsTest.java
index dd0ec9a34b3..c8442c6a2b5 100644
--- a/src/test/java/org/jabref/logic/citationstyle/CSLStyleUtilsTest.java
+++ b/src/test/java/org/jabref/logic/citationstyle/CSLStyleUtilsTest.java
@@ -6,7 +6,6 @@
 import java.util.Optional;
 import java.util.stream.Stream;
 
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.Arguments;
 import org.junit.jupiter.params.provider.MethodSource;
@@ -19,6 +18,15 @@
 
 class CSLStyleUtilsTest {
 
+    // internal styles
+    private static final String APA = "apa.csl";
+    private static final String IEEE = "ieee.csl";
+    private static final String VANCOUVER = "vancouver.csl";
+    private static final String CHICAGO_AUTHOR_DATE = "chicago-author-date.csl";
+    private static final String NATURE = "nature.csl";
+    private static final String JOURNAL_OF_CLINICAL_ETHICS = "the-journal-of-clinical-ethics.csl";
+
+    // external styles
     private static final String MODIFIED_IEEE = "ieee-bold-author.csl";
     private static final String MODIFIED_APA = "modified-apa.csl";
     private static final String LITERATURA = "literatura.csl";
@@ -29,6 +37,8 @@ class CSLStyleUtilsTest {
             "apa.csl",
             "harvard.csl",
             "vancouver.csl",
+            "ieee.modified.csl",
+            "apa.v7.csl",
             "/path/to/style/nature.csl",
             "C:\\Users\\username\\Documents\\styles\\chicago.csl"
     })
@@ -50,15 +60,9 @@ void rejectsNonCslExtension(String filename) {
         assertFalse(CSLStyleUtils.isCitationStyleFile(filename));
     }
 
-    @Test
-    void acceptsFilenameWithMultipleDots() {
-        assertTrue(CSLStyleUtils.isCitationStyleFile("ieee.modified.csl"));
-        assertTrue(CSLStyleUtils.isCitationStyleFile("apa.v7.csl"));
-    }
-
     @ParameterizedTest
     @MethodSource("styleTestData")
-    void parseStyleInfo(String styleName, String expectedTitle, boolean expectedIsNumeric) throws IOException {
+    void parseStyleInfo(String styleName, String expectedTitle, boolean expectedNumericNature, boolean expectedBibliographicNature) throws IOException {
         String styleContent;
         try (InputStream inputStream = CSLStyleUtilsTest.class.getResourceAsStream(styleName)) {
             styleContent = new String(inputStream.readAllBytes());
@@ -68,12 +72,13 @@ void parseStyleInfo(String styleName, String expectedTitle, boolean expectedIsNu
 
         assertTrue(styleInfo.isPresent());
         assertEquals(expectedTitle, styleInfo.get().title());
-        assertEquals(expectedIsNumeric, styleInfo.get().isNumericStyle());
+        assertEquals(expectedNumericNature, styleInfo.get().isNumericStyle());
+        assertEquals(expectedBibliographicNature, styleInfo.get().hasBibliography());
     }
 
     @ParameterizedTest
     @MethodSource("styleTestData")
-    void createCitationStyleFromFileReturnsValidCitationStyle(String styleName, String expectedTitle, boolean expectedIsNumeric) {
+    void createCitationStyleFromFileReturnsValidCitationStyle(String styleName, String expectedTitle, boolean expectedNumericNature, boolean expectedBibliographicNature) {
         // use absolute path to test csl so that it is treated as external file
         Path resourcePath = Path.of("").toAbsolutePath()
                                 .resolve("src/test/resources/org/jabref/logic/citationstyle")
@@ -83,16 +88,86 @@ void createCitationStyleFromFileReturnsValidCitationStyle(String styleName, Stri
 
         assertTrue(citationStyle.isPresent());
         assertEquals(expectedTitle, citationStyle.get().getTitle());
-        assertEquals(expectedIsNumeric, citationStyle.get().isNumericStyle());
+        assertEquals(expectedNumericNature, citationStyle.get().isNumericStyle());
+        assertEquals(expectedBibliographicNature, citationStyle.get().hasBibliography());
         assertNotNull(citationStyle.get().getSource());
         assertFalse(citationStyle.get().isInternalStyle());
     }
 
     private static Stream<Arguments> styleTestData() {
         return Stream.of(
-                Arguments.of(MODIFIED_IEEE, "IEEE - Bold Author", true),
-                Arguments.of(MODIFIED_APA, "Modified American Psychological Association 7th edition", false),
-                Arguments.of(LITERATURA, "Literatūra", false) // Literatūra uses author-date format, so non-numeric
+                Arguments.of(MODIFIED_IEEE, "IEEE - Bold Author", true, true),
+                Arguments.of(MODIFIED_APA, "Modified American Psychological Association 7th edition", false, true),
+                Arguments.of(LITERATURA, "Literatūra", false, true) // Literatūra uses author-date format, so non-numeric
+        );
+    }
+
+    @ParameterizedTest
+    @MethodSource
+    void internalCitationStylePresent(String cslFileName) {
+        Optional<CitationStyle> citationStyle = CSLStyleUtils.createCitationStyleFromFile(cslFileName);
+        assertTrue(citationStyle.isPresent());
+    }
+
+    static Stream<Arguments> internalCitationStylePresent() {
+        return Stream.of(
+                Arguments.of(IEEE),
+                Arguments.of(APA),
+                Arguments.of(VANCOUVER),
+                Arguments.of(CHICAGO_AUTHOR_DATE),
+                Arguments.of(NATURE)
+        );
+    }
+
+    @ParameterizedTest
+    @MethodSource
+    void titleMatches(String expectedTitle, String cslFileName) {
+        CitationStyle citationStyle = CSLStyleUtils.createCitationStyleFromFile(cslFileName).get();
+        assertEquals(expectedTitle, citationStyle.getTitle());
+    }
+
+    static Stream<Arguments> titleMatches() {
+        return Stream.of(
+                Arguments.of("IEEE", IEEE),
+                Arguments.of("American Psychological Association 7th edition", APA),
+                Arguments.of("Vancouver", VANCOUVER),
+                Arguments.of("Chicago Manual of Style 17th edition (author-date)", CHICAGO_AUTHOR_DATE),
+                Arguments.of("Nature", NATURE)
+        );
+    }
+
+    @ParameterizedTest
+    @MethodSource
+    void numericPropertyMatches(boolean expectedNumericNature, String cslFileName) {
+        CitationStyle citationStyle = CSLStyleUtils.createCitationStyleFromFile(cslFileName).get();
+        assertEquals(expectedNumericNature, citationStyle.isNumericStyle());
+    }
+
+    private static Stream<Arguments> numericPropertyMatches() {
+        return Stream.of(
+                Arguments.of(true, IEEE),
+                Arguments.of(false, APA),
+                Arguments.of(true, VANCOUVER),
+                Arguments.of(false, CHICAGO_AUTHOR_DATE),
+                Arguments.of(true, NATURE)
+        );
+    }
+
+    @ParameterizedTest
+    @MethodSource
+    void bibliographicPropertyMatches(boolean expectedBibliographicNature, String cslFileName) {
+        CitationStyle citationStyle = CSLStyleUtils.createCitationStyleFromFile(cslFileName).get();
+        assertEquals(expectedBibliographicNature, citationStyle.hasBibliography());
+    }
+
+    private static Stream<Arguments> bibliographicPropertyMatches() {
+        return Stream.of(
+                Arguments.of(true, IEEE),
+                Arguments.of(true, APA),
+                Arguments.of(true, VANCOUVER),
+                Arguments.of(true, CHICAGO_AUTHOR_DATE),
+                Arguments.of(true, NATURE),
+                Arguments.of(false, JOURNAL_OF_CLINICAL_ETHICS)
         );
     }
 }
diff --git a/src/test/java/org/jabref/logic/citationstyle/CitationStyleCatalogGeneratorTest.java b/src/test/java/org/jabref/logic/citationstyle/CitationStyleCatalogGeneratorTest.java
new file mode 100644
index 00000000000..1176fbf638b
--- /dev/null
+++ b/src/test/java/org/jabref/logic/citationstyle/CitationStyleCatalogGeneratorTest.java
@@ -0,0 +1,48 @@
+package org.jabref.logic.citationstyle;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.List;
+import java.util.Map;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+class CitationStyleCatalogGeneratorTest {
+
+    private static final String CATALOG_PATH = "build/resources/main/citation-style-catalog.json";
+
+    @BeforeEach
+    void generateCatalog() {
+        CitationStyleCatalogGenerator.generateCitationStyleCatalog();
+    }
+
+    @Test
+    void catalogGenerationContainsEntries() throws IOException {
+        Path catalogPath = Path.of(CATALOG_PATH);
+
+        assertTrue(Files.exists(catalogPath), "Catalog file should exist at " + CATALOG_PATH);
+
+        // Read and parse the catalog
+        String catalogContent = Files.readString(catalogPath);
+        ObjectMapper mapper = new ObjectMapper();
+        List<Map<String, Object>> styles = mapper.readValue(
+                catalogContent,
+                new TypeReference<>() {
+                });
+
+        assertFalse(styles.isEmpty(), "Catalog should contain at least one citation style");
+
+        Map<String, Object> firstStyle = styles.getFirst();
+        assertTrue(firstStyle.containsKey("path"), "Style entry should have a path");
+        assertTrue(firstStyle.containsKey("title"), "Style entry should have a title");
+        assertTrue(firstStyle.containsKey("isNumeric"), "Style entry should have isNumeric flag");
+        assertTrue(firstStyle.containsKey("hasBibliography"), "Style entry should have hasBibliography flag");
+    }
+}
diff --git a/src/test/java/org/jabref/logic/citationstyle/CitationStyleGeneratorTest.java b/src/test/java/org/jabref/logic/citationstyle/CitationStyleGeneratorTest.java
index 1d0f9354309..a2759808060 100644
--- a/src/test/java/org/jabref/logic/citationstyle/CitationStyleGeneratorTest.java
+++ b/src/test/java/org/jabref/logic/citationstyle/CitationStyleGeneratorTest.java
@@ -1,6 +1,5 @@
 package org.jabref.logic.citationstyle;
 
-import java.io.IOException;
 import java.util.List;
 import java.util.stream.Stream;
 
@@ -14,7 +13,6 @@
 import org.jabref.model.entry.field.StandardField;
 import org.jabref.model.entry.types.StandardEntryType;
 
-import de.undercouch.citeproc.output.Citation;
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -25,37 +23,96 @@
 
 class CitationStyleGeneratorTest {
 
+    private static final List<CitationStyle> STYLE_LIST = CSLStyleLoader.getInternalStyles();
+    private static final String DEFAULT_STYLE = CSLStyleLoader.getDefaultStyle().getSource();
+    private static final CitationStyleOutputFormat HTML_OUTPUT_FORMAT = CitationStyleOutputFormat.HTML;
+    private static final CitationStyleOutputFormat TEXT_OUTPUT_FORMAT = CitationStyleOutputFormat.TEXT;
+    private static final BibEntryTypesManager ENTRY_TYPES_MANAGER = new BibEntryTypesManager();
+
     private final BibEntry testEntry = TestEntry.getTestEntry();
-    private final BibDatabaseContext context = new BibDatabaseContext(new BibDatabase(List.of(testEntry)));
-    private final BibEntryTypesManager bibEntryTypesManager = new BibEntryTypesManager();
-    private final List<CitationStyle> styleList = CSLStyleLoader.getInternalStyles();
+    private final BibDatabaseContext testEntryContext = new BibDatabaseContext(new BibDatabase(List.of(testEntry)));
+
+    @Test
+    void defaultCitation() {
+        // IEEE
+        testEntryContext.setMode(BibDatabaseMode.BIBLATEX);
+        String citation = CitationStyleGenerator.generateCitation(List.of(testEntry), DEFAULT_STYLE, HTML_OUTPUT_FORMAT, testEntryContext, ENTRY_TYPES_MANAGER);
+
+        String expected = "[1]";
+
+        assertEquals(expected, citation);
+    }
 
     @Test
     void aCMCitation() {
-        context.setMode(BibDatabaseMode.BIBLATEX);
-        CitationStyle style = styleList.stream().filter(e -> "ACM SIGGRAPH".equals(e.getTitle())).findAny().get();
-        String citation = CitationStyleGenerator.generateBibliography(List.of(testEntry), style.getSource(), CitationStyleOutputFormat.HTML, context, bibEntryTypesManager).getFirst();
+        testEntryContext.setMode(BibDatabaseMode.BIBLATEX);
+        CitationStyle style = STYLE_LIST.stream().filter(e -> "ACM SIGGRAPH".equals(e.getTitle())).findAny().get();
+        String citation = CitationStyleGenerator.generateCitation(List.of(testEntry), style.getSource(), HTML_OUTPUT_FORMAT, testEntryContext, ENTRY_TYPES_MANAGER);
 
-        // if the acm-siggraph.csl citation style changes this has to be modified
-        String expected = "  <div class=\"csl-entry\">"
-                + "<span style=\"font-variant: small-caps\">Smith, B., Jones, B., and Williams, J.</span> 2016. Title of the test entry. <span style=\"font-style: italic\">BibTeX Journal</span> <span style=\"font-style: italic\">34</span>, 3, 45&ndash;67."
-                + "</div>\n"
-                + "";
+        String expected = "[Smith et al. 2016]";
 
         assertEquals(expected, citation);
     }
 
     @Test
     void aPACitation() {
-        context.setMode(BibDatabaseMode.BIBLATEX);
-        CitationStyle style = styleList.stream().filter(e -> "American Psychological Association 7th edition".equals(e.getTitle())).findAny().get();
-        String citation = CitationStyleGenerator.generateBibliography(List.of(testEntry), style.getSource(), CitationStyleOutputFormat.HTML, context, bibEntryTypesManager).getFirst();
+        testEntryContext.setMode(BibDatabaseMode.BIBLATEX);
+        CitationStyle style = STYLE_LIST.stream().filter(e -> "ACM SIGGRAPH".equals(e.getTitle())).findAny().get();
+        String citation = CitationStyleGenerator.generateCitation(List.of(testEntry), style.getSource(), HTML_OUTPUT_FORMAT, testEntryContext, ENTRY_TYPES_MANAGER);
 
-        // if the apa-7th-citation.csl citation style changes this has to be modified
-        String expected = "  <div class=\"csl-entry\">"
-                + "Smith, B., Jones, B., &amp; Williams, J. (2016). Title of the test entry. <span style=\"font-style: italic\">BibTeX Journal</span>, <span style=\"font-style: italic\">34</span>(3), 45&ndash;67. https://doi.org/10.1001/bla.blubb"
-                + "</div>\n"
-                + "";
+        String expected = "[Smith et al. 2016]";
+
+        assertEquals(expected, citation);
+    }
+
+    @Test
+    void clinicalEthicsNoteCitation() {
+        testEntryContext.setMode(BibDatabaseMode.BIBLATEX);
+        // Non-bibliographic citation style (citation-format="note")
+        CitationStyle style = STYLE_LIST.stream().filter(e -> "The Journal of Clinical Ethics".equals(e.getTitle())).findAny().get();
+        String citation = CitationStyleGenerator.generateCitation(List.of(testEntry), style.getSource(), HTML_OUTPUT_FORMAT, testEntryContext, ENTRY_TYPES_MANAGER);
+
+        String expected = "B. Smith, B. Jones and J. Williams, &ldquo;Title of the test entry,&rdquo; <span style=\"font-style: italic\">BibTeX Journal</span> 34, no. 3 (July 2016): 45&ndash;67.";
+
+        assertEquals(expected, citation);
+    }
+
+    @Test
+    void defaultBibliography() {
+        // IEEE
+        testEntryContext.setMode(BibDatabaseMode.BIBLATEX);
+        String citation = CitationStyleGenerator.generateBibliography(List.of(testEntry), DEFAULT_STYLE, HTML_OUTPUT_FORMAT, testEntryContext, ENTRY_TYPES_MANAGER).getFirst();
+
+        // if the default citation style (ieee.csl) changes this has to be modified
+        String expected = """
+                  <div class="csl-entry">
+                    <div class="csl-left-margin">[1]</div><div class="csl-right-inline">B. Smith, B. Jones, and J. Williams, &ldquo;Title of the test entry,&rdquo; <span style="font-style: italic">BibTeX Journal</span>, vol. 34, no. 3, pp. 45&ndash;67, Jul. 2016, doi: 10.1001/bla.blubb.</div>
+                  </div>
+                """;
+
+        assertEquals(expected, citation);
+    }
+
+    @Test
+    void aCMBibliography() {
+        testEntryContext.setMode(BibDatabaseMode.BIBLATEX);
+        CitationStyle style = STYLE_LIST.stream().filter(e -> "ACM SIGGRAPH".equals(e.getTitle())).findAny().get();
+        String citation = CitationStyleGenerator.generateBibliography(List.of(testEntry), style.getSource(), HTML_OUTPUT_FORMAT, testEntryContext, ENTRY_TYPES_MANAGER).getFirst();
+
+        // if the acm-siggraph.csl citation style changes this has to be modified
+        String expected = "  <div class=\"csl-entry\"><span style=\"font-variant: small-caps\">Smith, B., Jones, B., and Williams, J.</span> 2016. Title of the test entry. <span style=\"font-style: italic\">BibTeX Journal</span> <span style=\"font-style: italic\">34</span>, 3, 45&ndash;67.</div>\n";
+
+        assertEquals(expected, citation);
+    }
+
+    @Test
+    void aPABibliography() {
+        testEntryContext.setMode(BibDatabaseMode.BIBLATEX);
+        CitationStyle style = STYLE_LIST.stream().filter(e -> "American Psychological Association 7th edition".equals(e.getTitle())).findAny().get();
+        String citation = CitationStyleGenerator.generateBibliography(List.of(testEntry), style.getSource(), HTML_OUTPUT_FORMAT, testEntryContext, ENTRY_TYPES_MANAGER).getFirst();
+
+        // if the apa.csl citation style changes this has to be modified
+        String expected = "  <div class=\"csl-entry\">Smith, B., Jones, B., &amp; Williams, J. (2016). Title of the test entry. <span style=\"font-style: italic\">BibTeX Journal</span>, <span style=\"font-style: italic\">34</span>(3), 45&ndash;67. https://doi.org/10.1001/bla.blubb</div>\n";
 
         assertEquals(expected, citation);
     }
@@ -66,13 +123,12 @@ void aPACitation() {
      */
     @Test
     @Disabled("Till alphanumeric citations are supported by citeproc-java")
-    void din1502AlphanumericInTextCitation() throws IOException {
-        context.setMode(BibDatabaseMode.BIBLATEX);
-        CitationStyle style = styleList.stream().filter(e -> "DIN 1505-2 (alphanumeric, Deutsch) - standard superseded by ISO-690".equals(e.getTitle())).findAny().get();
-        Citation citation = CitationStyleGenerator.generateCitation(List.of(testEntry), style.getSource(), CitationStyleOutputFormat.HTML, context, bibEntryTypesManager);
-        String inTextCitationText = citation.getText();
+    void din1502AlphanumericInTextCitation() {
+        testEntryContext.setMode(BibDatabaseMode.BIBLATEX);
+        CitationStyle style = STYLE_LIST.stream().filter(e -> "DIN 1505-2 (alphanumeric, Deutsch) - standard superseded by ISO-690".equals(e.getTitle())).findAny().get();
+        String inTextCitation = CitationStyleGenerator.generateCitation(List.of(testEntry), style.getSource(), HTML_OUTPUT_FORMAT, testEntryContext, ENTRY_TYPES_MANAGER);
 
-        assertEquals("[Smit2016]", inTextCitationText);
+        assertEquals("[Smit2016]", inTextCitation);
     }
 
     @Test
@@ -84,7 +140,7 @@ void ignoreNewLine() {
         String expected = "  <div class=\"csl-entry\">\n" +
                 "    <div class=\"csl-left-margin\">[1]</div><div class=\"csl-right-inline\">F. Last and J. Doe, </div>\n" +
                 "  </div>\n";
-        String citation = CitationStyleGenerator.generateBibliography(List.of(entry), CSLStyleLoader.getDefaultStyle(), bibEntryTypesManager);
+        String citation = CitationStyleGenerator.generateBibliography(List.of(entry), DEFAULT_STYLE, ENTRY_TYPES_MANAGER);
         assertEquals(expected, citation);
     }
 
@@ -97,14 +153,16 @@ void ignoreCarriageReturnNewLine() {
         String expected = "  <div class=\"csl-entry\">\n" +
                 "    <div class=\"csl-left-margin\">[1]</div><div class=\"csl-right-inline\">F. Last and J. Doe, </div>\n" +
                 "  </div>\n";
-        String citation = CitationStyleGenerator.generateBibliography(List.of(entry), CSLStyleLoader.getDefaultStyle(), bibEntryTypesManager);
+        String citation = CitationStyleGenerator.generateBibliography(List.of(entry), DEFAULT_STYLE, ENTRY_TYPES_MANAGER);
         assertEquals(expected, citation);
     }
 
     @Test
     void missingCitationStyle() {
-        String expected = Localization.lang("Cannot generate preview based on selected citation style.");
-        String citation = CitationStyleGenerator.generateBibliography(List.of(new BibEntry()), "faulty citation style", bibEntryTypesManager);
+        BibEntry entry = new BibEntry();
+
+        String expected = Localization.lang("Cannot generate bibliography based on selected citation style.");
+        String citation = CitationStyleGenerator.generateBibliography(List.of(entry), "faulty citation style", ENTRY_TYPES_MANAGER);
         assertEquals(expected, citation);
     }
 
@@ -114,10 +172,7 @@ void htmlFormat() {
                 "    <div class=\"csl-left-margin\">[1]</div><div class=\"csl-right-inline\">B. Smith, B. Jones, and J. Williams, &ldquo;Title of the test entry,&rdquo; <span style=\"font-style: italic\">BibTeX Journal</span>, vol. 34, no. 3, pp. 45&ndash;67, Jul. 2016, doi: 10.1001/bla.blubb.</div>\n" +
                 "  </div>\n";
 
-        String style = CSLStyleLoader.getDefaultStyle().getSource();
-        CitationStyleOutputFormat format = CitationStyleOutputFormat.HTML;
-
-        String actualCitation = CitationStyleGenerator.generateBibliography(List.of(testEntry), style, format, context, bibEntryTypesManager).getFirst();
+        String actualCitation = CitationStyleGenerator.generateBibliography(List.of(testEntry), DEFAULT_STYLE, HTML_OUTPUT_FORMAT, testEntryContext, ENTRY_TYPES_MANAGER).getFirst();
         assertEquals(expectedCitation, actualCitation);
     }
 
@@ -125,10 +180,7 @@ void htmlFormat() {
     void textFormat() {
         String expectedCitation = "[1]B. Smith, B. Jones, and J. Williams, “Title of the test entry,” BibTeX Journal, vol. 34, no. 3, pp. 45–67, Jul. 2016, doi: 10.1001/bla.blubb.\n";
 
-        String style = CSLStyleLoader.getDefaultStyle().getSource();
-        CitationStyleOutputFormat format = CitationStyleOutputFormat.TEXT;
-
-        String actualCitation = CitationStyleGenerator.generateBibliography(List.of(testEntry), style, format, context, bibEntryTypesManager).getFirst();
+        String actualCitation = CitationStyleGenerator.generateBibliography(List.of(testEntry), DEFAULT_STYLE, TEXT_OUTPUT_FORMAT, testEntryContext, ENTRY_TYPES_MANAGER).getFirst();
         assertEquals(expectedCitation, actualCitation);
     }
 
@@ -137,12 +189,13 @@ void handleDiacritics() {
         BibEntry entry = new BibEntry();
         // We need to escape the backslash as well, because the slash is part of the LaTeX expression
         entry.setField(StandardField.AUTHOR, "L{\\\"a}st, First and Doe, Jane");
+
         // if the default citation style changes this has to be modified.
         // in this case ä was added to check if it is formatted appropriately
         String expected = "  <div class=\"csl-entry\">\n" +
                 "    <div class=\"csl-left-margin\">[1]</div><div class=\"csl-right-inline\">F. L&auml;st and J. Doe, </div>\n" +
                 "  </div>\n";
-        String citation = CitationStyleGenerator.generateBibliography(List.of(entry), CSLStyleLoader.getDefaultStyle(), bibEntryTypesManager);
+        String citation = CitationStyleGenerator.generateBibliography(List.of(entry), DEFAULT_STYLE, ENTRY_TYPES_MANAGER);
         assertEquals(expected, citation);
     }
 
@@ -150,10 +203,8 @@ void handleDiacritics() {
     void handleAmpersand() {
         String expectedCitation = "[1]B. Smith, B. Jones, and J. Williams, “Famous quote: “&TitleTest&” - that is it,” BibTeX Journal, vol. 34, no. 3, pp. 45–67, Jul. 2016, doi: 10.1001/bla.blubb.\n";
         testEntry.setField(StandardField.TITLE, "Famous quote: “&TitleTest&” - that is it");
-        String style = CSLStyleLoader.getDefaultStyle().getSource();
-        CitationStyleOutputFormat format = CitationStyleOutputFormat.TEXT;
 
-        String actualCitation = CitationStyleGenerator.generateBibliography(List.of(testEntry), style, format, context, bibEntryTypesManager).getFirst();
+        String actualCitation = CitationStyleGenerator.generateBibliography(List.of(testEntry), DEFAULT_STYLE, TEXT_OUTPUT_FORMAT, testEntryContext, ENTRY_TYPES_MANAGER).getFirst();
         assertEquals(expectedCitation, actualCitation);
     }
 
@@ -176,9 +227,8 @@ void handleCrossRefFields() {
 
         String expectedCitation = "[1]B. Smith, “An article,” J. Jones, Ed., Somewhere: Great Publisher, 2021, pp. 1–10.\n";
         BibDatabaseContext bibDatabaseContext = new BibDatabaseContext(new BibDatabase(List.of(firstEntry, secondEntry)));
-        String style = CSLStyleLoader.getDefaultStyle().getSource();
 
-        String actualCitation = CitationStyleGenerator.generateBibliography(List.of(firstEntry), style, CitationStyleOutputFormat.TEXT, bibDatabaseContext, bibEntryTypesManager).getFirst();
+        String actualCitation = CitationStyleGenerator.generateBibliography(List.of(firstEntry), DEFAULT_STYLE, TEXT_OUTPUT_FORMAT, bibDatabaseContext, ENTRY_TYPES_MANAGER).getFirst();
         assertEquals(expectedCitation, actualCitation);
     }
 
@@ -589,14 +639,14 @@ static Stream<Arguments> cslMapping() {
     @ParameterizedTest
     @MethodSource
     void cslMapping(String expected, BibDatabaseMode mode, BibEntry entry, String cslFileName) {
-        context.setMode(mode);
+        testEntryContext.setMode(mode);
 
         String citation = CitationStyleGenerator.generateBibliography(
                 List.of(entry),
                 CSLStyleUtils.createCitationStyleFromFile(cslFileName).orElseThrow().getSource(),
-                CitationStyleOutputFormat.TEXT,
-                context,
-                bibEntryTypesManager).getFirst();
+                TEXT_OUTPUT_FORMAT,
+                testEntryContext,
+                ENTRY_TYPES_MANAGER).getFirst();
         assertEquals(expected, citation);
     }
 }
diff --git a/src/test/java/org/jabref/logic/citationstyle/CitationStyleTest.java b/src/test/java/org/jabref/logic/citationstyle/CitationStyleTest.java
deleted file mode 100644
index f81ce64e765..00000000000
--- a/src/test/java/org/jabref/logic/citationstyle/CitationStyleTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package org.jabref.logic.citationstyle;
-
-import java.util.List;
-import java.util.Optional;
-import java.util.stream.Stream;
-
-import org.jabref.logic.util.TestEntry;
-import org.jabref.model.database.BibDatabase;
-import org.jabref.model.database.BibDatabaseContext;
-import org.jabref.model.database.BibDatabaseMode;
-import org.jabref.model.entry.BibEntryTypesManager;
-
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.MethodSource;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-class CitationStyleTest {
-
-    @Test
-    void getDefault() {
-        assertNotNull(CSLStyleLoader.getDefaultStyle());
-    }
-
-    @Test
-    void defaultCitation() {
-        BibDatabaseContext context = new BibDatabaseContext(new BibDatabase(List.of(TestEntry.getTestEntry())));
-        context.setMode(BibDatabaseMode.BIBLATEX);
-        String citation = CitationStyleGenerator.generateBibliography(List.of(TestEntry.getTestEntry()), CSLStyleLoader.getDefaultStyle().getSource(), CitationStyleOutputFormat.HTML, context, new BibEntryTypesManager()).getFirst();
-
-        // if the default citation style changes this has to be modified
-        String expected = """
-                  <div class="csl-entry">
-                    <div class="csl-left-margin">[1]</div><div class="csl-right-inline">B. Smith, B. Jones, and J. Williams, &ldquo;Title of the test entry,&rdquo; <span style="font-style: italic">BibTeX Journal</span>, vol. 34, no. 3, pp. 45&ndash;67, Jul. 2016, doi: 10.1001/bla.blubb.</div>
-                  </div>
-                """;
-
-        assertEquals(expected, citation);
-    }
-
-    @Test
-    void discoverCitationStylesNotNull() {
-        List<CitationStyle> styleList = CSLStyleLoader.getInternalStyles();
-        assertNotNull(styleList);
-    }
-
-    @ParameterizedTest
-    @MethodSource
-    void citationStylePresent(String cslFileName) {
-        Optional<CitationStyle> citationStyle = CSLStyleUtils.createCitationStyleFromFile(cslFileName);
-        assertTrue(citationStyle.isPresent());
-    }
-
-    static Stream<Arguments> citationStylePresent() {
-        return Stream.of(
-                Arguments.of("ieee.csl"),
-                Arguments.of("apa.csl"),
-                Arguments.of("vancouver.csl"),
-                Arguments.of("chicago-author-date.csl"),
-                Arguments.of("nature.csl")
-        );
-    }
-
-    @ParameterizedTest
-    @MethodSource
-    void titleMatches(String expectedTitle, String cslFileName) {
-        Optional<CitationStyle> citationStyle = CSLStyleUtils.createCitationStyleFromFile(cslFileName);
-        CSLStyleUtils.StyleInfo styleInfo = new CSLStyleUtils.StyleInfo(citationStyle.get().getTitle(), citationStyle.get().isNumericStyle());
-        assertEquals(expectedTitle, styleInfo.title());
-    }
-
-    static Stream<Arguments> titleMatches() {
-        return Stream.of(
-                Arguments.of("IEEE", "ieee.csl"),
-                Arguments.of("American Psychological Association 7th edition", "apa.csl"),
-                Arguments.of("Vancouver", "vancouver.csl"),
-                Arguments.of("Chicago Manual of Style 17th edition (author-date)", "chicago-author-date.csl"),
-                Arguments.of("Nature", "nature.csl")
-        );
-    }
-
-    @ParameterizedTest
-    @MethodSource
-    void numericPropertyMatches(boolean expectedNumericNature, String cslFileName) {
-        Optional<CitationStyle> citationStyle = CSLStyleUtils.createCitationStyleFromFile(cslFileName);
-        CSLStyleUtils.StyleInfo styleInfo = new CSLStyleUtils.StyleInfo(citationStyle.get().getTitle(), citationStyle.get().isNumericStyle());
-        assertEquals(expectedNumericNature, styleInfo.isNumericStyle());
-    }
-
-    private static Stream<Arguments> numericPropertyMatches() {
-        return Stream.of(
-                Arguments.of(true, "ieee.csl"),
-                Arguments.of(false, "apa.csl"),
-                Arguments.of(true, "vancouver.csl"),
-                Arguments.of(false, "chicago-author-date.csl"),
-                Arguments.of(true, "nature.csl")
-        );
-    }
-}
diff --git a/src/test/java/org/jabref/logic/openoffice/oocsltext/CSLFormatUtilsTest.java b/src/test/java/org/jabref/logic/openoffice/oocsltext/CSLFormatUtilsTest.java
index 7ec1984a52f..1e119b7621d 100644
--- a/src/test/java/org/jabref/logic/openoffice/oocsltext/CSLFormatUtilsTest.java
+++ b/src/test/java/org/jabref/logic/openoffice/oocsltext/CSLFormatUtilsTest.java
@@ -1,6 +1,5 @@
 package org.jabref.logic.openoffice.oocsltext;
 
-import java.io.IOException;
 import java.util.List;
 import java.util.stream.Stream;
 
@@ -18,7 +17,6 @@
 import org.jabref.model.entry.types.StandardEntryType;
 import org.jabref.model.openoffice.ootext.OOText;
 
-import de.undercouch.citeproc.output.Citation;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.Arguments;
 import org.junit.jupiter.params.provider.MethodSource;
@@ -28,11 +26,13 @@
 
 class CSLFormatUtilsTest {
 
-    private static final List<CitationStyle> STYLE_LIST = CSLStyleLoader.getInternalStyles();
+    private static final BibEntry TEST_ENTRY = TestEntry.getTestEntry();
+    private static final BibDatabaseContext TEST_ENTRY_CONTEXT = new BibDatabaseContext(new BibDatabase(List.of(TestEntry.getTestEntry())));
+    private static final BibEntryTypesManager ENTRY_TYPES_MANAGER = new BibEntryTypesManager();
+
+    private static final CitationStyleOutputFormat HTML_OUTPUT_FORMAT = CitationStyleOutputFormat.HTML;
 
-    private final BibEntry testEntry = TestEntry.getTestEntry();
-    private final BibDatabaseContext context = new BibDatabaseContext(new BibDatabase(List.of(TestEntry.getTestEntry())));
-    private final BibEntryTypesManager bibEntryTypesManager = new BibEntryTypesManager();
+    private static final List<CitationStyle> STYLE_LIST = CSLStyleLoader.getInternalStyles();
 
     /**
      * Test to check transformation of raw, unsupported HTML into OO-ready HTML.
@@ -149,7 +149,7 @@ static Stream<Arguments> ooHTMLTransformFromRawHTML() {
     @ParameterizedTest
     @MethodSource
     void ooHTMLTransformFromRawBibliography(String expected, CitationStyle style) {
-        String citation = CitationStyleGenerator.generateBibliography(List.of(testEntry), style.getSource(), CSLFormatUtils.OUTPUT_FORMAT, context, bibEntryTypesManager).getFirst();
+        String citation = CitationStyleGenerator.generateBibliography(List.of(TEST_ENTRY), style.getSource(), HTML_OUTPUT_FORMAT, TEST_ENTRY_CONTEXT, ENTRY_TYPES_MANAGER).getFirst();
         String actual = CSLFormatUtils.transformHTML(citation);
         assertEquals(expected, actual);
     }
@@ -259,17 +259,15 @@ static Stream<Arguments> ooHTMLTransformFromRawBibliography() {
      */
     @ParameterizedTest
     @MethodSource
-    void ooHTMLTransformFromCitationWithSingleEntry(String expected, CitationStyle style) throws IOException {
-        Citation citation = CitationStyleGenerator.generateCitation(List.of(testEntry), style.getSource(), CSLFormatUtils.OUTPUT_FORMAT, context, bibEntryTypesManager);
-        String inTextCitationText = citation.getText();
-        String actual = CSLFormatUtils.transformHTML(inTextCitationText);
+    void ooHTMLTransformFromCitationWithSingleEntry(String expected, CitationStyle style) {
+        String citation = CitationStyleGenerator.generateCitation(List.of(TEST_ENTRY), style.getSource(), HTML_OUTPUT_FORMAT, TEST_ENTRY_CONTEXT, ENTRY_TYPES_MANAGER);
+        String actual = CSLFormatUtils.transformHTML(citation);
         OOText ooText = OOText.fromString(actual);
         assertEquals(OOText.fromString(expected), ooText);
     }
 
     static Stream<Arguments> ooHTMLTransformFromCitationWithSingleEntry() {
         return Stream.of(
-
                 Arguments.of(
                         "(Smith et al., 2016)",
                         STYLE_LIST.stream().filter(e -> "American Psychological Association 7th edition".equals(e.getTitle())).findAny().get()
@@ -349,6 +347,12 @@ static Stream<Arguments> ooHTMLTransformFromCitationWithSingleEntry() {
                 Arguments.of(
                         "<sup>1</sup>",
                         STYLE_LIST.stream().filter(e -> "American Institute of Physics 4th edition".equals(e.getTitle())).findAny().get()
+                ),
+
+                // Non-bibliographic style (citation-format="note")
+                Arguments.of(
+                        "B. Smith, B. Jones and J. Williams, “Title of the test entry,” <i>BibTeX Journal</i> 34, no. 3 (July 2016): 45–67.",
+                        STYLE_LIST.stream().filter(e -> "The Journal of Clinical Ethics".equals(e.getTitle())).findAny().get()
                 )
         );
     }
@@ -360,7 +364,7 @@ static Stream<Arguments> ooHTMLTransformFromCitationWithSingleEntry() {
      */
     @ParameterizedTest
     @MethodSource
-    void ooHTMLTransformFromCitationWithMultipleEntries(String expected, CitationStyle style) throws IOException {
+    void ooHTMLTransformFromCitationWithMultipleEntries(String expected, CitationStyle style) {
         BibEntry entry1 = new BibEntry(StandardEntryType.Article)
                 .withField(StandardField.AUTHOR, "Garcia, Maria and Lee, David")
                 .withField(StandardField.JOURNAL, "International Review of Physics")
@@ -386,9 +390,8 @@ void ooHTMLTransformFromCitationWithMultipleEntries(String expected, CitationSty
         List<BibEntry> entries = List.of(entry1, entry2);
         BibDatabaseContext context = new BibDatabaseContext(new BibDatabase(entries));
         context.setMode(BibDatabaseMode.BIBLATEX);
-        Citation citation = CitationStyleGenerator.generateCitation(entries, style.getSource(), CSLFormatUtils.OUTPUT_FORMAT, context, bibEntryTypesManager);
-        String inTextCitationText = citation.getText();
-        String actual = CSLFormatUtils.transformHTML(inTextCitationText);
+        String citation = CitationStyleGenerator.generateCitation(entries, style.getSource(), HTML_OUTPUT_FORMAT, context, ENTRY_TYPES_MANAGER);
+        String actual = CSLFormatUtils.transformHTML(citation);
         assertEquals(expected, actual);
     }
 
@@ -472,6 +475,12 @@ static Stream<Arguments> ooHTMLTransformFromCitationWithMultipleEntries() {
                 Arguments.of(
                         "<sup>1,2</sup>",
                         STYLE_LIST.stream().filter(e -> "American Institute of Physics 4th edition".equals(e.getTitle())).findAny().get()
+                ),
+
+                // Non-bibliographic style (citation-format="note")
+                Arguments.of(
+                        "M. Garcia and D. Lee, “Quantum Entanglement in Superconductors,” <i>International Review of Physics</i> 28, no. 6 (2021): 789–810; J. Smith and E. Johnson, “A Study on Machine Learning Algorithms,” <i>Journal of Computer Science</i> 15, no. 4 (2020): 101–20.",
+                        STYLE_LIST.stream().filter(e -> "The Journal of Clinical Ethics".equals(e.getTitle())).findAny().get()
                 )
         );
     }
@@ -490,14 +499,14 @@ static Stream<Arguments> ooHTMLTransformFromCitationWithMultipleEntries() {
      */
     @ParameterizedTest
     @MethodSource
-    void updateSingleNumericCitation(String expected, CitationStyle style) {
-        String citation = CitationStyleGenerator.generateBibliography(List.of(testEntry), style.getSource(), CSLFormatUtils.OUTPUT_FORMAT, context, bibEntryTypesManager).getFirst();
+    void updateSingleNumericBibliography(String expected, CitationStyle style) {
+        String citation = CitationStyleGenerator.generateBibliography(List.of(TEST_ENTRY), style.getSource(), HTML_OUTPUT_FORMAT, TEST_ENTRY_CONTEXT, ENTRY_TYPES_MANAGER).getFirst();
         String transformedCitation = CSLFormatUtils.transformHTML(citation);
         String actual = CSLFormatUtils.updateSingleBibliographyNumber(transformedCitation, 3);
         assertEquals(expected, actual);
     }
 
-    static Stream<Arguments> updateSingleNumericCitation() {
+    static Stream<Arguments> updateSingleNumericBibliography() {
         return Stream.of(
 
                 // Type: "[1]"


Reviews:
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T15:34:13Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T15:35:05Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T15:37:26Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T15:37:39Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T15:39:23Z
user: login: subhramit
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-24T15:40:24Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T15:40:26Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T15:41:59Z
user: login: subhramit
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-24T15:45:10Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T16:55:52Z
user: login: koppor
state: DISMISSED
author_association: MEMBER
submitted_at: 2025-04-24T17:09:24Z
user: login: subhramit
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-24T17:12:48Z
user: login: subhramit
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-24T17:17:55Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T17:37:40Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T19:12:45Z
user: login: subhramit
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-24T19:51:54Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T20:00:36Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T20:00:38Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T20:00:41Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T20:00:44Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T20:00:48Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-24T20:48:30Z
user: login: subhramit
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-24T21:05:43Z
user: login: trag-bot[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-25T05:34:26Z
user: login: Siedlerchr
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-25T19:16:44Z

Review comments:
diff_hunk: @@ -78,20 +78,21 @@ public static void loadInternalStyles() {
                     String path = (String) info.get("path");
                     String title = (String) info.get("title");
                     boolean isNumeric = (boolean) info.get("isNumeric");
+                    boolean hasBibliography = (boolean) info.get("hasBibliography");
 
                     // We use these metadata and just load the content instead of re-parsing for them
                     try (InputStream styleStream = CSLStyleLoader.class.getResourceAsStream(STYLES_ROOT + "/" + path)) {
                         if (styleStream != null) {
                             String source = new String(styleStream.readAllBytes());
-                            CitationStyle style = new CitationStyle(path, title, isNumeric, source, true);
+                            CitationStyle style = new CitationStyle(path, title, isNumeric, hasBibliography, source, true);
                             INTERNAL_STYLES.add(style);
                         }
                     } catch (IOException e) {
                         LOGGER.error("Error loading style file: {}", path, e);
                         styleCount--;
                     }
                 }
-            LOGGER.info("Loaded {} CSL styles", styleCount);
+                LOGGER.info("Loaded {} CSL styles", styleCount);
path: src/main/java/org/jabref/logic/citationstyle/CSLStyleLoader.java
user: login: trag-bot[bot]
body: The logging statement should not be reformatted unless new statements are added. The patch only changes indentation without adding new logic. 

created_at: 2025-04-24T15:34:13Z
author_association: NONE
diff_hunk: @@ -28,9 +28,9 @@ public class CSLStyleUtils {
     private static final Logger LOGGER = LoggerFactory.getLogger(CSLStyleUtils.class);
 
     /**
-     * Style information record (title, isNumericStyle) pair for a citation style.
+     * Style information record (title, isNumericStyle, hasBibliography) triad for a citation style.
      */
-    public record StyleInfo(String title, boolean isNumericStyle) {
+    public record StyleInfo(String title, boolean isNumericStyle, boolean hasBibliography) {
path: src/main/java/org/jabref/logic/citationstyle/CSLStyleUtils.java
user: login: trag-bot[bot]
body: The JavaDoc for the StyleInfo record was updated to include 'hasBibliography', but the JavaDoc for the createCitationStyleFromSource method was not updated to reflect the change in the CitationStyle constructor. 

created_at: 2025-04-24T15:35:04Z
author_association: NONE
diff_hunk: @@ -17,22 +17,24 @@ public class CitationStyle implements OOStyle {
     private final String filePath;
     private final String title;
     private final boolean isNumericStyle;
+    private final boolean hasBibliography;
     private final String source;
     private final boolean isInternalStyle;
 
-    public CitationStyle(String filePath, String title, boolean isNumericStyle, String source, boolean isInternalStyle) {
+    public CitationStyle(String filePath, String title, boolean isNumericStyle, boolean hasBibliography, String source, boolean isInternalStyle) {
path: src/main/java/org/jabref/logic/citationstyle/CitationStyle.java
user: login: trag-bot[bot]
body: The constructor uses Objects.requireNonNull for parameter validation, which is discouraged. Instead, JSpecify @NonNull annotations should be used for parameter validation. 

created_at: 2025-04-24T15:37:26Z
author_association: NONE
diff_hunk: @@ -17,22 +17,24 @@ public class CitationStyle implements OOStyle {
     private final String filePath;
     private final String title;
     private final boolean isNumericStyle;
+    private final boolean hasBibliography;
     private final String source;
     private final boolean isInternalStyle;
 
-    public CitationStyle(String filePath, String title, boolean isNumericStyle, String source, boolean isInternalStyle) {
+    public CitationStyle(String filePath, String title, boolean isNumericStyle, boolean hasBibliography, String source, boolean isInternalStyle) {
         this.filePath = Path.of(Objects.requireNonNull(filePath)).toString(); // wrapping with Path.of takes care of extra slashes in path due to subsequent storage and retrieval (observed on Windows)
         this.title = Objects.requireNonNull(title);
         this.isNumericStyle = isNumericStyle;
+        this.hasBibliography = hasBibliography;
         this.source = Objects.requireNonNull(source);
         this.isInternalStyle = isInternalStyle;
     }
 
     /**
      * Creates a new citation style with an auto-determined internal/external state.
      */
-    public CitationStyle(String filePath, String title, boolean isNumericStyle, String source) {
-        this(filePath, title, isNumericStyle, source, !Path.of(filePath).isAbsolute());
+    public CitationStyle(String filePath, String title, boolean isNumericStyle, boolean hasBibliography, String source) {
path: src/main/java/org/jabref/logic/citationstyle/CitationStyle.java
user: login: trag-bot[bot]
body: The constructor uses Objects.requireNonNull for parameter validation, which is discouraged. Instead, JSpecify @NonNull annotations should be used for parameter validation. 

created_at: 2025-04-24T15:37:39Z
author_association: NONE
diff_hunk: @@ -73,6 +73,7 @@ private static void generateCatalog(List<CitationStyle> styles) throws IOExcepti
                                                             info.put("path", style.getFilePath());
                                                             info.put("title", style.getTitle());
                                                             info.put("isNumeric", style.isNumericStyle());
+                                                            info.put("hasBibliography", style.hasBibliography());
path: src/main/java/org/jabref/logic/citationstyle/CitationStyleCatalogGenerator.java
user: login: trag-bot[bot]
body: The JavaDoc for the generateCatalog method should be updated to reflect the addition of the 'hasBibliography' field in the metadata map, as per the special instructions. 

created_at: 2025-04-24T15:39:23Z
author_association: NONE
diff_hunk: @@ -78,20 +78,21 @@ public static void loadInternalStyles() {
                     String path = (String) info.get("path");
                     String title = (String) info.get("title");
                     boolean isNumeric = (boolean) info.get("isNumeric");
+                    boolean hasBibliography = (boolean) info.get("hasBibliography");
 
                     // We use these metadata and just load the content instead of re-parsing for them
                     try (InputStream styleStream = CSLStyleLoader.class.getResourceAsStream(STYLES_ROOT + "/" + path)) {
                         if (styleStream != null) {
                             String source = new String(styleStream.readAllBytes());
-                            CitationStyle style = new CitationStyle(path, title, isNumeric, source, true);
+                            CitationStyle style = new CitationStyle(path, title, isNumeric, hasBibliography, source, true);
                             INTERNAL_STYLES.add(style);
                         }
                     } catch (IOException e) {
                         LOGGER.error("Error loading style file: {}", path, e);
                         styleCount--;
                     }
                 }
-            LOGGER.info("Loaded {} CSL styles", styleCount);
+                LOGGER.info("Loaded {} CSL styles", styleCount);
path: src/main/java/org/jabref/logic/citationstyle/CSLStyleLoader.java
user: login: subhramit
body: It corrects the indent
created_at: 2025-04-24T15:40:24Z
author_association: MEMBER
diff_hunk: @@ -27,54 +28,48 @@ private CitationStyleGenerator() {
     }
 
     /**
-     * Generates a Citation based on a given list of entries and a style with a default {@link BibDatabaseContext}
+     * Generates a citation based on a given list of entries, .csl style source content and output format with a given {@link BibDatabaseContext}.
      *
      * @implNote the citation is generated using JavaScript which may take some time, better call it from outside the main Thread
      */
-    protected static String generateBibliography(List<BibEntry> bibEntries, CitationStyle style, BibEntryTypesManager entryTypesManager) {
-        return generateBibliography(bibEntries, style.getSource(), entryTypesManager);
+    public static String generateCitation(List<BibEntry> bibEntries, String style, CitationStyleOutputFormat outputFormat, BibDatabaseContext databaseContext, BibEntryTypesManager entryTypesManager) {
path: src/main/java/org/jabref/logic/citationstyle/CitationStyleGenerator.java
user: login: trag-bot[bot]
body: The method 'generateCitation' has changed, but the JavaDoc does not list the arguments 'bibEntries', 'style', 'outputFormat', 'databaseContext', and 'entryTypesManager'. The JavaDoc should be updated to reflect these arguments. 

created_at: 2025-04-24T15:40:25Z
author_association: NONE
diff_hunk: @@ -18,6 +18,10 @@ public CitationStylePreviewLayout(CitationStyle citationStyle, BibEntryTypesMana
 
     @Override
     public String generatePreview(BibEntry entry, BibDatabaseContext databaseContext) {
+        if (!citationStyle.hasBibliography()) {
path: src/main/java/org/jabref/logic/citationstyle/CitationStylePreviewLayout.java
user: login: trag-bot[bot]
body: The patch introduces a duplicate check for 'citationStyle.hasBibliography()' which is already present in the existing code. This results in code duplication and should be refactored to avoid redundancy. 

created_at: 2025-04-24T15:41:59Z
author_association: NONE
diff_hunk: @@ -28,9 +28,9 @@ public class CSLStyleUtils {
     private static final Logger LOGGER = LoggerFactory.getLogger(CSLStyleUtils.class);
 
     /**
-     * Style information record (title, isNumericStyle) pair for a citation style.
+     * Style information record (title, isNumericStyle, hasBibliography) triad for a citation style.
      */
-    public record StyleInfo(String title, boolean isNumericStyle) {
+    public record StyleInfo(String title, boolean isNumericStyle, boolean hasBibliography) {
path: src/main/java/org/jabref/logic/citationstyle/CSLStyleUtils.java
user: login: subhramit
body: No need
created_at: 2025-04-24T15:45:10Z
author_association: MEMBER
diff_hunk: @@ -900,8 +897,10 @@ public void guiActionUpdateDocument(List<BibDatabase> databases, OOStyle style)
                 OOError.fromMisc(ex).setTitle(errorTitle).showErrorDialog(dialogService);
             }
         } else if (style instanceof CitationStyle citationStyle) {
+            if (!citationStyle.hasBibliography()) {
+                return;
+            }
path: src/main/java/org/jabref/gui/openoffice/OOBibBase.java
user: login: trag-bot[bot]
body: The check for 'citationStyle.hasBibliography()' should be documented in the method's JavaDoc if it affects the method's behavior significantly, as per the special instructions. 

created_at: 2025-04-24T16:55:52Z
author_association: NONE
diff_hunk: @@ -0,0 +1,20 @@
+package org.jabref.logic.citationstyle;
+
+import java.util.List;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class CSLStyleLoaderTest {
+    @Test
+    void getDefault() {
+        assertNotNull(CSLStyleLoader.getDefaultStyle());
+    }
+
+    @Test
+    void discoverInternalCitationStylesNotNull() {
+        List<CitationStyle> styleList = CSLStyleLoader.getInternalStyles();
+        assertNotNull(styleList);
path: src/test/java/org/jabref/logic/citationstyle/CSLStyleLoaderTest.java
user: login: koppor
body: Maybe, `assertNotEquals(List.of(), styleList` to check that the list has some contents?
created_at: 2025-04-24T17:08:18Z
author_association: MEMBER
diff_hunk: @@ -46,26 +45,12 @@ public String getFormat() {
         }
     }
 
-    public static final CitationStyleOutputFormat OUTPUT_FORMAT = CitationStyleOutputFormat.HTML;
-
     public static final String DEFAULT_BIBLIOGRAPHY_BODY_PARAGRAPH_FORMAT = "Body Text";
-    
-    private static String bibliographyTitle;
-    private static String bibliographyHeaderFormat;
-    
-    private static final Pattern YEAR_IN_CITATION_PATTERN = Pattern.compile("(.)(.*), (\\d{4}.*)");
-
-    public static String getBibliographyTitle() {
-        return bibliographyTitle;
-    }
 
-    public static String getBibliographyHeaderFormat() {
-        return bibliographyHeaderFormat;
-    }
+    private static final Pattern YEAR_IN_CITATION_PATTERN = Pattern.compile("(.)(.*), (\\d{4}.*)");
 
-    public static void setBibliographyProperties(OpenOfficePreferences openOfficePreferences) {
-        bibliographyTitle = openOfficePreferences.getCslBibliographyTitle();
-        bibliographyHeaderFormat = openOfficePreferences.getCslBibliographyHeaderFormat();
path: src/main/java/org/jabref/logic/openoffice/oocsltext/CSLFormatUtils.java
user: login: subhramit
body: Removal as an outcome of discussion at https://github.com/JabRef/jabref/pull/12784/files#r2058893104
created_at: 2025-04-24T17:12:48Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,20 @@
+package org.jabref.logic.citationstyle;
+
+import java.util.List;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class CSLStyleLoaderTest {
+    @Test
+    void getDefault() {
+        assertNotNull(CSLStyleLoader.getDefaultStyle());
+    }
+
+    @Test
+    void discoverInternalCitationStylesNotNull() {
+        List<CitationStyle> styleList = CSLStyleLoader.getInternalStyles();
+        assertNotNull(styleList);
path: src/test/java/org/jabref/logic/citationstyle/CSLStyleLoaderTest.java
user: login: subhramit
body: Good idea, done
created_at: 2025-04-24T17:17:55Z
author_association: MEMBER
diff_hunk: @@ -83,16 +88,86 @@ void createCitationStyleFromFileReturnsValidCitationStyle(String styleName, Stri
 
         assertTrue(citationStyle.isPresent());
         assertEquals(expectedTitle, citationStyle.get().getTitle());
-        assertEquals(expectedIsNumeric, citationStyle.get().isNumericStyle());
+        assertEquals(expectedNumericNature, citationStyle.get().isNumericStyle());
+        assertEquals(expectedBibliographicNature, citationStyle.get().hasBibliography());
         assertNotNull(citationStyle.get().getSource());
         assertFalse(citationStyle.get().isInternalStyle());
     }
 
     private static Stream<Arguments> styleTestData() {
         return Stream.of(
-                Arguments.of(MODIFIED_IEEE, "IEEE - Bold Author", true),
-                Arguments.of(MODIFIED_APA, "Modified American Psychological Association 7th edition", false),
-                Arguments.of(LITERATURA, "Literatūra", false) // Literatūra uses author-date format, so non-numeric
+                Arguments.of(MODIFIED_IEEE, "IEEE - Bold Author", true, true),
+                Arguments.of(MODIFIED_APA, "Modified American Psychological Association 7th edition", false, true),
+                Arguments.of(LITERATURA, "Literatūra", false, true) // Literatūra uses author-date format, so non-numeric
+        );
+    }
+
+    @ParameterizedTest
+    @MethodSource
+    void internalCitationStylePresent(String cslFileName) {
+        Optional<CitationStyle> citationStyle = CSLStyleUtils.createCitationStyleFromFile(cslFileName);
path: src/test/java/org/jabref/logic/citationstyle/CSLStyleUtilsTest.java
user: login: trag-bot[bot]
body: The method should not return null, and the use of Optional is correct. However, ensure that null is never passed to this method. 

created_at: 2025-04-24T17:37:40Z
author_association: NONE
diff_hunk: @@ -0,0 +1,22 @@
+package org.jabref.logic.citationstyle;
+
+import java.util.List;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class CSLStyleLoaderTest {
+    @Test
+    void getDefault() {
+        assertNotNull(CSLStyleLoader.getDefaultStyle());
+    }
+
+    @Test
+    void discoverInternalCitationStylesNotNull() {
+        List<CitationStyle> styleList = CSLStyleLoader.getInternalStyles();
+        assertNotNull(styleList);
+        assertFalse(styleList.isEmpty());
path: src/test/java/org/jabref/logic/citationstyle/CSLStyleLoaderTest.java
user: login: trag-bot[bot]
body: The test uses assertFalse to check if the list is not empty. It should use assertEquals to verify the expected size of the list for better clarity and precision in testing. 

created_at: 2025-04-24T19:12:45Z
author_association: NONE
diff_hunk: @@ -0,0 +1,20 @@
+package org.jabref.logic.citationstyle;
+
+import java.util.List;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class CSLStyleLoaderTest {
+    @Test
+    void getDefault() {
+        assertNotNull(CSLStyleLoader.getDefaultStyle());
+    }
+
+    @Test
+    void discoverInternalCitationStylesNotNull() {
+        List<CitationStyle> styleList = CSLStyleLoader.getInternalStyles();
+        assertNotNull(styleList);
path: src/test/java/org/jabref/logic/citationstyle/CSLStyleLoaderTest.java
user: login: subhramit
body: I think `assertFalse(styleList.isEmpty())` is equivalent for more brevity, changed to it
created_at: 2025-04-24T19:51:54Z
author_association: MEMBER
diff_hunk: @@ -25,37 +23,96 @@
 
 class CitationStyleGeneratorTest {
 
+    private static final List<CitationStyle> STYLE_LIST = CSLStyleLoader.getInternalStyles();
path: src/test/java/org/jabref/logic/citationstyle/CitationStyleGeneratorTest.java
user: login: trag-bot[bot]
body: The variable name STYLE_LIST should be in camel-case format as per naming conventions. It should be renamed to styleList. 

created_at: 2025-04-24T20:00:36Z
author_association: NONE
diff_hunk: @@ -25,37 +23,96 @@
 
 class CitationStyleGeneratorTest {
 
+    private static final List<CitationStyle> STYLE_LIST = CSLStyleLoader.getInternalStyles();
+    private static final String DEFAULT_STYLE = CSLStyleLoader.getDefaultStyle().getSource();
path: src/test/java/org/jabref/logic/citationstyle/CitationStyleGeneratorTest.java
user: login: trag-bot[bot]
body: The variable name DEFAULT_STYLE should be in camel-case format as per naming conventions. It should be renamed to defaultStyle. 

created_at: 2025-04-24T20:00:37Z
author_association: NONE
diff_hunk: @@ -25,37 +23,96 @@
 
 class CitationStyleGeneratorTest {
 
+    private static final List<CitationStyle> STYLE_LIST = CSLStyleLoader.getInternalStyles();
+    private static final String DEFAULT_STYLE = CSLStyleLoader.getDefaultStyle().getSource();
+    private static final CitationStyleOutputFormat HTML_OUTPUT_FORMAT = CitationStyleOutputFormat.HTML;
path: src/test/java/org/jabref/logic/citationstyle/CitationStyleGeneratorTest.java
user: login: trag-bot[bot]
body: The variable name HTML_OUTPUT_FORMAT should be in camel-case format as per naming conventions. It should be renamed to htmlOutputFormat. 

created_at: 2025-04-24T20:00:41Z
author_association: NONE
diff_hunk: @@ -25,37 +23,96 @@
 
 class CitationStyleGeneratorTest {
 
+    private static final List<CitationStyle> STYLE_LIST = CSLStyleLoader.getInternalStyles();
+    private static final String DEFAULT_STYLE = CSLStyleLoader.getDefaultStyle().getSource();
+    private static final CitationStyleOutputFormat HTML_OUTPUT_FORMAT = CitationStyleOutputFormat.HTML;
+    private static final CitationStyleOutputFormat TEXT_OUTPUT_FORMAT = CitationStyleOutputFormat.TEXT;
path: src/test/java/org/jabref/logic/citationstyle/CitationStyleGeneratorTest.java
user: login: trag-bot[bot]
body: The variable name TEXT_OUTPUT_FORMAT should be in camel-case format as per naming conventions. It should be renamed to textOutputFormat. 

created_at: 2025-04-24T20:00:44Z
author_association: NONE
diff_hunk: @@ -25,37 +23,96 @@
 
 class CitationStyleGeneratorTest {
 
+    private static final List<CitationStyle> STYLE_LIST = CSLStyleLoader.getInternalStyles();
+    private static final String DEFAULT_STYLE = CSLStyleLoader.getDefaultStyle().getSource();
+    private static final CitationStyleOutputFormat HTML_OUTPUT_FORMAT = CitationStyleOutputFormat.HTML;
+    private static final CitationStyleOutputFormat TEXT_OUTPUT_FORMAT = CitationStyleOutputFormat.TEXT;
+    private static final BibEntryTypesManager ENTRY_TYPES_MANAGER = new BibEntryTypesManager();
path: src/test/java/org/jabref/logic/citationstyle/CitationStyleGeneratorTest.java
user: login: trag-bot[bot]
body: The variable name ENTRY_TYPES_MANAGER should be in camel-case format as per naming conventions. It should be renamed to entryTypesManager. 

created_at: 2025-04-24T20:00:48Z
author_association: NONE
diff_hunk: @@ -115,6 +115,7 @@ public static Optional<StyleInfo> parseStyleInfo(String filename, String content
 
             boolean inInfo = false;
             boolean hasBibliography = false;
+            boolean hasCitation = false;
path: src/main/java/org/jabref/logic/citationstyle/CSLStyleUtils.java
user: login: trag-bot[bot]
body: The introduction of hasCitation variable should be reflected in the JavaDoc of parseStyleInfo method, explaining its purpose and how it affects the method's logic. 

created_at: 2025-04-24T20:48:30Z
author_association: NONE
diff_hunk: @@ -18,6 +18,10 @@ public CitationStylePreviewLayout(CitationStyle citationStyle, BibEntryTypesMana
 
     @Override
     public String generatePreview(BibEntry entry, BibDatabaseContext databaseContext) {
+        if (!citationStyle.hasBibliography()) {
path: src/main/java/org/jabref/logic/citationstyle/CitationStylePreviewLayout.java
user: login: subhramit
body: It's just for conservative safety.
created_at: 2025-04-24T21:05:43Z
author_association: MEMBER
diff_hunk: @@ -92,10 +91,8 @@ private void initializeCitationAdapter(XTextDocument doc) throws WrappedTargetEx
         if (cslCitationOOAdapter == null) {
             StateManager stateManager = Injector.instantiateModelOrService(StateManager.class);
             Supplier<List<BibDatabaseContext>> databasesSupplier = stateManager::getOpenDatabases;
-            OOStyle initialStyle = openOfficePreferences.getCurrentStyle(); // may be a jstyle, can still be used for detecting subsequent style changes in context of CSL
-            cslCitationOOAdapter = new CSLCitationOOAdapter(doc, databasesSupplier, initialStyle);
+            cslCitationOOAdapter = new CSLCitationOOAdapter(doc, databasesSupplier, openOfficePreferences);
path: src/main/java/org/jabref/gui/openoffice/OOBibBase.java
user: login: trag-bot[bot]
body: The constructor call for 'CSLCitationOOAdapter' has changed, but the JavaDoc for 'initializeCitationAdapter' has not been updated to reflect this change. Ensure JavaDoc is consistent with method arguments. 

created_at: 2025-04-25T05:34:26Z
author_association: NONE

PR comments:
user: login: trag-bot[bot]
created_at: 2025-04-25T06:06:47Z
body: @trag-bot didn't find any issues in the code! ✅✨
author_association: NONE
user: login: trag-bot[bot]
created_at: 2025-04-25T06:08:21Z
body: @trag-bot didn't find any issues in the code! ✅✨
author_association: NONE