latexify_py icon indicating copy to clipboard operation
latexify_py copied to clipboard

Fine-grained name processing

Open odashi opened this issue 3 years ago • 3 comments

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 avatar Nov 09 '22 06:11 odashi

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

Casper-Guo avatar Nov 09 '22 19:11 Casper-Guo

@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 avatar Nov 10 '22 01:11 odashi

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 avatar Nov 15 '22 23:11 odashi

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.

ZibingZhang avatar Nov 20 '22 10:11 ZibingZhang

@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 avatar Nov 20 '22 11:11 odashi

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

odashi avatar Nov 20 '22 11:11 odashi

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!

adzcai avatar Jun 26 '24 14:06 adzcai