hi list,

skip to the many %%% if you just want to help me ;)

i need to make a macro which consists of ten optional arguments. it wouldn’t be too ugly to require to write the following to use it, since it outputs a 3×3 matrix with an adjacent tenth item, but tex can’t handle ten arguments afaik.


syntax idea:
empty:
\bigcrafting%
{}{}{}%
{}{}{}{}%
{}{}{}%

partly filled:
\bigcrafting%
{}{}{}%
{planks}{planks}{}{workbench}%
{planks}{planks}{}%

how it should look:
CraftingWorkbenchIO.png

ok, since using empty “required” arguments aren’t elegent, either, i wanted to get into key=value sets, but ran into the next problem:

i wanted to instead define bigcrafting to work like this:
\bigcrafting
  [21=planks, 22=planks,
   31=planks, 32=planks]
  [workbench]

but \getparameters can’t handle numerical values.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

and while points of the compass like NE, S and C (for center) would work, it sprang to my mind that a parser written in lua, whitch uses lua’s internal hashtables would meet my furter needs better (like looping over the matrix and testing if parameters are set) can somebody tell my how to access (and test if they exist) the arguments (#1,[#2],…) of a command definition in lua?