Skip to content

latex_to_unicode attacks math mode commands #498

@tcosmo

Description

@tcosmo

Describe the bug

I have "$\omega$" in the title of a bibtex entry.

latex_to_unicode transforms \o into ø, resulting in:

Image

Reproducing

Version: 1.4.3

Code:

parser = BibTexParser()
parser.customization = convert_to_unicode
bib_database = bibtexparser.loads(bib_content, parser=parser)

Bibtex:

@article{Scollo2005,
  author  = {Giuseppe Scollo},
  title   = {{$\omega$-rewriting the Collatz problem}},
  journal = {Fundamenta Informaticae},
  year    = {2005},
  volume  = {64},
  pages   = {401--412},
  note    = {MR 2008g:68060, Zbl 1102.68051}
}

Workaround
Did you identify a workaround? If so, please describe it here.

Remaining Questions (Optional)
Please tick all that apply:

  • I would be willing to contribute a PR to fix this issue.
  • This issue is a blocker, I'd be grateful for an early fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions