Hot answers tagged

7

You can use the /.list handler. \tikzset{myrowstyle/.style = {row #1/.style={nodes={fill=gray!10}}} and later in the picture you can then use myrowstyle/.list={1,...,10} or any other argument list.


4

This answer demonstrates how to modify your MWE to use the suggestions provided in comments and other answers. The reason that Qrrbrbirlbel's suggestion seemed not to work is probably that you didn't include the code to which the comment directed you. It is difficult to say for sure because your reported failure concerned a code fragment and not a complete ...


3

Here's expl3 using a \seq variable and splitting the content of the \commandkey{im} macro into sequence items, then looping over those items using a map function, say \loopfunction Basically any loop macro that can split the comma separated value list would do of course. From the documentation of keycommand it's apparent, that this packages uses etoolbox, ...


2

The following code defines and illustrates a macro \images{}. \images takes one mandatory argument which should be a key-value list of options. The minimum sensible list sets the key images to a list of one or more image files. I've defined this as a macro but it could be easily defined using \NewDocumentEnvironment{images}{m} ... instead, or used within ...



Only top voted, non community-wiki answers of a minimum length are eligible