Josef-Friedrich / luakeys

LuaTeX package to parse key value options in Lua only, like keyval, kvsetkeys, kvoptions, xkeyval, pgfkeys but in Lua

Home Page:https://www.ctan.org/pkg/luakeys

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How would I parse a value with curly brackets?

kalekje opened this issue · comments

I desire the following output:

luakeys.parse('hello={world}') -> hello='{world}'

How can I achieve this?

You have to use double quotes:

luakeys.parse('hello="{world}"')

Is there any provision in the settings for this without quotes? One example I can think of is setting a key to a LaTeX command value?
format=\color{blue} would be nice syntax vs. format="\color{blue}"

Is there any provision in the settings for this without quotes?

Unfortunately not. For this the LPeg grammar would have to be adapted. I think that is not an easy task.

That's understandable, thanks for considering.