Some nested braces are not expanded correctly

Issue #159 new
Austin Lund created an issue

The attached bibtex entry has nested braces with accents. Removing a level of braces seems to give the desired output.

In [88]: pybtex.richtext.Text.from_latex("Zangh{\`{\i}}").render_as('text')
Out[88]: 'Zangh\\`ı'

In [89]: pybtex.richtext.Text.from_latex("Zangh{\`\i}").render_as('text')
Out[89]: 'Zanghì'

Comments (2)

  1. Austin Lund reporter

    I see that pylatexenc seems to be more powerful for latex parsing. Would the attached patch be something this project would consider? The biggest issue I see with how it is at the moment is that it doesn’t leave behind the first level of braces which BiBTeX parses specially. But I believe this could be fixed.

  2. Log in to comment