On Sat, Jul 25, 2020 at 08:03:58PM +0200, Christopher Dimech wrote: > > I have written a macro for texinfo > > @macro GPage{titl, titlCn, subTitl, subTitlCn, date} > ... > @end macro > > > Call to macro > @GPage{, 1 @ User Freedom, Sub, Test, Friday 24 July 2020} > > Is there a way to determine whether an argument has been passed or not? > Currently I am checking using set variables > > @macro GPage{titl, titlCn, subTitl, subTitlCn, date} > > @title @sc{\titl\ @* \titlCn\} > @inlineifset{GSt, @subtitle \subTitl\} > @inlineifset{GToday , @subtitle \subTitlCn\ @today{}} > @inlineifclear{GToday , @subtitle \subTitlCn\ \date\} > > @end macro
I don't see how your macro works. How are GSt etc. set? I don't think there is a good way to do this. You are better off using several macros with different parameters, and not having any empty arguments. Another option is not using macros at all.