bug-texinfo
[Top][All Lists]
Advanced

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

Which line @-commands may occur other than at the beginning of a line?


From: Gavin Smith
Subject: Which line @-commands may occur other than at the beginning of a line?
Date: Sun, 5 Feb 2023 20:47:02 +0000

With looking at context changes in the parser at the end of a line,
I've come to the question of nested line commands.

In the current code, there are is a list of commands that do not
have to occur at the beginning of a line:

  # verbatiminclude is not said to begin at the beginning of the line
  # in the manual
  foreach my $not_begin_line_command ('comment', 'c', 'sp', 'columnfractions',
                                   'item', 'verbatiminclude',
                                   'set', 'clear', 'vskip', 'subentry') {
    delete $begin_line_commands{$not_begin_line_command};
  }

I really think that line commands not occuring at the beginning of a
line (and therefore nested line commands) should be a rare exception,
not least because it complicates parsing in TeX (run texinfo.tex with
tracing and you will see a lot of stripping off @c and @comment from
line commands, because this is not something that is done naturally
in TeX).

In the above list, I see no need for any of:
@sp, @verbatiminclude, @set, @clear and @vskip.

Would anybody have any thoughts on removing these exceptions?  As far
as I know, it has never been encouraged to use any of these other
than at the beginning of a line.

I did search mailing list archives but haven't found anything.

@item could also be removed, although the situation with @item is complicated
as the syntax differs depending on whether it is in a @table command or not.

The others (@columnfractions and @subentry) may be reinterpretable as
"nobrace" commands (like @tab) although this would depend whether the
details of implementation could be worked out.

Even if they can't all be removed as exceptions (and @c and @comment will
have to stay), I feel it will still make working on the code easier to
remove some of these exceptions.



reply via email to

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