diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fcf5c6dea6..0c86ef826c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,12 +15,14 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve ### Changed +- We changed the list of CSL styles to those that support formatting bibliographies [#8421](https://github.com/JabRef/jabref/issues/8421) [citeproc-java#116](https://github.com/michel-kraemer/citeproc-java/issues/116) - The CSL preview styles now also support displaying data from cross references entries that are linked via the `crossref` field [#7378](https://github.com/JabRef/jabref/issues/7378) - We made the Search button in Web Search wider. We also skewed the panel titles to the left [#8397](https://github.com/JabRef/jabref/issues/8397) - We introduced a preference to disable fulltext indexing [#8468](https://github.com/JabRef/jabref/issues/8468) ### Fixed +- We fixed an issue wehre long article numbers in the `pages` field would cause an exception and preventing the citation style to display [#8381](https://github.com/JabRef/jabref/issues/8381), [citeproc-java](https://github.com/michel-kraemer/citeproc-java/issues/114) - We fixed an issue where an exception could occur when saving the preferences [#7614](https://github.com/JabRef/jabref/issues/7614) - We fixed an issue where "Copy DOI url" in the right-click menu of the Entry List would just copy the DOI and not the DOI url. [#8389](https://github.com/JabRef/jabref/issues/8389) - We fixed an issue where opening the console from the drop-down menu would cause an exception. [#8466](https://github.com/JabRef/jabref/issues/8466) diff --git a/build.gradle b/build.gradle index 8e89ab5be35..84f4285bad0 100644 --- a/build.gradle +++ b/build.gradle @@ -181,7 +181,7 @@ dependencies { implementation "org.tinylog:slf4j-tinylog:2.4.1" implementation "org.tinylog:tinylog-impl:2.4.1" - implementation 'de.undercouch:citeproc-java:3.0.0-alpha.3' + implementation 'de.undercouch:citeproc-java:3.0.0-alpha.4' // jakarta.activation is already depdency of glassfish implementation group: 'jakarta.xml.bind', name: 'jakarta.xml.bind-api', version: '3.0.1' diff --git a/src/main/java/org/jabref/logic/citationstyle/CitationStyle.java b/src/main/java/org/jabref/logic/citationstyle/CitationStyle.java index e467dae04d1..bea31d40afd 100644 --- a/src/main/java/org/jabref/logic/citationstyle/CitationStyle.java +++ b/src/main/java/org/jabref/logic/citationstyle/CitationStyle.java @@ -23,6 +23,7 @@ import org.jabref.logic.util.StandardFileType; +import de.undercouch.citeproc.CSL; import de.undercouch.citeproc.helper.CSLUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -154,6 +155,14 @@ private static List discoverCitationStylesInPath(Path path) throw try (Stream stream = Files.find(path, 1, (file, attr) -> file.toString().endsWith("csl"))) { return stream.map(Path::getFileName) .map(Path::toString) + .filter(style -> { + try { + return CSL.canFormatBibliographies(style); + } catch (IOException e) { + LOGGER.warn("Cannot parse CSL style {}", style, e); + return false; + } + }) .map(CitationStyle::createCitationStyleFromFile) .filter(Optional::isPresent) .map(Optional::get)