
10 Jan
2025
10 Jan
'25
11:55 a.m.
Hi, I just recognized that I’m not sure how to define a macro with optional and mandatory arguments the best way. E.g. (oldfashioned) \def\doMyMacro[#1]#2% {Do something ... \iffirstargument #1\fi #2} \def\MyMacro% {\dosingleargument\doMyMacro} Is this still the way to do it? Does it also work with \define? I have more questions like that: From Wolfgang’s presentation (article in progress…) I know all the cool stuff for modules (namespaces, setup helpers…), I also know the Lua way of interface.implement, but how to combine those? When should I use brackets or other characters in a definition, when not? Which docs should I read? Hraban