Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Captial letters after an underscore are wrapped in braces #4

Closed
Siedlerchr opened this issue Mar 18, 2017 · 6 comments
Closed

Captial letters after an underscore are wrapped in braces #4

Siedlerchr opened this issue Mar 18, 2017 · 6 comments

Comments

@Siedlerchr
Copy link
Contributor

Hi,

first all thanks for the great lib ;)
while using JabRef I noticed one problem using the formatter: JabRef/jabref#2664

Have a string Underscore_Underscore
when running the formatter, I get Underscore_(U)nderscore

Regards
Christoph

@Siedlerchr
Copy link
Contributor Author

I have thought a bit about this issue and would propose the idea to only recognize it as latex if there is either exactly one letter or number following, or better only recognize it as latex if after the underscore curly braces follow. Otherwise ignore treat it directly as latex-free string.

@tomtung
Copy link
Owner

tomtung commented Mar 27, 2017

Hmm I think the behavior of determining subscript is consistent with latex (although if not in the math environment a compile error would be thrown). In other words, I guess latex2unicode is doing its job as intended?

Maybe JabRef can add some extra logic to determine when latex2unicode should kick in?

@koppor
Copy link

koppor commented Mar 27, 2017

I don't get, why braces (( and )) are added around the letter. This is no unicode, is it?

@koppor
Copy link

koppor commented Mar 27, 2017

Maybe, subscript and superscript should be implemented using the unicode characters? https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts#Latin_and_Greek_tables

@tomtung
Copy link
Owner

tomtung commented Mar 28, 2017

Yeah so only some characters have corresponding Unicode subscripts and superscripts. For those that don't, I used _(whatever) to denote that they should actually be subscripts.

@tomtung tomtung closed this as completed Feb 24, 2018
@koppor
Copy link

koppor commented Feb 24, 2018

We have huge issue with my proposal. A roundtrip is not possible any more. I am currently not sure whether it its JabRef or this library. I recorded the issue at JabRef's side at JabRef/jabref#3644.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants