Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.openoffice.bst

public final Class BSTFormatUtils

extends Object
Class Inheritance
Annotations
@NullMarked
Imports
java.util.regex.Matcher, .Pattern, org.apache.commons.text.StringEscapeUtils, org.jspecify.annotations.NullMarked

Utilities shared across BST-based formatting pipelines (Preview and LibreOffice).

Field Summary

Modifier and TypeField and Description
private static final Pattern
private static final Pattern
private static final Pattern
private static final Pattern
private static final Pattern
private static final Pattern
private static final Pattern
private static final Pattern
private static final Pattern

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String
public static String
public static String
normalizeBibItemLabel(String label)

Normalizes a BST \\bibitem[...] label by replacing supported label-only helper macros with their plain-text equivalents.

public static String
private static String
replaceLegacySwitch(String input, String legacy, String modern)

private static String
public static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

A_OPEN_TAGback to summary
private static final Pattern A_OPEN_TAG
BRACED_ETALCHAR_PATTERNback to summary
private static final Pattern BRACED_ETALCHAR_PATTERN
DIV_OPEN_TAGback to summary
private static final Pattern DIV_OPEN_TAG
ETALCHAR_PATTERNback to summary
private static final Pattern ETALCHAR_PATTERN
INLINE_MATH_SPANback to summary
private static final Pattern INLINE_MATH_SPAN
LEADING_EMPTY_PARAGRAPH_MARKERback to summary
private static final Pattern LEADING_EMPTY_PARAGRAPH_MARKER
LINE_BREAKSback to summary
private static final Pattern LINE_BREAKS
REMAINING_SPAN_TAGSback to summary
private static final Pattern REMAINING_SPAN_TAGS
TRAILING_EMPTY_PARAGRAPH_MARKERSback to summary
private static final Pattern TRAILING_EMPTY_PARAGRAPH_MARKERS

Constructor Detail

BSTFormatUtilsback to summary
private BSTFormatUtils()

Method Detail

convertPandocHtmlToOOTextback to summary
public static String convertPandocHtmlToOOText(String pandocHtml)
mapPandocInlineToOOback to summary
public static String mapPandocInlineToOO(String html)
normalizeBibItemLabelback to summary
public static String normalizeBibItemLabel(String label)

Normalizes a BST \\bibitem[...] label by replacing supported label-only helper macros with their plain-text equivalents.

Currently this converts alpha-style \\etalchar{...} markers such as TLY{\\etalchar{+}}21 to TLY+21 so the label can be shown directly in previews and LibreOffice citations.

normalizeLegacyForPandocback to summary
public static String normalizeLegacyForPandoc(String latex)
replaceLegacySwitchback to summary
private static String replaceLegacySwitch(String input, String legacy, String modern)
stripEmphasisInsideInlineMathback to summary
private static String stripEmphasisInsideInlineMath(String html)
transformHTMLback to summary
public static String transformHTML(String html)