On Sat, Oct 03, 2020 at 12:18:41PM +0100, Gavin Smith wrote:
> I found that starting a new line, like
>
> @uSubSec{@value{SecLb},
> Probabilistic Characterisation of Microseismicity}
>
> worked with texi2any, but not with TeX.
Works with TeX now with commit 73f61c705.
> As usual with macro handling in Texinfo, this is not easy to fix, and
> any fix risks breaking something else. There is an @xeatspaces macro
> being used around macro arguments that is not being expanded until
> quite late on, which might be better expanded earlier with a given
> value of active newline, but it would be very complicated if not
> impossible to expand this earlier without fully expanding the macro
> arguments at the same time (probably some complex arrangement of
> \expandafter's which would differ depending on the number of macro
> arguments, or repeatedly reading the argument text as a macro argument
> and moving expanded arguments one by one to the end). Even if it's
> possible it's probably better not to try as it would be error-prone
> and hard to understand after the fact.
I didn't follow this approach but I think it is possible. The definition
of \parsemargdef could build up a definition like
\eatspaces{#1},\eatspaces{#2}... as it builds up \paramlist. This would
have to be completely expanded though at some point before \scantokens
runs... so this idea would need more work.
The code for @macro's with 10 or more arguments also looked interesting,
although I've never understood how that code worked (never tested it
either).