Skip to content

Keep unknown commands #9

@stefan-kolb

Description

@stefan-kolb

Hi @tomtung
You recently introduced the feature that unknown commands are preserved.
However, parameters in braces are removed from the brace environment or empty braces are stripped.
We discussed this at the JabRef dev call and came to the conclusion that it would be beneficial if the commands are just kept as they are if they are unknown.
I added a few tests that show the intended behavior.
Could you help us in bringing this into Scala code?
Or in general, do you agree with our thoughts?

Best regards,

Stefan and the JabRef team

  test("Unknown commands") {
    LaTeX2Unicode.convert("\\this \\is \\alpha test") shouldBe "\\this \\is α test"
    LaTeX2Unicode.convert("\\unknown command") shouldBe "\\unknown command"
    LaTeX2Unicode.convert("\\unknown{} empty params") shouldBe "\\unknown{} empty params"
    LaTeX2Unicode.convert("\\unknown{cmd}") shouldBe "\\unknown{cmd}"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions