help-texinfo
[Top][All Lists]
Advanced

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

Re: [help-texinfo] Determine if an argument was supplied to a macro


From: Gavin Smith
Subject: Re: [help-texinfo] Determine if an argument was supplied to a macro
Date: Sun, 29 Sep 2019 10:33:11 +0100

On Sun, Sep 29, 2019 at 2:08 AM Pantxo Diribarne
<address@hidden> wrote:
> * Here is the simple version of the macro:
>
> @macro opxref{arg1, arg2, arg3, arg4, arg5}
>
> @ifnotplaintext
> @pxref{\arg1\, \arg2\, \arg3\, \arg4\, \arg5\}
> @end ifnotplaintext
> @ifplaintext
> see \arg3\
> @end ifplaintext
>
> @end macro
>
> * And here is how it ends up being called in GNU Octave's manual:
>
> @anchor{XREFcsvread}
> @deftypefn  {} {@var{x} =} csvread (@var{filename})
> ...
> Any optional arguments are passed directly to @code{dlmread}
> (@opxref{XREFdlmread,,dlmread}).
> @xseealso{@ref{XREFdlmread,,dlmread}, @ref{XREFtextscan,,textscan}, 
> @ref{XREFcsvwrite,,csvwrite}, @ref{XREFdlmwrite,,dlmwrite}}
> @end deftypefn

It works if you provide arguments for all of the macro's parameters,
with @opxref{XREFdlmread,,dlmread,,}.

I checked with an old version of Texinfo (4.13) and this was still the
case then: with TeX, you need to provide all the arguments, even
trailing ones which are empty.



reply via email to

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