[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rethinking @def*
From: |
Gavin Smith |
Subject: |
Re: rethinking @def* |
Date: |
Tue, 26 Jul 2022 14:48:39 +0100 |
On Tue, Jul 26, 2022 at 03:24:34PM +0200, Patrice Dumas wrote:
> > > * for the other @-commands, the argument is considered to be
> > > metasyntactic variable (in code as per rule 1)).
> > >
> >
> > @var should used to wrap function arguments or parameters. This is a more
> > straightforward definition than whatever "metasyntactic variables"
> > are. @var can be used for metasyntactic variables too, if they occur
> > elsewhere outside the context of a @def* line.
> >
> > I'm not sure what you mean by the "other @-commands"; is it just @var or
> > are there other commands you had in mind?
>
> Actually , what I meant was
> * for the other @def* @-commands, the argument is considered to be
> metasyntactic variable (in code as per rule 1)).
>
> If I understand you correctly, but I may be misinterpreting, you would
> propose something even simpler and somewhat less backward incompatible,
> that there is no semantics other than being in code for all the @def*
> 'argument', such that @var{} would need to be explicitly set. So for
> example
>
> @defspec foobar (var [from to [inc]]) body@dots{}
> would need to be rewritten as
> @defspec foobar (@var{var} [@var{from} @var{too} [@var{inc}]]) @var{body}
> @dots{}
That's what I'd thought, but on checking it I am not so sure. At present
the first line is output in a slanted font. Changing it to be like @code
by default would lead it to output in a fixed width font, which is not
necessarily an improvement: we lose the slant (bad) but gain the fixed
width (good). What would be better is to have both the slant and fixed width
by default (maybe that's what you were proposing in the first place).
We'd have to check that we could do this easily as the separator characters
like ( [ ] ) on the definition line shouldn't themselves be slanted. Current
texinfo.tex doesn't slant those, so perhaps there isn't a problem here.
>
> But I may be misinterpreting what you meant.
>
> > > could be rewritten as:
> > >
> > > @defspec foobar @r{(}var [from to [inc]]@r{)} body@dots{}
> > >
> > > The parentheses will be non slanted, roman font, the remaining
> > > will be slanted and typewriter, including [].
> >
> > What would be the point of having Roman font parentheses, as the parentheses
> > are part of the syntax of the computer language?
>
> No point, I thought that it was what Texinfo TeX does, but maybe the
> parentheses are typewriter.
You are right there, but a fixed-width font would make more sense.
- Re: rethinking @def*, (continued)
Re: rethinking @def*, pertusus, 2022/07/26
- Re: rethinking @def*, Eli Zaretskii, 2022/07/26
- Re: rethinking @def*, Werner LEMBERG, 2022/07/26
- Re: rethinking @def*, pertusus, 2022/07/26
- Re: rethinking @def*, Werner LEMBERG, 2022/07/26
- Re: rethinking @def*, pertusus, 2022/07/27
Re: rethinking @def*, Gavin Smith, 2022/07/26