Le 29/09/2019 à 11:33, Gavin Smith a écrit :
On Sun, Sep 29, 2019 at 2:08 AM Pantxo Diribarne
<[email protected]> 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.
Indeed this works. I'll stick to preprocessing though and automatically
replace @*ref{...} by some static string. This will save me from having
to add trailing arguments to all doc strings in Octave source. This will
also avoid the limitation of not having a way to pass @-command
arguments if necessary.
Many thanks.
Pantxo