skillmon / tex_expkv Goto Github PK
View Code? Open in Web Editor NEWA fully expandable key=value parser for TeX
A fully expandable key=value parser for TeX
As I understand it, bool
and friends don't define \footrue
and \foofalse
and users have to define them on their own. From my experience I need them often, so I wanted to know if we can have a t-prefix which provides them. Because right now at least one probable redundancy that I can think of is bool foo \iffoo
will set \iffoo
and if I need \footrue
, \foofalse
I will have to use \newif\iffoo
which will once again set \iffoo
. So if expkv
itself provides a new t-prefix which will set \footrue
and \foofalse
it would be great IMO.
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.
While using this type of keys, I was wondering when will someone actually require a boolean conditional like \iffoo
without \footrue
and \foofalse
? If no such use-case can be thought of, why doesn't expkv
only do \newif\iffoo
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.