Search in sources :

Example 1 with HtmlToLatexFormatter

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

the class CleanupWorkerTest method cleanupHtmlToLatexConvertsEpsilonToLatex.

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

Aggregations

HtmlToLatexFormatter (org.jabref.logic.formatter.bibtexfields.HtmlToLatexFormatter)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