[Top][All Lists]

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

protecting punctuation in nodes

From: Patrice Dumas
Subject: protecting punctuation in nodes
Date: Fri, 23 Dec 2011 01:15:48 +0100
User-agent: Mutt/


Not having all characters available in node is a pain when doing
automatic nodes and menu entry generation, and also when converting
from other formats to texinfo (as in pod2texi).  So I'd propose to handle
that TODO item first after the release.

This requires a coordinated change in the info reader and texi2any,
although we can work in parallel.

There are 2 distinct, yet linked, contexts in which some characters
beside @ } , and { may have a special meaning: in Texinfo code and in
Info output.  Protecting , in Texinfo code may be done through the
use of @comma{}.  In most cases, protecting other characters may be
achieved through the use of a @-command, like @asis, at least in tp.
For instance, the following code is correct, and only the third
entry is a menu entry for a node whose name is node^I,. (^I is a tab):

@node Top

@asis{*} menu entry::
* address@hidden::}
* address@hidden:}node.
* name:address@hidden,. }
@end menu

@address@hidden,. }, name:}.

@node address@hidden,. }

Now, in the resulting Info file all the menu lines are menu entries
although only the third one is really a menu entry, and the node
direction to the node with a comma in its name is incorrect.  I don't know
exactly when @*ref will become wrong because there are punctuation signs in
the node name, but I am certain there are such cases.

There are really 2 distinct issues here, in fact

1. some menu lines becomes menu entry node lines in Info although they
   are not menu entry node lines.  This is not such a serious issue,
   because it necessarily involves a * at the beginning of a line in a
   menu, which should be pretty rare (especially in automatically 
   generated texinfo).

2. node name or cross-ref name have punctuations signs in them that
   have a meaning in Info, namely
     , in node directions
     : in cross-ref names
     :: tab , the two characters period and space in node names for
      different menu entry styles and similarly in cross-refs

I think that 2 is more serious than 1, but maybe we would like to handle
both cases at once?  For case 2 Karl proposed quoting with SPACE BACKSPACE.
My guess is that space means \x{00} as it is already used for indices and 
images delimitations.

I guess that we could simply quote, with the point that there is a need to 
quote separately node name and cross-ref name.  Indeed, be it node lines,
menu entries or xrefs, all are in specific setups (in node line, after * at
theline beginning in menu, after * note).

Does it look good?

Any idea on the other issue, that is for a line in menu beginning with *
and with what looks like a node, avoid that line to be considered as
a menu entry line in Info?


reply via email to

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