Verified Owner
Top Description Fields Constructors Methods
org.jabref.model.strings

public Class LatexToUnicodeAdapter

extends Object
Class Inheritance
Imports
org.jabref.latexconv.LatexConv, com.github.benmanes.caffeine.cache.Cache, .Caffeine, org.jspecify.annotations.NonNull

Caching adapter for the latex-conv library: field values are converted repeatedly (every cell render), while the set of distinct values is small enough to cache.

Field Summary

Modifier and TypeField and Description
private static final int
private static final Cache<String, String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

a string with LaTeX resolved into Unicode, or the NFC-normalized input if the LaTeX could not be parsed.
format
(@NonNull String
a string containing LaTeX
inField
)

Attempts to resolve all LaTeX in the given string.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CACHE_SIZEback to summary
private static final int CACHE_SIZE
FORMAT_CACHEback to summary
private static final Cache<String, String> FORMAT_CACHE

Constructor Detail

LatexToUnicodeAdapterback to summary
public LatexToUnicodeAdapter()

Method Detail

formatback to summary
public static String format(@NonNull String inField)

Attempts to resolve all LaTeX in the given string.

Parameters
inField:@NonNull String

a string containing LaTeX

Returns:String

a string with LaTeX resolved into Unicode, or the NFC-normalized input if the LaTeX could not be parsed.