Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fine-grained name processing #82

Closed
odashi opened this issue Nov 9, 2022 · 7 comments · Fixed by #139
Closed

Fine-grained name processing #82

odashi opened this issue Nov 9, 2022 · 7 comments · Fixed by #139
Assignees
Labels
Milestone

Comments

@odashi
Copy link
Collaborator

odashi commented Nov 9, 2022

There are still some issues around name processing:

In the current implementation, only the function names are processed separately, but I think that that behavior is generally preferred for all identifiers, and it should be applied by default.

In some specific cases, it would be still good to process underscores (e.g., trailing numbers: x_123 -> $x_{123}$), but rather this feature should be the option than retaining underscores.

@odashi odashi self-assigned this Nov 9, 2022
@Casper-Guo
Copy link
Contributor

The user should additionally be able to specify a list of variable names for which underscores are processed for each function.

Or to make the feature easier to use, a list of variable names / variable prefixes for which underscores are processed can be specified at the beginning of the file

@odashi
Copy link
Collaborator Author

odashi commented Nov 10, 2022

@Casper-Guo Yeah it would be good, but it may also become a complicated config. We need to focus on consolidating the name processing first (using the same processor for all function names, arguments, and identifiers in the body)

@odashi
Copy link
Collaborator Author

odashi commented Nov 15, 2022

I guess this feature is really wanted by many users as far as I checked reactions in the social media. I would take my time to improve it.

@odashi odashi added this to the v0.3 milestone Nov 15, 2022
@ZibingZhang
Copy link
Contributor

I guess this feature is really wanted by many users as far as I checked reactions in the social media. I would take my time to improve it.

Do you have a link to the post by any chance? Pretty sure I found this repo off of social media, but I can't seem to find the original post. Would be interesting to see other people's feedback and thoughts.

@odashi
Copy link
Collaborator Author

odashi commented Nov 20, 2022

@ZibingZhang Sorry it's better not to share it here because the discussion I discovered involved a little offensive remarks.
Only I could say here is that some people hated the current behavior, and I really agreed it.

@odashi
Copy link
Collaborator Author

odashi commented Nov 20, 2022

note: "many" is just my opinion, not guaranteed by any quantitative perspectives.

@adzcai
Copy link

adzcai commented Jun 26, 2024

Is there any way to recover the original behaviour and render the variable x_3 with a subscript?

Edit: Ah, Just noticed PR #208 that addresses this. Would love to use this!

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

Successfully merging a pull request may close this issue.

4 participants