Closed fredrikekre closed 3 years ago
I am confused: it looks to me that this does add support for raw"..."
as a key. Isn't that the intention?
Practically, I don't think this came up before since one usually doesn't need \
and $
in pgfplots keys, so plain vanilla strings are fine. Is there an example where you needed this?
I am confused: it looks to me that this does add support for raw"..." as a key. Isn't that the intention?
I mean that it doesn't add support for @pgf { raw"hello" = "world" }
, only @pgf { raw"hello = world" }
.
Practically, I don't think this came up before since one usually doesn't need
\
and$
in pgfplots keys, so plain vanilla strings are fine. Is there an example where you needed this?
Right, what triggered this PR was actually a misread from me where I thought someting should go in options []
but should be outside. However, I sometiemes find it convenient to just copy-paste stuff and have it work. A trivial example would be something like @pgf {raw"xlabel=$x$"}
. Obviously this could be written as @pgf {xlabel=raw"$x$"}
, but for multiword keys it would be @pgf {"two word key" = raw"$x$"}
and then we might as well just support @pgf {raw"two word key = $x$"}
and you don't have to worry about splitting the entry yourself.
Since we pass through String
literals I think it makes sense to pass through raw
strings as well.
This doesn't add support for
raw"..."
when used as a key, e.g.@pgf {raw"a" = b}
, but I couldn't not find any examples of keys where you might want that in the example gallery. However, it is a pretty small change to support that too, e.g.Thoughts?