Search in sources :

Example 1 with LatexCleanupFormatter

use of org.jabref.logic.formatter.bibtexfields.LatexCleanupFormatter in project jabref by JabRef.

the class CleanupWorkerTest method cleanupLatexMergesTwoLatexMathEnvironments.

@Test
public void cleanupLatexMergesTwoLatexMathEnvironments() {
    CleanupPreset preset = new CleanupPreset(new FieldFormatterCleanups(true, Collections.singletonList(new FieldFormatterCleanup("title", new LatexCleanupFormatter()))));
    BibEntry entry = new BibEntry();
    entry.setField("title", "$\\alpha$$\\beta$");
    worker.cleanup(preset, entry);
    Assert.assertEquals(Optional.of("$\\alpha\\beta$"), entry.getField("title"));
}
Also used : BibEntry(org.jabref.model.entry.BibEntry) LatexCleanupFormatter(org.jabref.logic.formatter.bibtexfields.LatexCleanupFormatter) FieldFormatterCleanups(org.jabref.model.cleanup.FieldFormatterCleanups) FieldFormatterCleanup(org.jabref.model.cleanup.FieldFormatterCleanup) Test(org.junit.Test)

Aggregations

LatexCleanupFormatter (org.jabref.logic.formatter.bibtexfields.LatexCleanupFormatter)1 FieldFormatterCleanup (org.jabref.model.cleanup.FieldFormatterCleanup)1 FieldFormatterCleanups (org.jabref.model.cleanup.FieldFormatterCleanups)1 BibEntry (org.jabref.model.entry.BibEntry)1 Test (org.junit.Test)1