bug-texinfo
[Top][All Lists]
Advanced

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

@value, macro and other expansion questions


From: Patrice Dumas
Subject: @value, macro and other expansion questions
Date: Wed, 20 Aug 2008 16:52:25 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello,

I am a bit unsure about @value, @-commands defined by @macro, other
@-commands and --,---,``,'' expansion in @-commands arguments. This is 
a texinfo language issue (the different implementations are indeed
doing different things, and are certainly buggy, so it is in my opinion
better to abstract from these). 



First 2 definitions:

I call a 'code_style' expansion a case where --,---,``,'' are kept as 
is and not expanded into other characters for display (like ‐ in 
html for example, or --- transformed into -- for info). (They could 
still be expanded for synctactic correctness, but it is another issue, 
like & becoming & in html in any case).

I call line @-commands @-commands that aren't @-commands that shouldn't
appear on @-commands line arguments. For example these are not line 
@-commands: @example, @table, @footnote, @printindex, @defcodeindex, 
@insertcopying, @*index, @caption, @content, @anchor, @settitle. 
Typically line @-commands are @-commands that can appear on 
a section header @-command, like @chapter, on @cindex, and @settitle lines.
line @-commands include: accent @-commands, style @-commands 
(@code, @i, @emph), @@, @:, @., @TeX, @expansion and others. 
Things like @image, @email, @uref, @*ref, @inforef, @acronym, @abbr, 
@titlefont are not easily put in one category or the other, here they are 
considered as line @-commands for simplicity, even though some time 
they cannot really appear in some places.



Then the questions/specifications:

In most cases (section names for example) there is no doubt, however there 
are cases where it is still unclear to me. I have put below the rules I 
think that are right, please tell if you disagree, and also please 
complete the missing points

1 in comments, @c, @comment, there should be no expansion of any kind

2 in @-commands taking a filename as argument on the line, namely
  @setfilename, @include and @verbatiminclude
  my personal opinion is that the 
   
    @value, commands defined by @macro and other @-commands should be 
    expanded, in code_style. 

  It is certainly debatable, and not what is done currently.

3 in @-commands with braces, with args being filenames or url, like 
  @email first arg, @image first and last (extension) arg, @uref first
  arg, @indicateurl, and also in @-commands formatting code, that is
  @code, @command, @env, @file, @kbd, @option, @samp:

    @value, commands defined by @macro and other @-commands should be 
    expanded, in code_style.

4 in @-comands taking arguments on the line, and that should never need
  to have regular @-commands, like like @sp, @need, @defcodeindex, 
  @frenchspacing, 
  @allowcodebreaks, @setchapternewpage, @documentencoding, @clikstyle,
  @documentlanguage, @headings, @*headingmarks
  and other similar @-commands I think that the following should be 
  right:

    expand @values and @-command defined by @macros. The other @-commands
    may or may not be expanded.

5 in @-comands taking arguments on the line, and that should accept 
  regular @-commands (though in general only line @-commands)
  @settitle, @author, other similar @-commands, @everyheadings and 
  other @*headings commands, @*index, and, in my opinion
  @node and all the @section-like @-commands and @direcategory, I think 
  that the following should be right:
  
    expand @values and @-command defined by @macros. The other @-commands 
    are expanded when the implementation needs them, maybe in specific 
    contexts (like expansion in @copying for comments) and there should 
    be only line @-commands.

    I think that the @node should have a code_style expansion. Also the
    @*index set with @syncodeindex @defcodeindex and the default index
    commands except cindex. The other could be expanded in code_style
    if the implementation determines that it is relevant (for example when 
    appearing within in @example), but should in general not be expanded 
    in code_style.

6 I think that everything on a @def* line 

    should have @values and @-command defined by @macros expanded, and, 
    in my opinion, be in code_style. There should only be line @-commands.
    It is not completly clear to me if text within style @-commands that
    are not in code_style, like @var, should be in code_style. I think
    so, but it is definitely debatable.

7 in @*ref, if the nodes are in code_style, first arg should also be
  in code_style, fourth arg (INFO-FILE-NAME) should follow the same rule 
  than 3, 3rd arg of @inforef should also follow the same rule than 3

8 @anchor arg should be in code_style if the nodes are in code_style

9 I don't know if @key should be in code_style, but in most cases it
  appears in @kbd and should 'inherit' the code_style.

11 in @verb there should be no expansion at all.

--
Pat




reply via email to

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