Skip to content

Allow user to choose CSL Bibliography title and format #12663

@subhramit

Description

@subhramit

This is a "contextual" introductory issue for people wanting to dive into JabRef's LibreOffice integration.
It is a small/medium-sized task with the overall difficulty of a good third or fourth issue.

Context

Pre-requisites

Refer to this blog article for an introduction to how CSL styles are used with JabRef's LibreOffice integration.

Issue

Currently, we have a hardcoded default title and its paragraph format for the CSL Bibliography as given in CSLFormatUtils:

// TODO: These are static final fields right now, should add the functionality to let user select these and store them in preferences.
public static final String DEFAULT_BIBLIOGRAPHY_TITLE = "References";
public static final String DEFAULT_BIBLIOGRAPHY_HEADER_PARAGRAPH_FORMAT = "Heading 2";

We wish to provide flexibility to users such that they can set a different title for the list of references (e.g. "Bibliography", or some other word/phrase in English or other languages) as well as choose its formatting.

The current workaround is that the user manually modifies it themselves once all their work is over - as otherwise the title will get reset every time the bibliography is refreshed (due to addition/deletion/rearrangement of citations, or manual trigger).

In case of JStyles, this problem does not exist as they are custom styles, and the user can provide their intended values when making the .jstyle file:

PROPERTIES
Title="References"
IsSortByPosition="false"
IsNumberEntries="false"
ReferenceParagraphFormat="Text body"
ReferenceHeaderParagraphFormat="Heading 2"

Task

  1. Add an option in the "CSL Styles" tab of the "Select Style" window (in the OpenOffice/LibreOffice Panel) to "modify bibliography title". On clicking that, the user should be given options to set the text for the title and its format

    Image

    • The options for format should be available via a dropdown, and should consist of the popular presets in paragraph style formatting options as available in LibreOffice:

      Image
      The mechanism to apply the formatting does not need to be written, as it is already present. Just specifying the format name is enough. The default (if unchanged), however, should still remain "Heading 2".

  2. These settings should be saved as user preferences in OpenOfficePreferences.

Test for completion

  • The specified text should be rendered as the bibliography title on generating bibliography via CSL styles.
  • The options should be stored across JabRef sessions.

Metadata

Metadata

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions