Skip to content

Add 15 non-standard BibLaTeX entry types with .withType() method#14534

Merged
koppor merged 25 commits into
JabRef:mainfrom
shubhamk0205:fix-for-issue-12963
Dec 11, 2025
Merged

Add 15 non-standard BibLaTeX entry types with .withType() method#14534
koppor merged 25 commits into
JabRef:mainfrom
shubhamk0205:fix-for-issue-12963

Conversation

@shubhamk0205

@shubhamk0205 shubhamk0205 commented Dec 6, 2025

Copy link
Copy Markdown
Contributor

Closes #12963

Adds 15 non-standard BibLaTeX entry types (Artwork, Audio, Bibnote, Commentary, Image, Jurisdiction, Legislation, Legal, Letter, Movie, Music, Performance, Review, Standard, Video) that are hard-coded and only available in BibLaTeX mode. These types are displayed in a dedicated "Non-standard Types" group in the New Entry dialog and in the context menu. The implementation introduces a .withType() method to BibEntryType that allows creating type variants with the same field definitions, enabling all 15 types to be implemented as one-liners based on the MISC entry type.

Steps to test

Prerequisites: Ensure the library is in BibLaTeX mode (Library → Library Properties → General → Library mode = "biblatex").

  1. New Entry dialog: Press Ctrl+N → Scroll to "Non-standard types" section → Verify all 15 types are visible with tooltips → Click any type to create an entry → Verify correct type is set.

  2. Context menu: Right-click an entry → "Change entry type" → "Non-standard Types" → Verify all 15 types listed → Select a type → Verify entry type changes → Confirm no duplicates in main menu.

  3. BibTeX mode: Switch to BibTeX mode → Open New Entry dialog → Verify "Non-standard types" section is hidden → Right-click entry → Verify "Non-standard Types" submenu is not present.

  4. Persistence: Create entry with non-standard type → Add fields → Save library → Close and reopen → Verify entry type persists.

Screenshots

image image

Mandatory checks

@github-actions github-actions Bot added the status: changes-required Pull requests that are not yet complete label Dec 6, 2025
Comment thread jabgui/src/main/java/org/jabref/gui/newentry/NewEntryView.java
Plain\ citation\ parsing\ may\ generate\ inappropriate\ results.=Plain citation parsing may generate inappropriate results.
Recommended\ types=Recommended types
Non-standard\ types=Non-standard types
Non-standard\ Types=Non-standard Types

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Duplicate here and add all the other new descriptions

public class KeyCollisionException extends RuntimeException {

private String id;
private @Nullable String id;

@Siedlerchr Siedlerchr Dec 6, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do not modify this class

*/
public class BiblatexEntryTypeDefinitions {

static final BibEntryType MISC = new BibEntryTypeBuilder()

@Siedlerchr Siedlerchr Dec 6, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please move to the old position after article, makes it easer to review the changes and I don't think there are some

* @param newType The new EntryType to use
* @return A new BibEntryType instance with the new type but same field definitions
*/
public BibEntryType withType(@NonNull EntryType newType) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is unnecesary, we already hava. constructor

@Siedlerchr Siedlerchr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See comments
Also you are missing tests

Siedlerchr and others added 5 commits December 7, 2025 03:54
* New translations jabref_en.properties (French)

* New translations jabref_en.properties (Spanish)

* New translations jabref_en.properties (Danish)

* New translations jabref_en.properties (German)

* New translations jabref_en.properties (Greek)

* New translations jabref_en.properties (Italian)

* New translations jabref_en.properties (Japanese)

* New translations jabref_en.properties (Korean)

* New translations jabref_en.properties (Dutch)

* New translations jabref_en.properties (Norwegian)

* New translations jabref_en.properties (Polish)

* New translations jabref_en.properties (Portuguese)

* New translations jabref_en.properties (Russian)

* New translations jabref_en.properties (Swedish)

* New translations jabref_en.properties (Turkish)

* New translations jabref_en.properties (Chinese Simplified)

* New translations jabref_en.properties (Vietnamese)

* New translations jabref_en.properties (Portuguese, Brazilian)

* New translations jabref_en.properties (Indonesian)

* New translations jabref_en.properties (Tagalog)
@github-actions github-actions Bot removed the status: changes-required Pull requests that are not yet complete label Dec 7, 2025
Comment thread jabgui/src/main/java/org/jabref/gui/menus/ChangeEntryTypeMenu.java Outdated
Comment on lines 35 to 46
private static final BibEntryType MISC = new BibEntryTypeBuilder()
.withType(StandardEntryType.Misc)
.withRequiredFields(new OrFields(StandardField.AUTHOR, StandardField.EDITOR), StandardField.TITLE, StandardField.DATE)
.withImportantFields(
StandardField.SUBTITLE, StandardField.TITLEADDON, StandardField.HOWPUBLISHED, StandardField.LOCATION, StandardField.DOI,
StandardField.EPRINT, StandardField.EPRINTCLASS, StandardField.EPRINTTYPE, StandardField.URL, StandardField.URLDATE)
.withDetailFields(StandardField.LANGUAGE,
StandardField.TYPE, StandardField.VERSION, StandardField.NOTE, StandardField.ORGANIZATION,
StandardField.PAGETOTAL, StandardField.ADDENDUM, StandardField.PUBSTATE)
.build();

private static final BibEntryType BOOK = new BibEntryTypeBuilder()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We like alphabetical ordering - please keep the position

@shubhamk0205 shubhamk0205 Dec 7, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

understood . on it

@github-actions github-actions Bot added the status: changes-required Pull requests that are not yet complete label Dec 7, 2025
…java

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
@github-actions github-actions Bot removed the status: changes-required Pull requests that are not yet complete label Dec 7, 2025
@shubhamk0205 shubhamk0205 requested a review from koppor December 7, 2025 23:26
@github-actions github-actions Bot removed the status: changes-required Pull requests that are not yet complete label Dec 8, 2025
Comment on lines +36 to +62
// Creates object with default preference values
private ProxyPreferences() {
this(
false, // useProxy: Whether to enable proxy usage
"", // proxyHostname: The hostname of proxy
"80", // proxyPort: Port number on which the proxy is listening
false, // useAuthentication: Whether proxy authentication should be enabled
"", // proxyUsername: Username for proxy authentication (if enabled)
"", // proxyPassword: Password for proxy authentication (if enabled)
false // persistPassword: Whether the proxy password should be saved/persisted
);
}

public static ProxyPreferences getDefault() {
return new ProxyPreferences();
}

public void setAll(ProxyPreferences preferences) {
this.useProxy.set(preferences.shouldUseProxy());
this.hostname.set(preferences.getHostname());
this.port.set(preferences.getPort());
this.useAuthentication.set(preferences.shouldUseAuthentication());
this.username.set(preferences.getUsername());
this.password.set(preferences.getPassword());
this.persistPassword.set(preferences.shouldPersistPassword());
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like an artifact from another PR...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this file is not actually modified in this PR , it is identical to main , the commit appears in the history because i think it was merged from the main , but there are no actual changes to that file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@calixtus if u still want this to be removed from the history i will make a new clean pr with the same changes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No, do not create another PR. Just fix / cleanup your branch and push it. the GitHub PR will be updated automatically.

@koppor koppor added the status: changes-required Pull requests that are not yet complete label Dec 8, 2025
@shubhamk0205 shubhamk0205 requested a review from calixtus December 9, 2025 19:39
@github-actions github-actions Bot removed the status: changes-required Pull requests that are not yet complete label Dec 11, 2025
Comment thread CHANGELOG.md Outdated
Comment on lines +14 to +16
- We added 15 non-standard BibLaTeX entry types (Artwork, Audio, Bibnote, Commentary, Image, Jurisdiction, Legislation, Legal, Letter, Movie, Music, Performance, Review, Standard, Video) available in BibLaTeX mode only. These types are displayed in a dedicated "Non-standard types" group in the New Entry dialog and in the context menu. [#12963](https://github.com/JabRef/jabref/issues/12963)
- Improved merge dialog decisions for fields containing person names (e.g., `author`, `editor`) by using a new plausibility comparator. JabRef now prefers the side with more detailed/complete author information. [#14454](https://github.com/JabRef/jabref/issues/14454)
- We added 15 non-standard BibLaTeX entry types (Artwork, Audio, Bibnote, Commentary, Image, Jurisdiction, Legislation, Legal, Letter, Movie, Music, Performance, Review, Standard, Video) available in BibLaTeX mode only. These types are displayed in a dedicated "Non-standard types" group in the New Entry dialog and in the context menu. [#12963](https://github.com/JabRef/jabref/issues/12963)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Duplicate entry. Plesae fix.

Comment thread docs/code-howtos/fetchers.md Outdated
Comment on lines +15 to +16
| [ScienceDirect](https://www.sciencedirect.com) | [Elsevier Dev Portal](https://dev.elsevier.com/) | `ScienceDirectApiKey` | |
| [SemanticScholar](https://www.semanticscholar.org/) | <https://www.semanticscholar.org/product/api#api-key-form> | `SemanticScholarApiKey` | [20.000 calls/week](https://dev.elsevier.com/api_key_settings.html) |
| [ScienceDirect](https://www.sciencedirect.com) | [Elsevier Dev Portal](https://dev.elsevier.com/) | `ScienceDirectApiKey` | [20.000 calls/week](https://dev.elsevier.com/api_key_settings.html) |
| [SemanticScholar](https://www.semanticscholar.org/) | <https://www.semanticscholar.org/product/api#api-key-form> | `SemanticScholarApiKey` | |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not sure about this change - Do we have an issue with GitHub?

main shows at https://github.com/JabRef/jabref/blob/main/docs/code-howtos/fetchers.md

image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think some merge went wrong

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I merged main and I think it disappeared

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I merged main and I think it disappeared

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I merged main and I think it disappeared

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe some rebase thingy...

@github-actions github-actions Bot added the status: changes-required Pull requests that are not yet complete label Dec 11, 2025

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I fixed the CHANGELOG.md for myself.

@koppor koppor enabled auto-merge December 11, 2025 13:29
@github-actions github-actions Bot removed the status: changes-required Pull requests that are not yet complete label Dec 11, 2025
@koppor koppor requested a review from Siedlerchr December 11, 2025 16:46
@koppor koppor added this pull request to the merge queue Dec 11, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 11, 2025
@koppor koppor added this pull request to the merge queue Dec 11, 2025
Merged via the queue into JabRef:main with commit aafb809 Dec 11, 2025
55 checks passed
shubhamk0205 added a commit to shubhamk0205/jabref that referenced this pull request Dec 11, 2025
…Ref#14534)

* Add 15 non-standard BibLaTeX entry types with .withType() method

* updated ChangeLog.md

* fixed formatting issue

* fixed Formatting

* fixed Checkstyle's DeclarationOrder

* fix checkstyle errors

* fixed Key Collision error

* New Crowdin updates (JabRef#14535)

* New translations jabref_en.properties (French)

* New translations jabref_en.properties (Spanish)

* New translations jabref_en.properties (Danish)

* New translations jabref_en.properties (German)

* New translations jabref_en.properties (Greek)

* New translations jabref_en.properties (Italian)

* New translations jabref_en.properties (Japanese)

* New translations jabref_en.properties (Korean)

* New translations jabref_en.properties (Dutch)

* New translations jabref_en.properties (Norwegian)

* New translations jabref_en.properties (Polish)

* New translations jabref_en.properties (Portuguese)

* New translations jabref_en.properties (Russian)

* New translations jabref_en.properties (Swedish)

* New translations jabref_en.properties (Turkish)

* New translations jabref_en.properties (Chinese Simplified)

* New translations jabref_en.properties (Vietnamese)

* New translations jabref_en.properties (Portuguese, Brazilian)

* New translations jabref_en.properties (Indonesian)

* New translations jabref_en.properties (Tagalog)

* Revise JavaDoc links in README.md (JabRef#14533)

* applied given changes

* fixed formatting

* fixed formatting

* Update jabgui/src/main/java/org/jabref/gui/menus/ChangeEntryTypeMenu.java

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

* fixed alphabatical ordering

* Fix link

* Proxy Preference reset (JabRef#14554)

* Fix typos (JabRef#14552)

* Add LlmPlainCitationParserTest (JabRef#14553)

* Junie try 1

* Refine test

* Fix casing

* updated ChangeLog.md

* moved the non-standard types to their own own enum class and updated the connected files

* eevert "Proxy Preference reset (JabRef#14554)"

This reverts commit 430b6b9.

Clean PR

* Fix CHANGELOG.md

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
Co-authored-by: Lalit Kumar Verma <lalit2506verma@gmail.com>
Siedlerchr added a commit that referenced this pull request Dec 14, 2025
* upstream/main: (23 commits)
  Chore(deps): Bump org.mockito:mockito-core in /jablib (#14611)
  Chore(deps): Bump actions/download-artifact from 6 to 7 (#14605)
  Chore(deps): Bump com.squareup.okio:okio-jvm in /versions (#14613)
  Chore(deps): Bump DavidAnson/markdownlint-cli2-action from 21 to 22 (#14607)
  Chore(deps): Bump org.mockito:mockito-core in /versions (#14615)
  New translations jabref_en.properties (Italian) (#14596)
  Reset and Import for GroupsPreferences (#14572)
  Enable parallel tests (#14571)
  Copy over label in all cases
  Also allow adding label
  Fix workflow (#14586)
  Unassign issues on stale (#14585)
  Increase max assignments from 1 to 2
  Reduce time for initial PR to 14 days (#14580)
  New Crowdin updates (#14579)
  chore(deps): update dependency org.eclipse.jgit:org.eclipse.jgit.pgm to v7.5.0.202512021534-r (#14577)
  Fix stale closing
  Try to fix commenting on closed PRs
  Add 15 non-standard BibLaTeX entry types with .withType() method (#14534)
  New Crowdin updates (#14570)
  ...
Siva-Sai22 pushed a commit to Siva-Sai22/jabref that referenced this pull request Dec 19, 2025
…Ref#14534)

* Add 15 non-standard BibLaTeX entry types with .withType() method

* updated ChangeLog.md

* fixed formatting issue

* fixed Formatting

* fixed Checkstyle's DeclarationOrder

* fix checkstyle errors

* fixed Key Collision error

* New Crowdin updates (JabRef#14535)

* New translations jabref_en.properties (French)

* New translations jabref_en.properties (Spanish)

* New translations jabref_en.properties (Danish)

* New translations jabref_en.properties (German)

* New translations jabref_en.properties (Greek)

* New translations jabref_en.properties (Italian)

* New translations jabref_en.properties (Japanese)

* New translations jabref_en.properties (Korean)

* New translations jabref_en.properties (Dutch)

* New translations jabref_en.properties (Norwegian)

* New translations jabref_en.properties (Polish)

* New translations jabref_en.properties (Portuguese)

* New translations jabref_en.properties (Russian)

* New translations jabref_en.properties (Swedish)

* New translations jabref_en.properties (Turkish)

* New translations jabref_en.properties (Chinese Simplified)

* New translations jabref_en.properties (Vietnamese)

* New translations jabref_en.properties (Portuguese, Brazilian)

* New translations jabref_en.properties (Indonesian)

* New translations jabref_en.properties (Tagalog)

* Revise JavaDoc links in README.md (JabRef#14533)

* applied given changes

* fixed formatting

* fixed formatting

* Update jabgui/src/main/java/org/jabref/gui/menus/ChangeEntryTypeMenu.java

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

* fixed alphabatical ordering

* Fix link

* Proxy Preference reset (JabRef#14554)

* Fix typos (JabRef#14552)

* Add LlmPlainCitationParserTest (JabRef#14553)

* Junie try 1

* Refine test

* Fix casing

* updated ChangeLog.md

* moved the non-standard types to their own own enum class and updated the connected files

* eevert "Proxy Preference reset (JabRef#14554)"

This reverts commit 430b6b9.

Clean PR

* Fix CHANGELOG.md

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
Co-authored-by: Lalit Kumar Verma <lalit2506verma@gmail.com>
@ThiloteE

ThiloteE commented Feb 1, 2026

Copy link
Copy Markdown
Member

@shubhamk0205 This PR caused some issues (see #14985 and #14984). Either we fix it with a follow up PR or we have to revert this one before the JabRef 6.0 release. What's your opinion? Do you have time and willingness for a follow up?

@shubhamk0205

Copy link
Copy Markdown
Contributor Author

@shubhamk0205 This PR caused some issues (see #14985 and #14984). Either we fix it with a follow up PR or we have to revert this one before the JabRef 6.0 release. What's your opinion? Do you have time and willingness for a follow up?

sure i will start working on the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "Non-standard Types" of biblatex entry types

7 participants