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

ekvset is not alignment safe #1

Open
Skillmon opened this issue May 24, 2021 · 0 comments
Open

ekvset is not alignment safe #1

Skillmon opened this issue May 24, 2021 · 0 comments

Comments

@Skillmon
Copy link
Owner

Currently, while \ekvparse is alignment safe, \ekvset isn't.

A fix would be possible by putting \ekv@alignsafe at the start of \ekvset and using \ekv@endalignsafe before and another \ekv@alignsafe after every executed user code. This has an estimated performance hit of more than 10%. (This would also require changes in \ekvchangeset, and maybe a few other places)

Unlike with some other key=val parsers (that have some sort of brace bug), category 4 tokens (&) can be parsed without a problem by putting braces around them, so with a slight user adjustment this can be fixed with ease without affecting every other usage of \ekvset. Also, it is possible to use \ekvset in an alignment safe way (see expkv-cs, which does exactly that). And if the code is fully expandable, and \ekvset is the first thing to appear in an alignment cell, & aren't a problem as well (because TeX then scans for \omit during which it doesn't replace &).

Currently I tend to not make \ekvset alignment safe, but am open for discussion.

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

No branches or pull requests

1 participant