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

LaTeX token don't work correctly #22

Closed
JannesAlthoff opened this issue Jun 12, 2023 · 2 comments
Closed

LaTeX token don't work correctly #22

JannesAlthoff opened this issue Jun 12, 2023 · 2 comments

Comments

@JannesAlthoff
Copy link

Stuff like \frac 1\alpha or \frac {1}\alpha, which is valid LaTeX math produce errors:

❯ utftex '\frac 1 \alpha'

ERROR: Too few mandatory arguments to command (1x)
❯ utftex '\frac{1}\alpha'
Error, string is not proper UTF-8 code
Error, string is not proper UTF-8 code
1
─

@JannesAlthoff
Copy link
Author

And

❯ utftex '\frac  {1}{\alpha^2}'

ERROR: Too few mandatory arguments to command (1x)

spaces between command and arguments don't work, while being valid LaTeX syntax.

@bartp5
Copy link
Owner

bartp5 commented Jun 13, 2023

Hi, you found two bugs, I did not skip spaces between the command and its arguments, and I did not properly handle multi-byte UTF-8 arguments without brackets (a pre-processor replaces the '\alpha' with α before I parse the arguments). I pushed a fix to dev branch.
Thanks

@bartp5 bartp5 closed this as completed Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants