-
Notifications
You must be signed in to change notification settings - Fork 1
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
Parse lists in LaTeX macros #15
Comments
We think that this may be possible by adding a new rule higher up than |
I don't understand the problem. What is the definition of |
Here's an example of the problem.
It should match
However, in the previous example, |
The link https:/notjagan/texer/blob/master/lib/DRMFfcns.sty#L74 does not work for me;-( |
@physikerwelt They mistakenly put the sty file on github (it is private), they have removed it. Look at the re-edited post. |
I had to remove the file because it turned out to be private. However, the relevant line is now in my above comment. |
That was unintentional; I apologize. |
ok, I finally understand the problem. But I still don't know the solution. |
How about using something more general than |
Maybe the additional element introduced by @ClaudeZou DRMF/texvcjs@2049d82 are also helpful here? |
We tried that previously. Unfortunately, it didn't seem to work. It's possible that we implemented it wrong, but I don't think they're the same type of issue. |
@physikerwelt can you try to explain why you think it should work, or perhaps a suggested modification which would allow it to work? |
@physikerwelt Dr. Cohl mentioned that you had a potential solution to our problem; could you explain what it is/how it works? |
@ClaudeZou I got the impression that your current approach is an uphill battle. Instead of improving the texvc rules, I propose to build another level of abstraction on top of texvc. texvctexvc is supposed to parse latex and to parse it using the same logic as the tex parser uses. This deals about understanding the structure of TeX impression with regard to the tex syntax. More specifically frac is a function with two arguments in the TeX language. However, f(a,b) is neither a function nor any other object with structure from a TeX point of view. It’s just a list of symbols. However, DRMF specific extensions of TeX/LaTeX such as the @ symbols are supposed to end up in the texvc grammar. texerNow, there is texer. Like texvcinfo which extracts identifiers from the texvc token stream, texer is supposed discover possible replacements of regular latex symbols with semantic latex macros. texvcinfoI think to get a better understanding of how that could be done you should have a look at the new texvcinfo ast visitors that extract identifiers. |
@HowardCohl @AndreG-P can you check if https:/physikerwelt/texvcinfo/blob/master/README.md#implementation-details-on-identifier-extraction helps to understand how the identifier extraction in texvcinfo works? |
At the moment, we have macros that use lists of elements surrounded by parentheses and delimited by semicolons/commas. These elements are sometimes not covered by
lit
; for example,\cos\tha
is not matched since it is two literals chained together.As such, using
lit
in the auto-generated rule doesn't find occurrences of the macro when a case like this appears.We attempted to create a new rule that accepted such lists and added it as an option to
lit
but the return types were radically different and the program was unable to handle the lists properly.As of now, we aren't sure of how we should approach a fix to this problem.
@physikerwelt @HowardCohl
The text was updated successfully, but these errors were encountered: