Skip to content
This repository was archived by the owner on Feb 19, 2026. It is now read-only.
This repository was archived by the owner on Feb 19, 2026. It is now read-only.

ekvset is not alignment safe #1

@Skillmon

Description

@Skillmon

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions