help-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macro Determining of Arguments


From: Christopher Dimech
Subject: Re: Macro Determining of Arguments
Date: Sat, 25 Jul 2020 22:22:29 +0200

I use @set

Example:

@titlepage
@set GSt
@GPage{titl, titlCn, subTitl, subTitlCn, date}
@end titlepage

---------------------
Christopher Dimech
Chief Administrator - Naiad Informatics - GNU Project (Geocomputation)
- Geophysical Simulation
- Geological Subsurface Mapping
- Disaster Preparedness and Mitigation
- Natural Resource Exploration and Production
- Free Software Advocacy


> Sent: Saturday, July 25, 2020 at 8:06 PM
> From: "Gavin Smith" <gavinsmith0123@gmail.com>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "help-texinfo gnu" <help-texinfo@gnu.org>
> Subject: Re: Macro Determining of Arguments
>
> 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.
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]